2
2
rksettingsmodulegeneral - description
4
4
begin : Fri Jul 30 2004
5
copyright : (C) 2004 by Thomas Friedrichsmeier
5
copyright : (C) 2004, 2007 by Thomas Friedrichsmeier
6
6
email : tfry@users.sourceforge.net
7
7
***************************************************************************/
29
32
class RKSettingsModuleGeneral : public RKSettingsModule {
32
RKSettingsModuleGeneral (RKSettings *gui, QWidget *parent);
34
~RKSettingsModuleGeneral ();
35
RKSettingsModuleGeneral (RKSettings *gui, QWidget *parent);
37
~RKSettingsModuleGeneral ();
39
enum WorkplaceSaveMode { // don't change the int values of this enum, or you'll ruin users saved settings. Append new values at the end
40
SaveWorkplaceWithWorkspace=0,
41
SaveWorkplaceWithSession=1,
36
45
bool hasChanges ();
37
46
void applyChanges ();
38
47
void save (KConfig *config);
45
54
/// returns the directory-name where the logfiles should reside
46
55
static QString &filesPath () { return files_path; };
47
56
static StartupDialog::Result startupAction () { return startup_action; };
57
static bool showHelpOnStartup () { return show_help_on_startup; };
48
58
static void setStartupAction (StartupDialog::Result action) { startup_action = action; };
59
static WorkplaceSaveMode workplaceSaveMode () { return workplace_save_mode; };
60
/** retrieve the saved workplace description. Meaningful only is workplaceSaveMode () == SaveWorkplaceWithSession */
61
static QString getSavedWorkplace (KConfig *config);
62
/** set the saved workplace description. Meaningful only is workplaceSaveMode () == SaveWorkplaceWithSession */
63
static void setSavedWorkplace (const QString &description, KConfig *config);
64
static unsigned long warnLargeObjectThreshold () { return warn_size_object_edit; };
50
66
void pathChanged ();
51
67
void boxChanged (int);
53
69
GetFileNameWidget *files_choser;
54
70
QComboBox *startup_action_choser;
71
QButtonGroup *workplace_save_chooser;
72
QCheckBox *show_help_on_startup_box;
73
RKSpinBox *warn_size_object_edit_box;
56
75
static StartupDialog::Result startup_action;
57
76
static QString files_path;
58
77
/** since changing the files_path can not easily be done while in an active session, the setting should only take effect on the next start. This string stores a changed setting, while keeping the old one intact as long as RKWard is running */
59
78
static QString new_files_path;
79
static WorkplaceSaveMode workplace_save_mode;
80
static bool show_help_on_startup;
81
static int warn_size_object_edit;