diff options
Diffstat (limited to 'kolourpaint/widgets/kpcolortoolbar.cpp')
-rw-r--r-- | kolourpaint/widgets/kpcolortoolbar.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/kolourpaint/widgets/kpcolortoolbar.cpp b/kolourpaint/widgets/kpcolortoolbar.cpp index d3bb51e1..67e1e7e8 100644 --- a/kolourpaint/widgets/kpcolortoolbar.cpp +++ b/kolourpaint/widgets/kpcolortoolbar.cpp @@ -462,7 +462,7 @@ static bool ownColorsInitialised = false; #define rows 2 #define cols 11 kpColorCells::kpColorCells (TQWidget *parent, - Qt::Orientation o, + TQt::Orientation o, const char *name) : KColorCells (parent, rows, cols), m_mouseButton (-1) @@ -476,8 +476,8 @@ kpColorCells::kpColorCells (TQWidget *parent, setAcceptDrops (true); setAcceptDrags (true); - connect (this, TQT_SIGNAL (colorDoubleClicked (int)), - TQT_SLOT (slotColorDoubleClicked (int))); + connect (this, TQ_SIGNAL (colorDoubleClicked (int)), + TQ_SLOT (slotColorDoubleClicked (int))); if (!ownColorsInitialised) { @@ -514,16 +514,16 @@ kpColorCells::~kpColorCells () { } -Qt::Orientation kpColorCells::orientation () const +TQt::Orientation kpColorCells::orientation () const { return m_orientation; } -void kpColorCells::setOrientation (Qt::Orientation o) +void kpColorCells::setOrientation (TQt::Orientation o) { int c, r; - if (o == Qt::Horizontal) + if (o == TQt::Horizontal) { c = cols; r = rows; @@ -588,7 +588,7 @@ void kpColorCells::setOrientation (Qt::Orientation o) int y, x; int pos; - if (o == Qt::Horizontal) + if (o == TQt::Horizontal) { y = i / cols; x = i % cols; @@ -660,23 +660,23 @@ void kpColorCells::mouseReleaseEvent (TQMouseEvent *e) TQt::ButtonState button = e->button (); #if DEBUG_KP_COLOR_TOOL_BAR kdDebug () << "kpColorCells::mouseReleaseEvent(left=" - << (button & Qt::LeftButton) + << (button & TQt::LeftButton) << ",right=" - << (button & Qt::RightButton) + << (button & TQt::RightButton) << ")" << endl; #endif - if (!((button & Qt::LeftButton) && (button & Qt::RightButton))) + if (!((button & TQt::LeftButton) && (button & TQt::RightButton))) { - if (button & Qt::LeftButton) + if (button & TQt::LeftButton) m_mouseButton = 0; - else if (button & Qt::RightButton) + else if (button & TQt::RightButton) m_mouseButton = 1; } - connect (this, TQT_SIGNAL (colorSelected (int)), this, TQT_SLOT (slotColorSelected (int))); + connect (this, TQ_SIGNAL (colorSelected (int)), this, TQ_SLOT (slotColorSelected (int))); KColorCells::mouseReleaseEvent (e); - disconnect (this, TQT_SIGNAL (colorSelected (int)), this, TQT_SLOT (slotColorSelected (int))); + disconnect (this, TQ_SIGNAL (colorSelected (int)), this, TQ_SLOT (slotColorSelected (int))); #if DEBUG_KP_COLOR_TOOL_BAR kdDebug () << "kpColorCells::mouseReleaseEvent() setting m_mouseButton back to -1" << endl; @@ -783,14 +783,14 @@ void kpTransparentColorCell::mousePressEvent (TQMouseEvent * /*e*/) // protected virtual [base TQWidget] void kpTransparentColorCell::mouseReleaseEvent (TQMouseEvent *e) { - if (TQT_TQRECT_OBJECT(rect ()).contains (e->pos ())) + if (rect ().contains (e->pos ())) { - if (e->button () == Qt::LeftButton) + if (e->button () == TQt::LeftButton) { emit transparentColorSelected (0); emit foregroundColorChanged (kpColor::transparent); } - else if (e->button () == Qt::RightButton) + else if (e->button () == TQt::RightButton) { emit transparentColorSelected (1); emit backgroundColorChanged (kpColor::transparent); @@ -819,7 +819,7 @@ void kpTransparentColorCell::drawContents (TQPainter *p) */ kpColorPalette::kpColorPalette (TQWidget *parent, - Qt::Orientation o, + TQt::Orientation o, const char *name) : TQWidget (parent, name), m_boxLayout (0) @@ -830,16 +830,16 @@ kpColorPalette::kpColorPalette (TQWidget *parent, m_transparentColorCell = new kpTransparentColorCell (this); m_transparentColorCell->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed); - connect (m_transparentColorCell, TQT_SIGNAL (foregroundColorChanged (const kpColor &)), - this, TQT_SIGNAL (foregroundColorChanged (const kpColor &))); - connect (m_transparentColorCell, TQT_SIGNAL (backgroundColorChanged (const kpColor &)), - this, TQT_SIGNAL (backgroundColorChanged (const kpColor &))); + connect (m_transparentColorCell, TQ_SIGNAL (foregroundColorChanged (const kpColor &)), + this, TQ_SIGNAL (foregroundColorChanged (const kpColor &))); + connect (m_transparentColorCell, TQ_SIGNAL (backgroundColorChanged (const kpColor &)), + this, TQ_SIGNAL (backgroundColorChanged (const kpColor &))); m_colorCells = new kpColorCells (this); - connect (m_colorCells, TQT_SIGNAL (foregroundColorChanged (const kpColor &)), - this, TQT_SIGNAL (foregroundColorChanged (const kpColor &))); - connect (m_colorCells, TQT_SIGNAL (backgroundColorChanged (const kpColor &)), - this, TQT_SIGNAL (backgroundColorChanged (const kpColor &))); + connect (m_colorCells, TQ_SIGNAL (foregroundColorChanged (const kpColor &)), + this, TQ_SIGNAL (foregroundColorChanged (const kpColor &))); + connect (m_colorCells, TQ_SIGNAL (backgroundColorChanged (const kpColor &)), + this, TQ_SIGNAL (backgroundColorChanged (const kpColor &))); setOrientation (o); } @@ -849,18 +849,18 @@ kpColorPalette::~kpColorPalette () } // public -Qt::Orientation kpColorPalette::orientation () const +TQt::Orientation kpColorPalette::orientation () const { return m_orientation; } -void kpColorPalette::setOrientation (Qt::Orientation o) +void kpColorPalette::setOrientation (TQt::Orientation o) { m_colorCells->setOrientation (o); delete m_boxLayout; - if (o == Qt::Horizontal) + if (o == TQt::Horizontal) { m_boxLayout = new TQBoxLayout (this, TQBoxLayout::LeftToRight, 0/*margin*/, 5/*spacing*/); m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, TQt::AlignVCenter); @@ -965,25 +965,25 @@ kpColorToolBar::kpColorToolBar (const TQString &label, kpMainWindow *mainWindow, m_dualColorButton = new kpDualColorButton (mainWindow, base); m_dualColorButton->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed); - connect (m_dualColorButton, TQT_SIGNAL (colorsSwapped (const kpColor &, const kpColor &)), - this, TQT_SIGNAL (colorsSwapped (const kpColor &, const kpColor &))); - connect (m_dualColorButton, TQT_SIGNAL (foregroundColorChanged (const kpColor &)), - this, TQT_SIGNAL (foregroundColorChanged (const kpColor &))); - connect (m_dualColorButton, TQT_SIGNAL (backgroundColorChanged (const kpColor &)), - this, TQT_SIGNAL (backgroundColorChanged (const kpColor &))); + connect (m_dualColorButton, TQ_SIGNAL (colorsSwapped (const kpColor &, const kpColor &)), + this, TQ_SIGNAL (colorsSwapped (const kpColor &, const kpColor &))); + connect (m_dualColorButton, TQ_SIGNAL (foregroundColorChanged (const kpColor &)), + this, TQ_SIGNAL (foregroundColorChanged (const kpColor &))); + connect (m_dualColorButton, TQ_SIGNAL (backgroundColorChanged (const kpColor &)), + this, TQ_SIGNAL (backgroundColorChanged (const kpColor &))); m_boxLayout->addWidget (m_dualColorButton, 0/*stretch*/); m_colorPalette = new kpColorPalette (base); - connect (m_colorPalette, TQT_SIGNAL (foregroundColorChanged (const kpColor &)), - m_dualColorButton, TQT_SLOT (setForegroundColor (const kpColor &))); - connect (m_colorPalette, TQT_SIGNAL (backgroundColorChanged (const kpColor &)), - m_dualColorButton, TQT_SLOT (setBackgroundColor (const kpColor &))); + connect (m_colorPalette, TQ_SIGNAL (foregroundColorChanged (const kpColor &)), + m_dualColorButton, TQ_SLOT (setForegroundColor (const kpColor &))); + connect (m_colorPalette, TQ_SIGNAL (backgroundColorChanged (const kpColor &)), + m_dualColorButton, TQ_SLOT (setBackgroundColor (const kpColor &))); m_boxLayout->addWidget (m_colorPalette, 0/*stretch*/); m_colorSimilarityToolBarItem = new kpColorSimilarityToolBarItem (mainWindow, base); m_colorSimilarityToolBarItem->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed); - connect (m_colorSimilarityToolBarItem, TQT_SIGNAL (colorSimilarityChanged (double, int)), - this, TQT_SIGNAL (colorSimilarityChanged (double, int))); + connect (m_colorSimilarityToolBarItem, TQ_SIGNAL (colorSimilarityChanged (double, int)), + this, TQ_SIGNAL (colorSimilarityChanged (double, int))); m_boxLayout->addWidget (m_colorSimilarityToolBarItem, 0/*stretch*/); // HACK: couldn't get TQSpacerItem to work @@ -997,7 +997,7 @@ kpColorToolBar::kpColorToolBar (const TQString &label, kpMainWindow *mainWindow, } // virtual -void kpColorToolBar::setOrientation (Qt::Orientation o) +void kpColorToolBar::setOrientation (TQt::Orientation o) { // (TQDockWindow::undock() calls us) bool isOutsideDock = (place () == TQDockWindow::OutsideDock); @@ -1014,7 +1014,7 @@ void kpColorToolBar::setOrientation (Qt::Orientation o) o = m_lastDockedOrientation; } - if (o == Qt::Horizontal) + if (o == TQt::Horizontal) { m_boxLayout->setDirection (TQBoxLayout::LeftToRight); } |