1 | #pragma once |
---|---|
2 | |
3 | #include <QMap> |
4 | #include <QWidget> |
5 | |
6 | class GitBase; |
7 | class QTimer; |
8 | class FileEditor; |
9 | class QPushButton; |
10 | class QAbstractButton; |
11 | |
12 | namespace Ui |
13 | { |
14 | class ConfigWidget; |
15 | } |
16 | |
17 | class ConfigWidget : public QWidget |
18 | { |
19 | Q_OBJECT |
20 | |
21 | signals: |
22 | void reloadView(); |
23 | void buildSystemConfigured(bool configured); |
24 | void commitTitleMaxLenghtChanged(); |
25 | void panelsVisibilityChaned(); |
26 | |
27 | public: |
28 | explicit ConfigWidget(const QSharedPointer<GitBase> &git, QWidget *parent = nullptr); |
29 | ~ConfigWidget(); |
30 | |
31 | void onPanelsVisibilityChanged(); |
32 | |
33 | private: |
34 | Ui::ConfigWidget *ui; |
35 | QSharedPointer<GitBase> mGit; |
36 | int mOriginalRepoOrder = 0; |
37 | bool mShowResetMsg = false; |
38 | QTimer *mFeedbackTimer = nullptr; |
39 | QPushButton *mSave = nullptr; |
40 | FileEditor *mLocalGit = nullptr; |
41 | FileEditor *mGlobalGit = nullptr; |
42 | |
43 | void clearCache(); |
44 | void calculateCacheSize(); |
45 | void toggleBsAccesInfo(); |
46 | void enableWidgets(); |
47 | void saveFile(); |
48 | void showCredentialsDlg(); |
49 | |
50 | private slots: |
51 | void saveConfig(); |
52 | void onCredentialsOptionChanged(QAbstractButton *button); |
53 | }; |
54 |