lyx_mirror/src/frontends/qt/GuiBranches.h
Jean-Marc Lasgouttes c293be56bd Rename frontend qt4 to qt
In particular, the directory frontends/qt4 is renamed to frontends/qt.

Many configurations file have to be updated. All mentions of qt4 in
the source have been audited, and changed to qt if necessary.

The only part that has not been updated is the CMake build system.
2019-07-20 23:39:40 +02:00

95 lines
2.0 KiB
C++

// -*- C++ -*-
/**
* \file GuiBranches.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Edwin Leuven
*
* Full author contact details are available in file CREDITS.
*/
#ifndef GUIBRANCHES_H
#define GUIBRANCHES_H
#include "BranchList.h"
#include "ButtonController.h"
#include "ui_BranchesUnknownUi.h"
#include "ui_BranchesUi.h"
#include <QDialog>
#include <QWidget>
class QTreeWidgetItem;
namespace lyx {
class BufferParams;
namespace frontend {
class BranchesUnknownDialog : public QDialog, public Ui::BranchesUnknownUi
{
public:
BranchesUnknownDialog(QWidget * parent) : QDialog(parent)
{
Ui::BranchesUnknownUi::setupUi(this);
QDialog::setModal(true);
}
};
class GuiBranches : public QWidget, public Ui::BranchesUi
{
Q_OBJECT
public:
GuiBranches(QWidget * parent = 0);
void update(BufferParams const & params);
void apply(BufferParams & params) const;
void setUnknownBranches(QStringList const & b) { unknown_branches_ = b; }
bool eventFilter(QObject * obj, QEvent * event);
Q_SIGNALS:
void changed();
void renameBranches(docstring const &, docstring const &);
void okPressed();
protected:
void toggleBranch(QTreeWidgetItem *);
void toggleColor(QTreeWidgetItem *);
void toggleSuffix(QTreeWidgetItem *);
void updateView();
protected Q_SLOTS:
void on_newBranchLE_textChanged(QString);
void on_addBranchPB_pressed();
void on_removePB_pressed();
void on_renamePB_pressed();
void on_activatePB_pressed();
void on_branchesTW_itemDoubleClicked(QTreeWidgetItem *, int);
void on_branchesTW_itemSelectionChanged();
void on_colorPB_clicked();
void on_suffixPB_pressed();
void on_unknownPB_pressed();
void addUnknown();
void addAllUnknown();
void unknownBranchSelChanged();
private:
/// Contains all legal branches for this doc
BranchList branchlist_;
///
BranchesUnknownDialog * undef_;
///
ButtonController undef_bc_;
///
QStringList unknown_branches_;
};
} // namespace frontend
} // namespace lyx
#endif // GUIBRANCHES_H