| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <QDialog> |
| 4 | |
| 5 | namespace Ui |
| 6 | { |
| 7 | class SquashDlg; |
| 8 | } |
| 9 | |
| 10 | class GitCache; |
| 11 | class GitBase; |
| 12 | |
| 13 | class SquashDlg : public QDialog |
| 14 | { |
| 15 | Q_OBJECT |
| 16 | |
| 17 | signals: |
| 18 | void changesCommitted(); |
| 19 | |
| 20 | public: |
| 21 | explicit SquashDlg(const QSharedPointer<GitBase> git, const QSharedPointer<GitCache> &cache, const QStringList &shas, |
| 22 | QWidget *parent = nullptr); |
| 23 | ~SquashDlg() override; |
| 24 | |
| 25 | void accept() override; |
| 26 | |
| 27 | private: |
| 28 | QSharedPointer<GitBase> mGit; |
| 29 | QSharedPointer<GitCache> mCache; |
| 30 | QStringList mShas; |
| 31 | Ui::SquashDlg *ui; |
| 32 | int mTitleMaxLength = 50; |
| 33 | |
| 34 | void updateCounter(const QString &text); |
| 35 | bool checkMsg(QString &msg); |
| 36 | }; |
| 37 |