Diffstat (limited to 'noncore/apps/checkbook/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/mainwindow.cpp | 67 |
1 files changed, 35 insertions, 32 deletions
diff --git a/noncore/apps/checkbook/mainwindow.cpp b/noncore/apps/checkbook/mainwindow.cpp index c7ffa7c..d9e2047 100644 --- a/noncore/apps/checkbook/mainwindow.cpp +++ b/noncore/apps/checkbook/mainwindow.cpp | |||
@@ -1,26 +1,26 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | This file is part of the OPIE Project |
3 | =. | 3 | =. |
4 | .=l. Copyright (c) 2002 Dan Williams <drw@handhelds.org> | 4 | .=l. Copyright (c) 2002 Dan Williams <drw@handhelds.org> |
5 | .>+-= | 5 | .>+-= |
6 | _;:, .> :=|. This file is free software; you can | 6 | _;:, .> :=|. This file is free software; you can |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .> <`_, > . <= redistribute it and/or modify it under |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .="- .-=="i, .._ License as published by the Free Software |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | - . .-<_> .<> Foundation; either version 2 of the License, |
11 | ._= =} : or (at your option) any later version. | 11 | ._= =} : or (at your option) any later version. |
12 | .%`+i> _;_. | 12 | .%`+i> _;_. |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | .i_,=:_. -<s. This file is distributed in the hope that |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | : .. .:, . . . without even the implied warranty of | 15 | : .. .:, . . . without even the implied warranty of |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
18 | ..}^=.= = ; Public License for more details. | 18 | ..}^=.= = ; Public License for more details. |
19 | ++= -. .` .: | 19 | ++= -. .` .: |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
23 | -- :-=` Free Software Foundation, Inc., | 23 | -- :-=` Free Software Foundation, Inc., |
24 | 59 Temple Place - Suite 330, | 24 | 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
@@ -32,15 +32,16 @@ | |||
32 | #include "password.h" | 32 | #include "password.h" |
33 | #include "checkbook.h" | 33 | #include "checkbook.h" |
34 | 34 | ||
35 | #include <opie2/oresource.h> | ||
36 | |||
35 | #include <qpe/config.h> | 37 | #include <qpe/config.h> |
36 | #include <qpe/qpeapplication.h> | 38 | #include <qpe/qpeapplication.h> |
37 | #include <qpe/qpemessagebox.h> | 39 | #include <qpe/qpemessagebox.h> |
38 | #include <qtoolbar.h> | ||
39 | #include <qpe/resource.h> | ||
40 | 40 | ||
41 | #include <qmenubar.h> | ||
42 | #include <qaction.h> | 41 | #include <qaction.h> |
43 | #include <qdir.h> | 42 | #include <qdir.h> |
43 | #include <qmenubar.h> | ||
44 | #include <qtoolbar.h> | ||
44 | #include <qwhatsthis.h> | 45 | #include <qwhatsthis.h> |
45 | 46 | ||
46 | 47 | ||
@@ -50,7 +51,7 @@ MainWindow::MainWindow( QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
50 | setCaption( tr( "Checkbook" ) ); | 51 | setCaption( tr( "Checkbook" ) ); |
51 | 52 | ||
52 | cbDir = Global::applicationFileName( "checkbook", "" ); | 53 | cbDir = Global::applicationFileName( "checkbook", "" ); |
53 | lockIcon = Resource::loadPixmap( "locked" ); | 54 | lockIcon = Opie::Core::OResource::loadPixmap( "locked", Opie::Core::OResource::SmallIcon ); |
54 | 55 | ||
55 | // Load configuration options | 56 | // Load configuration options |
56 | Config config( "checkbook" ); | 57 | Config config( "checkbook" ); |
@@ -67,21 +68,22 @@ MainWindow::MainWindow( QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
67 | QPopupMenu *popup = new QPopupMenu( this ); | 68 | QPopupMenu *popup = new QPopupMenu( this ); |
68 | 69 | ||
69 | bar = new QToolBar( this ); | 70 | bar = new QToolBar( this ); |
70 | QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); | 71 | QAction *a = new QAction( tr( "New" ), Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ), |
72 | QString::null, 0, this, 0 ); | ||
71 | a->setWhatsThis( tr( "Click here to create a new checkbook.\n\nYou also can select New from the Checkbook menu." ) ); | 73 | a->setWhatsThis( tr( "Click here to create a new checkbook.\n\nYou also can select New from the Checkbook menu." ) ); |
72 | connect( a, SIGNAL( activated() ), this, SLOT( slotNew() ) ); | 74 | connect( a, SIGNAL( activated() ), this, SLOT( slotNew() ) ); |
73 | a->addTo( popup ); | 75 | a->addTo( popup ); |
74 | a->addTo( bar ); | 76 | a->addTo( bar ); |
75 | 77 | ||
76 | actionOpen = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, | 78 | actionOpen = new QAction( tr( "Edit" ), Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ), |
77 | 0, this, 0 ); | 79 | QString::null, 0, this, 0 ); |
78 | actionOpen->setWhatsThis( tr( "Select a checkbook and then click here to edit it.\n\nYou also can select Edit from the Checkbook menu, or click and hold on a checkbook name." ) ); | 80 | actionOpen->setWhatsThis( tr( "Select a checkbook and then click here to edit it.\n\nYou also can select Edit from the Checkbook menu, or click and hold on a checkbook name." ) ); |
79 | connect( actionOpen, SIGNAL( activated() ), this, SLOT( slotEdit() ) ); | 81 | connect( actionOpen, SIGNAL( activated() ), this, SLOT( slotEdit() ) ); |
80 | actionOpen->addTo( popup ); | 82 | actionOpen->addTo( popup ); |
81 | actionOpen->addTo( bar ); | 83 | actionOpen->addTo( bar ); |
82 | 84 | ||
83 | actionDelete = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, | 85 | actionDelete = new QAction( tr( "Delete" ), Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ), |
84 | 0, this, 0 ); | 86 | QString::null, 0, this, 0 ); |
85 | actionDelete->setWhatsThis( tr( "Select a checkbook and then click here delete it.\n\nYou also can select Delete from the Checkbook menu." ) ); | 87 | actionDelete->setWhatsThis( tr( "Select a checkbook and then click here delete it.\n\nYou also can select Delete from the Checkbook menu." ) ); |
86 | connect( actionDelete, SIGNAL( activated() ), this, SLOT( slotDelete() ) ); | 88 | connect( actionDelete, SIGNAL( activated() ), this, SLOT( slotDelete() ) ); |
87 | actionDelete->addTo( popup ); | 89 | actionDelete->addTo( popup ); |
@@ -89,7 +91,8 @@ MainWindow::MainWindow( QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
89 | 91 | ||
90 | popup->insertSeparator(); | 92 | popup->insertSeparator(); |
91 | 93 | ||
92 | a = new QAction( tr( "Configure" ), Resource::loadPixmap( "SettingsIcon" ), QString::null, 0, this, 0 ); | 94 | a = new QAction( tr( "Configure" ), Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ), |
95 | QString::null, 0, this, 0 ); | ||
93 | a->setWhatsThis( tr( "Click here to configure this app." ) ); | 96 | a->setWhatsThis( tr( "Click here to configure this app." ) ); |
94 | connect( a, SIGNAL( activated() ), this, SLOT( slotConfigure() ) ); | 97 | connect( a, SIGNAL( activated() ), this, SLOT( slotConfigure() ) ); |
95 | a->addTo( popup ); | 98 | a->addTo( popup ); |
@@ -156,7 +159,7 @@ void MainWindow::buildList() | |||
156 | 159 | ||
157 | if ( _cfg.getShowLocks() ) | 160 | if ( _cfg.getShowLocks() ) |
158 | { | 161 | { |
159 | cbList->addColumn( Resource::loadIconSet( "locked" ), "", 24 ); | 162 | cbList->addColumn( lockIcon, "", 24 ); |
160 | posName = 1; | 163 | posName = 1; |
161 | } | 164 | } |
162 | else | 165 | else |