Chris@57
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
Chris@57
|
2
|
Chris@57
|
3 /*
|
Chris@57
|
4 EasyMercurial
|
Chris@57
|
5
|
Chris@57
|
6 Based on HgExplorer by Jari Korhonen
|
Chris@57
|
7 Copyright (c) 2010 Jari Korhonen
|
Chris@57
|
8 Copyright (c) 2010 Chris Cannam
|
Chris@57
|
9 Copyright (c) 2010 Queen Mary, University of London
|
Chris@57
|
10
|
Chris@57
|
11 This program is free software; you can redistribute it and/or
|
Chris@57
|
12 modify it under the terms of the GNU General Public License as
|
Chris@57
|
13 published by the Free Software Foundation; either version 2 of the
|
Chris@57
|
14 License, or (at your option) any later version. See the file
|
Chris@57
|
15 COPYING included with this distribution for more information.
|
Chris@57
|
16 */
|
Chris@57
|
17
|
Chris@96
|
18 #ifndef HGTABWIDGET_H
|
Chris@96
|
19 #define HGTABWIDGET_H
|
jtkorhonen@0
|
20
|
Chris@43
|
21 #include "changeset.h"
|
jtkorhonen@0
|
22 #include "common.h"
|
Chris@92
|
23 #include "filestates.h"
|
jtkorhonen@0
|
24
|
Chris@50
|
25 #include <QMenu>
|
Chris@50
|
26 #include <QListWidget>
|
Chris@50
|
27 #include <QGroupBox>
|
Chris@50
|
28 #include <QVBoxLayout>
|
Chris@50
|
29 #include <QCheckBox>
|
Chris@50
|
30 #include <QLabel>
|
Chris@88
|
31 #include <QTabWidget>
|
Chris@86
|
32
|
Chris@88
|
33 class FileStatusWidget;
|
Chris@88
|
34
|
jtkorhonen@0
|
35
|
Chris@96
|
36 class HgTabWidget: public QTabWidget
|
jtkorhonen@0
|
37 {
|
jtkorhonen@0
|
38 Q_OBJECT
|
jtkorhonen@0
|
39
|
jtkorhonen@0
|
40 public:
|
Chris@96
|
41 HgTabWidget(QWidget *parent, QString remoteRepo, QString workFolderPath);
|
Chris@91
|
42
|
jtkorhonen@0
|
43 void updateWorkFolderFileList(QString fileList);
|
jtkorhonen@0
|
44 void updateLocalRepoHgLogList(QString hgLogList);
|
jtkorhonen@0
|
45 void setWorkFolderAndRepoNames(QString workFolderPath, QString remoteRepoPath);
|
Chris@106
|
46 void setBranch(QString branch);
|
jtkorhonen@0
|
47
|
Chris@92
|
48 FileStates getFileStates() { return fileStates; }
|
Chris@90
|
49
|
Chris@90
|
50 bool canCommit() const;
|
Chris@109
|
51 bool canRevert() const;
|
Chris@92
|
52 bool canAdd() const;
|
Chris@92
|
53 bool canRemove() const;
|
Chris@95
|
54 bool canDoDiff() const;
|
Chris@95
|
55
|
Chris@95
|
56 QStringList getAllSelectedFiles() const;
|
Chris@103
|
57
|
Chris@95
|
58 QStringList getSelectedCommittableFiles() const;
|
Chris@103
|
59 QStringList getAllCommittableFiles() const;
|
Chris@103
|
60
|
Chris@109
|
61 QStringList getSelectedRevertableFiles() const;
|
Chris@109
|
62 QStringList getAllRevertableFiles() const;
|
Chris@109
|
63
|
Chris@95
|
64 QStringList getSelectedAddableFiles() const;
|
Chris@103
|
65 QStringList getAllAddableFiles() const;
|
Chris@103
|
66
|
Chris@95
|
67 QStringList getSelectedRemovableFiles() const;
|
Chris@103
|
68 QStringList getAllRemovableFiles() const;
|
Chris@95
|
69
|
Chris@95
|
70 signals:
|
Chris@95
|
71 void selectionChanged();
|
jtkorhonen@0
|
72
|
Chris@94
|
73 public slots:
|
Chris@94
|
74 void clearSelections();
|
Chris@94
|
75
|
jtkorhonen@0
|
76 private:
|
Chris@88
|
77 FileStatusWidget *fileStatusWidget;
|
Chris@88
|
78
|
Chris@91
|
79 QWidget *historyGraphPageWidget;
|
Chris@91
|
80 QWidget *historyGraphWidget;
|
Chris@91
|
81 QWidget *historyGraphPanner;
|
Chris@91
|
82 QWidget *historyPageWidget;
|
jtkorhonen@0
|
83
|
Chris@92
|
84 FileStates fileStates;
|
jtkorhonen@0
|
85
|
Chris@91
|
86 Changesets parseChangeSets(QString changeSetsStr);
|
jtkorhonen@0
|
87 };
|
jtkorhonen@0
|
88
|
Chris@96
|
89 #endif // HGTABWIDGET_H
|