diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-05-20 18:33:50 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-05-20 18:33:50 -0400 |
| commit | 513eaaa3556bc08c7ac9d03944ee35deff9d7ceb (patch) | |
| tree | 00118efcb71698b52784b08d500c0ac64a0d71d0 /src/modinfodialog.h | |
| parent | c5f61733850d6737814041f645a009e1cc60a7ed (diff) | |
added const version of Settings::directInterface() for restoring states
added top-level saveState() and restoreState() to ModInfoDialog that are called from MainWindow, because it now also has to handle expander states in the conflict tab
added internal opened state to expander widget instead of using widget visibility so it can be saved even after the dialog is closed
Diffstat (limited to 'src/modinfodialog.h')
| -rw-r--r-- | src/modinfodialog.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/modinfodialog.h b/src/modinfodialog.h index 32efa210..3ce76740 100644 --- a/src/modinfodialog.h +++ b/src/modinfodialog.h @@ -191,14 +191,14 @@ public: void set(QToolButton* button, QWidget* content, bool opened=false);
- void open();
- void close();
void toggle();
+ void toggle(bool b);
bool opened() const;
private:
QToolButton* m_button;
QWidget* m_content;
+ bool opened_;
};
@@ -257,9 +257,8 @@ public: **/
void openTab(int tab);
- void restoreTabState(const QByteArray &state);
-
- QByteArray saveTabState() const;
+ void saveState(Settings& s) const;
+ void restoreState(const Settings& s);
signals:
@@ -408,6 +407,13 @@ private: ExpanderWidget m_overwriteExpander, m_overwrittenExpander, m_nonconflictExpander;
+
+ void restoreTabState(const QByteArray &state);
+ void restoreConflictExpandersState(const QByteArray &state);
+
+ QByteArray saveTabState() const;
+ QByteArray saveConflictExpandersState() const;
+
bool canHideConflictItem(const QTreeWidgetItem* item) const;
bool canUnhideConflictItem(const QTreeWidgetItem* item) const;
bool canPreviewConflictItem(const QTreeWidgetItem* item) const;
|
