karbon

vcolordocker.h

00001 /* This file is part of the KDE project
00002    Made by Tomislav Lukman (tomislav.lukman@ck.tel.hr)
00003    Copyright (C) 2002 - 2005, The Karbon Developers
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library 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 GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef __VCOLORDOCKER_H__
00022 #define __VCOLORDOCKER_H__
00023 
00024 class QTabWidget;
00025 class QWidget;
00026 class QColor;
00027 class KarbonView;
00028 class VColor;
00029 class VColorSlider;
00030 class KoHSVWidget;
00031 class KoCMYKWidget;
00032 class KoRGBWidget;
00033 
00034 class VColorDocker : public QWidget
00035 {
00036     Q_OBJECT
00037 
00038 public:
00039      VColorDocker( KarbonPart* part, KarbonView* parent = 0L, const char* name = 0L );
00040      virtual ~VColorDocker();
00041 
00042      virtual bool isStrokeDocker() { return m_isStrokeDocker; };
00043      VColor color() { return m_color; }
00044 
00045 public slots:
00046     virtual void setFillDocker();
00047     virtual void setStrokeDocker();
00048     virtual void update();
00049 
00050 private:
00051     virtual void mouseReleaseEvent( QMouseEvent *e );
00052 
00053     QTabWidget *mTabWidget;
00054     KoHSVWidget *mHSVWidget;
00055     //KoCMYKWidget *mCMYKWidget;
00056     KoRGBWidget *mRGBWidget;
00057     VColorSlider *mOpacity;
00058 
00059 signals:
00060     void fgColorChanged( const QColor &c );
00061     void bgColorChanged( const QColor &c );
00062     void modeChanged( KDualColorButton::DualColor s);
00063 private slots:
00064     void updateFgColor(const QColor &c);
00065     void updateBgColor(const QColor &c);
00066     void updateOpacity();
00067     void updateMode( KDualColorButton::DualColor s );
00068 protected:
00069     bool m_isStrokeDocker; //Are we setting stroke color ( true ) or fill color ( false )
00070     QColor m_color;
00071     float m_opacity;
00072 private:
00073     KarbonPart *m_part;
00074     KarbonView *m_view;
00075     VFillCmd *m_fillCmd;
00076     VStrokeCmd *m_strokeCmd;
00077 };
00078 
00079 #endif
00080 
KDE Home | KDE Accessibility Home | Description of Access Keys