diff options
Diffstat (limited to 'karbon/dialogs/vcolortab.cc')
-rw-r--r-- | karbon/dialogs/vcolortab.cc | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/karbon/dialogs/vcolortab.cc b/karbon/dialogs/vcolortab.cc index 037fdc6e..f66a9ced 100644 --- a/karbon/dialogs/vcolortab.cc +++ b/karbon/dialogs/vcolortab.cc @@ -18,9 +18,9 @@ * Boston, MA 02110-1301, USA. */ -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <kcolordialog.h> #include <klocale.h> @@ -34,67 +34,67 @@ #include <kdebug.h> -VColorTab::VColorTab( const VColor &c, QWidget* parent, const char* name ) - : QTabWidget( parent, name ) +VColorTab::VColorTab( const VColor &c, TQWidget* tqparent, const char* name ) + : TQTabWidget( tqparent, name ) { - QGridLayout *mainLayout; + TQGridLayout *mainLayout; - mRGBWidget = new QWidget( this ); - mainLayout = new QGridLayout( mRGBWidget, 3, 3 ); + mRGBWidget = new TQWidget( this ); + mainLayout = new TQGridLayout( mRGBWidget, 3, 3 ); mColorSelector = new KHSSelector( mRGBWidget ); mColorSelector->setMinimumHeight( 165 ); mColorSelector->setMinimumWidth( 165 ); - connect( mColorSelector, SIGNAL( valueChanged( int, int ) ), this, SLOT( slotHSChanged( int, int ) ) ); + connect( mColorSelector, TQT_SIGNAL( valueChanged( int, int ) ), this, TQT_SLOT( slotHSChanged( int, int ) ) ); mainLayout->addMultiCellWidget(mColorSelector, 0, 2, 0, 0 ); //Selector - mSelector = new KGradientSelector( KSelector::Vertical, mRGBWidget ); - mSelector->setColors( QColor( "white" ), QColor( "black" ) ); + mSelector = new KGradientSelector( Qt::Vertical, mRGBWidget ); + mSelector->setColors( TQColor( "white" ), TQColor( "black" ) ); mSelector->setMinimumWidth( 20 ); - //TODO: Make it autochange color if the solid-filled object is selected (also for QSpinBoxes) - connect( mSelector, SIGNAL( valueChanged( int ) ), this, SLOT( slotVChanged( int ) ) ); + //TODO: Make it autochange color if the solid-filled object is selected (also for TQSpinBoxes) + connect( mSelector, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotVChanged( int ) ) ); mainLayout->addMultiCellWidget( mSelector, 0, 2, 1, 1 ); //Reference - QGroupBox* groupbox = new QGroupBox( 2, Vertical, i18n( "Reference" ), mRGBWidget ); - new QLabel( i18n( "Old:" ), groupbox ); - new QLabel( i18n( "New:" ), groupbox ); + TQGroupBox* groupbox = new TQGroupBox( 2,Qt::Vertical, i18n( "Reference" ), mRGBWidget ); + new TQLabel( i18n( "Old:" ), groupbox ); + new TQLabel( i18n( "New:" ), groupbox ); mOldColor = new KColorPatch( groupbox ); mColorPreview = new KColorPatch( groupbox ); - QColor color( c ); + TQColor color( c ); mOldColor->setColor( color ); mColorPreview->setColor( color ); mainLayout->addWidget( groupbox, 0, 2 ); //Components - QGroupBox* cgroupbox = new QGroupBox( 3, Vertical, i18n( "Components" ), mRGBWidget ); + TQGroupBox* cgroupbox = new TQGroupBox( 3,Qt::Vertical, i18n( "Components" ), mRGBWidget ); //--->RGB - new QLabel( i18n( "R:" ), cgroupbox ); - new QLabel( i18n( "G:" ), cgroupbox ); - new QLabel( i18n( "B:" ), cgroupbox ); + new TQLabel( i18n( "R:" ), cgroupbox ); + new TQLabel( i18n( "G:" ), cgroupbox ); + new TQLabel( i18n( "B:" ), cgroupbox ); mRed = new KIntSpinBox( 0, 255, 1, 0, 10, cgroupbox ); mGreen = new KIntSpinBox( 0, 255, 1, 0, 10, cgroupbox ); mBlue = new KIntSpinBox( 0, 255, 1, 0, 10, cgroupbox ); - connect( mRed, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromRGBSpinBoxes() ) ); - connect( mGreen, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromRGBSpinBoxes() ) ); - connect( mBlue, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromRGBSpinBoxes() ) ); + connect( mRed, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromRGBSpinBoxes() ) ); + connect( mGreen, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromRGBSpinBoxes() ) ); + connect( mBlue, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromRGBSpinBoxes() ) ); //--->HSV - new QLabel( i18n( "Hue:", "H:" ), cgroupbox ); - new QLabel( i18n( "Saturation:", "S:" ), cgroupbox ); - new QLabel( i18n( "Value:", "V:" ), cgroupbox ); + new TQLabel( i18n( "Hue:", "H:" ), cgroupbox ); + new TQLabel( i18n( "Saturation:", "S:" ), cgroupbox ); + new TQLabel( i18n( "Value:", "V:" ), cgroupbox ); mHue = new KIntSpinBox( 0, 359, 1, 0, 10, cgroupbox ); mSaturation = new KIntSpinBox( 0, 255, 1, 0, 10, cgroupbox ); mValue = new KIntSpinBox( 0, 255, 1, 0, 10, cgroupbox ); - connect( mHue, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromHSVSpinBoxes() ) ); - connect( mSaturation, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromHSVSpinBoxes() ) ); - connect( mValue, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromHSVSpinBoxes() ) ); + connect( mHue, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromHSVSpinBoxes() ) ); + connect( mSaturation, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromHSVSpinBoxes() ) ); + connect( mValue, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromHSVSpinBoxes() ) ); mainLayout->addWidget( cgroupbox, 1, 2 ); //--->Opacity - QGroupBox* ogroupBox = new QGroupBox( 1, Vertical, i18n( "Opacity" ), mRGBWidget ); + TQGroupBox* ogroupBox = new TQGroupBox( 1,Qt::Vertical, i18n( "Opacity" ), mRGBWidget ); mOpacity = new KIntNumInput( 100, ogroupBox ); mOpacity->setRange( 0, 100, 1, true ); mOpacity->setValue( int( c.opacity() * 100.0 ) ); @@ -114,7 +114,7 @@ VColorTab::VColorTab( const VColor &c, QWidget* parent, const char* name ) void VColorTab::slotUpdateFromRGBSpinBoxes() { - QColor color( mRed->value(), mGreen->value(), mBlue->value(), QColor::Rgb ); + TQColor color( mRed->value(), mGreen->value(), mBlue->value(), TQColor::Rgb ); mColorPreview->setColor( color ); mColorPreview->update(); @@ -143,7 +143,7 @@ void VColorTab::slotUpdateFromRGBSpinBoxes() void VColorTab::slotUpdateFromHSVSpinBoxes() { - QColor color( mHue->value(), mSaturation->value(), mValue->value(), QColor::Hsv ); + TQColor color( mHue->value(), mSaturation->value(), mValue->value(), TQColor::Hsv ); mColorPreview->setColor( color ); mColorPreview->update(); @@ -181,17 +181,17 @@ VColor VColorTab::Color() void VColorTab::slotHSChanged( int h, int s ) { - //QColor color( mHue->value(), mSaturation->value(), newVal, QColor::Hsv ); + //TQColor color( mHue->value(), mSaturation->value(), newVal, TQColor::Hsv ); mHue->setValue( h ); mSaturation->setValue( s ); - QColor color1( h, s, 255, QColor::Hsv ); - QColor color2( h, s, 0, QColor::Hsv ); + TQColor color1( h, s, 255, TQColor::Hsv ); + TQColor color2( h, s, 0, TQColor::Hsv ); mSelector->setColors( color1, color2 ); } void VColorTab::slotVChanged( int newVal ) { - //QColor color( mHue->value(), mSaturation->value(), newVal, QColor::Hsv ); + //TQColor color( mHue->value(), mSaturation->value(), newVal, TQColor::Hsv ); mValue->setValue( static_cast<int>( float( newVal ) / 99.0 * 255.0 ) ); } |