2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
* \file GuiBranches.h
|
2006-03-05 17:24:44 +00:00
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#ifndef GUIBRANCHES_H
|
|
|
|
#define GUIBRANCHES_H
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2010-07-12 21:42:25 +00:00
|
|
|
#include "BranchList.h"
|
|
|
|
#include "ButtonController.h"
|
|
|
|
|
2009-07-09 09:48:34 +00:00
|
|
|
#include "ui_BranchesUnknownUi.h"
|
2007-09-05 20:33:29 +00:00
|
|
|
#include "ui_BranchesUi.h"
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2010-07-12 21:42:25 +00:00
|
|
|
#include <QDialog>
|
2006-03-05 17:24:44 +00:00
|
|
|
#include <QWidget>
|
|
|
|
|
2006-05-04 07:31:46 +00:00
|
|
|
class QTreeWidgetItem;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
namespace lyx {
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
class BufferParams;
|
|
|
|
|
|
|
|
namespace frontend {
|
|
|
|
|
2009-07-09 09:48:34 +00:00
|
|
|
class BranchesUnknownDialog : public QDialog, public Ui::BranchesUnknownUi
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
BranchesUnknownDialog(QWidget * parent) : QDialog(parent)
|
|
|
|
{
|
|
|
|
Ui::BranchesUnknownUi::setupUi(this);
|
|
|
|
QDialog::setModal(true);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class GuiBranches : public QWidget, public Ui::BranchesUi
|
2006-03-05 17:24:44 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-09-21 19:27:20 +00:00
|
|
|
GuiBranches(QWidget * parent = 0);
|
2006-04-05 23:56:29 +00:00
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
void update(BufferParams const & params);
|
|
|
|
void apply(BufferParams & params) const;
|
2009-07-09 09:48:34 +00:00
|
|
|
void setUnknownBranches(QStringList const & b) { unknown_branches_ = b; }
|
2006-03-20 17:25:02 +00:00
|
|
|
|
2006-06-30 14:37:33 +00:00
|
|
|
Q_SIGNALS:
|
2006-03-20 17:25:02 +00:00
|
|
|
void changed();
|
2009-07-10 06:49:51 +00:00
|
|
|
void renameBranches(docstring const &, docstring const &);
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
protected:
|
2006-05-04 07:31:46 +00:00
|
|
|
void toggleBranch(QTreeWidgetItem *);
|
2006-11-04 15:08:53 +00:00
|
|
|
void toggleColor(QTreeWidgetItem *);
|
2009-07-13 14:30:08 +00:00
|
|
|
void toggleSuffix(QTreeWidgetItem *);
|
2007-09-03 20:28:26 +00:00
|
|
|
void updateView();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2006-06-30 14:37:33 +00:00
|
|
|
protected Q_SLOTS:
|
2006-03-05 17:24:44 +00:00
|
|
|
void on_addBranchPB_pressed();
|
|
|
|
void on_removePB_pressed();
|
2009-07-10 06:49:51 +00:00
|
|
|
void on_renamePB_pressed();
|
2006-03-05 17:24:44 +00:00
|
|
|
void on_activatePB_pressed();
|
2006-05-04 07:31:46 +00:00
|
|
|
void on_branchesTW_itemDoubleClicked(QTreeWidgetItem *, int);
|
2009-07-11 06:12:27 +00:00
|
|
|
void on_branchesTW_itemSelectionChanged();
|
2006-03-05 17:24:44 +00:00
|
|
|
void on_colorPB_clicked();
|
2009-07-13 14:30:08 +00:00
|
|
|
void on_suffixPB_pressed();
|
2009-07-09 09:48:34 +00:00
|
|
|
void on_unknownPB_pressed();
|
|
|
|
void addUnknown();
|
|
|
|
void addAllUnknown();
|
|
|
|
void unknownBranchSelChanged();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
/// Contains all legal branches for this doc
|
|
|
|
BranchList branchlist_;
|
2009-07-09 09:48:34 +00:00
|
|
|
///
|
|
|
|
BranchesUnknownDialog * undef_;
|
|
|
|
///
|
|
|
|
ButtonController undef_bc_;
|
|
|
|
///
|
|
|
|
QStringList unknown_branches_;
|
2006-03-05 17:24:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2008-09-21 19:27:20 +00:00
|
|
|
#endif // GUIBRANCHES_H
|