module: settings¶
Support for AGUP program settings
A settings file is used to preserve certain values of the application (such as window positions and full path to the project file). The name of the settings file is given in the main window. Note, the settings file may have the suffix ”.ini” on some operating systems. Remove the settings file to clear any settings. There is also a menu item to clear this file and reset it to defaults.
This module uses QSettings (http://doc.qt.io/qt-4.8/qsettings.html).
Note
Multi-monitor support : method restoreWindowGeometry()
On multi-monitor systems such as laptops, window may be restored to offscreen position. Here is how it happens:
- geo was saved while window was on 2nd screen while docked
- now re-opened on laptop display and window is off-screen
For now, keep the windows on the main screen or learn how to edit the settings file.
-
class
Assign_GUP.settings.
ApplicationQSettings
[source]¶ Bases:
PyQt4.QtCore.QSettings
manage and preserve default settings for this application using QSettings
Use the .ini file format and save under user directory
-
getKey
(key)[source]¶ return the Python value (not a QVariant) of key or None if not found
Raises: TypeError – if key is None
-
restoreSplitterDetails
(window)[source]¶ put the splitter back where it was
Parameters: window (obj) – instance of QWidget
-
restoreWindowGeometry
(window, group=None)[source]¶ put the window back where it was
Parameters: window (obj) – instance of QWidget
-
saveSplitterDetails
(window)[source]¶ remember where the splitter was
Parameters: window (obj) – instance of QWidget
-
saveWindowGeometry
(window, group=None)[source]¶ remember where the window was
Parameters: window (obj) – instance of QWidget
-