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/plugins/paintops | |
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/plugins/paintops')
15 files changed, 221 insertions, 218 deletions
diff --git a/krita/plugins/paintops/defaultpaintops/defaultpaintops_plugin.cc b/krita/plugins/paintops/defaultpaintops/defaultpaintops_plugin.cc index e23fd3cf..c44a31c8 100644 --- a/krita/plugins/paintops/defaultpaintops/defaultpaintops_plugin.cc +++ b/krita/plugins/paintops/defaultpaintops/defaultpaintops_plugin.cc @@ -42,15 +42,15 @@ typedef KGenericFactory<DefaultPaintOpsPlugin> DefaultPaintOpsPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritadefaultpaintops, DefaultPaintOpsPluginFactory( "kritacore" ) ) -DefaultPaintOpsPlugin::DefaultPaintOpsPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +DefaultPaintOpsPlugin::DefaultPaintOpsPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(DefaultPaintOpsPluginFactory::instance()); // This is not a gui plugin; only load it when the doc is created. - if ( parent->inherits("KisPaintOpRegistry") ) + if ( tqparent->inherits("KisPaintOpRegistry") ) { - KisPaintOpRegistry * r = dynamic_cast<KisPaintOpRegistry*>(parent); + KisPaintOpRegistry * r = dynamic_cast<KisPaintOpRegistry*>(tqparent); // Add hard-coded paint ops. Plugin paintops will add // themselves in the plugin initialization code. r->add ( new KisAirbrushOpFactory ); diff --git a/krita/plugins/paintops/defaultpaintops/defaultpaintops_plugin.h b/krita/plugins/paintops/defaultpaintops/defaultpaintops_plugin.h index 402ae4a2..d7afb9d0 100644 --- a/krita/plugins/paintops/defaultpaintops/defaultpaintops_plugin.h +++ b/krita/plugins/paintops/defaultpaintops/defaultpaintops_plugin.h @@ -27,8 +27,9 @@ class DefaultPaintOpsPlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - DefaultPaintOpsPlugin(QObject *parent, const char *name, const QStringList &); + DefaultPaintOpsPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~DefaultPaintOpsPlugin(); }; diff --git a/krita/plugins/paintops/defaultpaintops/kis_airbrushop.cc b/krita/plugins/paintops/defaultpaintops/kis_airbrushop.cc index 6f2e5cb1..db320bec 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_airbrushop.cc +++ b/krita/plugins/paintops/defaultpaintops/kis_airbrushop.cc @@ -20,7 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qrect.h> +#include <tqrect.h> #include <kdebug.h> @@ -59,18 +59,18 @@ void KisAirbrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info // // Most graphics apps -- especially the simple ones like Kolourpaint // and the previous version of this routine in Krita took a brush -// shape -- often a simple ellipse -- and filled that shape with a +// tqshape -- often a simple ellipse -- and filled that tqshape with a // random 'spray' of single pixels. // // Other, more advanced graphics apps, like the Gimp or Photoshop, -// take the brush shape and paint just as with the brush paint op, +// take the brush tqshape and paint just as with the brush paint op, // only making the initial dab more transparent, and perhaps adding // extra transparence near the edges. Then, using a timer, when the // cursor stays in place, dab upon dab is positioned in the same // place, which makes the result less and less transparent. // // What I want to do here is create an airbrush that approaches a real -// one. It won't use brush shapes, instead going for the old-fashioned +// one. It won't use brush tqshapes, instead going for the old-fashioned // circle. Depending upon pressure, both the size of the dab and the // rate of paint deposition is determined. The edges of the dab are // more transparent than the center, with perhaps even some fully @@ -91,7 +91,7 @@ void KisAirbrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info KisPaintDeviceSP device = m_painter->device(); - // For now: use the current brush shape -- it beats calculating + // For now: use the current brush tqshape -- it beats calculating // ellipes and cones, and it shows the working of the timer. if (!device) return; @@ -103,9 +103,9 @@ void KisAirbrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info KisPoint hotSpot = brush->hotSpot(info); KisPoint pt = pos - hotSpot; - Q_INT32 x; + TQ_INT32 x; double xFraction; - Q_INT32 y; + TQ_INT32 y; double yFraction; splitCoordinate(pt.x(), &x, &xFraction); @@ -115,15 +115,15 @@ void KisAirbrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info dab = brush->image(device->colorSpace(), info, xFraction, yFraction); } else { - KisAlphaMaskSP mask = brush->mask(info, xFraction, yFraction); - dab = computeDab(mask); + KisAlphaMaskSP tqmask = brush->tqmask(info, xFraction, yFraction); + dab = computeDab(tqmask); } m_painter->setDab(dab); // Cache dab for future paints in the painter. m_painter->setPressure(info.pressure); // Cache pressure in the current painter. - QRect dabRect = QRect(0, 0, brush->maskWidth(info), brush->maskHeight(info)); - QRect dstRect = QRect(x, y, dabRect.width(), dabRect.height()); + TQRect dabRect = TQRect(0, 0, brush->tqmaskWidth(info), brush->tqmaskHeight(info)); + TQRect dstRect = TQRect(x, y, dabRect.width(), dabRect.height()); KisImage * image = device->image(); @@ -133,10 +133,10 @@ void KisAirbrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info if (dstRect.isNull() || dstRect.isEmpty() || !dstRect.isValid()) return; - Q_INT32 sx = dstRect.x() - x; - Q_INT32 sy = dstRect.y() - y; - Q_INT32 sw = dstRect.width(); - Q_INT32 sh = dstRect.height(); + TQ_INT32 sx = dstRect.x() - x; + TQ_INT32 sy = dstRect.y() - y; + TQ_INT32 sw = dstRect.width(); + TQ_INT32 sh = dstRect.height(); if (m_source->hasSelection()) { m_painter->bltSelection(dstRect.x(), dstRect.y(), m_painter->compositeOp(), dab.data(), diff --git a/krita/plugins/paintops/defaultpaintops/kis_airbrushop.h b/krita/plugins/paintops/defaultpaintops/kis_airbrushop.h index 7e751d3e..805664d7 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_airbrushop.h +++ b/krita/plugins/paintops/defaultpaintops/kis_airbrushop.h @@ -36,7 +36,7 @@ public: virtual KisPaintOp * createOp(const KisPaintOpSettings *settings, KisPainter * painter); virtual KisID id() { return KisID("airbrush", i18n("Pixel Airbrush")); } - virtual QString pixmap() { return "airbrush.png"; } + virtual TQString pixmap() { return "airbrush.png"; } }; diff --git a/krita/plugins/paintops/defaultpaintops/kis_brushop.cc b/krita/plugins/paintops/defaultpaintops/kis_brushop.cc index 4a7485e5..360fa66e 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_brushop.cc +++ b/krita/plugins/paintops/defaultpaintops/kis_brushop.cc @@ -22,12 +22,12 @@ #include <string.h> -#include <qrect.h> -#include <qwidget.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qtoolbutton.h> +#include <tqrect.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqtoolbutton.h> #include <kdebug.h> @@ -55,22 +55,22 @@ KisPaintOp * KisBrushOpFactory::createOp(const KisPaintOpSettings *settings, Kis return op; } -KisBrushOpSettings::KisBrushOpSettings(QWidget *parent) - : super(parent) +KisBrushOpSettings::KisBrushOpSettings(TQWidget *tqparent) + : super(tqparent) { - m_optionsWidget = new QWidget(parent, "brush option widget"); - QHBoxLayout * l = new QHBoxLayout(m_optionsWidget); + m_optionsWidget = new TQWidget(tqparent, "brush option widget"); + TQHBoxLayout * l = new TQHBoxLayout(m_optionsWidget); l->setAutoAdd(true); - m_pressureVariation = new QLabel(i18n("Pressure variation: "), m_optionsWidget); - m_size = new QCheckBox(i18n("Size"), m_optionsWidget); + m_pressureVariation = new TQLabel(i18n("Pressure variation: "), m_optionsWidget); + m_size = new TQCheckBox(i18n("Size"), m_optionsWidget); m_size->setChecked(true); - m_opacity = new QCheckBox(i18n("Opacity"), m_optionsWidget); - m_darken = new QCheckBox(i18n("Darken"), m_optionsWidget); + m_opacity = new TQCheckBox(i18n("Opacity"), m_optionsWidget); + m_darken = new TQCheckBox(i18n("Darken"), m_optionsWidget); m_curveControl = new WdgBrushCurveControl(m_optionsWidget); - QToolButton* moreButton = new QToolButton(Qt::UpArrow, m_optionsWidget); - moreButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - moreButton->setMinimumSize(QSize(24,24)); // Bah, I had hoped the above line would make this unneeded - connect(moreButton, SIGNAL(clicked()), this, SLOT(slotCustomCurves())); + TQToolButton* moreButton = new TQToolButton(TQt::UpArrow, m_optionsWidget); + moreButton->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + moreButton->setMinimumSize(TQSize(24,24)); // Bah, I had hoped the above line would make this unneeded + connect(moreButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCustomCurves())); m_customSize = false; m_customOpacity = false; @@ -79,7 +79,7 @@ KisBrushOpSettings::KisBrushOpSettings(QWidget *parent) } void KisBrushOpSettings::slotCustomCurves() { - if (m_curveControl->exec() == QDialog::Accepted) { + if (m_curveControl->exec() == TQDialog::Accepted) { m_customSize = m_curveControl->sizeCheckbox->isChecked(); m_customOpacity = m_curveControl->opacityCheckbox->isChecked(); m_customDarken = m_curveControl->darkenCheckbox->isChecked(); @@ -125,13 +125,13 @@ bool KisBrushOpSettings::varyDarken() const return m_darken->isChecked(); } -KisPaintOpSettings* KisBrushOpFactory::settings(QWidget * parent, const KisInputDevice& inputDevice) +KisPaintOpSettings* KisBrushOpFactory::settings(TQWidget * tqparent, const KisInputDevice& inputDevice) { if (inputDevice == KisInputDevice::mouse()) { // No options for mouse, only tablet devices return 0; } else { - return new KisBrushOpSettings(parent); + return new KisBrushOpSettings(tqparent); } } @@ -180,13 +180,13 @@ void KisBrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) // Painting should be implemented according to the following algorithm: // retrieve brush - // if brush == mask - // retrieve mask + // if brush == tqmask + // retrieve tqmask // else if brush == image // retrieve image - // subsample (mask | image) for position -- pos should be double! - // apply filters to mask (colour | gradient | pattern | etc. - // composite filtered mask into temporary layer + // subsample (tqmask | image) for position -- pos should be double! + // apply filters to tqmask (colour | gradient | pattern | etc. + // composite filtered tqmask into temporary layer // composite temporary layer into target layer // @see: doc/brush.txt @@ -207,9 +207,9 @@ void KisBrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) // Split the coordinates into integer plus fractional parts. The integer // is where the dab will be positioned and the fractional part determines // the sub-pixel positioning. - Q_INT32 x; + TQ_INT32 x; double xFraction; - Q_INT32 y; + TQ_INT32 y; double yFraction; splitCoordinate(pt.x(), &x, &xFraction); @@ -217,24 +217,24 @@ void KisBrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) KisPaintDeviceSP dab = 0; - Q_UINT8 origOpacity = m_painter->opacity(); + TQ_UINT8 origOpacity = m_painter->opacity(); KisColor origColor = m_painter->paintColor(); if (m_pressureOpacity) { if (!m_customOpacity) - m_painter->setOpacity((Q_INT8)(origOpacity * info.pressure)); + m_painter->setOpacity((TQ_INT8)(origOpacity * info.pressure)); else - m_painter->setOpacity((Q_INT8)(origOpacity * scaleToCurve(info.pressure, m_opacityCurve))); + m_painter->setOpacity((TQ_INT8)(origOpacity * scaleToCurve(info.pressure, m_opacityCurve))); } if (m_pressureDarken) { KisColor darkened = origColor; // Darken docs aren't really clear about what exactly the amount param can have as value... - Q_UINT32 darkenAmount; + TQ_UINT32 darkenAmount; if (!m_customDarken) - darkenAmount = (Q_INT32)(255 - 75 * info.pressure); + darkenAmount = (TQ_INT32)(255 - 75 * info.pressure); else - darkenAmount = (Q_INT32)(255 - 75 * scaleToCurve(info.pressure, m_darkenCurve)); + darkenAmount = (TQ_INT32)(255 - 75 * scaleToCurve(info.pressure, m_darkenCurve)); darkened.colorSpace()->darken(origColor.data(), darkened.data(), darkenAmount, false, 0.0, 1); @@ -245,15 +245,15 @@ void KisBrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) dab = brush->image(device->colorSpace(), adjustedInfo, xFraction, yFraction); } else { - KisAlphaMaskSP mask = brush->mask(adjustedInfo, xFraction, yFraction); - dab = computeDab(mask); + KisAlphaMaskSP tqmask = brush->tqmask(adjustedInfo, xFraction, yFraction); + dab = computeDab(tqmask); } m_painter->setPressure(adjustedInfo.pressure); - QRect dabRect = QRect(0, 0, brush->maskWidth(adjustedInfo), - brush->maskHeight(adjustedInfo)); - QRect dstRect = QRect(x, y, dabRect.width(), dabRect.height()); + TQRect dabRect = TQRect(0, 0, brush->tqmaskWidth(adjustedInfo), + brush->tqmaskHeight(adjustedInfo)); + TQRect dstRect = TQRect(x, y, dabRect.width(), dabRect.height()); KisImage * image = device->image(); @@ -263,10 +263,10 @@ void KisBrushOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) if (dstRect.isNull() || dstRect.isEmpty() || !dstRect.isValid()) return; - Q_INT32 sx = dstRect.x() - x; - Q_INT32 sy = dstRect.y() - y; - Q_INT32 sw = dstRect.width(); - Q_INT32 sh = dstRect.height(); + TQ_INT32 sx = dstRect.x() - x; + TQ_INT32 sy = dstRect.y() - y; + TQ_INT32 sw = dstRect.width(); + TQ_INT32 sh = dstRect.height(); if (m_source->hasSelection()) { m_painter->bltSelection(dstRect.x(), dstRect.y(), m_painter->compositeOp(), dab.data(), diff --git a/krita/plugins/paintops/defaultpaintops/kis_brushop.h b/krita/plugins/paintops/defaultpaintops/kis_brushop.h index ecaf3ad2..6475b3d7 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_brushop.h +++ b/krita/plugins/paintops/defaultpaintops/kis_brushop.h @@ -25,9 +25,9 @@ #include "kis_paintop.h" -class QWidget; -class QCheckBox; -class QLabel; +class TQWidget; +class TQCheckBox; +class TQLabel; class KisPoint; class KisPainter; class KCurve; @@ -41,15 +41,16 @@ public: virtual KisPaintOp * createOp(const KisPaintOpSettings *settings, KisPainter * painter); virtual KisID id() { return KisID("paintbrush", i18n("Pixel Brush")); } - virtual QString pixmap() { return "paintbrush.png"; } - virtual KisPaintOpSettings *settings(QWidget * parent, const KisInputDevice& inputDevice); + virtual TQString pixmap() { return "paintbrush.png"; } + virtual KisPaintOpSettings *settings(TQWidget * tqparent, const KisInputDevice& inputDevice); }; -class KisBrushOpSettings : public QObject, public KisPaintOpSettings { +class KisBrushOpSettings : public TQObject, public KisPaintOpSettings { Q_OBJECT + TQ_OBJECT typedef KisPaintOpSettings super; public: - KisBrushOpSettings(QWidget *parent); + KisBrushOpSettings(TQWidget *tqparent); bool varySize() const; bool varyOpacity() const; @@ -62,16 +63,16 @@ public: const double* opacityCurve() const { return m_opacityCurve; } const double* darkenCurve() const { return m_darkenCurve; } - virtual QWidget *widget() const { return m_optionsWidget; } + virtual TQWidget *widget() const { return m_optionsWidget; } private slots: void slotCustomCurves(); private: void transferCurve(KCurve* curve, double* target); - QWidget *m_optionsWidget; - QLabel * m_pressureVariation; - QCheckBox * m_size; - QCheckBox * m_opacity; - QCheckBox * m_darken; + TQWidget *m_optionsWidget; + TQLabel * m_pressureVariation; + TQCheckBox * m_size; + TQCheckBox * m_opacity; + TQCheckBox * m_darken; WdgBrushCurveControl* m_curveControl; bool m_customSize; diff --git a/krita/plugins/paintops/defaultpaintops/kis_convolveop.cc b/krita/plugins/paintops/defaultpaintops/kis_convolveop.cc index ae55f54f..72bf9e66 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_convolveop.cc +++ b/krita/plugins/paintops/defaultpaintops/kis_convolveop.cc @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qrect.h> +#include <tqrect.h> #include <kdebug.h> diff --git a/krita/plugins/paintops/defaultpaintops/kis_dlgbrushcurvecontrol.ui b/krita/plugins/paintops/defaultpaintops/kis_dlgbrushcurvecontrol.ui index 7682c12f..f6021ecc 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_dlgbrushcurvecontrol.ui +++ b/krita/plugins/paintops/defaultpaintops/kis_dlgbrushcurvecontrol.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgBrushCurveControl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>WdgBrushCurveControl</cstring> </property> @@ -22,11 +22,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>tabWidget</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>Widget8</cstring> </property> @@ -37,15 +37,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>sizeCheckbox</cstring> </property> @@ -70,7 +70,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>Widget9</cstring> </property> @@ -81,15 +81,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>opacityCheckbox</cstring> </property> @@ -114,7 +114,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -125,15 +125,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>darkenCheckbox</cstring> </property> @@ -159,7 +159,7 @@ </grid> </widget> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -183,14 +183,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -207,7 +207,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -262,7 +262,7 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcurve.h</includehint> <includehint>kcurve.h</includehint> diff --git a/krita/plugins/paintops/defaultpaintops/kis_duplicateop.cc b/krita/plugins/paintops/defaultpaintops/kis_duplicateop.cc index 79d00b96..139ed51d 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_duplicateop.cc +++ b/krita/plugins/paintops/defaultpaintops/kis_duplicateop.cc @@ -22,7 +22,7 @@ #include "kis_duplicateop.h" -#include <qrect.h> +#include <tqrect.h> #include <kdebug.h> @@ -108,9 +108,9 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf // Split the coordinates into integer plus fractional parts. The integer // is where the dab will be positioned and the fractional part determines // the sub-pixel positioning. - Q_INT32 x; + TQ_INT32 x; double xFraction; - Q_INT32 y; + TQ_INT32 y; double yFraction; splitCoordinate(pt.x(), &x, &xFraction); @@ -125,19 +125,19 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf dab->convertTo(KisMetaRegistry::instance()->csRegistry()->getAlpha8()); } else { - KisAlphaMaskSP mask = brush->mask(info, xFraction, yFraction); - dab = computeDab(mask, KisMetaRegistry::instance()->csRegistry()->getAlpha8()); + KisAlphaMaskSP tqmask = brush->tqmask(info, xFraction, yFraction); + dab = computeDab(tqmask, KisMetaRegistry::instance()->csRegistry()->getAlpha8()); } m_painter->setPressure(info.pressure); KisPoint srcPointF = pt - m_painter->duplicateOffset(); - QPoint srcPoint = QPoint(x - static_cast<Q_INT32>(m_painter->duplicateOffset().x()), - y - static_cast<Q_INT32>(m_painter->duplicateOffset().y())); + TQPoint srcPoint = TQPoint(x - static_cast<TQ_INT32>(m_painter->duplicateOffset().x()), + y - static_cast<TQ_INT32>(m_painter->duplicateOffset().y())); - Q_INT32 sw = dab->extent().width(); - Q_INT32 sh = dab->extent().height(); + TQ_INT32 sw = dab->extent().width(); + TQ_INT32 sh = dab->extent().height(); if (srcPoint.x() < 0 ) srcPoint.setX(0); @@ -169,7 +169,7 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf } // First look for the grid corresponding to the start point KisSubPerspectiveGrid* subGridStart = *device->image()->perspectiveGrid()->begin();//device->image()->perspectiveGrid()->gridAt(KisPoint(srcPoint.x() +hotSpot.x(),srcPoint.y() +hotSpot.y())); - QRect r = QRect(0,0, device->image()->width(), device->image()->height()); + TQRect r = TQRect(0,0, device->image()->width(), device->image()->height()); #if 1 if(subGridStart) @@ -236,9 +236,9 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf if(heal) { - Q_UINT16 dataDevice[4]; - Q_UINT16 dataSrcDev[4]; - QMemArray<double> matrix ( 3 * sw * sh ); + TQ_UINT16 dataDevice[4]; + TQ_UINT16 dataSrcDev[4]; + TQMemArray<double> matrix ( 3 * sw * sh ); // First divide KisColorSpace* deviceCs = device->colorSpace(); KisHLineIteratorPixel deviceIt = device->createHLineIterator(x, y, sw, false ); @@ -248,12 +248,12 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf { for(int i= 0; !srcDevIt.isDone(); i++) { - deviceCs->toLabA16(deviceIt.rawData(), (Q_UINT8*)dataDevice, 1); - deviceCs->toLabA16(srcDevIt.rawData(), (Q_UINT8*)dataSrcDev, 1); + deviceCs->toLabA16(deviceIt.rawData(), (TQ_UINT8*)dataDevice, 1); + deviceCs->toLabA16(srcDevIt.rawData(), (TQ_UINT8*)dataSrcDev, 1); // Division for( int k = 0; k < 3; k++) { - matrixIt[k] = dataDevice[k] / (double)QMAX(dataSrcDev [k], 1); + matrixIt[k] = dataDevice[k] / (double)TQMAX(dataSrcDev [k], 1); } ++deviceIt; ++srcDevIt; @@ -266,7 +266,7 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf { int iter = 0; double err; - QMemArray<double> solution ( 3 * sw * sh ); + TQMemArray<double> solution ( 3 * sw * sh ); do { err = minimizeEnergy(&matrix[0], &solution[0],sw,sh); memcpy (&matrix[0], &solution[0], sw * sh * 3 * sizeof(double)); @@ -282,14 +282,14 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf { for(int i= 0; !srcDevIt.isDone(); i++) { - deviceCs->toLabA16(deviceIt.rawData(), (Q_UINT8*)dataDevice, 1); - deviceCs->toLabA16(srcDevIt.rawData(), (Q_UINT8*)dataSrcDev, 1); + deviceCs->toLabA16(deviceIt.rawData(), (TQ_UINT8*)dataDevice, 1); + deviceCs->toLabA16(srcDevIt.rawData(), (TQ_UINT8*)dataSrcDev, 1); // Multiplication for( int k = 0; k < 3; k++) { - dataSrcDev[k] = (int)CLAMP( matrixIt[k] * QMAX( dataSrcDev[k], 1), 0, 65535 ); + dataSrcDev[k] = (int)CLAMP( matrixIt[k] * TQMAX( dataSrcDev[k], 1), 0, 65535 ); } - deviceCs->fromLabA16((Q_UINT8*)dataSrcDev, srcDevIt.rawData(), 1); + deviceCs->fromLabA16((TQ_UINT8*)dataSrcDev, srcDevIt.rawData(), 1); ++deviceIt; ++srcDevIt; matrixIt +=3; @@ -312,8 +312,8 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf OPACITY_OPAQUE, 0, 0, sw, sh); copyPainter.end(); - QRect dabRect = QRect(0, 0, brush->maskWidth(info), brush->maskHeight(info)); - QRect dstRect = QRect(x, y, dabRect.width(), dabRect.height()); + TQRect dabRect = TQRect(0, 0, brush->tqmaskWidth(info), brush->tqmaskHeight(info)); + TQRect dstRect = TQRect(x, y, dabRect.width(), dabRect.height()); KisImage * image = device->image(); @@ -323,8 +323,8 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf if (dstRect.isNull() || dstRect.isEmpty() || !dstRect.isValid()) return; - Q_INT32 sx = dstRect.x() - x; - Q_INT32 sy = dstRect.y() - y; + TQ_INT32 sx = dstRect.x() - x; + TQ_INT32 sy = dstRect.y() - y; sw = dstRect.width(); sh = dstRect.height(); diff --git a/krita/plugins/paintops/defaultpaintops/kis_eraseop.cc b/krita/plugins/paintops/defaultpaintops/kis_eraseop.cc index 4fe46af2..cbf67a15 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_eraseop.cc +++ b/krita/plugins/paintops/defaultpaintops/kis_eraseop.cc @@ -20,7 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qrect.h> +#include <tqrect.h> #include <kdebug.h> @@ -86,33 +86,33 @@ void KisEraseOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) KisPoint hotSpot = brush->hotSpot(info); KisPoint pt = pos - hotSpot; - Q_INT32 destX; + TQ_INT32 destX; double xFraction; - Q_INT32 destY; + TQ_INT32 destY; double yFraction; splitCoordinate(pt.x(), &destX, &xFraction); splitCoordinate(pt.y(), &destY, &yFraction); - KisAlphaMaskSP mask = brush->mask(info, xFraction, yFraction); + KisAlphaMaskSP tqmask = brush->tqmask(info, xFraction, yFraction); KisPaintDeviceSP dab = new KisPaintDevice(device->colorSpace(), "erase op dab"); Q_CHECK_PTR(dab); - Q_INT32 maskWidth = mask->width(); - Q_INT32 maskHeight = mask->height(); + TQ_INT32 tqmaskWidth = tqmask->width(); + TQ_INT32 tqmaskHeight = tqmask->height(); - QRect dstRect; + TQRect dstRect; - KisRectIteratorPixel it = dab->createRectIterator(0, 0, maskWidth, maskHeight, true); + KisRectIteratorPixel it = dab->createRectIterator(0, 0, tqmaskWidth, tqmaskHeight, true); KisColorSpace* cs = dab->colorSpace(); while (!it.isDone()) { - cs->setAlpha(it.rawData(), Q_UINT8_MAX - mask->alphaAt(it.x(), it.y()), 1); + cs->setAlpha(it.rawData(), TQ_UINT8_MAX - tqmask->alphaAt(it.x(), it.y()), 1); ++it; } - QRect dabRect = QRect(0, 0, maskWidth, maskHeight); - dstRect = QRect(destX, destY, dabRect.width(), dabRect.height()); + TQRect dabRect = TQRect(0, 0, tqmaskWidth, tqmaskHeight); + dstRect = TQRect(destX, destY, dabRect.width(), dabRect.height()); KisImage * image = device->image(); @@ -122,10 +122,10 @@ void KisEraseOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) if (dstRect.isNull() || dstRect.isEmpty() || !dstRect.isValid()) return; - Q_INT32 sx = dstRect.x() - destX; - Q_INT32 sy = dstRect.y() - destY; - Q_INT32 sw = dstRect.width(); - Q_INT32 sh = dstRect.height(); + TQ_INT32 sx = dstRect.x() - destX; + TQ_INT32 sy = dstRect.y() - destY; + TQ_INT32 sw = dstRect.width(); + TQ_INT32 sh = dstRect.height(); if (m_source->hasSelection()) { m_painter->bltSelection(dstRect.x(), dstRect.y(), COMPOSITE_ERASE, dab.data(), diff --git a/krita/plugins/paintops/defaultpaintops/kis_eraseop.h b/krita/plugins/paintops/defaultpaintops/kis_eraseop.h index c15d11b3..8c88a122 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_eraseop.h +++ b/krita/plugins/paintops/defaultpaintops/kis_eraseop.h @@ -36,7 +36,7 @@ public: virtual KisPaintOp * createOp(const KisPaintOpSettings *settings, KisPainter * painter); virtual KisID id() { return KisID("eraser", i18n("Pixel Eraser")); } - virtual QString pixmap() { return "eraser.png"; } + virtual TQString pixmap() { return "eraser.png"; } }; diff --git a/krita/plugins/paintops/defaultpaintops/kis_penop.cc b/krita/plugins/paintops/defaultpaintops/kis_penop.cc index d93a75d4..0fcbca02 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_penop.cc +++ b/krita/plugins/paintops/defaultpaintops/kis_penop.cc @@ -21,7 +21,7 @@ */ -#include <qrect.h> +#include <tqrect.h> #include <kdebug.h> @@ -70,8 +70,8 @@ void KisPenOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) KisPoint hotSpot = brush->hotSpot(info); KisPoint pt = pos - hotSpot; - Q_INT32 x = pt.roundX(); - Q_INT32 y = pt.roundY(); + TQ_INT32 x = pt.roundX(); + TQ_INT32 y = pt.roundY(); KisPaintDeviceSP dab = 0; if (brush->brushType() == IMAGE || @@ -79,14 +79,14 @@ void KisPenOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) dab = brush->image(device->colorSpace(), info); } else { - // Compute mask without sub-pixel positioning - KisAlphaMaskSP mask = brush->mask(info); - dab = computeDab(mask); + // Compute tqmask without sub-pixel positioning + KisAlphaMaskSP tqmask = brush->tqmask(info); + dab = computeDab(tqmask); } m_painter->setPressure(info.pressure); - QRect dabRect = QRect(0, 0, brush->maskWidth(info), brush->maskHeight(info)); - QRect dstRect = QRect(x, y, dabRect.width(), dabRect.height()); + TQRect dabRect = TQRect(0, 0, brush->tqmaskWidth(info), brush->tqmaskHeight(info)); + TQRect dstRect = TQRect(x, y, dabRect.width(), dabRect.height()); KisImage * image = device->image(); @@ -104,7 +104,7 @@ void KisPenOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) KisRectIteratorPixel pixelIt = dab->createRectIterator(dabRect.x(), dabRect.y(), dabRect.width(), dabRect.height(), true); while (!pixelIt.isDone()) { - Q_UINT8 alpha = cs->getAlpha(pixelIt.rawData()); + TQ_UINT8 alpha = cs->getAlpha(pixelIt.rawData()); if (alpha < (4 * OPACITY_OPAQUE) / 10) { cs->setAlpha(pixelIt.rawData(), OPACITY_TRANSPARENT, 1); @@ -115,10 +115,10 @@ void KisPenOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) ++pixelIt; } - Q_INT32 sx = dstRect.x() - x; - Q_INT32 sy = dstRect.y() - y; - Q_INT32 sw = dstRect.width(); - Q_INT32 sh = dstRect.height(); + TQ_INT32 sx = dstRect.x() - x; + TQ_INT32 sy = dstRect.y() - y; + TQ_INT32 sw = dstRect.width(); + TQ_INT32 sh = dstRect.height(); if (m_source->hasSelection()) { m_painter->bltSelection(dstRect.x(), dstRect.y(), m_painter->compositeOp(), dab.data(), diff --git a/krita/plugins/paintops/defaultpaintops/kis_penop.h b/krita/plugins/paintops/defaultpaintops/kis_penop.h index f548bed5..ac03a501 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_penop.h +++ b/krita/plugins/paintops/defaultpaintops/kis_penop.h @@ -23,8 +23,8 @@ #ifndef KIS_PENOP_H_ #define KIS_PENOP_H_ -#include <qlabel.h> -#include <qwidget.h> +#include <tqlabel.h> +#include <tqwidget.h> #include "kis_paintop.h" class KisPoint; @@ -38,7 +38,7 @@ public: virtual KisPaintOp * createOp(const KisPaintOpSettings *settings, KisPainter * painter); virtual KisID id(){ return KisID("pen", i18n("Pixel Pencil")); } - virtual QString pixmap() { return "pencil.png"; } + virtual TQString pixmap() { return "pencil.png"; } }; diff --git a/krita/plugins/paintops/defaultpaintops/kis_smudgeop.cc b/krita/plugins/paintops/defaultpaintops/kis_smudgeop.cc index a339c062..2e50bebb 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_smudgeop.cc +++ b/krita/plugins/paintops/defaultpaintops/kis_smudgeop.cc @@ -20,14 +20,14 @@ #include <string.h> -#include <qrect.h> -#include <qwidget.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qtabwidget.h> -#include <qtoolbutton.h> -#include <qslider.h> +#include <tqrect.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqtabwidget.h> +#include <tqtoolbutton.h> +#include <tqslider.h> #include <kdebug.h> @@ -56,30 +56,30 @@ KisPaintOp * KisSmudgeOpFactory::createOp(const KisPaintOpSettings *settings, Ki return op; } -KisSmudgeOpSettings::KisSmudgeOpSettings(QWidget *parent, bool isTablet) - : super(parent) +KisSmudgeOpSettings::KisSmudgeOpSettings(TQWidget *tqparent, bool isTablet) + : super(tqparent) { - m_optionsWidget = new QWidget(parent, "brush option widget"); - QHBoxLayout * l = new QHBoxLayout(m_optionsWidget); + m_optionsWidget = new TQWidget(tqparent, "brush option widget"); + TQHBoxLayout * l = new TQHBoxLayout(m_optionsWidget); l->setAutoAdd(true); - m_rateLabel = new QLabel(i18n("Rate: "), m_optionsWidget); - m_rateSlider = new QSlider(0,100,1, 50, Qt::Horizontal, m_optionsWidget); + m_rateLabel = new TQLabel(i18n("Rate: "), m_optionsWidget); + m_rateSlider = new TQSlider(0,100,1, 50, Qt::Horizontal, m_optionsWidget); if(isTablet) { - m_pressureVariation = new QLabel(i18n("Pressure variation: "), m_optionsWidget); - m_size = new QCheckBox(i18n("Size"), m_optionsWidget); + m_pressureVariation = new TQLabel(i18n("Pressure variation: "), m_optionsWidget); + m_size = new TQCheckBox(i18n("Size"), m_optionsWidget); m_size->setChecked(true); - m_opacity = new QCheckBox(i18n("Opacity"), m_optionsWidget); - m_rate = new QCheckBox(i18n("Rate"), m_optionsWidget); + m_opacity = new TQCheckBox(i18n("Opacity"), m_optionsWidget); + m_rate = new TQCheckBox(i18n("Rate"), m_optionsWidget); m_curveControl = new WdgBrushCurveControl(m_optionsWidget); // We abuse the darken curve here for rate m_curveControl->tabWidget->setTabLabel(m_curveControl->tabWidget->page(2), i18n("Rate")); m_curveControl->tabWidget->setTabToolTip(m_curveControl->tabWidget->page(2), i18n("Modifies the rate. Bottom is 0% of the rate top is 100% of the original rate.")); - QToolButton* moreButton = new QToolButton(Qt::UpArrow, m_optionsWidget); - moreButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - moreButton->setMinimumSize(QSize(24,24)); // Bah, I had hoped the above line would make this unneeded - connect(moreButton, SIGNAL(clicked()), this, SLOT(slotCustomCurves())); + TQToolButton* moreButton = new TQToolButton(TQt::UpArrow, m_optionsWidget); + moreButton->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + moreButton->setMinimumSize(TQSize(24,24)); // Bah, I had hoped the above line would make this unneeded + connect(moreButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCustomCurves())); } else { m_pressureVariation = 0; m_size = 0; @@ -95,7 +95,7 @@ KisSmudgeOpSettings::KisSmudgeOpSettings(QWidget *parent, bool isTablet) } void KisSmudgeOpSettings::slotCustomCurves() { - if (m_curveControl->exec() == QDialog::Accepted) { + if (m_curveControl->exec() == TQDialog::Accepted) { m_customRate = m_curveControl->darkenCheckbox->isChecked(); m_customSize = m_curveControl->sizeCheckbox->isChecked(); m_customOpacity = m_curveControl->opacityCheckbox->isChecked(); @@ -145,13 +145,13 @@ bool KisSmudgeOpSettings::varyOpacity() const return m_opacity ? m_opacity->isChecked() : false; } -KisPaintOpSettings* KisSmudgeOpFactory::settings(QWidget * parent, const KisInputDevice& inputDevice) +KisPaintOpSettings* KisSmudgeOpFactory::settings(TQWidget * tqparent, const KisInputDevice& inputDevice) { if (inputDevice == KisInputDevice::mouse()) { // No options for mouse, only tablet devices - return new KisSmudgeOpSettings(parent, false); + return new KisSmudgeOpSettings(tqparent, false); } else { - return new KisSmudgeOpSettings(parent, true); + return new KisSmudgeOpSettings(tqparent, true); } } @@ -205,13 +205,13 @@ void KisSmudgeOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) // Painting should be implemented according to the following algorithm: // retrieve brush - // if brush == mask - // retrieve mask + // if brush == tqmask + // retrieve tqmask // else if brush == image // retrieve image - // subsample (mask | image) for position -- pos should be double! - // apply filters to mask (colour | gradient | pattern | etc. - // composite filtered mask into temporary layer + // subsample (tqmask | image) for position -- pos should be double! + // apply filters to tqmask (colour | gradient | pattern | etc. + // composite filtered tqmask into temporary layer // composite temporary layer into target layer // @see: doc/brush.txt @@ -232,9 +232,9 @@ void KisSmudgeOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) // Split the coordinates into integer plus fractional parts. The integer // is where the dab will be positioned and the fractional part determines // the sub-pixel positioning. - Q_INT32 x; + TQ_INT32 x; double xFraction; - Q_INT32 y; + TQ_INT32 y; double yFraction; splitCoordinate(pt.x(), &x, &xFraction); @@ -242,13 +242,13 @@ void KisSmudgeOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) KisPaintDeviceSP dab = 0; - Q_UINT8 origOpacity = m_painter->opacity(); + TQ_UINT8 origOpacity = m_painter->opacity(); if (m_pressureOpacity) { if (!m_customOpacity) - m_painter->setOpacity((Q_INT8)(origOpacity * info.pressure)); + m_painter->setOpacity((TQ_INT8)(origOpacity * info.pressure)); else - m_painter->setOpacity((Q_INT8)(origOpacity * scaleToCurve(info.pressure, m_opacityCurve))); + m_painter->setOpacity((TQ_INT8)(origOpacity * scaleToCurve(info.pressure, m_opacityCurve))); } if (brush->brushType() == IMAGE || brush->brushType() == PIPE_IMAGE) { @@ -256,16 +256,16 @@ void KisSmudgeOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) dab->convertTo(KisMetaRegistry::instance()->csRegistry()->getAlpha8()); } else { - KisAlphaMaskSP mask = brush->mask(adjustedInfo, xFraction, yFraction); - dab = computeDab(mask, KisMetaRegistry::instance()->csRegistry()->getAlpha8()); + KisAlphaMaskSP tqmask = brush->tqmask(adjustedInfo, xFraction, yFraction); + dab = computeDab(tqmask, KisMetaRegistry::instance()->csRegistry()->getAlpha8()); } m_painter->setPressure(adjustedInfo.pressure); - QRect dabRect = QRect(0, 0, brush->maskWidth(adjustedInfo), - brush->maskHeight(adjustedInfo)); - QRect dstRect = QRect(x, y, dabRect.width(), dabRect.height()); + TQRect dabRect = TQRect(0, 0, brush->tqmaskWidth(adjustedInfo), + brush->tqmaskHeight(adjustedInfo)); + TQRect dstRect = TQRect(x, y, dabRect.width(), dabRect.height()); KisImage * image = device->image(); @@ -273,8 +273,8 @@ void KisSmudgeOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) dstRect &= image->bounds(); } - Q_INT32 sw = dab->extent().width(); - Q_INT32 sh = dab->extent().height(); + TQ_INT32 sw = dab->extent().width(); + TQ_INT32 sh = dab->extent().height(); KisPainter copyPainter(m_srcdev); int opacity = OPACITY_OPAQUE; @@ -283,9 +283,9 @@ void KisSmudgeOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) opacity = rate(); if (m_pressureRate) { if (m_customRate) { - opacity = CLAMP((Q_UINT8)(double(opacity) * scaleToCurve(info.pressure, m_rateCurve)), OPACITY_TRANSPARENT, OPACITY_OPAQUE); + opacity = CLAMP((TQ_UINT8)(double(opacity) * scaleToCurve(info.pressure, m_rateCurve)), OPACITY_TRANSPARENT, OPACITY_OPAQUE); } else { - opacity = CLAMP((Q_UINT8)(double(opacity) * info.pressure), OPACITY_TRANSPARENT, OPACITY_OPAQUE); + opacity = CLAMP((TQ_UINT8)(double(opacity) * info.pressure), OPACITY_TRANSPARENT, OPACITY_OPAQUE); } } opacity = OPACITY_OPAQUE - opacity; @@ -306,8 +306,8 @@ void KisSmudgeOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) if (dstRect.isNull() || dstRect.isEmpty() || !dstRect.isValid()) return; - Q_INT32 sx = dstRect.x() - x; - Q_INT32 sy = dstRect.y() - y; + TQ_INT32 sx = dstRect.x() - x; + TQ_INT32 sy = dstRect.y() - y; sw = dstRect.width(); sh = dstRect.height(); diff --git a/krita/plugins/paintops/defaultpaintops/kis_smudgeop.h b/krita/plugins/paintops/defaultpaintops/kis_smudgeop.h index 26a82e07..d9c8872d 100644 --- a/krita/plugins/paintops/defaultpaintops/kis_smudgeop.h +++ b/krita/plugins/paintops/defaultpaintops/kis_smudgeop.h @@ -20,12 +20,12 @@ #define KIS_SMUDGEOP_H_ #include "kis_paintop.h" -#include <qobject.h> +#include <tqobject.h> -class QWidget; -class QCheckBox; -class QLabel; -class QSlider; +class TQWidget; +class TQCheckBox; +class TQLabel; +class TQSlider; class KisPoint; class KisPainter; class KCurve; @@ -39,15 +39,16 @@ public: virtual KisPaintOp * createOp(const KisPaintOpSettings *settings, KisPainter * painter); virtual KisID id() { return KisID("smudge", i18n("Smudge Brush")); } - virtual QString pixmap() { return "paintbrush.png"; } - virtual KisPaintOpSettings *settings(QWidget * parent, const KisInputDevice& inputDevice); + virtual TQString pixmap() { return "paintbrush.png"; } + virtual KisPaintOpSettings *settings(TQWidget * tqparent, const KisInputDevice& inputDevice); }; -class KisSmudgeOpSettings : public QObject, public KisPaintOpSettings { +class KisSmudgeOpSettings : public TQObject, public KisPaintOpSettings { Q_OBJECT + TQ_OBJECT typedef KisPaintOpSettings super; public: - KisSmudgeOpSettings(QWidget *parent, bool isTablet); + KisSmudgeOpSettings(TQWidget *tqparent, bool isTablet); int rate() const; bool varyRate() const; @@ -61,18 +62,18 @@ public: const double* sizeCurve() const { return m_sizeCurve; } const double* opacityCurve() const { return m_opacityCurve; } - virtual QWidget *widget() const { return m_optionsWidget; } + virtual TQWidget *widget() const { return m_optionsWidget; } private slots: void slotCustomCurves(); private: void transferCurve(KCurve* curve, double* target); - QWidget *m_optionsWidget; - QLabel* m_rateLabel; - QSlider* m_rateSlider; - QLabel * m_pressureVariation; - QCheckBox * m_rate; - QCheckBox * m_size; - QCheckBox * m_opacity; + TQWidget *m_optionsWidget; + TQLabel* m_rateLabel; + TQSlider* m_rateSlider; + TQLabel * m_pressureVariation; + TQCheckBox * m_rate; + TQCheckBox * m_size; + TQCheckBox * m_opacity; WdgBrushCurveControl* m_curveControl; bool m_customSize; |