karbon

vcolordocker.h
1/* This file is part of the KDE project
2 Made by Tomislav Lukman (tomislav.lukman@ck.tel.hr)
3 Copyright (C) 2002 - 2005, The Karbon Developers
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library 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 GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#ifndef __VCOLORDOCKER_H__
22#define __VCOLORDOCKER_H__
23
24class TQTabWidget;
25class TQWidget;
26class TQColor;
27class KarbonView;
28class VColor;
29class VColorSlider;
30class KoHSVWidget;
31class KoCMYKWidget;
32class KoRGBWidget;
33
34class VColorDocker : public TQWidget
35{
36 TQ_OBJECT
37
38
39public:
40 VColorDocker( KarbonPart* part, KarbonView* parent = 0L, const char* name = 0L );
41 virtual ~VColorDocker();
42
43 virtual bool isStrokeDocker() { return m_isStrokeDocker; };
44 VColor color() { return m_color; }
45
46public slots:
47 virtual void setFillDocker();
48 virtual void setStrokeDocker();
49 virtual void update();
50
51private:
52 virtual void mouseReleaseEvent( TQMouseEvent *e );
53
54 TQTabWidget *mTabWidget;
55 KoHSVWidget *mHSVWidget;
56 //KoCMYKWidget *mCMYKWidget;
57 KoRGBWidget *mRGBWidget;
58 VColorSlider *mOpacity;
59
60signals:
61 void fgColorChanged( const TQColor &c );
62 void bgColorChanged( const TQColor &c );
63 void modeChanged( KDualColorButton::DualColor s);
64private slots:
65 void updateFgColor(const TQColor &c);
66 void updateBgColor(const TQColor &c);
67 void updateOpacity();
68 void updateMode( KDualColorButton::DualColor s );
69protected:
70 bool m_isStrokeDocker; //Are we setting stroke color ( true ) or fill color ( false )
71 TQColor m_color;
72 float m_opacity;
73private:
74 KarbonPart *m_part;
75 KarbonView *m_view;
76 VFillCmd *m_fillCmd;
77 VStrokeCmd *m_strokeCmd;
78};
79
80#endif
81
This is the color slider widget that is used to select color or color components.
This class keeps track of color properties.
Definition vcolor.h:41