diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kivio/kiviopart/ui/kivio_layer_panel.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kivio/kiviopart/ui/kivio_layer_panel.cpp')
-rw-r--r-- | kivio/kiviopart/ui/kivio_layer_panel.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/kivio/kiviopart/ui/kivio_layer_panel.cpp b/kivio/kiviopart/ui/kivio_layer_panel.cpp index 481a5644..92161ba3 100644 --- a/kivio/kiviopart/ui/kivio_layer_panel.cpp +++ b/kivio/kiviopart/ui/kivio_layer_panel.cpp @@ -26,8 +26,8 @@ #include "kivio_command.h" #include "layerlisttooltip.h" -#include <qheader.h> -#include <qlayout.h> +#include <tqheader.h> +#include <tqlayout.h> #include <ktoolbar.h> #include <klocale.h> @@ -35,11 +35,11 @@ #include <kiconloader.h> #include <kinputdialog.h> -KivioLayerItem::KivioLayerItem(QListView* parent, KivioLayer* d, int id) -: QListViewItem(parent), data(d) +KivioLayerItem::KivioLayerItem(TQListView* tqparent, KivioLayer* d, int id) +: TQListViewItem(tqparent), data(d) { - QString ids; - QString space; + TQString ids; + TQString space; ids.setNum(id); space.fill(' ',10-ids.length()); ids.prepend(space); @@ -63,8 +63,8 @@ void KivioLayerItem::update() /*********************************************************/ -KivioLayerPanel::KivioLayerPanel(KivioView* view, QWidget* parent, const char* name) -: KivioLayerPanelBase(parent, name), m_pView(view) +KivioLayerPanel::KivioLayerPanel(KivioView* view, TQWidget* tqparent, const char* name) +: KivioLayerPanelBase(tqparent, name), m_pView(view) { list->header()->hide(); list->addColumn(i18n("View"),15); @@ -75,11 +75,11 @@ KivioLayerPanel::KivioLayerPanel(KivioView* view, QWidget* parent, const char* n list->setSorting(5, false); list->installEventFilter(this); - actNew = new KAction( i18n("New Layer"), BarIcon("layer_add",KivioFactory::global()), 0, this, SLOT(addItem()), this); - actDel = new KAction( i18n("Remove Layer"), BarIcon("layer_remove",KivioFactory::global()), 0, this, SLOT(removeItem()), this); - actRename = new KAction( i18n("Rename Layer"), BarIcon("item_rename",KivioFactory::global()), 0, this, SLOT(renameItem()), this); - actUp = new KAction( i18n("Move Layer Up"), "up", 0, this, SLOT(upItem()), this); - actDown = new KAction( i18n("Move Layer Down"), "down", 0, this, SLOT(downItem()), this); + actNew = new KAction( i18n("New Layer"), BarIcon("layer_add",KivioFactory::global()), 0, TQT_TQOBJECT(this), TQT_SLOT(addItem()), TQT_TQOBJECT(this)); + actDel = new KAction( i18n("Remove Layer"), BarIcon("layer_remove",KivioFactory::global()), 0, TQT_TQOBJECT(this), TQT_SLOT(removeItem()), TQT_TQOBJECT(this)); + actRename = new KAction( i18n("Rename Layer"), BarIcon("item_rename",KivioFactory::global()), 0, TQT_TQOBJECT(this), TQT_SLOT(renameItem()), TQT_TQOBJECT(this)); + actUp = new KAction( i18n("Move Layer Up"), "up", 0, TQT_TQOBJECT(this), TQT_SLOT(upItem()), TQT_TQOBJECT(this)); + actDown = new KAction( i18n("Move Layer Down"), "down", 0, TQT_TQOBJECT(this), TQT_SLOT(downItem()), TQT_TQOBJECT(this)); actNew->plug(bar); actDel->plug(bar); @@ -96,9 +96,9 @@ KivioLayerPanel::~KivioLayerPanel() { } -bool KivioLayerPanel::eventFilter(QObject* o, QEvent* ev) +bool KivioLayerPanel::eventFilter(TQObject* o, TQEvent* ev) { - if (o == list && (ev->type() == QEvent::LayoutHint || ev->type() == QEvent::Resize)) { + if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(list) && (ev->type() == TQEvent::LayoutHint || ev->type() == TQEvent::Resize)) { int s = list->width() - 2*(list->margin() + list->lineWidth()); s -= list->header()->sectionSize(0); s -= list->header()->sectionSize(1); @@ -108,7 +108,7 @@ bool KivioLayerPanel::eventFilter(QObject* o, QEvent* ev) list->triggerUpdate(); } - return QWidget::eventFilter(o, ev); + return TQWidget::eventFilter(o, ev); } void KivioLayerPanel::addItem() @@ -118,7 +118,7 @@ void KivioLayerPanel::addItem() // Set the layer name to something a bit different. This isn't // guaranteed to be unique, but it's better than "Untitled" - layer->setName(i18n("Layer %1").arg(id)); + layer->setName(i18n("Layer %1").tqarg(id)); page->addLayer(layer); page->setCurLayer(layer); @@ -153,10 +153,10 @@ void KivioLayerPanel::renameItem() return; KivioLayer* layer = i->data; - QString oldText = layer->name(); + TQString oldText = layer->name(); bool ok=false; - QString newName = KInputDialog::getText(i18n("Rename Layer"), + TQString newName = KInputDialog::getText(i18n("Rename Layer"), i18n("Layer name:"), oldText, &ok, this); if (ok) { @@ -174,14 +174,14 @@ void KivioLayerPanel::upItem() if (!item) return; - QListViewItem* above = item->itemAbove(); + TQListViewItem* above = item->itemAbove(); if (!above) return; KivioPage* page = m_pView->activePage(); KivioLayer* layer = item->data; - int pos = page->layers()->find(layer); + int pos = page->layers()->tqfind(layer); // It's already the top layer... return if(pos == (static_cast<int>(page->layers()->count()) - 1)) return; @@ -192,7 +192,7 @@ void KivioLayerPanel::upItem() page->layers()->insert(pos + 1, layer); - QString t = above->text(5); + TQString t = above->text(5); above->setText(5,item->text(5)); item->setText(5,t); @@ -210,14 +210,14 @@ void KivioLayerPanel::downItem() if (!item) return; - QListViewItem* below = item->itemBelow(); + TQListViewItem* below = item->itemBelow(); if (!below) return; KivioPage* page = m_pView->activePage(); KivioLayer* layer = item->data; - int pos = page->layers()->find(layer); + int pos = page->layers()->tqfind(layer); // It's already the bottom layer... return if (pos == 0) return; @@ -228,7 +228,7 @@ void KivioLayerPanel::downItem() page->layers()->insert(pos - 1, layer); - QString t = below->text(5); + TQString t = below->text(5); below->setText(5,item->text(5)); item->setText(5,t); @@ -240,7 +240,7 @@ void KivioLayerPanel::downItem() m_pView->doc()->updateView(page); } -void KivioLayerPanel::updateButtons(QListViewItem* i) +void KivioLayerPanel::updateButtons(TQListViewItem* i) { if (!i) { actDel->setEnabled(false); @@ -260,7 +260,7 @@ void KivioLayerPanel::updateButtons(QListViewItem* i) } } -void KivioLayerPanel::itemClicked(QListViewItem* i, const QPoint&, int c) +void KivioLayerPanel::itemClicked(TQListViewItem* i, const TQPoint&, int c) { if(!i) { return; @@ -291,7 +291,7 @@ void KivioLayerPanel::itemClicked(QListViewItem* i, const QPoint&, int c) m_pView->doc()->updateView(m_pView->activePage()); } -void KivioLayerPanel::itemActivated(QListViewItem* i) +void KivioLayerPanel::itemActivated(TQListViewItem* i) { if (!i) return; @@ -320,7 +320,7 @@ void KivioLayerPanel::reset() KivioPage* page = m_pView->activePage(); KivioLayer* layer = page->firstLayer(); - QListViewItem* ci = 0; + TQListViewItem* ci = 0; while (layer) { KivioLayerItem* i = new KivioLayerItem(list, layer, id++); |