summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/mainwindow.h
Unidiff
Diffstat (limited to 'noncore/apps/checkbook/mainwindow.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/mainwindow.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/noncore/apps/checkbook/mainwindow.h b/noncore/apps/checkbook/mainwindow.h
index 2bc70b3..6275f94 100644
--- a/noncore/apps/checkbook/mainwindow.h
+++ b/noncore/apps/checkbook/mainwindow.h
@@ -10,67 +10,74 @@
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
27*/ 27*/
28 28
29#ifndef MAINWINDOW_H 29#ifndef MAINWINDOW_H
30#define MAINWINDOW_H 30#define MAINWINDOW_H
31 31
32#include <qmainwindow.h> 32#include <qmainwindow.h>
33#include <qpixmap.h> 33#include <qpixmap.h>
34#include "cfg.h"
34 35
35class CBInfo; 36class CBInfo;
36class CBInfoList; 37class CBInfoList;
37class QAction; 38class QAction;
38class QListView; 39class QListView;
39class QString; 40class QString;
41class QListViewItem;
40 42
41class MainWindow : public QMainWindow 43class MainWindow : public QMainWindow
42{ 44{
43 Q_OBJECT 45 Q_OBJECT
44 46
45 public: 47 public:
46 MainWindow(); 48 MainWindow(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
47 ~MainWindow(); 49 ~MainWindow();
50 static QString appName() { return QString::fromLatin1("checkbook"); };
51
52 // safe config
53 void writeConfig();
54
55 // open a check book
56 void openBook(QListViewItem *curr);
48 57
49 private: 58 private:
50 QListView *cbList; 59 QListView *cbList;
51 QString cbDir; 60 QString cbDir;
52 QAction *actionOpen; 61 QAction *actionOpen;
53 QAction *actionDelete; 62 QAction *actionDelete;
54 63
55 QString currencySymbol; 64 Cfg _cfg;
56 bool showLocks;
57 bool showBalances;
58 int posName; 65 int posName;
59 66
60 CBInfoList *checkbooks; 67 CBInfoList *checkbooks;
61 QString tempFilename; 68 QString tempFilename;
62 QPixmap lockIcon; 69 QPixmap lockIcon;
63 QPixmap nullIcon; 70 QPixmap nullIcon;
64 71
65 void buildList(); 72 void buildList();
66 void addCheckbook( CBInfo * ); 73 void addCheckbook( CBInfo * );
67 void buildFilename( const QString & ); 74 void buildFilename( const QString & );
68 75
69 private slots: 76 private slots:
70 void slotNew(); 77 void slotNew();
71 void slotEdit(); 78 void slotEdit();
72 void slotDelete(); 79 void slotDelete();
73 void slotConfigure(); 80 void slotConfigure();
74}; 81};
75 82
76#endif 83#endif