Changeset View
Changeset View
Standalone View
Standalone View
svn/svncommitdialog.h
- This file was added.
1 | /*************************************************************************** | ||||
---|---|---|---|---|---|
2 | * Copyright (C) 2019-2020 * | ||||
3 | * by Nikolai Krasheninnikov <nkrasheninnikov@yandex.ru> * | ||||
4 | * * | ||||
5 | * This program is free software; you can redistribute it and/or modify * | ||||
6 | * it under the terms of the GNU General Public License as published by * | ||||
7 | * the Free Software Foundation; either version 2 of the License, or * | ||||
8 | * (at your option) any later version. * | ||||
9 | * * | ||||
10 | * This program is distributed in the hope that it will be useful, * | ||||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||||
13 | * GNU General Public License for more details. * | ||||
14 | * * | ||||
15 | * You should have received a copy of the GNU General Public License * | ||||
16 | * along with this program; if not, write to the * | ||||
17 | * Free Software Foundation, Inc., * | ||||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * | ||||
19 | ***************************************************************************/ | ||||
20 | | ||||
21 | #ifndef SVNCOMMITDIALOG_H | ||||
22 | #define SVNCOMMITDIALOG_H | ||||
23 | | ||||
24 | #include <QDialog> | ||||
25 | #include <QHash> | ||||
26 | | ||||
27 | #include <Dolphin/KVersionControlPlugin> | ||||
28 | | ||||
29 | class QPlainTextEdit; | ||||
30 | class QTableWidget; | ||||
31 | | ||||
32 | /** | ||||
33 | * \brief SVN Commit dialog class. | ||||
34 | */ | ||||
35 | class SvnCommitDialog : public QDialog { | ||||
36 | Q_OBJECT | ||||
37 | public: | ||||
38 | explicit SvnCommitDialog(const QHash<QString, KVersionControlPlugin::ItemVersion> *versionInfo, QWidget *parent = nullptr); | ||||
39 | virtual ~SvnCommitDialog() override; | ||||
40 | | ||||
41 | signals: | ||||
42 | void commit(const QString& msg); | ||||
43 | void revertFile(const QString& filePath); | ||||
44 | void diffFile(const QString& filePath); | ||||
45 | void addFile(const QString& filePath); | ||||
46 | | ||||
47 | public slots: | ||||
48 | void refreshChangesList(); | ||||
49 | void show(); | ||||
50 | | ||||
51 | private slots: | ||||
52 | void contextMenu(const QPoint& pos); | ||||
53 | | ||||
54 | private: | ||||
55 | const QHash<QString, KVersionControlPlugin::ItemVersion> *m_versionInfoHash; | ||||
56 | QPlainTextEdit *m_editor; | ||||
57 | QTableWidget *m_changes; | ||||
58 | QAction *m_actRevertFile; | ||||
59 | QAction *m_actDiffFile; | ||||
60 | QAction *m_actAddFile; | ||||
61 | | ||||
62 | protected: | ||||
63 | virtual void keyPressEvent(QKeyEvent *event) override; | ||||
64 | }; | ||||
65 | | ||||
66 | #endif // SVNCOMMITDIALOG_H |