lib

ko_gray_widget.h
1/*
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_GRAY_WIDGET_H
20#define KO_GRAY_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;
34
35class KoGrayWidget
36 : public TQWidget
37{
38 TQ_OBJECT
39
40 typedef TQWidget super;
41
42public:
43 KoGrayWidget(TQWidget *parent = 0L, const char *name = 0);
44 virtual ~KoGrayWidget() {}
45
46public slots:
50 virtual void setFgColor(const TQColor & c);
51 virtual void setBgColor(const TQColor & c);
52
53signals:
54
58 virtual void sigFgColorChanged(const TQColor & c);
59 virtual void sigBgColorChanged(const TQColor & c);
60
61protected slots:
62 virtual void slotChanged(int v);
63
64 void slotFGColorSelected(const TQColor& c);
65 void slotBGColorSelected(const TQColor& c);
66 void currentChanged(KDualColorButton::DualColor);
67
68private:
69
70 void update(const TQColor & fgColor, const TQColor & bgColor);
71
72 KoColorSlider *mSlider;
73 TQLabel *mLabel;
74 TQSpinBox *mIn;
75 KDualColorButton *m_ColorButton;
76
77 TQColor m_fgColor;
78 TQColor m_bgColor;
79};
80
81#endif