summaryrefslogtreecommitdiffstats
path: root/krita/core/kis_group_layer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'krita/core/kis_group_layer.cc')
-rw-r--r--krita/core/kis_group_layer.cc62
1 files changed, 31 insertions, 31 deletions
diff --git a/krita/core/kis_group_layer.cc b/krita/core/kis_group_layer.cc
index 2a2ed325..a3a35339 100644
--- a/krita/core/kis_group_layer.cc
+++ b/krita/core/kis_group_layer.cc
@@ -18,8 +18,8 @@
#include <kdebug.h>
#include <kglobal.h>
-#include <qimage.h>
-#include <qdatetime.h>
+#include <tqimage.h>
+#include <tqdatetime.h>
#include "kis_types.h"
#include "kis_layer.h"
@@ -31,7 +31,7 @@
#include "kis_merge_visitor.h"
#include "kis_fill_painter.h"
-KisGroupLayer::KisGroupLayer(KisImage *img, const QString &name, Q_UINT8 opacity) :
+KisGroupLayer::KisGroupLayer(KisImage *img, const TQString &name, TQ_UINT8 opacity) :
super(img, name, opacity),
m_x(0),
m_y(0)
@@ -69,7 +69,7 @@ void KisGroupLayer::setDirty(bool propagate)
if (propagate) emit (sigDirty(m_dirtyRect));
}
-void KisGroupLayer::setDirty(const QRect & rc, bool propagate)
+void KisGroupLayer::setDirty(const TQRect & rc, bool propagate)
{
KisLayer::setDirty(rc, propagate);
if (propagate) emit sigDirty(rc);
@@ -88,11 +88,11 @@ bool KisGroupLayer::paintLayerInducesProjectionOptimization(KisPaintLayer* l) {
&& l->opacity() == OPACITY_OPAQUE && !l->temporaryTarget() && !l->hasMask();
}
-KisPaintDeviceSP KisGroupLayer::projection(const QRect & rect)
+KisPaintDeviceSP KisGroupLayer::projection(const TQRect & rect)
{
- // We don't have a parent, and we've got only one child: abuse the child's
+ // We don't have a tqparent, and we've got only one child: abuse the child's
// paint device as the projection if the child is visible and 100% opaque
- if (parent() == 0 && childCount() == 1) {
+ if (tqparent() == 0 && childCount() == 1) {
KisPaintLayerSP l = dynamic_cast<KisPaintLayer*>(firstChild().data());
if (paintLayerInducesProjectionOptimization(l)) {
l->setClean(rect);
@@ -113,8 +113,8 @@ KisPaintDeviceSP KisGroupLayer::projection(const QRect & rect)
// Okay, we need to update the intersection between
// what's dirty and what's asked us to be updated.
// XXX Nooo, that doesn't work, since the call to setClean following this, is actually:
- // m_dirtyRect = QRect(); So the non-intersecting part gets brilliantly lost otherwise.
- const QRect rc = m_dirtyRect;//rect.intersect(m_dirtyRect);
+ // m_dirtyRect = TQRect(); So the non-intersecting part gets brilliantly lost otherwise.
+ const TQRect rc = m_dirtyRect;//rect.intersect(m_dirtyRect);
updateProjection(rc);
setClean(rect);
@@ -146,14 +146,14 @@ KisLayerSP KisGroupLayer::at(int index) const
int KisGroupLayer::index(KisLayerSP layer) const
{
- if (layer->parent().data() == this)
+ if (layer->tqparent().data() == this)
return layer->index();
return -1;
}
void KisGroupLayer::setIndex(KisLayerSP layer, int index)
{
- if (layer->parent().data() != this)
+ if (layer->tqparent().data() != this)
return;
//TODO optimize
removeLayer(layer);
@@ -163,7 +163,7 @@ void KisGroupLayer::setIndex(KisLayerSP layer, int index)
bool KisGroupLayer::addLayer(KisLayerSP newLayer, int x)
{
if (x < 0 || kClamp(uint(x), uint(0), childCount()) != uint(x) ||
- newLayer->parent() || m_layers.contains(newLayer))
+ newLayer->tqparent() || m_layers.tqcontains(newLayer))
{
kdWarning() << "invalid input to KisGroupLayer::addLayer(KisLayerSP newLayer, int x)!" << endl;
return false;
@@ -185,7 +185,7 @@ bool KisGroupLayer::addLayer(KisLayerSP newLayer, int x)
bool KisGroupLayer::addLayer(KisLayerSP newLayer, KisLayerSP aboveThis)
{
- if (aboveThis && aboveThis->parent().data() != this)
+ if (aboveThis && aboveThis->tqparent().data() != this)
{
kdWarning() << "invalid input to KisGroupLayer::addLayer(KisLayerSP newLayer, KisLayerSP aboveThis)!" << endl;
return false;
@@ -207,7 +207,7 @@ bool KisGroupLayer::removeLayer(int x)
m_layers.erase(m_layers.begin() + reverseIndex(index));
setDirty(removedLayer->extent());
if (childCount() < 1) {
- // No children, nothing to show for it.
+ // No tqchildren, nothing to show for it.
m_projection->clear();
setDirty();
}
@@ -219,7 +219,7 @@ bool KisGroupLayer::removeLayer(int x)
bool KisGroupLayer::removeLayer(KisLayerSP layer)
{
- if (layer->parent().data() != this)
+ if (layer->tqparent().data() != this)
{
kdWarning() << "invalid input to KisGroupLayer::removeLayer()!" << endl;
return false;
@@ -237,9 +237,9 @@ void KisGroupLayer::setImage(KisImage *image)
}
}
-QRect KisGroupLayer::extent() const
+TQRect KisGroupLayer::extent() const
{
- QRect groupExtent;
+ TQRect groupExtent;
for (vKisLayerSP_cit it = m_layers.begin(); it != m_layers.end(); ++it)
{
@@ -249,9 +249,9 @@ QRect KisGroupLayer::extent() const
return groupExtent;
}
-QRect KisGroupLayer::exactBounds() const
+TQRect KisGroupLayer::exactBounds() const
{
- QRect groupExactBounds;
+ TQRect groupExactBounds;
for (vKisLayerSP_cit it = m_layers.begin(); it != m_layers.end(); ++it)
{
@@ -261,14 +261,14 @@ QRect KisGroupLayer::exactBounds() const
return groupExactBounds;
}
-Q_INT32 KisGroupLayer::x() const
+TQ_INT32 KisGroupLayer::x() const
{
return m_x;
}
-void KisGroupLayer::setX(Q_INT32 x)
+void KisGroupLayer::setX(TQ_INT32 x)
{
- Q_INT32 delta = x - m_x;
+ TQ_INT32 delta = x - m_x;
for (vKisLayerSP_cit it = m_layers.begin(); it != m_layers.end(); ++it)
{
@@ -278,14 +278,14 @@ void KisGroupLayer::setX(Q_INT32 x)
m_x = x;
}
-Q_INT32 KisGroupLayer::y() const
+TQ_INT32 KisGroupLayer::y() const
{
return m_y;
}
-void KisGroupLayer::setY(Q_INT32 y)
+void KisGroupLayer::setY(TQ_INT32 y)
{
- Q_INT32 delta = y - m_y;
+ TQ_INT32 delta = y - m_y;
for (vKisLayerSP_cit it = m_layers.begin(); it != m_layers.end(); ++it)
{
@@ -296,19 +296,19 @@ void KisGroupLayer::setY(Q_INT32 y)
m_y = y;
}
-QImage KisGroupLayer::createThumbnail(Q_INT32 w, Q_INT32 h)
+TQImage KisGroupLayer::createThumbnail(TQ_INT32 w, TQ_INT32 h)
{
return m_projection->createThumbnail(w, h);
}
-void KisGroupLayer::updateProjection(const QRect & rc)
+void KisGroupLayer::updateProjection(const TQRect & rc)
{
if (!m_dirtyRect.isValid()) return;
// Get the first layer in this group to start compositing with
KisLayerSP child = lastChild();
- // No child -- clear the projection. Without children, a group layer is empty.
+ // No child -- clear the projection. Without tqchildren, a group layer is empty.
if (!child) m_projection->clear();
KisLayerSP startWith = 0;
@@ -317,7 +317,7 @@ void KisGroupLayer::updateProjection(const QRect & rc)
// If this is the rootlayer, don't do anything with adj. layers that are below the
// first paintlayer
- bool gotPaintLayer = (parent() != 0);
+ bool gotPaintLayer = (tqparent() != 0);
// Look through all the child layers, searching for the first dirty layer
// if it's found, and if we have found an adj. layer before the the dirty layer,
@@ -404,8 +404,8 @@ void KisGroupLayer::updateProjection(const QRect & rc)
const KisCompositeOp cop = child->compositeOp();
const bool block = child->signalsBlocked();
child->blockSignals(true);
- // Composite op copy doesn't take a mask/selection into account, so we need
- // to make a difference between a paintlayer with a mask, and one without
+ // Composite op copy doesn't take a tqmask/selection into account, so we need
+ // to make a difference between a paintlayer with a tqmask, and one without
KisPaintLayer* l = dynamic_cast<KisPaintLayer*>(child.data());
if (l && l->hasMask())
child->m_compositeOp = COMPOSITE_OVER;