Diffstat (limited to 'noncore/unsupported/libopie/colordialog.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/libopie/colordialog.h | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/noncore/unsupported/libopie/colordialog.h b/noncore/unsupported/libopie/colordialog.h new file mode 100644 index 0000000..c825a83 --- a/dev/null +++ b/noncore/unsupported/libopie/colordialog.h | |||
@@ -0,0 +1,90 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of OColorDialog class | ||
5 | ** | ||
6 | ** Created : 990222 | ||
7 | ** | ||
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the dialogs module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef OColorDialog_H | ||
39 | #define OColorDialog_H | ||
40 | |||
41 | #ifndef QT_H | ||
42 | #include <qdialog.h> | ||
43 | #endif // QT_H | ||
44 | |||
45 | class OColorDialogPrivate; | ||
46 | |||
47 | /* | ||
48 | * @class OColorDialog | ||
49 | * @brief The OColorDialog class is a copy of QColorDialog for use in Opie. | ||
50 | * | ||
51 | * OColorDialog is a copy of TrollTech's QColorDialog for use in Opie. The default | ||
52 | * build of QT/Embedded used by Opie does not include QColorDialog, so it is provided | ||
53 | * here. It is renamed to prevent conflicts in the event the QColorDialog is included | ||
54 | * at a later date in QP/E. | ||
55 | * | ||
56 | * See http://doc.trolltech.com/2.3/qcolordialog.html for complete documentation of | ||
57 | * QColorDialog. | ||
58 | */ | ||
59 | class Q_EXPORT OColorDialog : public QDialog | ||
60 | { | ||
61 | Q_OBJECT | ||
62 | |||
63 | public: | ||
64 | static QColor getColor( const QColor&, QWidget *parent=0, const char* name=0 ); | ||
65 | static QRgb getRgba( const QRgb&, bool* ok = 0, | ||
66 | QWidget *parent=0, const char* name=0 ); | ||
67 | |||
68 | private: | ||
69 | ~OColorDialog(); | ||
70 | |||
71 | // FIXME add WFlags? -zecke | ||
72 | OColorDialog( QWidget* parent=0, const char* name=0, bool modal=FALSE ); | ||
73 | void setColor( const QColor& ); | ||
74 | QColor color() const; | ||
75 | |||
76 | private: | ||
77 | void setSelectedAlpha( int ); | ||
78 | int selectedAlpha() const; | ||
79 | private: | ||
80 | OColorDialogPrivate *d; | ||
81 | friend class OColorDialogPrivate; | ||
82 | |||
83 | private:// Disabled copy constructor and operator= | ||
84 | #if defined(Q_DISABLE_COPY) | ||
85 | OColorDialog( const OColorDialog & ); | ||
86 | OColorDialog& operator=( const OColorDialog & ); | ||
87 | #endif | ||
88 | }; | ||
89 | |||
90 | #endif | ||