diff options
Diffstat (limited to 'krita/core/kis_layer.cc')
-rw-r--r-- | krita/core/kis_layer.cc | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/krita/core/kis_layer.cc b/krita/core/kis_layer.cc index b19a4dcf..cac178e5 100644 --- a/krita/core/kis_layer.cc +++ b/krita/core/kis_layer.cc @@ -18,7 +18,7 @@ */ #include <kdebug.h> -#include <qimage.h> +#include <tqimage.h> #include "kis_debug_areas.h" #include "kis_group_layer.h" @@ -33,7 +33,7 @@ namespace { typedef KNamedCommand super; public: - KisLayerCommand(const QString& name, KisLayerSP layer); + KisLayerCommand(const TQString& name, KisLayerSP layer); virtual ~KisLayerCommand() {} virtual void execute() = 0; @@ -45,7 +45,7 @@ namespace { KisLayerSP m_layer; }; - KisLayerCommand::KisLayerCommand(const QString& name, KisLayerSP layer) : + KisLayerCommand::KisLayerCommand(const TQString& name, KisLayerSP layer) : super(name), m_layer(layer) { } @@ -94,17 +94,17 @@ namespace { typedef KisLayerCommand super; public: - KisLayerOpacityCommand(KisLayerSP layer, Q_UINT8 oldOpacity, Q_UINT8 newOpacity); + KisLayerOpacityCommand(KisLayerSP layer, TQ_UINT8 oldOpacity, TQ_UINT8 newOpacity); virtual void execute(); virtual void unexecute(); private: - Q_UINT8 m_oldOpacity; - Q_UINT8 m_newOpacity; + TQ_UINT8 m_oldOpacity; + TQ_UINT8 m_newOpacity; }; - KisLayerOpacityCommand::KisLayerOpacityCommand(KisLayerSP layer, Q_UINT8 oldOpacity, Q_UINT8 newOpacity) : + KisLayerOpacityCommand::KisLayerOpacityCommand(KisLayerSP layer, TQ_UINT8 oldOpacity, TQ_UINT8 newOpacity) : super(i18n("Layer Opacity"), layer) { m_oldOpacity = oldOpacity; @@ -198,31 +198,31 @@ namespace { typedef KNamedCommand super; public: - KisLayerOffsetCommand(KisLayerSP layer, const QPoint& oldpos, const QPoint& newpos); + KisLayerOffsetCommand(KisLayerSP layer, const TQPoint& oldpos, const TQPoint& newpos); virtual ~KisLayerOffsetCommand(); virtual void execute(); virtual void unexecute(); private: - void moveTo(const QPoint& pos); + void moveTo(const TQPoint& pos); private: KisLayerSP m_layer; - QRect m_updateRect; - QPoint m_oldPos; - QPoint m_newPos; + TQRect m_updateRect; + TQPoint m_oldPos; + TQPoint m_newPos; }; - KisLayerOffsetCommand::KisLayerOffsetCommand(KisLayerSP layer, const QPoint& oldpos, const QPoint& newpos) : + KisLayerOffsetCommand::KisLayerOffsetCommand(KisLayerSP layer, const TQPoint& oldpos, const TQPoint& newpos) : super(i18n("Move Layer")) { m_layer = layer; m_oldPos = oldpos; m_newPos = newpos; - QRect currentBounds = m_layer->exactBounds(); - QRect oldBounds = currentBounds; + TQRect currentBounds = m_layer->exactBounds(); + TQRect oldBounds = currentBounds; oldBounds.moveBy(oldpos.x() - newpos.x(), oldpos.y() - newpos.y()); m_updateRect = currentBounds | oldBounds; @@ -242,7 +242,7 @@ namespace { moveTo(m_oldPos); } - void KisLayerOffsetCommand::moveTo(const QPoint& pos) + void KisLayerOffsetCommand::moveTo(const TQPoint& pos) { if (m_layer->undoAdapter()) { m_layer->undoAdapter()->setUndo(false); @@ -266,8 +266,8 @@ static int getID() } -KisLayer::KisLayer(KisImage *img, const QString &name, Q_UINT8 opacity) : - QObject(0, name.latin1()), +KisLayer::KisLayer(KisImage *img, const TQString &name, TQ_UINT8 opacity) : + TQObject(0, name.latin1()), KShared(), m_id(getID()), m_index(-1), @@ -283,7 +283,7 @@ KisLayer::KisLayer(KisImage *img, const QString &name, Q_UINT8 opacity) : } KisLayer::KisLayer(const KisLayer& rhs) : - QObject(), + TQObject(), KShared(rhs) { if (this != &rhs) { @@ -305,14 +305,14 @@ KisLayer::~KisLayer() { } -void KisLayer::setClean(const QRect & rect) +void KisLayer::setClean(const TQRect & rect) { if (m_dirtyRect.isValid() && rect.isValid()) { // XXX: We should only set the parts clean that were actually cleaned. However, extent and exactBounds conspire // to make that very hard atm. - //if (rect.contains(m_dirtyRect)) m_dirtyRect = QRect(); - m_dirtyRect = QRect(); + //if (rect.tqcontains(m_dirtyRect)) m_dirtyRect = TQRect(); + m_dirtyRect = TQRect(); } } @@ -323,25 +323,25 @@ bool KisLayer::dirty() } -bool KisLayer::dirty(const QRect & rc) +bool KisLayer::dirty(const TQRect & rc) { if (!m_dirtyRect.isValid() || !rc.isValid()) return false; return rc.intersects(m_dirtyRect); } -QRect KisLayer::dirtyRect() const +TQRect KisLayer::dirtyRect() const { return m_dirtyRect; } void KisLayer::setDirty(bool propagate) { - QRect rc = extent(); + TQRect rc = extent(); if (rc.isValid()) m_dirtyRect = rc; - // If we're dirty, our parent is dirty, if we've got a parent + // If we're dirty, our tqparent is dirty, if we've got a tqparent if (propagate && m_parent && rc.isValid()) m_parent->setDirty(m_dirtyRect); if (m_image && rc.isValid()) { @@ -349,9 +349,9 @@ void KisLayer::setDirty(bool propagate) } } -void KisLayer::setDirty(const QRect & rc, bool propagate) +void KisLayer::setDirty(const TQRect & rc, bool propagate) { - // If we're dirty, our parent is dirty, if we've got a parent + // If we're dirty, our tqparent is dirty, if we've got a tqparent if (rc.isValid()) m_dirtyRect |= rc; @@ -364,23 +364,23 @@ void KisLayer::setDirty(const QRect & rc, bool propagate) } } -KisGroupLayerSP KisLayer::parent() const +KisGroupLayerSP KisLayer::tqparent() const { return m_parent; } KisLayerSP KisLayer::prevSibling() const { - if (!parent()) + if (!tqparent()) return 0; - return parent()->at(index() - 1); + return tqparent()->at(index() - 1); } KisLayerSP KisLayer::nextSibling() const { - if (!parent()) + if (!tqparent()) return 0; - return parent()->at(index() + 1); + return tqparent()->at(index() + 1); } int KisLayer::index() const @@ -390,12 +390,12 @@ int KisLayer::index() const void KisLayer::setIndex(int i) { - if (!parent()) + if (!tqparent()) return; - parent()->setIndex(this, i); + tqparent()->setIndex(this, i); } -KisLayerSP KisLayer::findLayer(const QString& n) const +KisLayerSP KisLayer::findLayer(const TQString& n) const { if (name() == n) return const_cast<KisLayer*>(this); //HACK any less ugly way? findLayer() is conceptually const... @@ -437,12 +437,12 @@ bool KisLayer::matchesFlags(int flags) const return true; } -Q_UINT8 KisLayer::opacity() const +TQ_UINT8 KisLayer::opacity() const { return m_opacity; } -void KisLayer::setOpacity(Q_UINT8 val) +void KisLayer::setOpacity(TQ_UINT8 val) { if (m_opacity != val) { @@ -452,12 +452,12 @@ void KisLayer::setOpacity(Q_UINT8 val) } } -KNamedCommand *KisLayer::setOpacityCommand(Q_UINT8 newOpacity) +KNamedCommand *KisLayer::setOpacityCommand(TQ_UINT8 newOpacity) { return new KisLayerOpacityCommand(this, opacity(), newOpacity); } -KNamedCommand *KisLayer::setOpacityCommand(Q_UINT8 prevOpacity, Q_UINT8 newOpacity) +KNamedCommand *KisLayer::setOpacityCommand(TQ_UINT8 prevOpacity, TQ_UINT8 newOpacity) { return new KisLayerOpacityCommand(this, prevOpacity, newOpacity); } @@ -518,12 +518,12 @@ KNamedCommand *KisLayer::setLockedCommand(bool newLocked) return new KisLayerLockedCommand(this, newLocked); } -QString KisLayer::name() const +TQString KisLayer::name() const { return m_name; } -void KisLayer::setName(const QString& name) +void KisLayer::setName(const TQString& name) { if (!name.isEmpty() && m_name != name) { @@ -548,7 +548,7 @@ KNamedCommand *KisLayer::setCompositeOpCommand(const KisCompositeOp& newComposit return new KisLayerCompositeOpCommand(this, compositeOp(), newCompositeOp); } -KNamedCommand *KisLayer::moveCommand(QPoint oldPosition, QPoint newPosition) +KNamedCommand *KisLayer::moveCommand(TQPoint oldPosition, TQPoint newPosition) { return new KisLayerOffsetCommand(this, oldPosition, newPosition); } @@ -561,19 +561,19 @@ KisUndoAdapter *KisLayer::undoAdapter() const return 0; } -void KisLayer::paintMaskInactiveLayers(QImage &, Q_INT32, Q_INT32, Q_INT32, Q_INT32) +void KisLayer::paintMaskInactiveLayers(TQImage &, TQ_INT32, TQ_INT32, TQ_INT32, TQ_INT32) { } -void KisLayer::paintSelection(QImage &, Q_INT32, Q_INT32, Q_INT32, Q_INT32) +void KisLayer::paintSelection(TQImage &, TQ_INT32, TQ_INT32, TQ_INT32, TQ_INT32) { } -void KisLayer::paintSelection(QImage &, const QRect&, const QSize&, const QSize&) +void KisLayer::paintSelection(TQImage &, const TQRect&, const TQSize&, const TQSize&) { } -QImage KisLayer::createThumbnail(Q_INT32, Q_INT32) +TQImage KisLayer::createThumbnail(TQ_INT32, TQ_INT32) { return 0; } @@ -592,7 +592,7 @@ void KisLayerSupportsIndirectPainting::setTemporaryCompositeOp(const KisComposit m_compositeOp = c; } -void KisLayerSupportsIndirectPainting::setTemporaryOpacity(Q_UINT8 o) { +void KisLayerSupportsIndirectPainting::setTemporaryOpacity(TQ_UINT8 o) { m_compositeOpacity = o; } @@ -604,7 +604,7 @@ KisCompositeOp KisLayerSupportsIndirectPainting::temporaryCompositeOp() const { return m_compositeOp; } -Q_UINT8 KisLayerSupportsIndirectPainting::temporaryOpacity() const { +TQ_UINT8 KisLayerSupportsIndirectPainting::temporaryOpacity() const { return m_compositeOpacity; } |