author | dwmw2 <dwmw2> | 2002-05-09 14:29:57 (UTC) |
---|---|---|
committer | dwmw2 <dwmw2> | 2002-05-09 14:29:57 (UTC) |
commit | 2ba0a18680b3dc6eb0a952977c38fefda34eefa6 (patch) (unidiff) | |
tree | 2c57b7bdf73756b026962ec35a18369f470cef25 | |
parent | 2a21c7fdce37f76d47926b4d326ad0ab638f744b (diff) | |
download | opie-2ba0a18680b3dc6eb0a952977c38fefda34eefa6.zip opie-2ba0a18680b3dc6eb0a952977c38fefda34eefa6.tar.gz opie-2ba0a18680b3dc6eb0a952977c38fefda34eefa6.tar.bz2 |
Remove #include <iostream> which pulled in libstdc++.
-rw-r--r-- | core/pim/todo/todotable.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/core/pim/todo/todotable.cpp b/core/pim/todo/todotable.cpp index 2389cdd..877308a 100644 --- a/core/pim/todo/todotable.cpp +++ b/core/pim/todo/todotable.cpp | |||
@@ -1,110 +1,109 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | /* Show Deadline was added by Stefan Eilers (se, eilers.stefan@epost.de) | 20 | /* Show Deadline was added by Stefan Eilers (se, eilers.stefan@epost.de) |
21 | */ | 21 | */ |
22 | #include "todotable.h" | 22 | #include "todotable.h" |
23 | 23 | ||
24 | #include <opie/tododb.h> | 24 | #include <opie/tododb.h> |
25 | #include <opie/xmltree.h> | 25 | #include <opie/xmltree.h> |
26 | 26 | ||
27 | #include <qpe/categoryselect.h> | 27 | #include <qpe/categoryselect.h> |
28 | #include <qpe/xmlreader.h> | 28 | #include <qpe/xmlreader.h> |
29 | 29 | ||
30 | #include <qasciidict.h> | 30 | #include <qasciidict.h> |
31 | #include <qcombobox.h> | 31 | #include <qcombobox.h> |
32 | #include <qfile.h> | 32 | #include <qfile.h> |
33 | #include <qpainter.h> | 33 | #include <qpainter.h> |
34 | #include <qtextcodec.h> | 34 | #include <qtextcodec.h> |
35 | #include <qtimer.h> | 35 | #include <qtimer.h> |
36 | #include <qdatetime.h> | 36 | #include <qdatetime.h> |
37 | #include <qtextstream.h> | 37 | #include <qtextstream.h> |
38 | 38 | ||
39 | #include <qcursor.h> | 39 | #include <qcursor.h> |
40 | #include <qregexp.h> | 40 | #include <qregexp.h> |
41 | 41 | ||
42 | #include <errno.h> | 42 | #include <errno.h> |
43 | #include <stdlib.h> | 43 | #include <stdlib.h> |
44 | 44 | ||
45 | #include <stdio.h> | 45 | #include <stdio.h> |
46 | #include <iostream> | ||
47 | 46 | ||
48 | using namespace Opie; | 47 | using namespace Opie; |
49 | 48 | ||
50 | namespace { | 49 | namespace { |
51 | 50 | ||
52 | static bool taskCompare( const ToDoEvent &task, const QRegExp &r, int category ); | 51 | static bool taskCompare( const ToDoEvent &task, const QRegExp &r, int category ); |
53 | static QString journalFileName(); | 52 | static QString journalFileName(); |
54 | static ToDoEvent xmlToEvent( XMLElement *ev ); | 53 | static ToDoEvent xmlToEvent( XMLElement *ev ); |
55 | } | 54 | } |
56 | CheckItem::CheckItem( QTable *t, const QString &key ) | 55 | CheckItem::CheckItem( QTable *t, const QString &key ) |
57 | : QTableItem( t, Never, "" ), checked( FALSE ), sortKey( key ) | 56 | : QTableItem( t, Never, "" ), checked( FALSE ), sortKey( key ) |
58 | { | 57 | { |
59 | } | 58 | } |
60 | 59 | ||
61 | QString CheckItem::key() const | 60 | QString CheckItem::key() const |
62 | { | 61 | { |
63 | return sortKey; | 62 | return sortKey; |
64 | } | 63 | } |
65 | 64 | ||
66 | void CheckItem::setChecked( bool b ) | 65 | void CheckItem::setChecked( bool b ) |
67 | { | 66 | { |
68 | checked = b; | 67 | checked = b; |
69 | table()->updateCell( row(), col() ); | 68 | table()->updateCell( row(), col() ); |
70 | } | 69 | } |
71 | 70 | ||
72 | void CheckItem::toggle() | 71 | void CheckItem::toggle() |
73 | { | 72 | { |
74 | TodoTable *parent = static_cast<TodoTable*>(table()); | 73 | TodoTable *parent = static_cast<TodoTable*>(table()); |
75 | ToDoEvent newTodo = parent->currentEntry(); | 74 | ToDoEvent newTodo = parent->currentEntry(); |
76 | checked = !checked; | 75 | checked = !checked; |
77 | newTodo.setCompleted( checked ); | 76 | newTodo.setCompleted( checked ); |
78 | table()->updateCell( row(), col() ); | 77 | table()->updateCell( row(), col() ); |
79 | parent->replaceCurrentEntry( newTodo, true ); | 78 | parent->replaceCurrentEntry( newTodo, true ); |
80 | } | 79 | } |
81 | 80 | ||
82 | bool CheckItem::isChecked() const | 81 | bool CheckItem::isChecked() const |
83 | { | 82 | { |
84 | return checked; | 83 | return checked; |
85 | } | 84 | } |
86 | 85 | ||
87 | static const int BoxSize = 10; | 86 | static const int BoxSize = 10; |
88 | 87 | ||
89 | void CheckItem::paint( QPainter *p, const QColorGroup &cg, const QRect &cr, | 88 | void CheckItem::paint( QPainter *p, const QColorGroup &cg, const QRect &cr, |
90 | bool ) | 89 | bool ) |
91 | { | 90 | { |
92 | p->fillRect( 0, 0, cr.width(), cr.height(), cg.brush( QColorGroup::Base ) ); | 91 | p->fillRect( 0, 0, cr.width(), cr.height(), cg.brush( QColorGroup::Base ) ); |
93 | 92 | ||
94 | int marg = ( cr.width() - BoxSize ) / 2; | 93 | int marg = ( cr.width() - BoxSize ) / 2; |
95 | int x = 0; | 94 | int x = 0; |
96 | int y = ( cr.height() - BoxSize ) / 2; | 95 | int y = ( cr.height() - BoxSize ) / 2; |
97 | p->setPen( QPen( cg.text() ) ); | 96 | p->setPen( QPen( cg.text() ) ); |
98 | p->drawRect( x + marg, y, BoxSize, BoxSize ); | 97 | p->drawRect( x + marg, y, BoxSize, BoxSize ); |
99 | p->drawRect( x + marg+1, y+1, BoxSize-2, BoxSize-2 ); | 98 | p->drawRect( x + marg+1, y+1, BoxSize-2, BoxSize-2 ); |
100 | p->setPen( darkGreen ); | 99 | p->setPen( darkGreen ); |
101 | x += 1; | 100 | x += 1; |
102 | y += 1; | 101 | y += 1; |
103 | if ( checked ) { | 102 | if ( checked ) { |
104 | QPointArray a( 7*2 ); | 103 | QPointArray a( 7*2 ); |
105 | int i, xx, yy; | 104 | int i, xx, yy; |
106 | xx = x+1+marg; | 105 | xx = x+1+marg; |
107 | yy = y+2; | 106 | yy = y+2; |
108 | for ( i=0; i<3; i++ ) { | 107 | for ( i=0; i<3; i++ ) { |
109 | a.setPoint( 2*i, xx, yy ); | 108 | a.setPoint( 2*i, xx, yy ); |
110 | a.setPoint( 2*i+1, xx, yy+2 ); | 109 | a.setPoint( 2*i+1, xx, yy+2 ); |