diff options
author | Slávek Banko <[email protected]> | 2016-03-25 20:03:28 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2016-03-25 20:03:28 +0100 |
commit | 2ee99ab520931c5efe91123c85ba10064a45e95d (patch) | |
tree | a367666e410de28d0f258aed77b11e17cafb28e4 /deco/config/colorpicker.cc | |
parent | cfa36e1a95e82492c17225ff376911abb3688f62 (diff) | |
download | tde-style-baghira-2ee99ab520931c5efe91123c85ba10064a45e95d.tar.gz tde-style-baghira-2ee99ab520931c5efe91123c85ba10064a45e95d.zip |
Initial TQt conversion
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'deco/config/colorpicker.cc')
-rw-r--r-- | deco/config/colorpicker.cc | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/deco/config/colorpicker.cc b/deco/config/colorpicker.cc index 5e11312..6934920 100644 --- a/deco/config/colorpicker.cc +++ b/deco/config/colorpicker.cc @@ -1,51 +1,51 @@ #include "colorpicker.h" -#include <qcolor.h> -#include <qlayout.h> -#include <qslider.h> -#include <qspinbox.h> +#include <tqcolor.h> +#include <tqlayout.h> +#include <tqslider.h> +#include <tqspinbox.h> -ColorPicker::ColorPicker(QWidget* parent, const char* name) : QGroupBox( parent, name){ -// box = new QGroupBox(parent); -// setFrameShape(QFrame::GroupBoxPanel); -// setFrameShadow(QFrame::Sunken); - setColumnLayout(0, Qt::Vertical ); +ColorPicker::ColorPicker(TQWidget* parent, const char* name) : TQGroupBox( parent, name){ +// box = new TQGroupBox(parent); +// setFrameShape(TQFrame::GroupBoxPanel); +// setFrameShadow(TQFrame::Sunken); + setColumnLayout(0, TQt::Vertical ); layout()->setSpacing( 6 ); layout()->setMargin( 11 ); - QVBoxLayout *vLayout = new QVBoxLayout(layout()); -// gridLayout->setAlignment( Qt::AlignTop ); + TQVBoxLayout *vLayout = new TQVBoxLayout(layout()); +// gridLayout->setAlignment( TQt::AlignTop ); - QHBoxLayout *redLayout = new QHBoxLayout(); - redSlider = new QSlider(0, 255, 1, 0, Qt::Horizontal, this, "redSlider"); + TQHBoxLayout *redLayout = new TQHBoxLayout(); + redSlider = new TQSlider(0, 255, 1, 0, TQt::Horizontal, this, "redSlider"); redLayout->addWidget(redSlider); - redValue = new QSpinBox(0,255,1,this); + redValue = new TQSpinBox(0,255,1,this); redValue->setValue(0); redLayout->addWidget(redValue); vLayout->addLayout(redLayout); - QHBoxLayout *greenLayout = new QHBoxLayout(); - greenSlider = new QSlider(0, 255, 1, 0, Qt::Horizontal, this, "greenSlider"); + TQHBoxLayout *greenLayout = new TQHBoxLayout(); + greenSlider = new TQSlider(0, 255, 1, 0, TQt::Horizontal, this, "greenSlider"); greenLayout->addWidget(greenSlider); - greenValue = new QSpinBox(0,255,1,this); + greenValue = new TQSpinBox(0,255,1,this); greenValue->setValue(0); greenLayout->addWidget(greenValue); vLayout->addLayout(greenLayout); - QHBoxLayout *blueLayout = new QHBoxLayout(); - blueSlider = new QSlider(0, 255, 1, 0, Qt::Horizontal, this, "blueSlider"); + TQHBoxLayout *blueLayout = new TQHBoxLayout(); + blueSlider = new TQSlider(0, 255, 1, 0, TQt::Horizontal, this, "blueSlider"); blueLayout->addWidget(blueSlider); - blueValue = new QSpinBox(0,255,1,this); + blueValue = new TQSpinBox(0,255,1,this); blueValue->setValue(0); blueLayout->addWidget(blueValue); vLayout->addLayout(blueLayout); -// resize( QSize(350, 100).expandedTo(minimumSizeHint()) ); +// resize( TQSize(350, 100).expandedTo(minimumSizeHint()) ); //connections connect(redSlider, SIGNAL(valueChanged (int)), this, SLOT(setRed(int))); @@ -59,7 +59,7 @@ ColorPicker::ColorPicker(QWidget* parent, const char* name) : QGroupBox( parent, ColorPicker::~ColorPicker(){ } -void ColorPicker::setColor(QColor color){ +void ColorPicker::setColor(TQColor color){ redSlider->blockSignals(true); redSlider->setValue( color.red() ); redSlider->blockSignals(false); @@ -88,7 +88,7 @@ void ColorPicker::setRed(int red){ redValue->blockSignals(true); redValue->setValue(red); redValue->blockSignals(false); - emit colorChanged(QColor(red, greenSlider->value(), blueSlider->value())); + emit colorChanged(TQColor(red, greenSlider->value(), blueSlider->value())); } void ColorPicker::setGreen(int green){ @@ -98,7 +98,7 @@ void ColorPicker::setGreen(int green){ greenValue->blockSignals(true); greenValue->setValue(green); greenValue->blockSignals(false); - emit colorChanged(QColor(redSlider->value(), green, blueSlider->value())); + emit colorChanged(TQColor(redSlider->value(), green, blueSlider->value())); } void ColorPicker::setBlue(int blue){ @@ -108,11 +108,11 @@ void ColorPicker::setBlue(int blue){ blueValue->blockSignals(true); blueValue->setValue(blue); blueValue->blockSignals(false); - emit colorChanged(QColor(redSlider->value(), greenSlider->value(), blue)); + emit colorChanged(TQColor(redSlider->value(), greenSlider->value(), blue)); } -QColor ColorPicker::Color(){ - return QColor(redSlider->value(), greenSlider->value(), blueSlider->value()); +TQColor ColorPicker::Color(){ + return TQColor(redSlider->value(), greenSlider->value(), blueSlider->value()); } void ColorPicker::reset(){ |