-rw-r--r-- | libopie2/opieui/oselector.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libopie2/opieui/oselector.h b/libopie2/opieui/oselector.h index f832239..fe75a46 100644 --- a/libopie2/opieui/oselector.h +++ b/libopie2/opieui/oselector.h | |||
@@ -6,48 +6,51 @@ | |||
6 | License as published by the Free Software Foundation; either | 6 | License as published by the Free Software Foundation; either |
7 | version 2 of the License, or (at your option) any later version. | 7 | version 2 of the License, or (at your option) any later version. |
8 | 8 | ||
9 | This library is distributed in the hope that it will be useful, | 9 | This library is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | Library General Public License for more details. | 12 | Library General Public License for more details. |
13 | 13 | ||
14 | You should have received a copy of the GNU Library General Public License | 14 | You should have received a copy of the GNU Library General Public License |
15 | along with this library; see the file COPYING.LIB. If not, write to | 15 | along with this library; see the file COPYING.LIB. If not, write to |
16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
17 | Boston, MA 02111-1307, USA. | 17 | Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | //----------------------------------------------------------------------------- | 19 | //----------------------------------------------------------------------------- |
20 | // Selector widgets for KDE Color Selector, but probably useful for other | 20 | // Selector widgets for KDE Color Selector, but probably useful for other |
21 | // stuff also. | 21 | // stuff also. |
22 | 22 | ||
23 | #ifndef __OSELECT_H__ | 23 | #ifndef __OSELECT_H__ |
24 | #define __OSELECT_H__ | 24 | #define __OSELECT_H__ |
25 | 25 | ||
26 | #include <qwidget.h> | 26 | #include <qwidget.h> |
27 | #include <qrangecontrol.h> | 27 | #include <qrangecontrol.h> |
28 | #include <qpixmap.h> | 28 | #include <qpixmap.h> |
29 | 29 | ||
30 | |||
31 | namespace Opie { | ||
32 | namespace Ui { | ||
30 | /** | 33 | /** |
31 | * OXYSelector is the base class for other widgets which | 34 | * OXYSelector is the base class for other widgets which |
32 | * provides the ability to choose from a two-dimensional | 35 | * provides the ability to choose from a two-dimensional |
33 | * range of values. The currently chosen value is indicated | 36 | * range of values. The currently chosen value is indicated |
34 | * by a cross. An example is the @ref OHSSelector which | 37 | * by a cross. An example is the @ref OHSSelector which |
35 | * allows to choose from a range of colors, and which is | 38 | * allows to choose from a range of colors, and which is |
36 | * used in OColorDialog. | 39 | * used in OColorDialog. |
37 | * | 40 | * |
38 | * A custom drawing routine for the widget surface has | 41 | * A custom drawing routine for the widget surface has |
39 | * to be provided by the subclass. | 42 | * to be provided by the subclass. |
40 | */ | 43 | */ |
41 | class OXYSelector : public QWidget | 44 | class OXYSelector : public QWidget |
42 | { | 45 | { |
43 | Q_OBJECT | 46 | Q_OBJECT |
44 | 47 | ||
45 | public: | 48 | public: |
46 | /** | 49 | /** |
47 | * Constructs a two-dimensional selector widget which | 50 | * Constructs a two-dimensional selector widget which |
48 | * has a value range of [0..100] in both directions. | 51 | * has a value range of [0..100] in both directions. |
49 | */ | 52 | */ |
50 | OXYSelector( QWidget *parent=0, const char *name=0 ); | 53 | OXYSelector( QWidget *parent=0, const char *name=0 ); |
51 | /** | 54 | /** |
52 | * Destructs the widget. | 55 | * Destructs the widget. |
53 | */ | 56 | */ |
@@ -491,28 +494,30 @@ public: | |||
491 | OColor( const QColor &col); | 494 | OColor( const QColor &col); |
492 | 495 | ||
493 | OColor& operator=( const OColor& col); | 496 | OColor& operator=( const OColor& col); |
494 | 497 | ||
495 | bool operator==( const OColor& col) const; | 498 | bool operator==( const OColor& col) const; |
496 | 499 | ||
497 | void setHsv(int _h, int _s, int _v); | 500 | void setHsv(int _h, int _s, int _v); |
498 | void setRgb(int _r, int _g, int _b); | 501 | void setRgb(int _r, int _g, int _b); |
499 | 502 | ||
500 | void rgb(int *_r, int *_g, int *_b) const; | 503 | void rgb(int *_r, int *_g, int *_b) const; |
501 | void hsv(int *_h, int *_s, int *_v) const; | 504 | void hsv(int *_h, int *_s, int *_v) const; |
502 | protected: | 505 | protected: |
503 | int h; | 506 | int h; |
504 | int s; | 507 | int s; |
505 | int v; | 508 | int v; |
506 | int r; | 509 | int r; |
507 | int g; | 510 | int g; |
508 | int b; | 511 | int b; |
509 | 512 | ||
510 | private: | 513 | private: |
511 | class OColorPrivate; | 514 | class OColorPrivate; |
512 | OColorPrivate *d; | 515 | OColorPrivate *d; |
513 | }; | 516 | }; |
514 | 517 | ||
518 | } | ||
519 | } | ||
515 | 520 | ||
516 | 521 | ||
517 | #endif // __OSELECT_H__ | 522 | #endif // __OSELECT_H__ |
518 | 523 | ||