~l3on/ubuntu/precise/rkward/rebuild1

« back to all changes in this revision

Viewing changes to rkward/settings/rksettingsmodulegeneral.h

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Friedrichsmeier
  • Date: 2008-04-20 21:30:00 UTC
  • mfrom: (1.2.2 upstream) (3.1.9 hardy)
  • Revision ID: james.westby@ubuntu.com-20080420213000-fs4i8efmfc793bnn
new upstream release
closes: #475175
closes: #463348
closes: #475982

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
                          rksettingsmodulegeneral  -  description
3
3
                             -------------------
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
 ***************************************************************************/
8
8
 
22
22
 
23
23
class GetFileNameWidget;
24
24
class QComboBox;
 
25
class QCheckBox;
 
26
class QButtonGroup;
 
27
class RKSpinBox;
25
28
 
26
29
/**
27
30
@author Thomas Friedrichsmeier
29
32
class RKSettingsModuleGeneral : public RKSettingsModule {
30
33
        Q_OBJECT
31
34
public:
32
 
    RKSettingsModuleGeneral (RKSettings *gui, QWidget *parent);
33
 
 
34
 
    ~RKSettingsModuleGeneral ();
35
 
        
 
35
        RKSettingsModuleGeneral (RKSettings *gui, QWidget *parent);
 
36
 
 
37
        ~RKSettingsModuleGeneral ();
 
38
 
 
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,
 
42
                DontSaveWorkplace=2
 
43
        };
 
44
 
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; };
49
65
public slots:
50
66
        void pathChanged ();
51
67
        void boxChanged (int);
52
68
private:
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;
55
74
 
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;
60
82
};
61
83
 
62
84
#endif