summaryrefslogtreecommitdiffstats
path: root/krita/core/kis_layer.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /krita/core/kis_layer.h
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-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/core/kis_layer.h')
-rw-r--r--krita/core/kis_layer.h93
1 files changed, 47 insertions, 46 deletions
diff --git a/krita/core/kis_layer.h b/krita/core/kis_layer.h
index 5da5181d..fd710839 100644
--- a/krita/core/kis_layer.h
+++ b/krita/core/kis_layer.h
@@ -19,14 +19,14 @@
#ifndef KIS_LAYER_H_
#define KIS_LAYER_H_
-#include <qobject.h>
+#include <tqobject.h>
#include "kis_types.h"
#include "kis_layer_visitor.h"
#include "kis_composite_op.h"
#include <koffice_export.h>
class KNamedCommand;
-class QPainter;
+class TQPainter;
class KisUndoAdapter;
class KisGroupLayer;
@@ -38,12 +38,13 @@ class KisGroupLayer;
* is at the top of the group in the layerlist, using next will iterate to the bottom to last,
* whereas previous will go up to first again.
**/
-class KRITACORE_EXPORT KisLayer : public QObject, public KShared
+class KRITACORE_EXPORT KisLayer : public TQObject, public KShared
{
Q_OBJECT
+ TQ_OBJECT
public:
- KisLayer(KisImage *img, const QString &name, Q_UINT8 opacity);
+ KisLayer(KisImage *img, const TQString &name, TQ_UINT8 opacity);
KisLayer(const KisLayer& rhs);
virtual ~KisLayer();
@@ -51,7 +52,7 @@ public:
/**
* Set the specified rect to clean
*/
- virtual void setClean(const QRect & rect);
+ virtual void setClean(const TQRect & rect);
/**
* If the layer has been changed and not been composited yet, this returns true
@@ -61,24 +62,24 @@ public:
/**
* Return true if the given rect intersects the dirty rect(s) of this layer
*/
- virtual bool dirty(const QRect & rc);
+ virtual bool dirty(const TQRect & rc);
- virtual QRect dirtyRect() const;
+ virtual TQRect dirtyRect() const;
/**
- * Set the entire layer extent dirty; this percolates up to parent layers all the
+ * Set the entire layer extent dirty; this percolates up to tqparent layers all the
* way to the root layer.
*/
virtual void setDirty(bool propagate = true);
/**
* Add the given rect to the set of dirty rects for this layer;
- * this percolates up to parent layers all the way to the root
+ * this percolates up to tqparent layers all the way to the root
* layer.
*/
- virtual void setDirty(const QRect & rect, bool propagate = true);
+ virtual void setDirty(const TQRect & rect, bool propagate = true);
/// Return a copy of this layer
virtual KisLayerSP clone() const = 0;
@@ -86,41 +87,41 @@ public:
/// Returns the ID of the layer, which is guaranteed to be unique among all KisLayers.
int id() const { return m_id; }
- /* Returns the index of the layer in its parent's list of child layers. Indices
+ /* Returns the index of the layer in its tqparent's list of child layers. Indices
* increase from 0, which is the topmost layer in the list, to the bottommost.
*/
virtual int index() const;
- /// Moves this layer to the specified index within its parent's list of child layers.
+ /// Moves this layer to the specified index within its tqparent's list of child layers.
virtual void setIndex(int index);
/**
- * Returns the parent layer of a layer. This is 0 only for a root layer; otherwise
+ * Returns the tqparent layer of a layer. This is 0 only for a root layer; otherwise
* this will be an actual GroupLayer */
- virtual KisGroupLayerSP parent() const;
+ virtual KisGroupLayerSP tqparent() const;
/**
- * Returns the previous sibling of this layer in the parent's list. This is the layer
- * *above* this layer. 0 is returned if there is no parent, or if this child has no more
+ * Returns the previous sibling of this layer in the tqparent's list. This is the layer
+ * *above* this layer. 0 is returned if there is no tqparent, or if this child has no more
* previous siblings (== firstChild())
*/
virtual KisLayerSP prevSibling() const;
/**
- * Returns the next sibling of this layer in the parent's list. This is the layer *below*
- * this layer. 0 is returned if there is no parent, or if this child has no more next
+ * Returns the next sibling of this layer in the tqparent's list. This is the layer *below*
+ * this layer. 0 is returned if there is no tqparent, or if this child has no more next
* siblings (== lastChild())
*/
virtual KisLayerSP nextSibling() const;
/**
- * Returns the sibling above this layer in its parent's list. 0 is returned if there is no parent,
+ * Returns the sibling above this layer in its tqparent's list. 0 is returned if there is no tqparent,
* or if this layer is the topmost layer in its group. This is the same as calling prevSibling().
*/
KisLayerSP siblingAbove() const { return prevSibling(); }
/**
- * Returns the sibling below this layer in its parent's list. 0 is returned if there is no parent,
+ * Returns the sibling below this layer in its tqparent's list. 0 is returned if there is no tqparent,
* or if this layer is the bottommost layer in its group. This is the same as calling nextSibling().
*/
KisLayerSP siblingBelow() const { return nextSibling(); }
@@ -135,7 +136,7 @@ public:
virtual KisLayerSP lastChild() const { return 0; }
/// Recursively searches this layer and any child layers for a layer with the specified name.
- virtual KisLayerSP findLayer(const QString& name) const;
+ virtual KisLayerSP findLayer(const TQString& name) const;
/// Recursively searches this layer and any child layers for a layer with the specified ID.
virtual KisLayerSP findLayer(int id) const;
@@ -153,27 +154,27 @@ public:
virtual void deactivate() {};
public:
- virtual Q_INT32 x() const = 0;
- virtual void setX(Q_INT32) = 0;
+ virtual TQ_INT32 x() const = 0;
+ virtual void setX(TQ_INT32) = 0;
- virtual Q_INT32 y() const = 0;
- virtual void setY(Q_INT32) = 0;
+ virtual TQ_INT32 y() const = 0;
+ virtual void setY(TQ_INT32) = 0;
- virtual KNamedCommand *moveCommand(QPoint oldPosition, QPoint newPosition);
+ virtual KNamedCommand *moveCommand(TQPoint oldPosition, TQPoint newPosition);
/// Returns an approximation of where the bounds on actual data are in this layer
- virtual QRect extent() const = 0;
+ virtual TQRect extent() const = 0;
/// Returns the exact bounds of where the actual data resides in this layer
- virtual QRect exactBounds() const = 0;
+ virtual TQRect exactBounds() const = 0;
virtual const bool visible() const;
virtual void setVisible(bool v);
KNamedCommand *setVisibleCommand(bool visiblel);
- Q_UINT8 opacity() const;
- void setOpacity(Q_UINT8 val);
- KNamedCommand *setOpacityCommand(Q_UINT8 val);
- KNamedCommand *setOpacityCommand(Q_UINT8 prevOpacity, Q_UINT8 newOpacity);
+ TQ_UINT8 opacity() const;
+ void setOpacity(TQ_UINT8 val);
+ KNamedCommand *setOpacityCommand(TQ_UINT8 val);
+ KNamedCommand *setOpacityCommand(TQ_UINT8 prevOpacity, TQ_UINT8 newOpacity);
bool locked() const;
void setLocked(bool l);
@@ -184,8 +185,8 @@ public:
bool temporary() const;
void setTemporary(bool t);
- virtual QString name() const;
- virtual void setName(const QString& name);
+ virtual TQString name() const;
+ virtual void setName(const TQString& name);
KisCompositeOp compositeOp() { return m_compositeOp; }
void setCompositeOp(const KisCompositeOp& compositeOp);
@@ -196,16 +197,16 @@ public:
KisUndoAdapter *undoAdapter() const;
- /// paints a mask where the selection on this layer resides
- virtual void paintSelection(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h);
- virtual void paintSelection(QImage &img, const QRect& scaledImageRect, const QSize& scaledImageSize, const QSize& imageSize);
+ /// paints a tqmask where the selection on this layer resides
+ virtual void paintSelection(TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h);
+ virtual void paintSelection(TQImage &img, const TQRect& scaledImageRect, const TQSize& scaledImageSize, const TQSize& imageSize);
/// paints where no data is on this layer. Useful when it is a transparent layer stacked on top of another one
- virtual void paintMaskInactiveLayers(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h);
+ virtual void paintMaskInactiveLayers(TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h);
- /// Returns a thumbnail in requested size. The QImage may have transparent parts.
+ /// Returns a thumbnail in requested size. The TQImage may have transparent parts.
/// May also return 0
- virtual QImage createThumbnail(Q_INT32 w, Q_INT32 h);
+ virtual TQImage createThumbnail(TQ_INT32 w, TQ_INT32 h);
/// Accept the KisLayerVisitor (for the Visitor design pattern), should call the correct function on the KisLayerVisitor for this layer type
virtual bool accept(KisLayerVisitor &) = 0;
@@ -217,14 +218,14 @@ private:
int m_id;
int m_index;
- Q_UINT8 m_opacity;
+ TQ_UINT8 m_opacity;
bool m_locked;
bool m_visible;
bool m_temporary;
// XXX: keep a list of dirty rects instead of always aggegrating them
- QRect m_dirtyRect;
- QString m_name;
+ TQRect m_dirtyRect;
+ TQString m_name;
KisGroupLayerSP m_parent;
KisImage *m_image;
@@ -237,15 +238,15 @@ class KRITACORE_EXPORT KisLayerSupportsIndirectPainting {
// To simulate the indirect painting
KisPaintDeviceSP m_temporaryTarget;
KisCompositeOp m_compositeOp;
- Q_UINT8 m_compositeOpacity;
+ TQ_UINT8 m_compositeOpacity;
public:
// Indirect painting
void setTemporaryTarget(KisPaintDeviceSP t);
void setTemporaryCompositeOp(const KisCompositeOp& c);
- void setTemporaryOpacity(Q_UINT8 o);
+ void setTemporaryOpacity(TQ_UINT8 o);
KisPaintDeviceSP temporaryTarget();
KisCompositeOp temporaryCompositeOp() const;
- Q_UINT8 temporaryOpacity() const;
+ TQ_UINT8 temporaryOpacity() const;
// Or I could make KisLayer a virtual base of KisLayerSupportsIndirectPainting and so, but
// I'm sure virtual diamond inheritance isn't as appreciated as this