From 513eaaa3556bc08c7ac9d03944ee35deff9d7ceb Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Mon, 20 May 2019 18:33:50 -0400 Subject: 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 --- src/modinfodialog.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/modinfodialog.h') 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; -- cgit v1.3.1