summaryrefslogtreecommitdiffstats
path: root/python/pykde/sip/kdeui/kcolordialog.sip
blob: 557bbd5659bef3fef4505ce08a35810a2587838f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
//
//     Copyright 2006 Jim Bublitz <jbublitz@nwinternet.com>
//     Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson
//     may also apply


//                 Generated by preSip
//            module kdeui  version KDE 3.5.3


// This software is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// This software is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this library; see the file COPYING.
// If not, write to the Free Software Foundation, Inc.,
// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


class KHSSelector : KXYSelector
{
%TypeHeaderCode
#include <kcolordialog.h>
%End


public:
                         KHSSelector (QWidget* /TransferThis/ = 0, const char* = 0);

protected:
    virtual void         drawPalette (QPixmap*);
    virtual void         resizeEvent (QResizeEvent*);
    virtual void         drawContents (QPainter*);

protected:
//igx     virtual void         virtual_hook (int, void*);

};  // class KHSSelector


class KValueSelector : KSelector
{
%TypeHeaderCode
#include <kcolordialog.h>
%End


public:
                         KValueSelector (QWidget* /TransferThis/ = 0, const char* = 0);
                         KValueSelector (Orientation, QWidget* /TransferThis/ = 0, const char* = 0);
    int                  hue () const;
    void                 setHue (int);
    int                  saturation () const;
    void                 setSaturation (int);
    void                 updateContents ();

protected:
    virtual void         drawPalette (QPixmap*);
    virtual void         resizeEvent (QResizeEvent*);
    virtual void         drawContents (QPainter*);

protected:
//igx     virtual void         virtual_hook (int, void*);

};  // class KValueSelector


class KColor : QColor
{
%TypeHeaderCode
#include <kcolordialog.h>
%End


public:
                         KColor ();
                         KColor (const KColor&);
                         KColor (const QColor&);

%If ( KDE_3_1_4 -  )
    bool                 operator == (const KColor&) const;
%End

    void                 setHsv (int, int, int);
    void                 setRgb (int, int, int);
    void                 rgb (int*, int*, int*);
    void                 hsv (int*, int*, int*);

protected:

};  // class KColor


class KPaletteTable : QWidget
{
%TypeHeaderCode
#include <kcolordialog.h>
%End


public:
                         KPaletteTable (QWidget* /TransferThis/, int = 210, int = 16);
    void                 addToCustomColors (const QColor&);
    void                 addToRecentColors (const QColor&);
    QString              palette ();

public slots:
    void                 setPalette (const QString&);

signals:
    void                 colorSelected (const QColor&, const QString&);
    void                 colorDoubleClicked (const QColor&, const QString&);

protected slots:
    void                 slotColorCellSelected (int);
    void                 slotColorCellDoubleClicked (int);
    void                 slotColorTextSelected (const QString&);
    void                 slotSetPalette (const QString&);
    void                 slotShowNamedColorReadError ();

protected:
    void                 readNamedColor ();

protected:

protected:
//igx     virtual void         virtual_hook (int, void*);

};  // class KPaletteTable


class KColorCells : QGridView
{
%TypeHeaderCode
#include <kcolordialog.h>
%End


public:
                         KColorCells (QWidget* /TransferThis/, int, int);
    void                 setColor (int, const QColor&);
    QColor               color (int) const;
    int                  numCells () const;
    void                 setShading (bool);
    void                 setAcceptDrags (bool);
    int                  getSelected () const;

signals:
    void                 colorSelected (int);
    void                 colorDoubleClicked (int);

protected:
    virtual void         paintCell (QPainter*, int, int);
    virtual void         resizeEvent (QResizeEvent*);
    virtual void         mouseReleaseEvent (QMouseEvent*);
    virtual void         mousePressEvent (QMouseEvent*);
    virtual void         mouseMoveEvent (QMouseEvent*);
    virtual void         dragEnterEvent (QDragEnterEvent*);
    virtual void         dropEvent (QDropEvent*);
    virtual void         mouseDoubleClickEvent (QMouseEvent*);
    int                  posToCell (const QPoint&, bool = 0);

protected:
//igx     virtual void         virtual_hook (int, void*);

};  // class KColorCells


class KColorPatch : QFrame
{
%TypeHeaderCode
#include <kcolordialog.h>
%End


public:
                         KColorPatch (QWidget* /TransferThis/);
    void                 setColor (const QColor&);

signals:
    void                 colorChanged (const QColor&);

protected:
    virtual void         drawContents (QPainter*);
    virtual void         mouseMoveEvent (QMouseEvent*);
    virtual void         dragEnterEvent (QDragEnterEvent*);
    virtual void         dropEvent (QDropEvent*);

protected:
//igx     virtual void         virtual_hook (int, void*);

};  // class KColorPatch


class KColorDialog : KDialogBase
{
%TypeHeaderCode
#include <kcolordialog.h>
%End


public:
                         KColorDialog (QWidget* /TransferThis/ = 0, const char* = 0, bool = 0);
    QColor               color ();
    static int           getColor (QColor&, QWidget* /Transfer/ = 0);
    static int           getColor (QColor&, const QColor&, QWidget* /Transfer/ = 0);
    static QColor        grabColor (const QPoint&);
    void                 setDefaultColor (const QColor&);
    QColor               defaultColor () const;

public slots:
    void                 setColor (const QColor&);

signals:
    void                 colorSelected (const QColor&);

protected:
    virtual void         mouseReleaseEvent (QMouseEvent*);
    virtual void         keyPressEvent (QKeyEvent*);

%If ( KDE_3_2_0 -  )
    virtual bool         eventFilter (QObject*, QEvent*);
%End


protected:
//igx     virtual void         virtual_hook (int, void*);

};  // class KColorDialog