diff options
Diffstat (limited to 'lib/kopainter/ko_rgb_widget.cc')
-rw-r--r-- | lib/kopainter/ko_rgb_widget.cc | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/lib/kopainter/ko_rgb_widget.cc b/lib/kopainter/ko_rgb_widget.cc index f533bef5..64b15366 100644 --- a/lib/kopainter/ko_rgb_widget.cc +++ b/lib/kopainter/ko_rgb_widget.cc @@ -21,12 +21,12 @@ #include "ko_rgb_widget.h" -#include <qlayout.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qspinbox.h> -#include <qtooltip.h> -#include <qcolor.h> +#include <tqlayout.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqtooltip.h> +#include <tqcolor.h> #include <kdebug.h> #include <klocale.h> @@ -35,59 +35,59 @@ #include <koColorSlider.h> #include <kcolordialog.h> -KoRGBWidget::KoRGBWidget(QWidget *parent, const char *name) : super(parent, name) +KoRGBWidget::KoRGBWidget(TQWidget *tqparent, const char *name) : super(tqparent, name) { m_ColorButton = new KDualColorButton(this); - m_ColorButton -> setFixedSize(m_ColorButton->sizeHint()); - QGridLayout *mGrid = new QGridLayout(this, 3, 5, 5, 2); + m_ColorButton -> setFixedSize(m_ColorButton->tqsizeHint()); + TQGridLayout *mGrid = new TQGridLayout(this, 3, 5, 5, 2); /* setup color sliders */ mRSlider = new KoColorSlider(this); mRSlider->setMaximumHeight(20); mRSlider->slotSetRange(0, 255); - mRSlider->setFocusPolicy( QWidget::ClickFocus ); + mRSlider->setFocusPolicy( TQ_ClickFocus ); mGSlider = new KoColorSlider(this); mGSlider->setMaximumHeight(20); mGSlider->slotSetRange(0, 255); - mGSlider->setFocusPolicy( QWidget::ClickFocus ); + mGSlider->setFocusPolicy( TQ_ClickFocus ); mBSlider = new KoColorSlider(this); mBSlider->setMaximumHeight(20); mBSlider->slotSetRange(0, 255); - mBSlider->setFocusPolicy( QWidget::ClickFocus ); + mBSlider->setFocusPolicy( TQ_ClickFocus ); /* setup slider labels */ - mRLabel = new QLabel("R:", this); + mRLabel = new TQLabel("R:", this); mRLabel->setFixedWidth(12); mRLabel->setFixedHeight(20); - mGLabel = new QLabel("G:", this); + mGLabel = new TQLabel("G:", this); mGLabel->setFixedWidth(12); mGLabel->setFixedHeight(20); - mBLabel = new QLabel("B:", this); + mBLabel = new TQLabel("B:", this); mBLabel->setFixedWidth(12); mBLabel->setFixedHeight(20); /* setup spin box */ - mRIn = new QSpinBox(0, 255, 1, this); + mRIn = new TQSpinBox(0, 255, 1, this); mRIn->setFixedWidth(50); mRIn->setFixedHeight(20); - mRIn->setFocusPolicy( QWidget::ClickFocus ); - QToolTip::add( mRIn, i18n( "Red" ) ); + mRIn->setFocusPolicy( TQ_ClickFocus ); + TQToolTip::add( mRIn, i18n( "Red" ) ); - mGIn = new QSpinBox(0, 255, 1, this); + mGIn = new TQSpinBox(0, 255, 1, this); mGIn->setFixedWidth(50); mGIn->setFixedHeight(20); - mGIn->setFocusPolicy( QWidget::ClickFocus ); - QToolTip::add( mGIn, i18n( "Green" ) ); + mGIn->setFocusPolicy( TQ_ClickFocus ); + TQToolTip::add( mGIn, i18n( "Green" ) ); - mBIn = new QSpinBox(0, 255, 1, this); + mBIn = new TQSpinBox(0, 255, 1, this); mBIn->setFixedWidth(50); mBIn->setFixedHeight(20); - mBIn->setFocusPolicy( QWidget::ClickFocus ); - QToolTip::add( mBIn, i18n( "Blue" ) ); + mBIn->setFocusPolicy( TQ_ClickFocus ); + TQToolTip::add( mBIn, i18n( "Blue" ) ); - mGrid->addMultiCellWidget(m_ColorButton, 0, 3, 0, 0, Qt::AlignTop); + mGrid->addMultiCellWidget(m_ColorButton, 0, 3, 0, 0, TQt::AlignTop); mGrid->addWidget(mRLabel, 0, 1); mGrid->addWidget(mGLabel, 1, 1); mGrid->addWidget(mBLabel, 2, 1); @@ -98,68 +98,68 @@ KoRGBWidget::KoRGBWidget(QWidget *parent, const char *name) : super(parent, name mGrid->addWidget(mGIn, 1, 4); mGrid->addWidget(mBIn, 2, 4); - connect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &))); - connect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &))); - connect(m_ColorButton, SIGNAL(currentChanged(KDualColorButton::DualColor)), this, SLOT(currentChanged(KDualColorButton::DualColor))); + connect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &))); + connect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &))); + connect(m_ColorButton, TQT_SIGNAL(currentChanged(KDualColorButton::DualColor)), this, TQT_SLOT(currentChanged(KDualColorButton::DualColor))); /* connect color sliders */ - connect(mRSlider, SIGNAL(valueChanged(int)), this, SLOT(slotRChanged(int))); - connect(mGSlider, SIGNAL(valueChanged(int)), this, SLOT(slotGChanged(int))); - connect(mBSlider, SIGNAL(valueChanged(int)), this, SLOT(slotBChanged(int))); + connect(mRSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotRChanged(int))); + connect(mGSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotGChanged(int))); + connect(mBSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotBChanged(int))); /* connect spin box */ - connect(mRIn, SIGNAL(valueChanged(int)), this, SLOT(slotRChanged(int))); - connect(mGIn, SIGNAL(valueChanged(int)), this, SLOT(slotGChanged(int))); - connect(mBIn, SIGNAL(valueChanged(int)), this, SLOT(slotBChanged(int))); + connect(mRIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotRChanged(int))); + connect(mGIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotGChanged(int))); + connect(mBIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotBChanged(int))); - update(Qt::black, Qt::white); + update(TQt::black, TQt::white); } void KoRGBWidget::slotRChanged(int r) { if (m_ColorButton->current() == KDualColorButton::Foreground) - slotFGColorSelected( QColor(r, m_fgColor.green(), m_fgColor.blue())); + slotFGColorSelected( TQColor(r, m_fgColor.green(), m_fgColor.blue())); else - slotBGColorSelected( QColor(r, m_bgColor.green(), m_bgColor.blue())); + slotBGColorSelected( TQColor(r, m_bgColor.green(), m_bgColor.blue())); } void KoRGBWidget::slotGChanged(int g) { if (m_ColorButton->current() == KDualColorButton::Foreground) - slotFGColorSelected( QColor( m_fgColor.red(), g, m_fgColor.blue())); + slotFGColorSelected( TQColor( m_fgColor.red(), g, m_fgColor.blue())); else - slotBGColorSelected( QColor( m_bgColor.red(), g, m_bgColor.blue()));; + slotBGColorSelected( TQColor( m_bgColor.red(), g, m_bgColor.blue()));; } void KoRGBWidget::slotBChanged(int b) { if (m_ColorButton->current() == KDualColorButton::Foreground) - slotFGColorSelected( QColor( m_fgColor.red(), m_fgColor.green(), b)); + slotFGColorSelected( TQColor( m_fgColor.red(), m_fgColor.green(), b)); else - slotBGColorSelected( QColor( m_bgColor.red(), m_bgColor.green(), b)); + slotBGColorSelected( TQColor( m_bgColor.red(), m_bgColor.green(), b)); } -void KoRGBWidget::setFgColor(const QColor & c) +void KoRGBWidget::setFgColor(const TQColor & c) { blockSignals(true); slotFGColorSelected(c); blockSignals(false); } -void KoRGBWidget::setBgColor(const QColor & c) +void KoRGBWidget::setBgColor(const TQColor & c) { blockSignals(true); slotBGColorSelected(c); blockSignals(false); } -void KoRGBWidget::update(const QColor fgColor, const QColor bgColor) +void KoRGBWidget::update(const TQColor fgColor, const TQColor bgColor) { m_fgColor = fgColor; m_bgColor = bgColor; - QColor color = (m_ColorButton->current() == KDualColorButton::Foreground)? m_fgColor : m_bgColor; + TQColor color = (m_ColorButton->current() == KDualColorButton::Foreground)? m_fgColor : m_bgColor; int r = color.red(); int g = color.green(); @@ -172,18 +172,18 @@ void KoRGBWidget::update(const QColor fgColor, const QColor bgColor) mBSlider->blockSignals(true); mBIn->blockSignals(true); - mRSlider->slotSetColor1(QColor(0, g, b)); - mRSlider->slotSetColor2(QColor(255, g, b)); + mRSlider->slotSetColor1(TQColor(0, g, b)); + mRSlider->slotSetColor2(TQColor(255, g, b)); mRSlider->slotSetValue(r); mRIn->setValue(r); - mGSlider->slotSetColor1(QColor(r, 0, b)); - mGSlider->slotSetColor2(QColor(r, 255, b)); + mGSlider->slotSetColor1(TQColor(r, 0, b)); + mGSlider->slotSetColor2(TQColor(r, 255, b)); mGSlider->slotSetValue(g); mGIn->setValue(g); - mBSlider->slotSetColor1(QColor(r, g, 0)); - mBSlider->slotSetColor2(QColor(r, g, 255)); + mBSlider->slotSetColor1(TQColor(r, g, 0)); + mBSlider->slotSetColor2(TQColor(r, g, 255)); mBSlider->slotSetValue(b); mBIn->setValue(b); @@ -195,24 +195,24 @@ void KoRGBWidget::update(const QColor fgColor, const QColor bgColor) mBIn->blockSignals(false); } -void KoRGBWidget::slotFGColorSelected(const QColor& c) +void KoRGBWidget::slotFGColorSelected(const TQColor& c) { m_fgColor = c; - disconnect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &))); + disconnect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &))); m_ColorButton->setForeground( m_fgColor ); - connect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &))); + connect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &))); update( m_fgColor, m_bgColor); emit sigFgColorChanged(m_fgColor); } -void KoRGBWidget::slotBGColorSelected(const QColor& c) +void KoRGBWidget::slotBGColorSelected(const TQColor& c) { m_bgColor = c; - disconnect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &))); + disconnect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &))); m_ColorButton->setBackground( m_bgColor ); - connect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &))); + connect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &))); update(m_fgColor, m_bgColor); emit sigBgColorChanged(m_bgColor); |