lib

ko_rgb_widget.h
1/* This file is part of the KDE project
2 * Copyright (c) 1999 Matthias Elter (me@kde.org)
3 * Copyright (c) 2001-2002 Igor Jansen (rm@kde.org)
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19#ifndef KO_RGB_WIDGET_H
20#define KO_RGB_WIDGET_H
21
22#include "tqwidget.h"
23
24#include <koffice_export.h>
25#include <kdualcolorbutton.h>
26
27class KoFrameButton;
28class TQGridLayout;
29class TQColor;
30class KoColorSlider;
31class TQLabel;
32class TQSpinBox;
34class KoColorSlider;
35class TQColor;
36
37class KoRGBWidget
38 : public TQWidget
39{
40 TQ_OBJECT
41
42 typedef TQWidget super;
43
44public:
45 KoRGBWidget(TQWidget *parent = 0L, const char *name = 0);
46 virtual ~KoRGBWidget() {}
47
48public slots:
52 virtual void setFgColor(const TQColor & c);
53 virtual void setBgColor(const TQColor & c);
55 virtual void setMode(KDualColorButton::DualColor);
56
57signals:
58
62 virtual void sigFgColorChanged(const TQColor & c);
63 virtual void sigBgColorChanged(const TQColor & c);
65 virtual void sigModeChanged(KDualColorButton::DualColor);
66
67
68protected slots:
69
70 virtual void slotRChanged(int r);
71 virtual void slotGChanged(int g);
72 virtual void slotBChanged(int b);
73
74 void slotFGColorSelected(const TQColor& c);
75 void slotBGColorSelected(const TQColor& c);
76 void currentChanged(KDualColorButton::DualColor);
77
78private:
79
80 void update(const TQColor fgColor, const TQColor);
81
82private:
83
84 KoColorSlider *mRSlider;
85 KoColorSlider *mGSlider;
86 KoColorSlider *mBSlider;
87 TQLabel *mRLabel;
88 TQLabel *mGLabel;
89 TQLabel *mBLabel;
90 TQSpinBox *mRIn;
91 TQSpinBox *mGIn;
92 TQSpinBox *mBIn;
93 KDualColorButton *m_ColorButton;
94
95 TQColor m_fgColor;
96 TQColor m_bgColor;
97};
98
99#endif