diff options
author | Michele Calgaro <[email protected]> | 2021-02-12 12:11:09 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2021-02-12 12:11:09 +0900 |
commit | a600e78779e6499a53663be60524ca21144e6ca9 (patch) | |
tree | 66029e3fe8185dedc6904baf27ed487de4ccbe82 /deco/config/colorpicker.cc | |
parent | b591c43190556a9c93e9af9dca9c03d09527c040 (diff) | |
download | tde-style-baghira-a600e78779e6499a53663be60524ca21144e6ca9.tar.gz tde-style-baghira-a600e78779e6499a53663be60524ca21144e6ca9.zip |
Renaming of files in preparation for code style tools.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'deco/config/colorpicker.cc')
-rw-r--r-- | deco/config/colorpicker.cc | 126 |
1 files changed, 0 insertions, 126 deletions
diff --git a/deco/config/colorpicker.cc b/deco/config/colorpicker.cc deleted file mode 100644 index c5301c1..0000000 --- a/deco/config/colorpicker.cc +++ /dev/null @@ -1,126 +0,0 @@ -#include "colorpicker.h" -#include <tqcolor.h> -#include <tqlayout.h> -#include <tqslider.h> -#include <tqspinbox.h> - -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 ); - - TQVBoxLayout *vLayout = new TQVBoxLayout(layout()); -// gridLayout->setAlignment( TQt::AlignTop ); - - TQHBoxLayout *redLayout = new TQHBoxLayout(); - redSlider = new TQSlider(0, 255, 1, 0, TQt::Horizontal, this, "redSlider"); - redLayout->addWidget(redSlider); - - redValue = new TQSpinBox(0,255,1,this); - redValue->setValue(0); - redLayout->addWidget(redValue); - - vLayout->addLayout(redLayout); - - TQHBoxLayout *greenLayout = new TQHBoxLayout(); - greenSlider = new TQSlider(0, 255, 1, 0, TQt::Horizontal, this, "greenSlider"); - greenLayout->addWidget(greenSlider); - - greenValue = new TQSpinBox(0,255,1,this); - greenValue->setValue(0); - greenLayout->addWidget(greenValue); - - vLayout->addLayout(greenLayout); - - TQHBoxLayout *blueLayout = new TQHBoxLayout(); - blueSlider = new TQSlider(0, 255, 1, 0, TQt::Horizontal, this, "blueSlider"); - blueLayout->addWidget(blueSlider); - - blueValue = new TQSpinBox(0,255,1,this); - blueValue->setValue(0); - blueLayout->addWidget(blueValue); - - vLayout->addLayout(blueLayout); - -// resize( TQSize(350, 100).expandedTo(minimumSizeHint()) ); - - //connections - connect(redSlider, SIGNAL(valueChanged (int)), this, SLOT(setRed(int))); - connect(greenSlider, SIGNAL(valueChanged (int)), this, SLOT(setGreen(int))); - connect(blueSlider, SIGNAL(valueChanged (int)), this, SLOT(setBlue(int))); - connect(redValue, SIGNAL(valueChanged (int)), this, SLOT(setRed(int))); - connect(greenValue, SIGNAL(valueChanged (int)), this, SLOT(setGreen(int))); - connect(blueValue, SIGNAL(valueChanged (int)), this, SLOT(setBlue(int))); -} - -ColorPicker::~ColorPicker(){ -} - -void ColorPicker::setColor(TQColor color){ - redSlider->blockSignals(true); - redSlider->setValue( color.red() ); - redSlider->blockSignals(false); - redValue->blockSignals(true); - redValue->setValue(redSlider->value()); - redValue->blockSignals(false); - greenSlider->blockSignals(true); - greenSlider->setValue( color.green() ); - greenSlider->blockSignals(false); - greenValue->blockSignals(true); - greenValue->setValue(greenSlider->value()); - greenValue->blockSignals(false); - blueSlider->blockSignals(true); - blueSlider->setValue( color.blue() ); - blueSlider->blockSignals(false); - blueValue->blockSignals(true); - blueValue->setValue(blueSlider->value()); - blueValue->blockSignals(false); - emit colorChanged(color); -} - -void ColorPicker::setRed(int red){ - redSlider->blockSignals(true); - redSlider->setValue( red ); - redSlider->blockSignals(false); - redValue->blockSignals(true); - redValue->setValue(red); - redValue->blockSignals(false); - emit colorChanged(TQColor(red, greenSlider->value(), blueSlider->value())); -} - -void ColorPicker::setGreen(int green){ - greenSlider->blockSignals(true); - greenSlider->setValue( green ); - greenSlider->blockSignals(false); - greenValue->blockSignals(true); - greenValue->setValue(green); - greenValue->blockSignals(false); - emit colorChanged(TQColor(redSlider->value(), green, blueSlider->value())); -} - -void ColorPicker::setBlue(int blue){ - blueSlider->blockSignals(true); - blueSlider->setValue( blue ); - blueSlider->blockSignals(false); - blueValue->blockSignals(true); - blueValue->setValue(blue); - blueValue->blockSignals(false); - emit colorChanged(TQColor(redSlider->value(), greenSlider->value(), blue)); -} - -TQColor ColorPicker::Color(){ - return TQColor(redSlider->value(), greenSlider->value(), blueSlider->value()); -} - -void ColorPicker::reset(){ - setColor(color_); -} - -void ColorPicker::init(){ - color_ = Color(); -} - -#include "colorpicker.moc" |