summaryrefslogtreecommitdiff
path: root/noncore/apps/qashmoney/preferences.h
Unidiff
Diffstat (limited to 'noncore/apps/qashmoney/preferences.h') (more/less context) (ignore whitespace changes)
-rwxr-xr-xnoncore/apps/qashmoney/preferences.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/noncore/apps/qashmoney/preferences.h b/noncore/apps/qashmoney/preferences.h
new file mode 100755
index 0000000..4a3e058
--- a/dev/null
+++ b/noncore/apps/qashmoney/preferences.h
@@ -0,0 +1,50 @@
1#include <sqlite.h>
2#include <qstring.h>
3
4#ifndef PREFERENCES_H
5#define PREFERENCES_H
6
7class Preferences
8 {
9 public:
10 Preferences ();
11 ~Preferences ();
12
13 void addPreferences ();
14 void initializeColumnPreferences ();
15
16 // Returns a preference value for the given preferences ID
17 int getPreference ( int );
18 int getColumnPreference ( int id );
19
20 // Convenience for getting date separator with one function
21 // call. Takes the preference id as its argument
22 QString getSeparator ( );
23
24 // Changes a preference for the given ID
25 void changePreference ( int , int );
26 void changeColumnPreference ( int id, int width );
27
28 // The primary database that stores all our data
29 sqlite *db;
30
31 // This function returns a Qstring for the year first date formats
32 // for displaying. It takes the date numbers
33 QString getDate ( int, int, int );
34 QString getDate ( int y, int m );
35
36 void setDefaultDatePreferences ();
37 };
38
39#endif
40
41
42
43
44
45
46
47
48
49
50