Git push and pull implemented almost like a plugin. Clone and commit
[qa-tools:testplanner.git] / src / gitplugin.h
1 #ifndef GITPLUGIN_H
2 #define GITPLUGIN_H
3
4 #include <QObject>
5
6 class QMenu;
7 class QAction;
8 class GitOutputDialog;
9 class PluginContext;
10
11 class GitPlugin : public QObject
12 {
13     Q_OBJECT
14 public:
15     explicit GitPlugin(QObject *parent = 0);
16
17     void setContext(PluginContext *);
18     QMenu *menu();
19     
20 signals:
21
22 public slots:
23
24 private slots:
25     void gitClone();
26     void gitPull();
27     void gitPush();
28     void gitCommit();
29     void refreshActions();
30     
31 private:
32     QString activeDocumentDir();
33     bool isActiveDocumentInGitRepo();
34     
35 private:
36     PluginContext *m_context;
37     QMenu *m_menu;
38     QAction *m_cloneAction;
39     QAction *m_pullAction;
40     QAction *m_pushAction;
41     QAction *m_commitAction;        
42     
43     GitOutputDialog *m_gitOutputDialog;
44 };
45
46 #endif // GITPLUGIN_H