FIX issue #19 where multiple widget values led to bad replacements in the command
[qgit4/redivivus.git] / src / commitimpl.h
blob266fce17e0eda87ea90381ecf75124e3ec2146f9
1 /*
2 Author: Marco Costalba (C) 2005-2007
4 Copyright: See COPYING file that comes with this distribution
6 */
7 #ifndef COMMITIMPL_H
8 #define COMMITIMPL_H
10 #include "ui_commit.h"
11 #include "common.h"
13 class Git;
15 class CommitImpl : public QWidget, public Ui_CommitBase {
16 Q_OBJECT
17 public:
18 explicit CommitImpl(Git* g, bool amend);
20 signals:
21 void changesCommitted(bool);
23 public slots:
24 virtual void closeEvent(QCloseEvent*);
25 void pushButtonCommit_clicked();
26 void pushButtonAmend_clicked();
27 void pushButtonCancel_clicked();
28 void pushButtonUpdateCache_clicked();
29 void pushButtonSettings_clicked();
30 void textEditMsg_cursorPositionChanged();
32 private slots:
33 void contextMenuPopup(const QPoint&);
34 void checkAll();
35 void unCheckAll();
37 private:
38 void checkUncheck(bool checkAll);
39 bool getFiles(SList selFiles);
40 void warnNoFiles();
41 bool checkFiles(SList selFiles);
42 bool checkMsg(QString& msg);
43 bool checkPatchName(QString& patchName);
44 bool checkConfirm(SCRef msg, SCRef patchName, SCList selFiles, bool amend);
45 void computePosition(int &col_pos, int &line_pos);
46 bool eventFilter(QObject* obj, QEvent* event);
48 Git* git;
49 QString origMsg;
50 int ofsX, ofsY;
52 static QString lastMsgBeforeError;
55 #endif