Feature #65
Save and restore Qt-Gui geometry
| Status: | Closed | Start: | 12/31/2010 | |
|---|---|---|---|---|
| Priority: | Low | Due date: | ||
| Assigned to: | Alguno | % Done: |
100% |
|
| Category: | Qt GUI (regular GUI) | |||
| Target version: | 0.7.0 | |||
| Votes: | 0 |
Description
make user-defined GUI layout changes persistent
the patch attached implements this feature for top level (mainwindow) layout only.
Associated revisions
closes #65
History
#1 Updated by Alguno over 2 years ago
- Category set to Qt GUI (regular GUI)
- Status changed from New to In Progress
- Assigned to set to Alguno
- Target version set to 0.7.0
Thanks for your patch.
There already is a configuration file which can be used to maintain settings about the GUI.
The class ConfigGuiOpts is responsible for maintaining this configuration file.
Could you please update the patch so that the settings get maintained by
the ConfigGuiOpts class instead of a new configuration file?
- File svn_diff_saveGeometryState_v2.patch added
ok done.
mainwindow and splitter positions and currently active tab are saved and restored with this patch;
however remembering all the treeWidgets column positions and widths is something i'd like to have but i have still not implemented since i don't know of a nice way to do it: looping through the columns and spamming the config file with dozens of enumerated int-values seems dirty :/ (additionally access-methods would either be quite generic setInt(name, value) / getInt(name) or bloat too)
...
or is there something Qt offers i just didn't discover yet?
#3 Updated by Alguno over 2 years ago
- % Done changed from 20 to 50
The patch is approved. Feel free to apply it to the trunk branch.
Please mention something like 'closes #65' in the commit message so that this report is updated automatically as well.
As for your column positions/width question. You might want to use a list-based datatype to save all the information in the configuration file. See https://doc.qt.nokia.com/4.7/qvariant.html for the possible data types which can be saved in a QSettings file.
#4 Updated by tg1311 over 2 years ago
- Status changed from In Progress to Closed
- % Done changed from 50 to 100
Applied in changeset r1807.
Also available in: Atom PDF
NNTPGrab

