Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/colorselectors/kdeselector/kdecolorselector.cpp
Show All 13 Lines | |||||
14 | * You should have received a copy of the GNU General Public License * | 14 | * You should have received a copy of the GNU General Public License * | ||
15 | * along with this program; if not, write to the * | 15 | * along with this program; if not, write to the * | ||
16 | * Free Software Foundation, Inc., * | 16 | * Free Software Foundation, Inc., * | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * | ||
18 | *********************************************************************************/ | 18 | *********************************************************************************/ | ||
19 | 19 | | |||
20 | #include "kdecolorselector.h" | 20 | #include "kdecolorselector.h" | ||
21 | 21 | | |||
22 | #include <QtGui/QLayout> | 22 | #include <QLayout> | ||
23 | #include <QtGui/QLabel> | 23 | #include <QLabel> | ||
24 | 24 | | |||
25 | #include <KLocalizedString> | 25 | #include <KLocalizedString> | ||
26 | #include <KIcon> | | |||
27 | #include <KComboBox> | 26 | #include <KComboBox> | ||
28 | 27 | | |||
29 | #include "rectanglecolorwidget.h" | 28 | #include "rectanglecolorwidget.h" | ||
30 | 29 | | |||
31 | KdeColorSelector::KdeColorSelector(QWidget * parent) : ColorSelector(parent) | 30 | KdeColorSelector::KdeColorSelector(QWidget * parent) : ColorSelector(parent) | ||
32 | { | 31 | { | ||
33 | m_rectangleColorWidget = new RectangleColorWidget(this); | 32 | m_rectangleColorWidget = new RectangleColorWidget(this); | ||
34 | 33 | | |||
35 | KComboBox * chooserModeComboBox = new KComboBox(this); | 34 | KComboBox * chooserModeComboBox = new KComboBox(this); | ||
36 | chooserModeComboBox->addItem(KIcon("view-filter"), i18n("Hue")); | 35 | chooserModeComboBox->addItem(QIcon::fromTheme("view-filter"), i18n("Hue")); | ||
37 | chooserModeComboBox->addItem(KIcon("view-filter"), i18n("Saturation")); | 36 | chooserModeComboBox->addItem(QIcon::fromTheme("view-filter"), i18n("Saturation")); | ||
38 | chooserModeComboBox->addItem(KIcon("view-filter"), i18n("Value")); | 37 | chooserModeComboBox->addItem(QIcon::fromTheme("view-filter"), i18n("Value")); | ||
39 | chooserModeComboBox->addItem(KIcon("view-filter"), i18n("Red")); | 38 | chooserModeComboBox->addItem(QIcon::fromTheme("view-filter"), i18n("Red")); | ||
40 | chooserModeComboBox->addItem(KIcon("view-filter"), i18n("Green")); | 39 | chooserModeComboBox->addItem(QIcon::fromTheme("view-filter"), i18n("Green")); | ||
41 | chooserModeComboBox->addItem(KIcon("view-filter"), i18n("Blue")); | 40 | chooserModeComboBox->addItem(QIcon::fromTheme("view-filter"), i18n("Blue")); | ||
42 | chooserModeComboBox->setCurrentIndex(2); | 41 | chooserModeComboBox->setCurrentIndex(2); | ||
43 | 42 | | |||
44 | QHBoxLayout * chooserModeLayout = new QHBoxLayout(); | 43 | QHBoxLayout * chooserModeLayout = new QHBoxLayout(); | ||
45 | chooserModeLayout->addWidget(new QLabel(i18n("Chooser mode:"), this)); | 44 | chooserModeLayout->addWidget(new QLabel(i18n("Chooser mode:"), this)); | ||
46 | chooserModeLayout->addWidget(chooserModeComboBox, Qt::AlignJustify); | 45 | chooserModeLayout->addWidget(chooserModeComboBox, Qt::AlignJustify); | ||
47 | 46 | | |||
48 | QVBoxLayout * mainLayout = new QVBoxLayout(this); | 47 | QVBoxLayout * mainLayout = new QVBoxLayout(this); | ||
49 | mainLayout->addWidget(m_rectangleColorWidget); | 48 | mainLayout->addWidget(m_rectangleColorWidget); | ||
Show All 30 Lines | 76 | { | |||
80 | case 2 : m_rectangleColorWidget->setChooserMode(ChooserValue); break; | 79 | case 2 : m_rectangleColorWidget->setChooserMode(ChooserValue); break; | ||
81 | case 3 : m_rectangleColorWidget->setChooserMode(ChooserRed); break; | 80 | case 3 : m_rectangleColorWidget->setChooserMode(ChooserRed); break; | ||
82 | case 4 : m_rectangleColorWidget->setChooserMode(ChooserGreen); break; | 81 | case 4 : m_rectangleColorWidget->setChooserMode(ChooserGreen); break; | ||
83 | case 5 : m_rectangleColorWidget->setChooserMode(ChooserBlue); break; | 82 | case 5 : m_rectangleColorWidget->setChooserMode(ChooserBlue); break; | ||
84 | } | 83 | } | ||
85 | 84 | | |||
86 | m_rectangleColorWidget->setColor(m_lastSelectedColor); | 85 | m_rectangleColorWidget->setColor(m_lastSelectedColor); | ||
87 | } | 86 | } | ||
88 | | ||||
89 | #include "kdecolorselector.moc" | |