]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QBranches.h
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / qt4 / QBranches.h
1 // -*- C++ -*-
2 /**
3  * \file QBranches.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 QBRANCHES_H
13 #define QBRANCHES_H
14
15 #include "ui/BranchesUi.h"
16 #include "QDocument.h"
17 #include "BranchList.h"
18
19 #include <QWidget>
20
21 #include <vector>
22 #include <string>
23
24
25 class QTreeWidgetItem;
26
27 class BufferParams;
28
29 namespace lyx {
30 namespace frontend {
31
32
33 class QBranches: public QWidget, public Ui::BranchesUi
34 {
35         Q_OBJECT
36 public:
37         QBranches(QWidget * parent=0, Qt::WFlags f=0);
38         ~QBranches();
39
40         void update(BufferParams const & params);
41         void apply(BufferParams & params) const;
42
43 Q_SIGNALS:
44         void changed();
45
46 protected:
47         void toggleBranch(QTreeWidgetItem *);
48         void update();
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
59         /// Contains all legal branches for this doc
60         BranchList branchlist_;
61
62 };
63
64 } // namespace frontend
65 } // namespace lyx
66
67 #endif // DOCUMENTDIALOG_H