summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/cfg.h
Unidiff
Diffstat (limited to 'noncore/apps/checkbook/cfg.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/cfg.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/noncore/apps/checkbook/cfg.h b/noncore/apps/checkbook/cfg.h
index 2b69368..20692b4 100644
--- a/noncore/apps/checkbook/cfg.h
+++ b/noncore/apps/checkbook/cfg.h
@@ -68,53 +68,65 @@ class Cfg
68 Cfg(); 68 Cfg();
69 69
70 // --- members 70 // --- members
71 bool getShowLocks() { return(_showLocks); } 71 bool getShowLocks() { return(_showLocks); }
72 void setShowLocks(bool n) { _showLocks=n; } 72 void setShowLocks(bool n) { _showLocks=n; }
73 bool getShowBalances() { return(_showBalances); } 73 bool getShowBalances() { return(_showBalances); }
74 void setShowBalances(bool n) { _showBalances=n; } 74 void setShowBalances(bool n) { _showBalances=n; }
75 QString &getCurrencySymbol() { return(_currencySymbol); } 75 QString &getCurrencySymbol() { return(_currencySymbol); }
76 void setCurrencySymbol(QString n) {_currencySymbol= n; } 76 void setCurrencySymbol(QString n) {_currencySymbol= n; }
77 void setCurrencySymbol(const char *n) { _currencySymbol=n; } 77 void setCurrencySymbol(const char *n) { _currencySymbol=n; }
78 QStringList &getAccountTypes() { return(_AccountTypes); } 78 QStringList &getAccountTypes() { return(_AccountTypes); }
79 79
80 // --- Payees
81 QStringList &getPayees() { return(_Payees); }
82 bool getSavePayees() { return(_bSavePayees); }
83 void setSavePayees(bool bSave) { _bSavePayees=bSave; }
84
80 // --- Categories 85 // --- Categories
81 QStringList getCategories(); 86 QStringList getCategories();
82 void setCategories(QStringList &lst); 87 void setCategories(QStringList &lst);
83 CategoryList *getCategoryList() { return(_pCategories); } 88 CategoryList *getCategoryList() { return(_pCategories); }
84 89
85 // --- last book 90 // --- last book
86 void setOpenLastBook(bool openLastBook) { _openLastBook=openLastBook; } 91 void setOpenLastBook(bool openLastBook) { _openLastBook=openLastBook; }
87 bool isOpenLastBook() { return(_openLastBook); } 92 bool isOpenLastBook() { return(_openLastBook); }
88 void setLastBook(const QString &lastBook) { _sLastBook=lastBook; } 93 void setLastBook(const QString &lastBook) { _sLastBook=lastBook; }
89 QString &getLastBook() { return(_sLastBook); } 94 QString &getLastBook() { return(_sLastBook); }
90 95
91 // --- last tab 96 // --- last tab
92 void setShowLastTab(bool showLastTab) { _showLastTab=showLastTab; } 97 void setShowLastTab(bool showLastTab) { _showLastTab=showLastTab; }
93 bool isShowLastTab() { return(_showLastTab); } 98 bool isShowLastTab() { return(_showLastTab); }
94 99
95 // --- reads data from config file 100 // --- reads data from config file
96 void readConfig(Config &cfg); 101 void readConfig(Config &cfg);
97 102
98 // --- writes data to config file 103 // --- writes data to config file
99 void writeConfig(Config &cfg); 104 void writeConfig(Config &cfg);
100 105
106 // --- dirty flag
107 bool isDirty() { return(_bDirty); }
108 void setDirty(bool bDirty) { _bDirty=bDirty; }
109
110 protected:
101 // --- reads list from config file 111 // --- reads list from config file
102 static void readStringList(Config &cfg, const char *sKey, QStringList &lst); 112 static void readStringList(Config &cfg, const char *sKey, QStringList &lst);
103 113
104 // --- writes list in configuration file 114 // --- writes list in configuration file
105 static void writeStringList(Config &cfg, const char *sKey, QStringList &lst); 115 static void writeStringList(Config &cfg, const char *sKey, QStringList &lst);
106 116
107
108
109 private: 117 private:
110 QString _currencySymbol; 118 QString _currencySymbol;
111 bool _showLocks; 119 bool _showLocks;
112 bool _showBalances; 120 bool _showBalances;
113 bool _openLastBook; 121 bool _openLastBook;
114 bool _showLastTab; 122 bool _showLastTab;
123 bool _bDirty;
124 bool _bSavePayees;
115 QString _sLastBook; 125 QString _sLastBook;
116 QStringList _AccountTypes; 126 QStringList _AccountTypes;
117 CategoryList *_pCategories; 127 CategoryList *_pCategories;
128 QStringList _Payees;
129
118}; 130};
119 131
120#endif 132#endif