Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

preferences.h

Go to the documentation of this file.
00001 #include <sqlite3.h>
00002 #include <qstring.h>
00003 
00004 #ifndef PREFERENCES_H
00005 #define PREFERENCES_H
00006 
00007 class Preferences
00008   {
00009     public:
00010       Preferences ();
00011       ~Preferences ();
00012 
00013       void addPreferences ();
00014       void initializeColumnPreferences ();
00015       void initializeSortingPreferences ();
00016 
00017       // Returns a preference value for the given preferences ID
00018       int getPreference ( int );
00019       int getColumnPreference ( int id );
00020       void getSortingPreference ( int id, int *column, int *direction );
00021 
00022       // Convenience for getting date separator with one function
00023       // call.  Takes the preference id as its argument
00024       QString getSeparator ( );
00025 
00026       //  Changes a preference for the given ID
00027       void changePreference ( int , int );
00028       void changeColumnPreference ( int id, int width );
00029       void changeSortingPreference ( int id, int column );
00030 
00031       // The primary database that stores all our data
00032       sqlite3 *db;
00033 
00034       // This function returns a Qstring for the year first date formats
00035       // for displaying.  It takes the date numbers
00036       QString getDate ( int, int, int );
00037       QString getDate ( int y, int m );
00038 
00039       void setDefaultDatePreferences ();
00040   };
00041 
00042 #endif
00043 
00044 
00045 
00046 
00047 
00048 
00049 
00050 
00051 
00052 
00053 

Generated on Sat Nov 5 16:16:56 2005 for OPIE by  doxygen 1.4.2