lib

ko_gray_widget.h

00001 /*
00002  *  Copyright (c) 1999 Matthias Elter (me@kde.org)
00003  *  Copyright (c) 2001-2002 Igor Jansen (rm@kde.org)
00004  *
00005  *  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018  */
00019 #ifndef KO_GRAY_WIDGET_H
00020 #define KO_GRAY_WIDGET_H
00021 
00022 #include "qwidget.h"
00023 
00024 #include <koffice_export.h>
00025 #include <kdualcolorbutton.h>
00026 
00027 class KoFrameButton;
00028 class QGridLayout;
00029 class QColor;
00030 class KoColorSlider;
00031 class QLabel;
00032 class QSpinBox;
00033 class KDualColorButton;
00034 
00035 class KoGrayWidget
00036      : public QWidget
00037 {
00038     Q_OBJECT
00039     typedef QWidget super;
00040 
00041 public:
00042     KoGrayWidget(QWidget *parent = 0L, const char *name = 0);
00043     virtual ~KoGrayWidget() {}
00044 
00045 public slots:
00049     virtual void setFgColor(const QColor & c);
00050     virtual void setBgColor(const QColor & c);
00051 
00052 signals:
00053 
00057     virtual void sigFgColorChanged(const QColor & c);
00058     virtual void sigBgColorChanged(const QColor & c);
00059 
00060 protected slots:
00061     virtual void slotChanged(int v);
00062 
00063     void slotFGColorSelected(const QColor& c);
00064     void slotBGColorSelected(const QColor& c);
00065     void currentChanged(KDualColorButton::DualColor);
00066 
00067 private:
00068 
00069     void update(const QColor & fgColor, const QColor & bgColor);
00070 
00071     KoColorSlider *mSlider;
00072     QLabel *mLabel;
00073     QSpinBox *mIn;
00074     KDualColorButton *m_ColorButton;
00075 
00076     QColor m_fgColor;
00077     QColor m_bgColor;
00078 };
00079 
00080 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys