summaryrefslogtreecommitdiff
path: root/libopie/ocheckitem.cpp
Unidiff
Diffstat (limited to 'libopie/ocheckitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ocheckitem.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/libopie/ocheckitem.cpp b/libopie/ocheckitem.cpp
index 082d7a2..cd763c1 100644
--- a/libopie/ocheckitem.cpp
+++ b/libopie/ocheckitem.cpp
@@ -1,61 +1,60 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 Stefan Eilers (se, eilers.stefan@epost.de 2** Copyright (C) 2002 Stefan Eilers (se, eilers.stefan@epost.de
3** 3**
4** This file may be distributed and/or modified under the terms of the 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 5** GNU Library General Public License version 2 as published by the
6** Free Software Foundation and appearing in the file LICENSE.GPL 6** Free Software Foundation and appearing in the file LICENSE.GPL
7** included in the packaging of this file. 7** included in the packaging of this file.
8** 8**
9** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 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. 10** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11**********************************************************************/ 11**********************************************************************/
12 12
13#include <qpainter.h>
14 13
15#include "ocheckitem.h" 14#include "ocheckitem.h"
16 15
17/** 16/**
18 * Constructs an CheckItem with a QTable as parent 17 * Constructs an CheckItem with a QTable as parent
19 * and a sort key for. 18 * and a sort key for.
20 * The sort key will be used by QTable to sort the table later 19 * The sort key will be used by QTable to sort the table later
21 * @param t The parent QTable where the check item belongs 20 * @param t The parent QTable where the check item belongs
22 * @param key A sort key 21 * @param key A sort key
23 */ 22 */
24OCheckItem::OCheckItem( QTable *t, const QString &key ) 23OCheckItem::OCheckItem( QTable *t, const QString &key )
25 : QTableItem( t, Never, "" ), m_checked( FALSE ), m_sortKey( key ) 24 : QTableItem( t, Never, "" ), m_checked( FALSE ), m_sortKey( key )
26{ 25{
27} 26}
28 27
29/** 28/**
30 * reimplemted for internal reasons 29 * reimplemted for internal reasons
31 * @return Returns the sort key of the Item 30 * @return Returns the sort key of the Item
32 * @see QTableItem 31 * @see QTableItem
33 */ 32 */
34QString OCheckItem::key() const 33QString OCheckItem::key() const
35{ 34{
36 return m_sortKey; 35 return m_sortKey;
37} 36}
38 37
39/** 38/**
40 * This method can check or uncheck the item. It will 39 * This method can check or uncheck the item. It will
41 * call QTable to update the cell. 40 * call QTable to update the cell.
42 * 41 *
43 * @param b Whether to check or uncheck the item 42 * @param b Whether to check or uncheck the item
44 */ 43 */
45void OCheckItem::setChecked( bool b ) 44void OCheckItem::setChecked( bool b )
46{ 45{
47 m_checked = b; 46 m_checked = b;
48 table()->updateCell( row(), col() ); 47 table()->updateCell( row(), col() );
49} 48}
50 49
51/** 50/**
52 * This will toggle the item. If it is checked it'll get 51 * This will toggle the item. If it is checked it'll get
53 * unchecked by this method or vice versa. 52 * unchecked by this method or vice versa.
54 */ 53 */
55void OCheckItem::toggle() 54void OCheckItem::toggle()
56{ 55{
57 m_checked = !m_checked; 56 m_checked = !m_checked;
58} 57}
59 58
60/** 59/**
61 * This will return the state of the item. 60 * This will return the state of the item.