/[svn]/gigedit/trunk/src/gigedit/Settings.h
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/Settings.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2891 by schoenebeck, Tue Apr 26 17:42:26 2016 UTC revision 3461 by persson, Sat Feb 2 17:53:36 2019 UTC
# Line 1  Line 1 
1  /*  /*
2      Copyright (c) 2014-2016 Christian Schoenebeck      Copyright (c) 2014-2019 Christian Schoenebeck
3            
4      This file is part of "gigedit" and released under the terms of the      This file is part of "gigedit" and released under the terms of the
5      GNU General Public License version 2.      GNU General Public License version 2.
# Line 12  Line 12 
12  #include <glibmm/object.h>  #include <glibmm/object.h>
13  #include <glibmm/property.h>  #include <glibmm/property.h>
14  #include <vector>  #include <vector>
15    #include "global.h"
16    
17  /**  /**
18   * Reflects, saves and restores all settings for the gigedit application.   * Reflects, saves and restores all settings for the gigedit application.
# Line 36  public: Line 37  public:
37       * All settings are grouped into these settings groups.       * All settings are grouped into these settings groups.
38       */       */
39      enum Group_t {      enum Group_t {
40          GLOBAL          GLOBAL,
41            MAIN_WINDOW,
42            SCRIPT_EDITOR,
43            DIMENSION_MANAGER,
44            SCRIPT_SLOTS,
45            COMBINE_INSTRUMENTS,
46            MIDI_RULES,
47            FILE_PROPS,
48            INSTR_PROPS,
49            SAMPLE_REFS,
50            MACRO_EDITOR,
51            MACROS_SETUP,
52            MACROS,
53      };      };
54    
55      /**      /**
# Line 59  public: Line 72  public:
72                  sigc::bind(                  sigc::bind(
73                      sigc::bind(                      sigc::bind(
74                          sigc::bind(                          sigc::bind(
75                              sigc::mem_fun(m_settings, &Settings::onPropertyChanged),                              sigc::mem_fun(*m_settings, &Settings::onPropertyChanged),
76                              m_group                              m_group
77                          ),                          ),
78                          type                          type
# Line 79  public: Line 92  public:
92                  sigc::bind(                  sigc::bind(
93                      sigc::bind(                      sigc::bind(
94                          sigc::bind(                          sigc::bind(
95                              sigc::mem_fun(m_settings, &Settings::onPropertyChanged),                              sigc::mem_fun(*m_settings, &Settings::onPropertyChanged),
96                              m_group                              m_group
97                          ),                          ),
98                          type                          type
# Line 108  public: Line 121  public:
121          Group_t m_group;          Group_t m_group;
122      };      };
123    
124        // settings of "Global" group
125      Property<bool> warnUserOnExtensions; ///< if enabled, the user shall he be warned if he is trying to use a gig format extension that will not work with Gigasampler/GigaStudio      Property<bool> warnUserOnExtensions; ///< if enabled, the user shall he be warned if he is trying to use a gig format extension that will not work with Gigasampler/GigaStudio
126      Property<bool> syncSamplerInstrumentSelection; ///< if enabled, the sampler's current instrument will automatically be switched whenever another instrument was selected in gigedit      Property<bool> syncSamplerInstrumentSelection; ///< if enabled, the sampler's current instrument will automatically be switched whenever another instrument was selected in gigedit
127      Property<bool> moveRootNoteWithRegionMoved; ///< if enabled, the root note(s) of regions are automatically moving when the user drags a region around at the virtual keyboard      Property<bool> moveRootNoteWithRegionMoved; ///< if enabled, the root note(s) of regions are automatically moving when the user drags a region around at the virtual keyboard
128        Property<bool> autoRestoreWindowDimension;
129        Property<bool> saveWithTemporaryFile; ///< If enabled and the user selects "Save" from the main menu, then the file is first saved as separate temporary file and after the save operation completed the temporary file is moved over the original file.
130        Property<bool> showTooltips; ///< Whether tooltips specifically intended for newbies should be displayed throughout the application (default: yes).
131    
132        // settings of "MainWindow" group
133        Property<int> mainWindowX;
134        Property<int> mainWindowY;
135        Property<int> mainWindowW;
136        Property<int> mainWindowH;
137    
138        // settings of "ScriptEditor" group
139        Property<int> scriptEditorWindowX;
140        Property<int> scriptEditorWindowY;
141        Property<int> scriptEditorWindowW;
142        Property<int> scriptEditorWindowH;
143        Property<int> scriptEditorFontSize;
144    
145        // settings of "DimensionManager" group
146        Property<int> dimensionManagerWindowX;
147        Property<int> dimensionManagerWindowY;
148        Property<int> dimensionManagerWindowW;
149        Property<int> dimensionManagerWindowH;
150    
151        // settings of "ScriptSlots" group
152        Property<int> scriptSlotsWindowX;
153        Property<int> scriptSlotsWindowY;
154        Property<int> scriptSlotsWindowW;
155        Property<int> scriptSlotsWindowH;
156    
157        // settings of "CombineInstruments" group
158        Property<int> combineInstrumentsWindowX;
159        Property<int> combineInstrumentsWindowY;
160        Property<int> combineInstrumentsWindowW;
161        Property<int> combineInstrumentsWindowH;
162    
163        // settings of "MidiRules" group
164        Property<int> midiRulesWindowX;
165        Property<int> midiRulesWindowY;
166        Property<int> midiRulesWindowW;
167        Property<int> midiRulesWindowH;
168    
169        // settings of "FileProps" group
170        Property<int> filePropsWindowX;
171        Property<int> filePropsWindowY;
172        Property<int> filePropsWindowW;
173        Property<int> filePropsWindowH;
174    
175        // settings of "InstrProps" group
176        Property<int> instrPropsWindowX;
177        Property<int> instrPropsWindowY;
178        Property<int> instrPropsWindowW;
179        Property<int> instrPropsWindowH;
180    
181        // settings of "SampleRefs" group
182        Property<int> sampleRefsWindowX;
183        Property<int> sampleRefsWindowY;
184        Property<int> sampleRefsWindowW;
185        Property<int> sampleRefsWindowH;
186    
187        // settings of "MacroEditor" group
188        Property<int> macroEditorWindowX;
189        Property<int> macroEditorWindowY;
190        Property<int> macroEditorWindowW;
191        Property<int> macroEditorWindowH;
192    
193        // settings of "MacrosSetup" group
194        Property<int> macrosSetupWindowX;
195        Property<int> macrosSetupWindowY;
196        Property<int> macrosSetupWindowW;
197        Property<int> macrosSetupWindowH;
198    
199      static Settings* singleton();      static Settings* singleton();
200      Settings();      Settings();
201      void load();      void load();
202        void loadMacros(std::vector<Serialization::Archive>& macros);
203        void saveMacros(const std::vector<Serialization::Archive>& macros);
204    
205  protected:  protected:
206      void onPropertyChanged(Glib::PropertyBase* pProperty, RawValueType_t type, Group_t group);      void onPropertyChanged(Glib::PropertyBase* pProperty, RawValueType_t type, Group_t group);

Legend:
Removed from v.2891  
changed lines
  Added in v.3461

  ViewVC Help
Powered by ViewVC