| 1 | #pragma once |
| 2 | |
| 3 | /**************************************************************************************** |
| 4 | ** GitQlient is an application to manage and operate one or several Git repositories. With |
| 5 | ** GitQlient you will be able to add commits, branches and manage all the options Git provides. |
| 6 | ** Copyright (C) 2021 Francesc Martinez |
| 7 | ** |
| 8 | ** LinkedIn: www.linkedin.com/in/cescmm/ |
| 9 | ** Web: www.francescmm.com |
| 10 | ** |
| 11 | ** This library is free software; you can redistribute it and/or |
| 12 | ** modify it under the terms of the GNU Lesser General Public |
| 13 | ** License as published by the Free Software Foundation; either |
| 14 | ** version 2 of the License, or (at your option) any later version. |
| 15 | ** |
| 16 | ** This program is distributed in the hope that it will be useful, |
| 17 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 19 | ** Lesser General Public License for more details. |
| 20 | ** |
| 21 | ** You should have received a copy of the GNU Lesser General Public |
| 22 | ** License along with this library; if not, write to the Free Software |
| 23 | ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 24 | ***************************************************************************************/ |
| 25 | |
| 26 | #include <QDialog> |
| 27 | |
| 28 | class QSpinBox; |
| 29 | class CheckBox; |
| 30 | class QComboBox; |
| 31 | class QLabel; |
| 32 | class QPushButton; |
| 33 | class QLineEdit; |
| 34 | class GitQlientSettings; |
| 35 | |
| 36 | /*! |
| 37 | \brief The GeneralConfigPage shows the available configuration for GitQlient. The configurable options are the |
| 38 | following: |
| 39 | - Disable logs: The user can enable or disable logs. |
| 40 | - Log level: The user can configure the level of the logs for GitQlient. |
| 41 | |
| 42 | */ |
| 43 | class GeneralConfigDlg : public QDialog |
| 44 | { |
| 45 | Q_OBJECT |
| 46 | |
| 47 | public: |
| 48 | /*! |
| 49 | \brief Default constructor. |
| 50 | |
| 51 | \param parent The parent widget if needed. |
| 52 | */ |
| 53 | explicit GeneralConfigDlg(QWidget *parent = nullptr); |
| 54 | |
| 55 | private: |
| 56 | QSharedPointer<GitQlientSettings> mSettings; |
| 57 | CheckBox *mDisableLogs = nullptr; |
| 58 | QComboBox *mLevelCombo = nullptr; |
| 59 | QComboBox *mStylesSchema = nullptr; |
| 60 | QLineEdit *mGitLocation = nullptr; |
| 61 | bool mShowResetMsg = false; |
| 62 | QPushButton *mClose = nullptr; |
| 63 | QPushButton *mReset = nullptr; |
| 64 | QPushButton *mApply = nullptr; |
| 65 | |
| 66 | /*! |
| 67 | \brief Reset the changes to its default value. |
| 68 | |
| 69 | */ |
| 70 | void resetChanges(); |
| 71 | /*! |
| 72 | \brief Applies the changes into the settings system. |
| 73 | |
| 74 | */ |
| 75 | void accept() override; |
| 76 | |
| 77 | /** |
| 78 | * @brief importConfig Imports an external configuration. |
| 79 | */ |
| 80 | void importConfig(); |
| 81 | |
| 82 | /** |
| 83 | * @brief exportConfig Exports the configuration to an external file. |
| 84 | */ |
| 85 | void exportConfig(); |
| 86 | }; |
| 87 | |