summaryrefslogtreecommitdiff
path: root/noncore/unsupported/libopie/ocheckitem.h
Unidiff
Diffstat (limited to 'noncore/unsupported/libopie/ocheckitem.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/libopie/ocheckitem.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/noncore/unsupported/libopie/ocheckitem.h b/noncore/unsupported/libopie/ocheckitem.h
new file mode 100644
index 0000000..82ee3d0
--- a/dev/null
+++ b/noncore/unsupported/libopie/ocheckitem.h
@@ -0,0 +1,62 @@
1/**********************************************************************
2** Copyright (C) 2002 Stefan Eilers (se, eilers.stefan@epost.de)
3**
4** This file may be distributed and/or modified under the terms of the
5** GNU Library General Public License version 2 as published by the
6** Free Software Foundation and appearing in the file LICENSE.GPL
7** included in the packaging of this file.
8**
9** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11**********************************************************************/
12#include <qtable.h>
13
14#ifndef CHECKITEM_H__
15#define CHECKITEM_H__
16
17/**
18 * This class represents a checkable QTableItem. This can
19 * be added to any QTable.
20 *
21 *
22 * @see QTable
23 * @see QTableItem
24 * @short An checkable QTableItem
25 * @version 1.0
26 * @author Stefan Eilers ( eilers@handhelds.org )
27 */
28
29class OCheckItem : public QTableItem
30{
31public:
32 /** The size of a box currently unused */
33 enum Size { BoxSize = 10 };
34 OCheckItem( QTable *t, const QString &sortkey );
35
36 virtual void setChecked( bool b );
37 virtual void toggle();
38 bool isChecked() const;
39 /**
40 * @short Set the sort key
41 * @reimp
42 */
43 void setKey( const QString &key ) { m_sortKey = key; }
44 virtual QString key() const;
45
46 /**
47 * foo
48 * @internal
49 */
50 void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected );
51
52 //static const int BoxSize = 10;
53
54private:
55 class OCheckItemPrivate;
56 OCheckItemPrivate *d;
57 bool m_checked: 1;
58 QString m_sortKey;
59
60};
61
62#endif