Diffstat (limited to 'noncore/apps/checkbook/cfg.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/cfg.h | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/noncore/apps/checkbook/cfg.h b/noncore/apps/checkbook/cfg.h index 20692b4..418bd93 100644 --- a/noncore/apps/checkbook/cfg.h +++ b/noncore/apps/checkbook/cfg.h | |||
@@ -1,35 +1,35 @@ | |||
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 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef CFG_H | 29 | #ifndef CFG_H |
30 | #define CFG_H | 30 | #define CFG_H |
31 | 31 | ||
32 | #include <qstring.h> | 32 | #include <qstring.h> |
33 | #include <qlist.h> | 33 | #include <qlist.h> |
34 | #include <qstringlist.h> | 34 | #include <qstringlist.h> |
35 | class Config; | 35 | class Config; |
@@ -59,24 +59,26 @@ class CategoryList : public QList<Category> | |||
59 | CategoryList(); | 59 | CategoryList(); |
60 | }; | 60 | }; |
61 | 61 | ||
62 | 62 | ||
63 | // --- Cfg -------------------------------------------------------------------- | 63 | // --- Cfg -------------------------------------------------------------------- |
64 | class Cfg | 64 | class Cfg |
65 | { | 65 | { |
66 | public: | 66 | public: |
67 | // --- Constructor | 67 | // --- Constructor |
68 | Cfg(); | 68 | Cfg(); |
69 | 69 | ||
70 | // --- members | 70 | // --- members |
71 | bool getUseSmallFont() { return(_useSmallFont); } | ||
72 | void setUseSmallFont(bool n) { _useSmallFont=n; } | ||
71 | bool getShowLocks() { return(_showLocks); } | 73 | bool getShowLocks() { return(_showLocks); } |
72 | void setShowLocks(bool n) { _showLocks=n; } | 74 | void setShowLocks(bool n) { _showLocks=n; } |
73 | bool getShowBalances() { return(_showBalances); } | 75 | bool getShowBalances() { return(_showBalances); } |
74 | void setShowBalances(bool n) { _showBalances=n; } | 76 | void setShowBalances(bool n) { _showBalances=n; } |
75 | QString &getCurrencySymbol() { return(_currencySymbol); } | 77 | QString &getCurrencySymbol() { return(_currencySymbol); } |
76 | void setCurrencySymbol(QString n) {_currencySymbol= n; } | 78 | void setCurrencySymbol(QString n) {_currencySymbol= n; } |
77 | void setCurrencySymbol(const char *n) { _currencySymbol=n; } | 79 | void setCurrencySymbol(const char *n) { _currencySymbol=n; } |
78 | QStringList &getAccountTypes() { return(_AccountTypes); } | 80 | QStringList &getAccountTypes() { return(_AccountTypes); } |
79 | 81 | ||
80 | // --- Payees | 82 | // --- Payees |
81 | QStringList &getPayees() { return(_Payees); } | 83 | QStringList &getPayees() { return(_Payees); } |
82 | bool getSavePayees() { return(_bSavePayees); } | 84 | bool getSavePayees() { return(_bSavePayees); } |
@@ -107,24 +109,25 @@ class Cfg | |||
107 | bool isDirty() { return(_bDirty); } | 109 | bool isDirty() { return(_bDirty); } |
108 | void setDirty(bool bDirty) { _bDirty=bDirty; } | 110 | void setDirty(bool bDirty) { _bDirty=bDirty; } |
109 | 111 | ||
110 | protected: | 112 | protected: |
111 | // --- reads list from config file | 113 | // --- reads list from config file |
112 | static void readStringList(Config &cfg, const char *sKey, QStringList &lst); | 114 | static void readStringList(Config &cfg, const char *sKey, QStringList &lst); |
113 | 115 | ||
114 | // --- writes list in configuration file | 116 | // --- writes list in configuration file |
115 | static void writeStringList(Config &cfg, const char *sKey, QStringList &lst); | 117 | static void writeStringList(Config &cfg, const char *sKey, QStringList &lst); |
116 | 118 | ||
117 | private: | 119 | private: |
118 | QString _currencySymbol; | 120 | QString _currencySymbol; |
121 | bool _useSmallFont; | ||
119 | bool _showLocks; | 122 | bool _showLocks; |
120 | bool _showBalances; | 123 | bool _showBalances; |
121 | bool _openLastBook; | 124 | bool _openLastBook; |
122 | bool _showLastTab; | 125 | bool _showLastTab; |
123 | bool _bDirty; | 126 | bool _bDirty; |
124 | bool _bSavePayees; | 127 | bool _bSavePayees; |
125 | QString _sLastBook; | 128 | QString _sLastBook; |
126 | QStringList _AccountTypes; | 129 | QStringList _AccountTypes; |
127 | CategoryList *_pCategories; | 130 | CategoryList *_pCategories; |
128 | QStringList _Payees; | 131 | QStringList _Payees; |
129 | 132 | ||
130 | }; | 133 | }; |