1#pragma once
2
3#include <QMap>
4#include <QWidget>
5
6class GitBase;
7class QTimer;
8class FileEditor;
9class QPushButton;
10class QAbstractButton;
11
12namespace Ui
13{
14class ConfigWidget;
15}
16
17class ConfigWidget : public QWidget
18{
19 Q_OBJECT
20
21signals:
22 void reloadView();
23 void buildSystemConfigured(bool configured);
24 void commitTitleMaxLenghtChanged();
25 void panelsVisibilityChaned();
26
27public:
28 explicit ConfigWidget(const QSharedPointer<GitBase> &git, QWidget *parent = nullptr);
29 ~ConfigWidget();
30
31 void onPanelsVisibilityChanged();
32
33private:
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
50private slots:
51 void saveConfig();
52 void onCredentialsOptionChanged(QAbstractButton *button);
53};
54