diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2016-02-28 19:23:20 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2016-02-28 18:25:50 +0000 |
commit | 1a716800e37ae482901e9cce36c40005742dd78e (patch) | |
tree | 6dc88f72f082fa795646442e086363ff3d2f1b9f /ui/qt/preferences_dialog.cpp | |
parent | f0425e83a16acabfec103f52099a3f20ea7b35c2 (diff) |
Qt: Add dialog geometry restore
Add GeometryStateDialog class to handle load and save dialog geometry.
The QDialog class name will be used as window name. For shared
classes the UAT name or the statistics title or abbr will be used.
Change-Id: I5a019598307fb3861518f41e733de834788184d8
Reviewed-on: https://code.wireshark.org/review/14139
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui/qt/preferences_dialog.cpp')
-rw-r--r-- | ui/qt/preferences_dialog.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/qt/preferences_dialog.cpp b/ui/qt/preferences_dialog.cpp index 0908901783..58b36c3baa 100644 --- a/ui/qt/preferences_dialog.cpp +++ b/ui/qt/preferences_dialog.cpp @@ -255,7 +255,7 @@ const int capture_item_ = 1; const int pref_ptr_col_ = 0; PreferencesDialog::PreferencesDialog(QWidget *parent) : - QDialog(parent), + GeometryStateDialog(parent), pd_ui_(new Ui::PreferencesDialog), cur_line_edit_(NULL), cur_combo_box_(NULL) @@ -266,6 +266,8 @@ PreferencesDialog::PreferencesDialog(QWidget *parent) : // Some classes depend on pref_ptr_to_pref_ so this MUST be called after // fill_advanced_prefs. pd_ui_->setupUi(this); + loadGeometry(); + setWindowTitle(wsApp->windowTitleString(tr("Preferences"))); pd_ui_->advancedTree->invisibleRootItem()->addChildren(tmp_item.takeChildren()); QTreeWidgetItemIterator pref_it(pd_ui_->advancedTree, QTreeWidgetItemIterator::NoChildren); |