File indexing completed on 2025-01-05 05:14:40
0001 /* 0002 SPDX-FileCopyrightText: 2021 Hamed Masafi <hamed.masfi@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "ui_settingspagebase.h" 0010 #include "ui_settingspagediff.h" 0011 #include "ui_settingspagegit.h" 0012 #include <QObject> 0013 0014 namespace Git 0015 { 0016 class Manager; 0017 }; 0018 0019 class SettingsManager : public QObject 0020 { 0021 Q_OBJECT 0022 0023 public: 0024 SettingsManager(Git::Manager *git, QWidget *parentWidget); 0025 0026 void exec(QWidget *parentWidget); 0027 static void applyToLib(); 0028 0029 public Q_SLOTS: 0030 void show(); 0031 0032 Q_SIGNALS: 0033 void settingsUpdated(); 0034 0035 private: 0036 Git::Manager *const mGit; 0037 void settingsChanged(); 0038 Ui::SettingsPageBase pageBase{}; 0039 Ui::SettingsPageDiff pageDiff{}; 0040 Ui::SettingsPageGit pageGit{}; 0041 QWidget *createBasePage(); 0042 QWidget *createGitPage(); 0043 QWidget *createDiffPage(); 0044 QWidget *const mParentWidget; 0045 };