author | mickeyl <mickeyl> | 2004-01-15 13:59:58 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-01-15 13:59:58 (UTC) |
commit | dde789ef19fa3a3913805e452ac1e3400688e8a0 (patch) (unidiff) | |
tree | a33a0ce31750ad56cfd3362585d4e7b32ca0a456 /libopie2/opieui/ocheckitem.h | |
parent | 3c74c5343a8432c494ace71d94cca354c01ef1d3 (diff) | |
download | opie-dde789ef19fa3a3913805e452ac1e3400688e8a0.zip opie-dde789ef19fa3a3913805e452ac1e3400688e8a0.tar.gz opie-dde789ef19fa3a3913805e452ac1e3400688e8a0.tar.bz2 |
more libopie1 --> libopie2 with namespace cleanups and code layout cleanups
Diffstat (limited to 'libopie2/opieui/ocheckitem.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opieui/ocheckitem.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/libopie2/opieui/ocheckitem.h b/libopie2/opieui/ocheckitem.h new file mode 100644 index 0000000..db2e832 --- a/dev/null +++ b/libopie2/opieui/ocheckitem.h | |||
@@ -0,0 +1,86 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | Copyright (C) Stefan Eilers <eilers.stefan@epost.de> | ||
4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> | ||
5 | .=l. | ||
6 | .>+-= | ||
7 | _;:, .> :=|. This program is free software; you can | ||
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This program is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
19 | ..}^=.= = ; Library General Public License for more | ||
20 | ++= -. .` .: details. | ||
21 | : = ...= . :.=- | ||
22 | -. .:....=;==+<; You should have received a copy of the GNU | ||
23 | -_. . . )=. = Library General Public License along with | ||
24 | -- :-=` this library; see the file COPYING.LIB. | ||
25 | If not, write to the Free Software Foundation, | ||
26 | Inc., 59 Temple Place - Suite 330, | ||
27 | Boston, MA 02111-1307, USA. | ||
28 | */ | ||
29 | |||
30 | #ifndef OCHECKITEM_H_ | ||
31 | #define OCHECKITEM_H_ | ||
32 | |||
33 | /* QT */ | ||
34 | #include <qtable.h> | ||
35 | |||
36 | namespace Opie | ||
37 | { | ||
38 | |||
39 | /** | ||
40 | * This class represents a checkable QTableItem. This can | ||
41 | * be added to any QTable. | ||
42 | * | ||
43 | * | ||
44 | * @see QTable | ||
45 | * @see QTableItem | ||
46 | * @short An checkable QTableItem | ||
47 | * @version 1.0 | ||
48 | * @author Stefan Eilers ( eilers@handhelds.org ) | ||
49 | **/ | ||
50 | |||
51 | class OCheckItem : public QTableItem | ||
52 | { | ||
53 | public: | ||
54 | /** The size of a box currently unused */ | ||
55 | enum Size { BoxSize = 10 }; | ||
56 | OCheckItem( QTable *t, const QString &sortkey ); | ||
57 | |||
58 | virtual void setChecked( bool b ); | ||
59 | virtual void toggle(); | ||
60 | bool isChecked() const; | ||
61 | /** | ||
62 | * @short Set the sort key | ||
63 | * @reimp | ||
64 | */ | ||
65 | void setKey( const QString &key ) { m_sortKey = key; } | ||
66 | virtual QString key() const; | ||
67 | |||
68 | /** | ||
69 | * @short Paint the Checkitem | ||
70 | * @reimp | ||
71 | */ | ||
72 | void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected ); | ||
73 | |||
74 | //static const int BoxSize = 10; | ||
75 | |||
76 | private: | ||
77 | class OCheckItemPrivate; | ||
78 | OCheckItemPrivate *d; | ||
79 | bool m_checked : 1; | ||
80 | QString m_sortKey; | ||
81 | |||
82 | }; | ||
83 | |||
84 | }; | ||
85 | |||
86 | #endif | ||