]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiBranches.h
Remove the .aux and .bbl files and update the citation labels
[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 "BranchList.h"
16 #include "ButtonController.h"
17
18 #include "ui_BranchesUnknownUi.h"
19 #include "ui_BranchesUi.h"
20
21 #include <QDialog>
22 #include <QWidget>
23
24 class QTreeWidgetItem;
25
26 namespace lyx {
27
28 class BufferParams;
29
30 namespace frontend {
31
32 class BranchesUnknownDialog : public QDialog, public Ui::BranchesUnknownUi
33 {
34 public:
35         BranchesUnknownDialog(QWidget * parent) : QDialog(parent)
36         {
37                 Ui::BranchesUnknownUi::setupUi(this);
38                 QDialog::setModal(true);
39         }
40 };
41
42 class GuiBranches : public QWidget, public Ui::BranchesUi
43 {
44         Q_OBJECT
45 public:
46         GuiBranches(QWidget * parent = 0);
47
48         void update(BufferParams const & params);
49         void apply(BufferParams & params) const;
50         void setUnknownBranches(QStringList const & b) { unknown_branches_ = b; }
51
52 Q_SIGNALS:
53         void changed();
54         void renameBranches(docstring const &, docstring const &);
55
56 protected:
57         void toggleBranch(QTreeWidgetItem *);
58         void toggleColor(QTreeWidgetItem *);
59         void toggleSuffix(QTreeWidgetItem *);
60         void updateView();
61
62 protected Q_SLOTS:
63         void on_addBranchPB_pressed();
64         void on_removePB_pressed();
65         void on_renamePB_pressed();
66         void on_activatePB_pressed();
67         void on_branchesTW_itemDoubleClicked(QTreeWidgetItem *, int);
68         void on_branchesTW_itemSelectionChanged();
69         void on_colorPB_clicked();
70         void on_suffixPB_pressed();
71         void on_unknownPB_pressed();
72         void addUnknown();
73         void addAllUnknown();
74         void unknownBranchSelChanged();
75
76 private:
77         /// Contains all legal branches for this doc
78         BranchList branchlist_;
79         ///
80         BranchesUnknownDialog * undef_;
81         ///
82         ButtonController undef_bc_;
83         ///
84         QStringList unknown_branches_;
85 };
86
87 } // namespace frontend
88 } // namespace lyx
89
90 #endif // GUIBRANCHES_H