diff options
Diffstat (limited to 'krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.cc')
-rw-r--r-- | krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.cc | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.cc b/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.cc index cdb38cb3..bfac2a5d 100644 --- a/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.cc +++ b/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.cc @@ -18,12 +18,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qpoint.h> -#include <qlayout.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qtimer.h> +#include <tqpoint.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqtimer.h> #include <kapplication.h> #include <kaction.h> @@ -47,10 +47,10 @@ #include "kis_tool_selectsimilar.h" -void selectByColor(KisPaintDeviceSP dev, KisSelectionSP selection, const Q_UINT8 * c, int fuzziness, enumSelectionMode mode) +void selectByColor(KisPaintDeviceSP dev, KisSelectionSP selection, const TQ_UINT8 * c, int fuzziness, enumSelectionMode mode) { // XXX: Multithread this! - Q_INT32 x, y, w, h; + TQ_INT32 x, y, w, h; dev->exactBounds(x, y, w, h); @@ -63,7 +63,7 @@ void selectByColor(KisPaintDeviceSP dev, KisSelectionSP selection, const Q_UINT8 //if (dev->colorSpace()->hasAlpha()) // opacity = dev->colorSpace()->getAlpha(hiter.rawData()); - Q_UINT8 match = cs->difference(c, hiter.rawData()); + TQ_UINT8 match = cs->difference(c, hiter.rawData()); if (mode == SELECTION_ADD) { if (match <= fuzziness) { @@ -96,8 +96,8 @@ KisToolSelectSimilar::KisToolSelectSimilar() m_selectionOptionsWidget = 0; m_fuzziness = 20; m_currentSelectAction = m_defaultSelectAction = SELECTION_ADD; - m_timer = new QTimer(this); - connect(m_timer, SIGNAL(timeout()), SLOT(slotTimer()) ); + m_timer = new TQTimer(this); + connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimer()) ); } KisToolSelectSimilar::~KisToolSelectSimilar() @@ -124,13 +124,13 @@ void KisToolSelectSimilar::buttonPress(KisButtonPressEvent *e) { if (m_subject) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); KisImageSP img; KisPaintDeviceSP dev; - QPoint pos; - Q_UINT8 opacity = OPACITY_OPAQUE; + TQPoint pos; + TQ_UINT8 opacity = OPACITY_OPAQUE; - if (e->button() != QMouseEvent::LeftButton && e->button() != QMouseEvent::RightButton) + if (e->button() != TQMouseEvent::LeftButton && e->button() != TQMouseEvent::RightButton) return; if (!(img = m_subject->currentImg())) @@ -141,7 +141,7 @@ void KisToolSelectSimilar::buttonPress(KisButtonPressEvent *e) if (!dev || !img->activeLayer()->visible()) return; - pos = QPoint(e->pos().floorX(), e->pos().floorY()); + pos = TQPoint(e->pos().floorX(), e->pos().floorY()); KisSelectedTransaction *t = 0; if (img->undo()) t = new KisSelectedTransaction(i18n("Similar Selection"),dev); @@ -159,23 +159,23 @@ void KisToolSelectSimilar::buttonPress(KisButtonPressEvent *e) img->undoAdapter()->addCommand(t); m_subject->canvasController()->updateCanvas(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } void KisToolSelectSimilar::slotTimer() { #if KDE_IS_VERSION(3,4,0) - int state = kapp->keyboardMouseState() & (Qt::ShiftButton|Qt::ControlButton|Qt::AltButton); + int state = kapp->keyboardMouseState() & (TQt::ShiftButton|TQt::ControlButton|TQt::AltButton); #else int state = kapp->keyboardModifiers() & (KApplication::ShiftModifier |KApplication::ControlModifier|KApplication::Modifier1); #endif enumSelectionMode action; - if (state == Qt::ShiftButton) + if (state == TQt::ShiftButton) action = SELECTION_ADD; - else if (state == Qt::ControlButton) + else if (state == TQt::ControlButton) action = SELECTION_SUBTRACT; else action = m_defaultSelectAction; @@ -202,7 +202,7 @@ void KisToolSelectSimilar::setup(KActionCollection *collection) m_action = static_cast<KRadioAction *>(collection->action(name())); if (m_action == 0) { - m_action = new KRadioAction(i18n("&Similar Selection"), "tool_similar_selection", "Ctrl+E", this, SLOT(activate()), collection, name()); + m_action = new KRadioAction(i18n("&Similar Selection"), "tool_similar_selection", "Ctrl+E", this, TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); m_action->setToolTip(i18n("Select similar colors")); m_action->setExclusiveGroup("tools"); @@ -226,26 +226,26 @@ void KisToolSelectSimilar::slotSetAction(int action) m_defaultSelectAction = (enumSelectionMode)action; } -QWidget* KisToolSelectSimilar::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectSimilar::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new QWidget(parent); + m_optWidget = new TQWidget(tqparent); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Similar Selection")); - QVBoxLayout * l = new QVBoxLayout(m_optWidget, 0, 6); + TQVBoxLayout * l = new TQVBoxLayout(m_optWidget, 0, 6); Q_CHECK_PTR(l); m_selectionOptionsWidget = new KisSelectionOptions(m_optWidget, m_subject); Q_CHECK_PTR(m_selectionOptionsWidget); l->addWidget(m_selectionOptionsWidget); - connect (m_selectionOptionsWidget, SIGNAL(actionChanged(int)), this, SLOT(slotSetAction(int))); + connect (m_selectionOptionsWidget, TQT_SIGNAL(actionChanged(int)), this, TQT_SLOT(slotSetAction(int))); - QHBoxLayout * hbox = new QHBoxLayout(l); + TQHBoxLayout * hbox = new TQHBoxLayout(l); Q_CHECK_PTR(hbox); - QLabel * lbl = new QLabel(i18n("Fuzziness: "), m_optWidget); + TQLabel * lbl = new TQLabel(i18n("Fuzziness: "), m_optWidget); Q_CHECK_PTR(lbl); hbox->addWidget(lbl); @@ -256,14 +256,14 @@ QWidget* KisToolSelectSimilar::createOptionWidget(QWidget* parent) input->setRange(0, 200, 10, true); input->setValue(20); hbox->addWidget(input); - connect(input, SIGNAL(valueChanged(int)), this, SLOT(slotSetFuzziness(int))); + connect(input, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetFuzziness(int))); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; } -QWidget* KisToolSelectSimilar::optionWidget() +TQWidget* KisToolSelectSimilar::optionWidget() { return m_optWidget; } |