]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiBranches.h
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / frontends / qt4 / GuiBranches.h
1 // -*- C++ -*-
2 /**
3  * \file GuiBranches.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Edwin Leuven
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUIBRANCHES_H
13 #define GUIBRANCHES_H
14
15 #include "GuiDocument.h"
16 #include "ui_BranchesUi.h"
17 #include "BranchList.h"
18
19 #include <QWidget>
20
21 #include <vector>
22 #include <string>
23
24
25 class QTreeWidgetItem;
26
27 namespace lyx {
28
29 class BufferParams;
30
31 namespace frontend {
32
33 class GuiBranches : public QWidget, public Ui::BranchesUi
34 {
35         Q_OBJECT
36 public:
37         GuiBranches(QWidget * parent=0, Qt::WFlags f=0);
38
39         void update(BufferParams const & params);
40         void apply(BufferParams & params) const;
41
42 Q_SIGNALS:
43         void changed();
44
45 protected:
46         void toggleBranch(QTreeWidgetItem *);
47         void toggleColor(QTreeWidgetItem *);
48         void updateView();
49
50 protected Q_SLOTS:
51         void on_addBranchPB_pressed();
52         void on_removePB_pressed();
53         void on_activatePB_pressed();
54         void on_branchesTW_itemDoubleClicked(QTreeWidgetItem *, int);
55         void on_colorPB_clicked();
56
57 private:
58         /// Contains all legal branches for this doc
59         BranchList branchlist_;
60 };
61
62 } // namespace frontend
63 } // namespace lyx
64
65 #endif // GUIBRANCHES