summaryrefslogtreecommitdiff
path: root/noncore/unsupported/qashmoney/preferences.h
Unidiff
Diffstat (limited to 'noncore/unsupported/qashmoney/preferences.h') (more/less context) (show whitespace changes)
-rwxr-xr-xnoncore/unsupported/qashmoney/preferences.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/noncore/unsupported/qashmoney/preferences.h b/noncore/unsupported/qashmoney/preferences.h
new file mode 100755
index 0000000..38579ad
--- a/dev/null
+++ b/noncore/unsupported/qashmoney/preferences.h
@@ -0,0 +1,53 @@
1#include <sqlite3.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 void initializeSortingPreferences ();
16
17 // Returns a preference value for the given preferences ID
18 int getPreference ( int );
19 int getColumnPreference ( int id );
20 void getSortingPreference ( int id, int *column, int *direction );
21
22 // Convenience for getting date separator with one function
23 // call. Takes the preference id as its argument
24 QString getSeparator ( );
25
26 // Changes a preference for the given ID
27 void changePreference ( int , int );
28 void changeColumnPreference ( int id, int width );
29 void changeSortingPreference ( int id, int column );
30
31 // The primary database that stores all our data
32 sqlite3 *db;
33
34 // This function returns a Qstring for the year first date formats
35 // for displaying. It takes the date numbers
36 QString getDate ( int, int, int );
37 QString getDate ( int y, int m );
38
39 void setDefaultDatePreferences ();
40 };
41
42#endif
43
44
45
46
47
48
49
50
51
52
53