diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-09-09 01:25:01 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-09 01:25:01 -0400 |
| commit | 99fdbb2539227cec4fab534efc7420cfc5ca1a92 (patch) | |
| tree | 4fe70561a85d86b65cc4c6725541767684af09a7 /src/mainwindow.h | |
| parent | 73626b297904d50507bb7d5d1342120040e655e8 (diff) | |
| parent | d863e62c6e2f3c0daa50e16a0206f59558a7bb7e (diff) | |
Merge pull request #830 from isanae/settings-interface
Settings interface
Diffstat (limited to 'src/mainwindow.h')
| -rw-r--r-- | src/mainwindow.h | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/src/mainwindow.h b/src/mainwindow.h index aa49205d..6f06b9d5 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -40,7 +40,6 @@ class Executable; class CategoryFactory; class LockedDialogBase; class OrganizerCore; -class StatusBar; class PluginListSortProxy; namespace BSA { class Archive; } @@ -83,7 +82,6 @@ class QProgressDialog; class QTranslator; class QTreeWidgetItem; class QUrl; -class QSettings; class QWidget; #ifndef Q_MOC_RUN @@ -103,6 +101,7 @@ namespace Ui { class MainWindow; } +class Settings; class MainWindow : public QMainWindow, public IUserInterface @@ -113,14 +112,12 @@ class MainWindow : public QMainWindow, public IUserInterface public: - explicit MainWindow(QSettings &initSettings, + explicit MainWindow(Settings &settings, OrganizerCore &organizerCore, PluginContainer &pluginContainer, QWidget *parent = 0); ~MainWindow(); - void storeSettings(QSettings &settings) override; - void readSettings(); - void processUpdates(); + void processUpdates(Settings& settings); virtual ILockedWaitingForProcess* lock() override; virtual void unlock() override; @@ -229,8 +226,6 @@ private: QMenu* createPopupMenu() override; void activateSelectedProfile(); - void setExecutableIndex(int index); - void startSteam(); void updateTo(QTreeWidgetItem *subTree, const std::wstring &directorySoFar, const MOShared::DirectoryEntry &directoryEntry, bool conflictsOnly, QIcon *fileIcon, QIcon *folderIcon); @@ -293,7 +288,6 @@ private: static void setupNetworkProxy(bool activate); void activateProxy(bool activate); - void setBrowserGeometry(const QByteArray &geometry); bool createBackup(const QString &filePath, const QDateTime &time); QString queryRestore(const QString &filePath); @@ -315,8 +309,6 @@ private: void dropLocalFile(const QUrl &url, const QString &outputDir, bool move); - bool registerWidgetState(const QString &name, QHeaderView *view, const char *oldSettingName = nullptr); - void sendSelectedModsToPriority(int newPriority); void sendSelectedPluginsToPriority(int newPriority); @@ -334,12 +326,6 @@ private: bool m_WasVisible; - // this has to be remembered because by the time storeSettings() is called, - // the window is closed and the all bars are hidden - bool m_menuBarVisible, m_statusBarVisible; - - std::unique_ptr<StatusBar> m_statusBar; - // last separator on the toolbar, used to add spacer for right-alignment and // as an insert point for executables QAction* m_linksSeparator; @@ -349,11 +335,9 @@ private: int m_OldProfileIndex; std::vector<QString> m_ModNameList; // the mod-list to go with the directory structure - bool m_Refreshing; QStringList m_DefaultArchives; - QAbstractItemModel *m_ModListGroupingProxy; ModListSortProxy *m_ModListSortProxy; PluginListSortProxy *m_PluginListSortProxy; @@ -369,8 +353,6 @@ private: CategoryFactory &m_CategoryFactory; - bool m_LoginAttempted; - QTimer m_CheckBSATimer; QTimer m_SaveMetaTimer; QTimer m_UpdateProblemsTimer; @@ -404,8 +386,6 @@ private: bool m_showArchiveData{ true }; - std::vector<std::pair<QString, QHeaderView*>> m_PersistedGeometry; - MOBase::DelayedFileWriter m_ArchiveListWriter; QAction* m_LinkToolbar; @@ -603,10 +583,7 @@ private slots: void expandModList(const QModelIndex &index); - /** - * @brief resize columns in mod list and plugin list to content - */ - void resizeLists(bool modListCustom, bool pluginListCustom); + void resizeLists(bool pluginListCustom); /** * @brief allow columns in mod list and plugin list to be resized @@ -697,10 +674,9 @@ private slots: // ui slots void on_categoriesOrBtn_toggled(bool checked); void on_managedArchiveLabel_linkHovered(const QString &link); - void showMenuBar(bool b); - void showStatusBar(bool b); + void storeSettings(Settings& settings); + void readSettings(const Settings& settings); + void setupModList(); }; - - #endif // MAINWINDOW_H |
