author | drw <drw> | 2005-04-06 21:39:47 (UTC) |
---|---|---|
committer | drw <drw> | 2005-04-06 21:39:47 (UTC) |
commit | 9ea956870ddf74ddc70b83ed529ebb3b36e9231e (patch) (unidiff) | |
tree | 599da226b62023d6c51c1f00867e3dffde9977ec /core/pim/todo/tableview.cpp | |
parent | 2b0e27b45eb9ff5563f786c5e45d53db49afb9f9 (diff) | |
download | opie-9ea956870ddf74ddc70b83ed529ebb3b36e9231e.zip opie-9ea956870ddf74ddc70b83ed529ebb3b36e9231e.tar.gz opie-9ea956870ddf74ddc70b83ed529ebb3b36e9231e.tar.bz2 |
Use OResource for loading images and fix headers
-rw-r--r-- | core/pim/todo/tableview.cpp | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp index c64ad46..3e88974 100644 --- a/core/pim/todo/tableview.cpp +++ b/core/pim/todo/tableview.cpp | |||
@@ -1,43 +1,46 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 <zecke> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | _;:, .> :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, > . <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | ._= =} : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | .%`+i> _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. .:, . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= = ; Library General Public License for more |
21 | -_. . . )=. = Library General Public License along with | 21 | ++= -. .` .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | ||
24 | -_. . . )=. = Library General Public License along with | ||
25 | -- :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
30 | |||
28 | #include <stdlib.h> | 31 | #include <stdlib.h> |
29 | #include <cmath> | 32 | #include <cmath> |
30 | #include <cctype> | 33 | #include <cctype> |
31 | 34 | ||
32 | #include <opie2/odebug.h> | 35 | #include <opie2/odebug.h> |
33 | #include <opie2/opimrecurrence.h> | 36 | #include <opie2/opimrecurrence.h> |
37 | #include <opie2/oresource.h> | ||
34 | 38 | ||
35 | #include <qpe/config.h> | 39 | #include <qpe/config.h> |
36 | #include <qpe/qpeapplication.h> | 40 | #include <qpe/qpeapplication.h> |
37 | #include <qpe/resource.h> | ||
38 | 41 | ||
39 | #include <qcombobox.h> | 42 | #include <qcombobox.h> |
40 | #include <qlineedit.h> | 43 | #include <qlineedit.h> |
41 | #include <qpopupmenu.h> | 44 | #include <qpopupmenu.h> |
42 | 45 | ||
43 | #include "mainwindow.h" | 46 | #include "mainwindow.h" |
@@ -87,18 +90,18 @@ TableView::TableView( MainWindow* window, QWidget* wid ) | |||
87 | : QTable( wid ), TodoView( window ) { | 90 | : QTable( wid ), TodoView( window ) { |
88 | 91 | ||
89 | setName("TableView"); | 92 | setName("TableView"); |
90 | // Load icons | 93 | // Load icons |
91 | // TODO - probably should be done globally somewhere else, | 94 | // TODO - probably should be done globally somewhere else, |
92 | // see also quickeditimpl.cpp/h, taskeditoroverview.cpp/h | 95 | // see also quickeditimpl.cpp/h, taskeditoroverview.cpp/h |
93 | m_pic_completed = Resource::loadPixmap( "todo/completed" ); | 96 | m_pic_completed = Opie::Core::OResource::loadPixmap( "todo/completed" ); |
94 | QString namestr; | 97 | QString namestr; |
95 | for ( unsigned int i = 1; i < 6; i++ ) { | 98 | for ( unsigned int i = 1; i < 6; i++ ) { |
96 | namestr = "todo/priority"; | 99 | namestr = "todo/priority"; |
97 | namestr.append( QString::number( i ) ); | 100 | namestr.append( QString::number( i ) ); |
98 | m_pic_priority[ i - 1 ] = Resource::loadPixmap( namestr ); | 101 | m_pic_priority[ i - 1 ] = Opie::Core::OResource::loadPixmap( namestr ); |
99 | } | 102 | } |
100 | 103 | ||
101 | setUpdatesEnabled( false ); | 104 | setUpdatesEnabled( false ); |
102 | viewport()->setUpdatesEnabled( false ); | 105 | viewport()->setUpdatesEnabled( false ); |
103 | m_enablePaint = false; | 106 | m_enablePaint = false; |
104 | setNumRows(0); | 107 | setNumRows(0); |
@@ -267,13 +270,13 @@ void TableView::setShowDeadline( bool b ) { | |||
267 | } | 270 | } |
268 | setColumnWidth( 2, col2width ); | 271 | setColumnWidth( 2, col2width ); |
269 | } | 272 | } |
270 | void TableView::setShowCategory( const QString& str) { | 273 | void TableView::setShowCategory( const QString& str) { |
271 | if ( str != m_oleCat || m_first ) | 274 | if ( str != m_oleCat || m_first ) |
272 | updateView(); | 275 | updateView(); |
273 | 276 | ||
274 | m_oleCat = str; | 277 | m_oleCat = str; |
275 | m_first = false; | 278 | m_first = false; |
276 | } | 279 | } |
277 | void TableView::clear() { | 280 | void TableView::clear() { |
278 | setNumRows(0); | 281 | setNumRows(0); |
279 | } | 282 | } |