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 /krita/ui/kis_layerbox.cc | |
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 'krita/ui/kis_layerbox.cc')
-rw-r--r-- | krita/ui/kis_layerbox.cc | 264 |
1 files changed, 132 insertions, 132 deletions
diff --git a/krita/ui/kis_layerbox.cc b/krita/ui/kis_layerbox.cc index ef30e331..37dbd27e 100644 --- a/krita/ui/kis_layerbox.cc +++ b/krita/ui/kis_layerbox.cc @@ -19,22 +19,22 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qbutton.h> -#include <qtoolbutton.h> -#include <qbrush.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qhbox.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> -#include <qstyle.h> -#include <qtooltip.h> -#include <qwidget.h> -#include <qcombobox.h> -#include <qcheckbox.h> +#include <tqbutton.h> +#include <tqtoolbutton.h> +#include <tqbrush.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqhbox.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> +#include <tqstyle.h> +#include <tqtooltip.h> +#include <tqwidget.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> #include <kdebug.h> #include <kglobal.h> @@ -61,26 +61,26 @@ #include "kis_layerbox.h" -KisLayerBox::KisLayerBox(KisCanvasSubject *subject, QWidget *parent, const char *name) - : super(parent, name), m_image(0) +KisLayerBox::KisLayerBox(KisCanvasSubject *subject, TQWidget *tqparent, const char *name) + : super(tqparent, name), m_image(0) { - QVBoxLayout *vbox = new QVBoxLayout(this); + TQVBoxLayout *vbox = new TQVBoxLayout(this); vbox->setAutoAdd(true); m_lst = new WdgLayerBox(this); - setMinimumSize(m_lst->minimumSizeHint()); + setMinimumSize(m_lst->tqminimumSizeHint()); - QToolTip::add(m_lst->bnAdd, i18n("Create new layer")); + TQToolTip::add(m_lst->bnAdd, i18n("Create new layer")); - QToolTip::add(m_lst->bnDelete, i18n("Remove current layer")); + TQToolTip::add(m_lst->bnDelete, i18n("Remove current layer")); - QToolTip::add(m_lst->bnRaise, i18n("Raise current layer")); + TQToolTip::add(m_lst->bnRaise, i18n("Raise current layer")); m_lst->bnRaise->setEnabled(false); m_lst->bnLower->setEnabled(false); - QToolTip::add(m_lst->bnLower, i18n("Lower current layer")); + TQToolTip::add(m_lst->bnLower, i18n("Lower current layer")); - QToolTip::add(m_lst->bnProperties, i18n("Properties for layer")); + TQToolTip::add(m_lst->bnProperties, i18n("Properties for layer")); KIconLoader il( "krita" ); @@ -95,27 +95,27 @@ KisLayerBox::KisLayerBox(KisCanvasSubject *subject, QWidget *parent, const char loadPixmap("unlocked.png", il, KIcon::SizeSmallMedium)); - connect(list()->contextMenu(), SIGNAL(aboutToShow()), SLOT(slotAboutToShow())); - connect(list(), SIGNAL(activated(LayerItem*)), - SLOT(slotLayerActivated(LayerItem*))); - connect(list(), SIGNAL(displayNameChanged(LayerItem*, const QString&)), - SLOT(slotLayerDisplayNameChanged(LayerItem*, const QString&))); - connect(list(), SIGNAL(propertyChanged(LayerItem*, const QString&, bool)), - SLOT(slotLayerPropertyChanged(LayerItem*, const QString&, bool))); - connect(list(), SIGNAL(layerMoved(LayerItem*, LayerItem*, LayerItem*)), - SLOT(slotLayerMoved(LayerItem*, LayerItem*, LayerItem*))); - connect(list(), SIGNAL(requestNewLayer(LayerItem*, LayerItem*)), - SLOT(slotRequestNewLayer(LayerItem*, LayerItem*))); - connect(list(), SIGNAL(requestNewFolder(LayerItem*, LayerItem*)), - SLOT(slotRequestNewFolder(LayerItem*, LayerItem*))); - connect(list(), SIGNAL(requestNewAdjustmentLayer(LayerItem*, LayerItem*)), - SLOT(slotRequestNewAdjustmentLayer(LayerItem*, LayerItem*))); - connect(list(), SIGNAL(requestNewObjectLayer(LayerItem*, LayerItem*, const KoDocumentEntry&)), - SLOT(slotRequestNewObjectLayer(LayerItem*, LayerItem*, const KoDocumentEntry&))); - connect(list(), SIGNAL(requestRemoveLayer(LayerItem*)), - SLOT(slotRequestRemoveLayer(LayerItem*))); - connect(list(), SIGNAL(requestLayerProperties(LayerItem*)), - SLOT(slotRequestLayerProperties(LayerItem*))); + connect(list()->contextMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotAboutToShow())); + connect(list(), TQT_SIGNAL(activated(LayerItem*)), + TQT_SLOT(slotLayerActivated(LayerItem*))); + connect(list(), TQT_SIGNAL(displayNameChanged(LayerItem*, const TQString&)), + TQT_SLOT(slotLayerDisplayNameChanged(LayerItem*, const TQString&))); + connect(list(), TQT_SIGNAL(propertyChanged(LayerItem*, const TQString&, bool)), + TQT_SLOT(slotLayerPropertyChanged(LayerItem*, const TQString&, bool))); + connect(list(), TQT_SIGNAL(layerMoved(LayerItem*, LayerItem*, LayerItem*)), + TQT_SLOT(slotLayerMoved(LayerItem*, LayerItem*, LayerItem*))); + connect(list(), TQT_SIGNAL(requestNewLayer(LayerItem*, LayerItem*)), + TQT_SLOT(slotRequestNewLayer(LayerItem*, LayerItem*))); + connect(list(), TQT_SIGNAL(requestNewFolder(LayerItem*, LayerItem*)), + TQT_SLOT(slotRequestNewFolder(LayerItem*, LayerItem*))); + connect(list(), TQT_SIGNAL(requestNewAdjustmentLayer(LayerItem*, LayerItem*)), + TQT_SLOT(slotRequestNewAdjustmentLayer(LayerItem*, LayerItem*))); + connect(list(), TQT_SIGNAL(requestNewObjectLayer(LayerItem*, LayerItem*, const KoDocumentEntry&)), + TQT_SLOT(slotRequestNewObjectLayer(LayerItem*, LayerItem*, const KoDocumentEntry&))); + connect(list(), TQT_SIGNAL(requestRemoveLayer(LayerItem*)), + TQT_SLOT(slotRequestRemoveLayer(LayerItem*))); + connect(list(), TQT_SIGNAL(requestLayerProperties(LayerItem*)), + TQT_SLOT(slotRequestLayerProperties(LayerItem*))); m_newLayerMenu = new KPopupMenu(this); m_lst->bnAdd->setPopup(m_newLayerMenu); @@ -125,22 +125,22 @@ KisLayerBox::KisLayerBox(KisCanvasSubject *subject, QWidget *parent, const char m_newLayerMenu->insertItem( SmallIconSet( "tool_filter" ), i18n( "New &Adjustment Layer..." ), ADJUSTMENT_LAYER ); m_partLayerAction = new KoPartSelectAction( i18n( "New &Object Layer" ), "gear", this ); m_partLayerAction->plug( m_newLayerMenu ); - connect(m_partLayerAction, SIGNAL(activated()), this, SLOT(slotAddMenuActivated())); - connect(m_newLayerMenu, SIGNAL(activated(int)), this, SLOT(slotAddMenuActivated(int))); + connect(m_partLayerAction, TQT_SIGNAL(activated()), this, TQT_SLOT(slotAddMenuActivated())); + connect(m_newLayerMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotAddMenuActivated(int))); - connect(m_lst->bnDelete, SIGNAL(clicked()), SLOT(slotRmClicked())); - connect(m_lst->bnRaise, SIGNAL(clicked()), SLOT(slotRaiseClicked())); - connect(m_lst->bnLower, SIGNAL(clicked()), SLOT(slotLowerClicked())); - connect(m_lst->bnProperties, SIGNAL(clicked()), SLOT(slotPropertiesClicked())); - connect(m_lst->intOpacity, SIGNAL(valueChanged(int, bool)), SIGNAL(sigOpacityChanged(int, bool))); - connect(m_lst->intOpacity, SIGNAL(finishedChanging(int, int)), SIGNAL(sigOpacityFinishedChanging(int, int))); - connect(m_lst->cmbComposite, SIGNAL(activated(const KisCompositeOp&)), SIGNAL(sigItemComposite(const KisCompositeOp&))); + connect(m_lst->bnDelete, TQT_SIGNAL(clicked()), TQT_SLOT(slotRmClicked())); + connect(m_lst->bnRaise, TQT_SIGNAL(clicked()), TQT_SLOT(slotRaiseClicked())); + connect(m_lst->bnLower, TQT_SIGNAL(clicked()), TQT_SLOT(slotLowerClicked())); + connect(m_lst->bnProperties, TQT_SIGNAL(clicked()), TQT_SLOT(slotPropertiesClicked())); + connect(m_lst->intOpacity, TQT_SIGNAL(valueChanged(int, bool)), TQT_SIGNAL(sigOpacityChanged(int, bool))); + connect(m_lst->intOpacity, TQT_SIGNAL(finishedChanging(int, int)), TQT_SIGNAL(sigOpacityFinishedChanging(int, int))); + connect(m_lst->cmbComposite, TQT_SIGNAL(activated(const KisCompositeOp&)), TQT_SIGNAL(sigItemComposite(const KisCompositeOp&))); Q_ASSERT(subject->document() != 0); if (subject->document()) { - connect(subject->document(), SIGNAL(sigCommandExecuted()), SLOT(updateThumbnails())); + connect(subject->document(), TQT_SIGNAL(sigCommandExecuted()), TQT_SLOT(updateThumbnails())); } } @@ -165,16 +165,16 @@ void KisLayerBox::setImage(KisImageSP img) if (img) { - connect(img, SIGNAL(sigLayerActivated(KisLayerSP)), this, SLOT(slotLayerActivated(KisLayerSP))); - connect(img, SIGNAL(sigLayerAdded(KisLayerSP)), this, SLOT(slotLayerAdded(KisLayerSP))); - connect(img, SIGNAL(sigLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), - this, SLOT(slotLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP))); - connect(img, SIGNAL(sigLayerPropertiesChanged(KisLayerSP)), - this, SLOT(slotLayerPropertiesChanged(KisLayerSP))); - connect(img, SIGNAL(sigLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), - this, SLOT(slotLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP))); - connect(img, SIGNAL(sigLayersChanged(KisGroupLayerSP)), this, SLOT(slotLayersChanged(KisGroupLayerSP))); - connect(img, SIGNAL(sigLayerUpdated(KisLayerSP, QRect)), this, SLOT(slotLayerUpdated(KisLayerSP, QRect))); + connect(img, TQT_SIGNAL(sigLayerActivated(KisLayerSP)), this, TQT_SLOT(slotLayerActivated(KisLayerSP))); + connect(img, TQT_SIGNAL(sigLayerAdded(KisLayerSP)), this, TQT_SLOT(slotLayerAdded(KisLayerSP))); + connect(img, TQT_SIGNAL(sigLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(slotLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP))); + connect(img, TQT_SIGNAL(sigLayerPropertiesChanged(KisLayerSP)), + this, TQT_SLOT(slotLayerPropertiesChanged(KisLayerSP))); + connect(img, TQT_SIGNAL(sigLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(slotLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP))); + connect(img, TQT_SIGNAL(sigLayersChanged(KisGroupLayerSP)), this, TQT_SLOT(slotLayersChanged(KisGroupLayerSP))); + connect(img, TQT_SIGNAL(sigLayerUpdated(KisLayerSP, TQRect)), this, TQT_SLOT(slotLayerUpdated(KisLayerSP, TQRect))); slotLayersChanged(img->rootLayer()); updateThumbnails(); } @@ -200,7 +200,7 @@ void KisLayerBox::slotLayerAdded(KisLayerSP layer) vKisLayerSP layersAdded; - if (layer->parent() == m_image->rootLayer()) + if (layer->tqparent() == m_image->rootLayer()) { KisPopulateVisitor visitor(list()); layer->accept(visitor); @@ -208,7 +208,7 @@ void KisLayerBox::slotLayerAdded(KisLayerSP layer) } else { - KisPopulateVisitor visitor(static_cast<KisLayerItem*>(list()->layer(layer->parent()->id()))); + KisPopulateVisitor visitor(static_cast<KisLayerItem*>(list()->layer(layer->tqparent()->id()))); layer->accept(visitor); layersAdded = visitor.layersAdded(); } @@ -229,17 +229,17 @@ void KisLayerBox::slotLayerRemoved(KisLayerSP layer, KisGroupLayerSP wasParent, void KisLayerBox::slotLayerMoved(KisLayerSP layer, KisGroupLayerSP wasParent, KisLayerSP) { - int parentID = layer->parent()->id(); - if (layer->parent() == m_image->rootLayer()) - parentID = -1; + int tqparentID = layer->tqparent()->id(); + if (layer->tqparent() == m_image->rootLayer()) + tqparentID = -1; int siblingID = -1; if (layer->prevSibling()) siblingID = layer->prevSibling()->id(); - list()->moveLayer(layer->id(), parentID, siblingID); + list()->moveLayer(layer->id(), tqparentID, siblingID); - markModified(layer->parent()); + markModified(layer->tqparent()); markModified(wasParent); updateUI(); } @@ -262,12 +262,12 @@ void KisLayerBox::slotLayersChanged(KisGroupLayerSP rootLayer) for (KisLayerSP layer = rootLayer->firstChild(); layer; layer = layer->nextSibling()) layer->accept(visitor); m_modified.clear(); - for (QListViewItemIterator it(list()->lastItem()); *it; --it) + for (TQListViewItemIterator it(list()->lastItem()); *it; --it) m_modified.append(static_cast<LayerItem*>(*it)->id()); updateUI(); } -void KisLayerBox::slotLayerUpdated(KisLayerSP layer, QRect) +void KisLayerBox::slotLayerUpdated(KisLayerSP layer, TQRect) { markModified(layer); } @@ -281,14 +281,14 @@ void KisLayerBox::slotLayerActivated(LayerItem* item) updateUI(); } -void KisLayerBox::slotLayerDisplayNameChanged(LayerItem* item, const QString& displayName) +void KisLayerBox::slotLayerDisplayNameChanged(LayerItem* item, const TQString& displayName) { if(KisLayerSP layer = m_image->findLayer(item->id())) layer->setName(displayName); updateUI(); } -void KisLayerBox::slotLayerPropertyChanged(LayerItem* item, const QString& name, bool on) +void KisLayerBox::slotLayerPropertyChanged(LayerItem* item, const TQString& name, bool on) { if (KisLayerSP layer = m_image->findLayer(item->id())) { @@ -302,16 +302,16 @@ void KisLayerBox::slotLayerPropertyChanged(LayerItem* item, const QString& name, void KisLayerBox::slotLayerMoved(LayerItem* item, LayerItem*, LayerItem*) { KisLayerSP layer = m_image->findLayer(item->id()); - KisGroupLayerSP parent; - if( item->parent() ) - parent = dynamic_cast<KisGroupLayer*>(m_image->findLayer(item->parent()->id()).data()); - if( !parent ) - parent = m_image->rootLayer(); + KisGroupLayerSP tqparent; + if( item->tqparent() ) + tqparent = dynamic_cast<KisGroupLayer*>(m_image->findLayer(item->tqparent()->id()).data()); + if( !tqparent ) + tqparent = m_image->rootLayer(); KisLayerSP above = 0; if (item->nextSibling()) above = m_image->findLayer(item->nextSibling()->id()); if (layer) - m_image->moveLayer(layer, parent.data(), above); + m_image->moveLayer(layer, tqparent.data(), above); updateUI(); } @@ -320,7 +320,7 @@ void KisLayerBox::slotRequestNewLayer(LayerItem* p, LayerItem* after) KisLayer* l = m_image->rootLayer().data(); if (p) l = m_image->findLayer(p->id()).data(); - KisGroupLayerSP parent = dynamic_cast<KisGroupLayer*>(l); + KisGroupLayerSP tqparent = dynamic_cast<KisGroupLayer*>(l); KisLayerSP above = 0; if (after && after->nextSibling()) @@ -328,10 +328,10 @@ void KisLayerBox::slotRequestNewLayer(LayerItem* p, LayerItem* after) else if (after) above = 0; else if (p && p->firstChild()) - above = parent->firstChild(); + above = tqparent->firstChild(); else if (!p && m_image->rootLayer()->childCount()) above = m_image->rootLayer()->firstChild(); - emit sigRequestLayer(parent, above); + emit sigRequestLayer(tqparent, above); } void KisLayerBox::slotRequestNewFolder(LayerItem* p, LayerItem* after) @@ -339,7 +339,7 @@ void KisLayerBox::slotRequestNewFolder(LayerItem* p, LayerItem* after) KisLayer* l = m_image->rootLayer().data(); //FIXME I hate copy-pasting like this. if (p) l = m_image->findLayer(p->id()).data(); - KisGroupLayerSP parent = dynamic_cast<KisGroupLayer*>(l); + KisGroupLayerSP tqparent = dynamic_cast<KisGroupLayer*>(l); KisLayerSP above = 0; if (after && after->nextSibling()) @@ -347,10 +347,10 @@ void KisLayerBox::slotRequestNewFolder(LayerItem* p, LayerItem* after) else if (after) above = 0; else if (p && p->firstChild()) - above = parent->firstChild(); + above = tqparent->firstChild(); else if (!p && m_image->rootLayer()->childCount()) above = m_image->rootLayer()->firstChild(); - emit sigRequestGroupLayer(parent, above); + emit sigRequestGroupLayer(tqparent, above); } void KisLayerBox::slotRequestNewAdjustmentLayer(LayerItem* p, LayerItem* after) @@ -358,7 +358,7 @@ void KisLayerBox::slotRequestNewAdjustmentLayer(LayerItem* p, LayerItem* after) KisLayer* l = m_image->rootLayer().data(); //FIXME here too. if (p) l = m_image->findLayer(p->id()).data(); - KisGroupLayerSP parent = dynamic_cast<KisGroupLayer*>(l); + KisGroupLayerSP tqparent = dynamic_cast<KisGroupLayer*>(l); KisLayerSP above = 0; if (after && after->nextSibling()) @@ -366,10 +366,10 @@ void KisLayerBox::slotRequestNewAdjustmentLayer(LayerItem* p, LayerItem* after) else if (after) above = 0; else if (p && p->firstChild()) - above = parent->firstChild(); + above = tqparent->firstChild(); else if (!p && m_image->rootLayer()->childCount()) above = m_image->rootLayer()->firstChild(); - emit sigRequestAdjustmentLayer(parent, above); + emit sigRequestAdjustmentLayer(tqparent, above); } void KisLayerBox::slotRequestNewObjectLayer(LayerItem* p, LayerItem* after, const KoDocumentEntry& entry) @@ -377,7 +377,7 @@ void KisLayerBox::slotRequestNewObjectLayer(LayerItem* p, LayerItem* after, cons KisLayer* l = m_image->rootLayer().data(); //FIXME and here. if (p) l = m_image->findLayer(p->id()).data(); - KisGroupLayerSP parent = dynamic_cast<KisGroupLayer*>(l); + KisGroupLayerSP tqparent = dynamic_cast<KisGroupLayer*>(l); KisLayerSP above = 0; if (after && after->nextSibling()) @@ -385,10 +385,10 @@ void KisLayerBox::slotRequestNewObjectLayer(LayerItem* p, LayerItem* after, cons else if (after) above = 0; else if (p && p->firstChild()) - above = parent->firstChild(); + above = tqparent->firstChild(); else if (!p && m_image->rootLayer()->childCount()) above = m_image->rootLayer()->firstChild(); - emit sigRequestPartLayer(parent, above, entry); + emit sigRequestPartLayer(tqparent, above, entry); } void KisLayerBox::slotRequestRemoveLayer(LayerItem* item) @@ -410,7 +410,7 @@ void KisLayerBox::slotRequestLayerProperties(LayerItem* item) void KisLayerBox::updateUI() { m_lst->bnDelete->setEnabled(list()->activeLayer()); - m_lst->bnRaise->setEnabled(list()->activeLayer() && (list()->activeLayer()->prevSibling() || list()->activeLayer()->parent())); + m_lst->bnRaise->setEnabled(list()->activeLayer() && (list()->activeLayer()->prevSibling() || list()->activeLayer()->tqparent())); m_lst->bnLower->setEnabled(list()->activeLayer() && list()->activeLayer()->nextSibling()); m_lst->intOpacity->setEnabled(list()->activeLayer()); m_lst->cmbComposite->setEnabled(list()->activeLayer()); @@ -464,42 +464,42 @@ void KisLayerBox::slotAddMenuActivated(int type) return; KisGroupLayerSP root = m_image->rootLayer(); - KisGroupLayerSP parent; + KisGroupLayerSP tqparent; KisLayerSP above; if (KisLayerSP active = m_image->activeLayer()) { - parent = root; + tqparent = root; above = active; - if (active->parent()) - parent = active->parent(); + if (active->tqparent()) + tqparent = active->tqparent(); } else { - parent = root; + tqparent = root; above = m_image->rootLayer()->firstChild(); } switch (type) { case PAINT_LAYER: - emit sigRequestLayer(parent, above); + emit sigRequestLayer(tqparent, above); break; case GROUP_LAYER: - emit sigRequestGroupLayer(parent, above); + emit sigRequestGroupLayer(tqparent, above); break; case ADJUSTMENT_LAYER: - emit sigRequestAdjustmentLayer(parent, above); + emit sigRequestAdjustmentLayer(tqparent, above); break; case OBJECT_LAYER: - default: //goddamned Qt doesn't emit activated for default-assigned IDs, so this does nothing - emit sigRequestPartLayer(parent, above, m_partLayerAction->documentEntry()); + default: //goddamned TQt doesn't emit activated for default-assigned IDs, so this does nothing + emit sigRequestPartLayer(tqparent, above, m_partLayerAction->documentEntry()); } } void KisLayerBox::slotRmClicked() { - QValueList<int> l = list()->selectedLayerIDs(); - if (l.count() < 2 && list()->activeLayer() && !l.contains(list()->activeLayer()->id())) + TQValueList<int> l = list()->selectedLayerIDs(); + if (l.count() < 2 && list()->activeLayer() && !l.tqcontains(list()->activeLayer()->id())) { l.clear(); l.append(list()->activeLayer()->id()); @@ -514,25 +514,25 @@ void KisLayerBox::slotRmClicked() void KisLayerBox::slotRaiseClicked() { - QValueList<int> l = list()->selectedLayerIDs(); - if (l.count() < 2 && list()->activeLayer() && !l.contains(list()->activeLayer()->id())) + TQValueList<int> l = list()->selectedLayerIDs(); + if (l.count() < 2 && list()->activeLayer() && !l.tqcontains(list()->activeLayer()->id())) { l.clear(); l.append(list()->activeLayer()->id()); } KisLayerSP layer = m_image->findLayer(l.first()); - if( l.count() == 1 && layer == layer->parent()->firstChild() && layer->parent() != m_image->rootLayer()) + if( l.count() == 1 && layer == layer->tqparent()->firstChild() && layer->tqparent() != m_image->rootLayer()) { - if (KisGroupLayerSP grandparent = layer->parent()->parent()) - m_image->moveLayer(layer, grandparent, layer->parent().data()); + if (KisGroupLayerSP grandtqparent = layer->tqparent()->tqparent()) + m_image->moveLayer(layer, grandtqparent, layer->tqparent().data()); } else { for (int i = 0, n = l.count(); i < n; ++i) if (KisLayerSP li = m_image->findLayer(l[i])) if (li->prevSibling()) - m_image->moveLayer(li, li->parent(), li->prevSibling()); + m_image->moveLayer(li, li->tqparent(), li->prevSibling()); } if( !l.isEmpty() ) @@ -541,8 +541,8 @@ void KisLayerBox::slotRaiseClicked() void KisLayerBox::slotLowerClicked() { - QValueList<LayerItem*> l = list()->selectedLayers(); - if (l.count() < 2 && list()->activeLayer() && !l.contains(list()->activeLayer())) + TQValueList<LayerItem*> l = list()->selectedLayers(); + if (l.count() < 2 && list()->activeLayer() && !l.tqcontains(list()->activeLayer())) { l.clear(); l.append(list()->activeLayer()); @@ -551,7 +551,7 @@ void KisLayerBox::slotLowerClicked() for (int i = l.count() - 1; i >= 0; --i) if (LayerItem *layer = l[i]) if (layer->nextSibling()) - list()->moveLayer(layer, layer->parent(), layer->nextSibling()); + list()->moveLayer(layer, layer->tqparent(), layer->nextSibling()); if( !l.isEmpty() ) list()->ensureItemVisible( l.last() ); @@ -588,13 +588,13 @@ void KisLayerBox::setUpdatesAndSignalsEnabled(bool enable) } -QPixmap KisLayerBox::loadPixmap(const QString& filename, const KIconLoader& +TQPixmap KisLayerBox::loadPixmap(const TQString& filename, const KIconLoader& il, int size) { - QPixmap pixmap = il.loadIcon(filename, KIcon::NoGroup, size); + TQPixmap pixmap = il.loadIcon(filename, KIcon::NoGroup, size); if (pixmap.isNull()) - KMessageBox::error(0, i18n("Cannot find %1").arg(filename), + KMessageBox::error(0, i18n("Cannot tqfind %1").tqarg(filename), i18n("Canvas")); return pixmap; @@ -605,14 +605,14 @@ void KisLayerBox::markModified(KisLayer* layer) if( !layer ) return; - QValueList<int> v; + TQValueList<int> v; while (layer && layer != m_image->rootLayer().data()) { v.append(layer->id()); - layer = layer->parent(); + layer = layer->tqparent(); } for (int i = v.count() - 1; i >= 0; --i) - if (!m_modified.contains(v[i])) + if (!m_modified.tqcontains(v[i])) m_modified.append(v[i]); } @@ -624,19 +624,19 @@ void KisLayerBox::printKritaLayers() const root = m_image->rootLayer(); if( !root ) return; - QString s = root->name(); + TQString s = root->name(); if( dynamic_cast<KisGroupLayer*>( root ) ) - s = QString("[%1]").arg( s ); + s = TQString("[%1]").tqarg( s ); if( m_image->activeLayer().data() == root ) s.prepend("*"); - kdDebug() << (QString().fill(' ', indent) + s) << endl; + kdDebug() << (TQString().fill(' ', indent) + s) << endl; for (KisLayer* layer = root->firstChild(); layer; layer = layer->nextSibling()) { indent += 2; root = layer; printKritaLayers(); indent -= 2; - root = layer->parent(); + root = layer->tqparent(); } } @@ -652,23 +652,23 @@ void KisLayerBox::printLayerboxLayers() const root = layer; printLayerboxLayers(); indent -= 2; - root = layer->parent(); + root = layer->tqparent(); } return; } - QString s = root->displayName(); + TQString s = root->displayName(); if( root->isFolder() ) - s = QString("[%1]").arg( s ); + s = TQString("[%1]").tqarg( s ); if( list()->activeLayer() == root ) s.prepend("*"); - kdDebug() << (QString().fill(' ', indent) + s) << endl; + kdDebug() << (TQString().fill(' ', indent) + s) << endl; for (LayerItem* layer = root->firstChild(); layer; layer = layer->nextSibling()) { indent += 2; root = layer; printLayerboxLayers(); indent -= 2; - root = layer->parent(); + root = layer->tqparent(); } } |