mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
qt branch support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7964 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
33f19b9ccc
commit
838ec5d986
@ -46,6 +46,7 @@ src/frontends/qt2/QAbout.C
|
||||
src/frontends/qt2/QBibitem.C
|
||||
src/frontends/qt2/QBibtex.C
|
||||
src/frontends/qt2/QBibtexDialog.C
|
||||
src/frontends/qt2/QBranch.C
|
||||
src/frontends/qt2/QChanges.C
|
||||
src/frontends/qt2/QCharacter.C
|
||||
src/frontends/qt2/QCitation.C
|
||||
|
@ -1,3 +1,16 @@
|
||||
2003-10-23 Juergen Spitzmueller <j.spitzmueller@gmx.de>
|
||||
|
||||
* Dialogs.C:
|
||||
* Makefile.am:
|
||||
* Makefile.dialogs:
|
||||
* QDocument.[Ch]:
|
||||
* QDocumentDialog.[Ch]: Add qt gui for branches
|
||||
|
||||
* QBranch.[Ch]:
|
||||
* QBranchDialog.[Ch]:
|
||||
* ui/BranchesModuleBase.ui:
|
||||
* ui/QBranchModuleBase.ui: new files (qt gui for branches).
|
||||
|
||||
2003-10-22 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* QExternal.C:
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
#include "ControlAboutlyx.h"
|
||||
#include "ControlBibtex.h"
|
||||
#include "ControlBranch.h"
|
||||
#include "ControlChanges.h"
|
||||
#include "ControlCharacter.h"
|
||||
#include "ControlCitation.h"
|
||||
@ -41,6 +42,7 @@
|
||||
#include "QAbout.h"
|
||||
#include "QBibitem.h"
|
||||
#include "QBibtex.h"
|
||||
#include "QBranch.h"
|
||||
#include "QChanges.h"
|
||||
#include "QCharacter.h"
|
||||
#include "QCitation.h"
|
||||
@ -82,8 +84,8 @@ using std::string;
|
||||
|
||||
namespace {
|
||||
|
||||
char const * const dialognames[] = { "aboutlyx", "bibitem", "bibtex", "changes",
|
||||
"character", "citation", "error", "errorlist", "ert", "external", "file",
|
||||
char const * const dialognames[] = { "aboutlyx", "bibitem", "bibtex", "branch",
|
||||
"changes", "character", "citation", "error", "errorlist", "ert", "external", "file",
|
||||
"float", "graphics", "include", "index", "label", "latexlog",
|
||||
"mathpanel", "mathdelimiter", "mathmatrix",
|
||||
"minipage", "note", "paragraph", "ref", "tabular", "tabularcreate", "texinfo",
|
||||
@ -137,6 +139,10 @@ Dialog * Dialogs::build(string const & name)
|
||||
dialog->setController(new ControlBibtex(*dialog));
|
||||
dialog->setView(new QBibtex(*dialog));
|
||||
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
||||
} else if (name == "branch") {
|
||||
dialog->setController(new ControlBranch(*dialog));
|
||||
dialog->setView(new QBranch(*dialog));
|
||||
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
||||
} else if (name == "changes") {
|
||||
dialog->setController(new ControlChanges(*dialog));
|
||||
dialog->setView(new QChanges(*dialog));
|
||||
|
@ -30,6 +30,7 @@ libqt2_la_SOURCES = \
|
||||
QAbout.C QAbout.h \
|
||||
QBibitem.C QBibitem.h \
|
||||
QBibtex.C QBibtex.h \
|
||||
QBranch.C QBranch.h \
|
||||
QChanges.C QChanges.h \
|
||||
QCharacter.C QCharacter.h \
|
||||
QCitation.C QCitation.h \
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
UIFILES = \
|
||||
BiblioModuleBase.ui \
|
||||
BranchesModuleBase.ui \
|
||||
BulletsModuleBase.ui \
|
||||
TextLayoutModuleBase.ui \
|
||||
LanguageModuleBase.ui \
|
||||
@ -16,6 +17,7 @@ UIFILES = \
|
||||
QBibitemDialogBase.ui \
|
||||
QBibtexDialogBase.ui \
|
||||
QBibtexAddDialogBase.ui \
|
||||
QBranchDialogBase.ui \
|
||||
QChangesDialogBase.ui \
|
||||
QCharacterDialogBase.ui \
|
||||
QCitationDialogBase.ui \
|
||||
@ -78,6 +80,7 @@ MOCFILES = \
|
||||
QAboutDialog.C QAboutDialog.h \
|
||||
QBibitemDialog.C QBibitemDialog.h \
|
||||
QBibtexDialog.C QBibtexDialog.h \
|
||||
QBranchDialog.C QBranchDialog.h \
|
||||
QBrowseBox.C QBrowseBox.h \
|
||||
QChangesDialog.C QChangesDialog.h \
|
||||
QCharacterDialog.C QCharacterDialog.h \
|
||||
|
81
src/frontends/qt2/QBranch.C
Normal file
81
src/frontends/qt2/QBranch.C
Normal file
@ -0,0 +1,81 @@
|
||||
/**
|
||||
* \file QBranch.C
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Jürgen Spitzmüller
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "qt_helpers.h"
|
||||
#include "ControlBranch.h"
|
||||
#include "insets/insetbranch.h"
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <qcombobox.h>
|
||||
#include <qpushbutton.h>
|
||||
|
||||
#include "QBranchDialog.h"
|
||||
#include "QBranch.h"
|
||||
#include "Qt2BC.h"
|
||||
|
||||
using lyx::support::getVectorFromString;
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
|
||||
typedef QController<ControlBranch, QView<QBranchDialog> > base_class;
|
||||
|
||||
|
||||
QBranch::QBranch(Dialog & parent)
|
||||
: base_class(parent, _("LyX: Branch Settings"))
|
||||
{}
|
||||
|
||||
|
||||
void QBranch::build_dialog()
|
||||
{
|
||||
string all_branches(controller().params().branchlist.allBranches());
|
||||
|
||||
dialog_.reset(new QBranchDialog(this));
|
||||
|
||||
std::vector<string> all = getVectorFromString(all_branches, "|");
|
||||
for (unsigned i = 0; i < all.size(); ++i) {
|
||||
QString const bname = toqstr(all[i].c_str());
|
||||
dialog_->branchCO->insertItem(bname);
|
||||
}
|
||||
|
||||
bcview().setOK(dialog_->okPB);
|
||||
bcview().setCancel(dialog_->closePB);
|
||||
}
|
||||
|
||||
|
||||
void QBranch::update_contents()
|
||||
{
|
||||
// re-read branch list
|
||||
dialog_->branchCO->clear();
|
||||
string all_branches(controller().params().branchlist.allBranches());
|
||||
string cur_branch(controller().params().branch);
|
||||
unsigned int cur_item = 0;
|
||||
std::vector<string> all = getVectorFromString(all_branches, "|");
|
||||
for (unsigned i = 0; i < all.size(); ++i) {
|
||||
QString const bname = toqstr(all[i].c_str());
|
||||
dialog_->branchCO->insertItem(bname);
|
||||
if (bname == toqstr(cur_branch))
|
||||
cur_item = i;
|
||||
}
|
||||
// set to current item. A better idea anyone?
|
||||
if (all_branches.find(cur_branch) != string::npos && cur_branch != "none")
|
||||
dialog_->branchCO->setCurrentItem(cur_item);
|
||||
}
|
||||
|
||||
|
||||
void QBranch::apply()
|
||||
{
|
||||
string const type = fromqstr(dialog_->branchCO->currentText());
|
||||
controller().params().branch = type;
|
||||
}
|
39
src/frontends/qt2/QBranch.h
Normal file
39
src/frontends/qt2/QBranch.h
Normal file
@ -0,0 +1,39 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file QBranch.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Jürgen Spitzmüller
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#ifndef QBRANCH_H
|
||||
#define QBRANCH_H
|
||||
|
||||
#include "QDialogView.h"
|
||||
|
||||
|
||||
class ControlBranch;
|
||||
class QBranchDialog;
|
||||
|
||||
/** This class provides a QT implementation of the Branch Dialog.
|
||||
*/
|
||||
class QBranch : public QController<ControlBranch, QView<QBranchDialog> >
|
||||
{
|
||||
public:
|
||||
friend class QBranchDialog;
|
||||
|
||||
/// Constructor
|
||||
QBranch(Dialog &);
|
||||
private:
|
||||
/// Apply changes
|
||||
virtual void apply();
|
||||
/// Build the dialog
|
||||
virtual void build_dialog();
|
||||
/// Update dialog before showing it
|
||||
virtual void update_contents();
|
||||
};
|
||||
|
||||
#endif // QBRANCH_H
|
41
src/frontends/qt2/QBranchDialog.C
Normal file
41
src/frontends/qt2/QBranchDialog.C
Normal file
@ -0,0 +1,41 @@
|
||||
/**
|
||||
* \file QBranchDialog.C
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Jürgen Spitzmüller
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
||||
#include "QBranch.h"
|
||||
#include "QBranchDialog.h"
|
||||
|
||||
#include <qpushbutton.h>
|
||||
|
||||
|
||||
QBranchDialog::QBranchDialog(QBranch * form)
|
||||
: QBranchDialogBase(0, 0, false, 0),
|
||||
form_(form)
|
||||
{
|
||||
connect(okPB, SIGNAL(clicked()),
|
||||
form, SLOT(slotOK()));
|
||||
connect(closePB, SIGNAL(clicked()),
|
||||
form, SLOT(slotClose()));
|
||||
}
|
||||
|
||||
|
||||
void QBranchDialog::closeEvent(QCloseEvent * e)
|
||||
{
|
||||
form_->slotWMHide();
|
||||
e->accept();
|
||||
}
|
||||
|
||||
|
||||
void QBranchDialog::change_adaptor()
|
||||
{
|
||||
form_->changed();
|
||||
}
|
32
src/frontends/qt2/QBranchDialog.h
Normal file
32
src/frontends/qt2/QBranchDialog.h
Normal file
@ -0,0 +1,32 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file QBranchDialog.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Jürgen Spitzmüller
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#ifndef QBRANCHDIALOG_H
|
||||
#define QBRANCHDIALOG_H
|
||||
|
||||
#include "ui/QBranchDialogBase.h"
|
||||
|
||||
|
||||
class QBranch;
|
||||
|
||||
class QBranchDialog : public QBranchDialogBase {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QBranchDialog(QBranch * form);
|
||||
protected slots:
|
||||
virtual void change_adaptor();
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent * e);
|
||||
private:
|
||||
QBranch * form_;
|
||||
};
|
||||
|
||||
#endif // QBRANCHDIALOG_H
|
@ -621,6 +621,9 @@ void QDocument::update_contents()
|
||||
|
||||
lengthToWidgets(m->footskipLE, m->footskipUnit,
|
||||
params.footskip, defaultUnit);
|
||||
|
||||
// branches
|
||||
dialog_->updateBranchView();
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,6 +17,8 @@
|
||||
#include "Qt2Base.h"
|
||||
#include "Qt2BC.h"
|
||||
|
||||
#include "BranchList.h"
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <string>
|
||||
|
||||
@ -51,6 +53,8 @@ private:
|
||||
|
||||
/// FIXME
|
||||
std::vector<std::string> lang_;
|
||||
/// Contains all legal branches for this doc
|
||||
BranchList branchlist_;
|
||||
};
|
||||
|
||||
#endif // QDOCUMENT_H
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "panelstack.h"
|
||||
#include "floatplacement.h"
|
||||
#include "LColor.h"
|
||||
|
||||
#include "support/lstrings.h"
|
||||
#include "bufferparams.h"
|
||||
@ -32,10 +33,15 @@
|
||||
#include <qradiobutton.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qslider.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qcolor.h>
|
||||
#include <qcolordialog.h>
|
||||
#include "lengthcombo.h"
|
||||
|
||||
using lyx::support::token;
|
||||
using lyx::support::getVectorFromString;
|
||||
|
||||
using std::vector;
|
||||
using std::string;
|
||||
|
||||
|
||||
@ -61,6 +67,7 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
|
||||
mathsModule = new MathsModuleBase(this);
|
||||
floatModule = new FloatPlacement(this, "floatplacement");
|
||||
latexModule = new LaTeXModuleBase(this);
|
||||
branchesModule = new BranchesModuleBase(this);
|
||||
preambleModule = new PreambleModuleBase(this);
|
||||
|
||||
docPS->addPanel(latexModule, _("Document Class"));
|
||||
@ -73,6 +80,7 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
|
||||
docPS->addPanel(mathsModule, _("Math options"));
|
||||
docPS->addPanel(floatModule, _("Float Placement"));
|
||||
docPS->addPanel(bulletsModule, _("Bullets"));
|
||||
docPS->addPanel(branchesModule, _("Branches"));
|
||||
docPS->addPanel(preambleModule, _("LaTeX Preamble"));
|
||||
docPS->setCurrentPanel(_("Document Class"));
|
||||
|
||||
@ -154,6 +162,13 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
|
||||
|
||||
// bullets
|
||||
connect(bulletsModule, SIGNAL(changed()), this, SLOT(change_adaptor()));
|
||||
|
||||
// branches
|
||||
connect(branchesModule->addBranchPB, SIGNAL(pressed()), this, SLOT(addBranchPressed()));
|
||||
connect(branchesModule->removePB, SIGNAL(pressed()), this, SLOT(deleteBranchPressed()));
|
||||
connect(branchesModule->activatePB, SIGNAL(pressed()), this, SLOT(toggleBranchPressed()));
|
||||
connect(branchesModule->colorPB, SIGNAL(pressed()), this, SLOT(toggleBranchColor()));
|
||||
branchesModule->branchesLV->setSorting(0);
|
||||
}
|
||||
|
||||
|
||||
@ -286,7 +301,6 @@ void QDocumentDialog::setCustomMargins(int margin)
|
||||
marginsModule->footskipL->setEnabled(custom);
|
||||
marginsModule->footskipLE->setEnabled(custom);
|
||||
marginsModule->footskipUnit->setEnabled(custom);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -404,3 +418,114 @@ void QDocumentDialog::updateNumbering()
|
||||
//numberingModule->tocLV->setUpdatesEnabled(true);
|
||||
//numberingModule->tocLV->update();
|
||||
}
|
||||
|
||||
|
||||
void QDocumentDialog::updateBranchView()
|
||||
{
|
||||
ControlDocument & cntrl = form_->controller();
|
||||
BufferParams & params = cntrl.params();
|
||||
|
||||
string const all_branches = params.branchlist().allBranches();
|
||||
string const all_selected = params.branchlist().allSelected();
|
||||
branchesModule->branchesLV->clear();
|
||||
if (!all_branches.empty()) {
|
||||
std::vector<string> all = getVectorFromString(all_branches, "|");
|
||||
for (unsigned i = 0; i < all.size(); ++i) {
|
||||
QString const bname = toqstr(all[i].c_str());
|
||||
QString const sel =
|
||||
(params.branchlist().selected(fromqstr(bname))) ? qt_("Yes") : qt_("No");
|
||||
QColor itemcolor(white);
|
||||
string x11hexname = params.branchlist().getColor(fromqstr(bname));
|
||||
if (x11hexname[0] == '#')
|
||||
itemcolor.setNamedColor(toqstr(x11hexname));
|
||||
QPixmap coloritem(30, 10);
|
||||
coloritem.fill(itemcolor);
|
||||
QListViewItem * newItem =
|
||||
new QListViewItem(branchesModule->branchesLV, bname, sel);
|
||||
newItem->setPixmap(2, coloritem);
|
||||
}
|
||||
}
|
||||
form_->changed();
|
||||
}
|
||||
|
||||
|
||||
void QDocumentDialog::addBranchPressed()
|
||||
{
|
||||
ControlDocument & cntrl = form_->controller();
|
||||
BufferParams & params = cntrl.params();
|
||||
|
||||
QString const new_branch = branchesModule->newBranchLE->text();
|
||||
if (!new_branch.isEmpty()) {
|
||||
params.branchlist().add(fromqstr(new_branch));
|
||||
branchesModule->newBranchLE->clear();
|
||||
updateBranchView();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void QDocumentDialog::deleteBranchPressed()
|
||||
{
|
||||
ControlDocument & cntrl = form_->controller();
|
||||
BufferParams & params = cntrl.params();
|
||||
|
||||
QListViewItem * selItem =
|
||||
branchesModule->branchesLV->selectedItem();
|
||||
QString sel_branch;
|
||||
if (selItem != 0)
|
||||
sel_branch = selItem->text(0);
|
||||
if (sel_branch) {
|
||||
params.branchlist().remove(fromqstr(sel_branch));
|
||||
branchesModule->newBranchLE->clear();
|
||||
updateBranchView();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void QDocumentDialog::toggleBranchPressed()
|
||||
{
|
||||
ControlDocument & cntrl = form_->controller();
|
||||
BufferParams & params = cntrl.params();
|
||||
|
||||
QListViewItem * selItem =
|
||||
branchesModule->branchesLV->selectedItem();
|
||||
QString sel_branch;
|
||||
if (selItem != 0)
|
||||
sel_branch = selItem->text(0);
|
||||
if (sel_branch) {
|
||||
bool selected = false;
|
||||
if (selItem->text(1) == qt_("Yes"))
|
||||
selected = true;
|
||||
params.branchlist().setSelected(fromqstr(sel_branch), !selected);
|
||||
branchesModule->newBranchLE->clear();
|
||||
updateBranchView();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void QDocumentDialog::toggleBranchColor()
|
||||
{
|
||||
ControlDocument & cntrl = form_->controller();
|
||||
BufferParams & params = cntrl.params();
|
||||
|
||||
QListViewItem * selItem =
|
||||
branchesModule->branchesLV->selectedItem();
|
||||
QString sel_branch;
|
||||
if (selItem != 0)
|
||||
sel_branch = selItem->text(0);
|
||||
if (sel_branch) {
|
||||
QColor initial;
|
||||
string x11hexname = params.branchlist().getColor(fromqstr(sel_branch));
|
||||
if (x11hexname[0] == '#')
|
||||
initial.setNamedColor(toqstr(x11hexname));
|
||||
QColor ncol(QColorDialog::getColor(initial));
|
||||
if (ncol.isValid()){
|
||||
// FIXME: The color does not apply unless buffer restart
|
||||
// XForms has this hack. What can we do?
|
||||
// lyxColorHandler->getGCForeground(c);
|
||||
// lyxColorHandler->updateColor(c);
|
||||
params.branchlist().setColor(fromqstr(sel_branch), fromqstr(ncol.name()));
|
||||
branchesModule->newBranchLE->clear();
|
||||
updateBranchView();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "ui/NumberingModuleBase.h"
|
||||
#include "ui/MarginsModuleBase.h"
|
||||
#include "ui/PreambleModuleBase.h"
|
||||
#include "ui/BranchesModuleBase.h"
|
||||
|
||||
|
||||
class QDocument;
|
||||
@ -41,6 +42,7 @@ public:
|
||||
|
||||
void updateFontsize(std::string const &, std::string const &);
|
||||
void updatePagestyle(std::string const &, std::string const &);
|
||||
void updateBranchView();
|
||||
|
||||
void showPreamble();
|
||||
|
||||
@ -59,6 +61,10 @@ protected slots:
|
||||
void enableSkip(bool);
|
||||
void portraitChanged();
|
||||
void classChanged();
|
||||
void addBranchPressed();
|
||||
void deleteBranchPressed();
|
||||
void toggleBranchPressed();
|
||||
void toggleBranchColor();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
@ -75,6 +81,7 @@ private:
|
||||
LaTeXModuleBase * latexModule;
|
||||
PreambleModuleBase * preambleModule;
|
||||
FloatPlacement * floatModule;
|
||||
BranchesModuleBase * branchesModule;
|
||||
|
||||
QDocument * form_;
|
||||
};
|
||||
|
292
src/frontends/qt2/ui/BranchesModuleBase.ui
Normal file
292
src/frontends/qt2/ui/BranchesModuleBase.ui
Normal file
@ -0,0 +1,292 @@
|
||||
<!DOCTYPE UI><UI>
|
||||
<class>BranchesModuleBase</class>
|
||||
<include location="global">config.h</include>
|
||||
<include location="local">qt_helpers.h</include>
|
||||
<widget>
|
||||
<class>QWidget</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>BranchesModuleBase</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>geometry</name>
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>344</width>
|
||||
<height>297</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>caption</name>
|
||||
<string>Form2</string>
|
||||
</property>
|
||||
<grid>
|
||||
<property stdset="1">
|
||||
<name>margin</name>
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>spacing</name>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget row="1" column="0" rowspan="5" colspan="1" >
|
||||
<class>QLayoutWidget</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>Layout2</cstring>
|
||||
</property>
|
||||
<grid>
|
||||
<property stdset="1">
|
||||
<name>margin</name>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>spacing</name>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget row="0" column="0" >
|
||||
<class>QLabel</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>availableLB</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>A&vailable Branches:</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>buddy</name>
|
||||
<cstring>branchesLV</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="1" column="0" >
|
||||
<class>QListView</class>
|
||||
<column>
|
||||
<property>
|
||||
<name>text</name>
|
||||
<string>Name</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>clickable</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property>
|
||||
<name>resizeable</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property>
|
||||
<name>text</name>
|
||||
<string>Activated</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>clickable</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property>
|
||||
<name>resizeable</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property>
|
||||
<name>text</name>
|
||||
<string>Color</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>clickable</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property>
|
||||
<name>resizeable</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</column>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>branchesLV</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>enabled</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>focusPolicy</name>
|
||||
<enum>NoFocus</enum>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>resizePolicy</name>
|
||||
<enum>AutoOneFit</enum>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>vScrollBarMode</name>
|
||||
<enum>Auto</enum>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>hScrollBarMode</name>
|
||||
<enum>Auto</enum>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>allColumnsShowFocus</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>rootIsDecorated</name>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>The available branches</string>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget row="3" column="1" >
|
||||
<class>QPushButton</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>activatePB</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>(&De)activate</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Toggle the selected branch</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="4" column="1" >
|
||||
<class>QPushButton</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>colorPB</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>Alter Co&lor...</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Define or change background color</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="2" column="1" >
|
||||
<class>QPushButton</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>removePB</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&Remove</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Remove the selected branch</string>
|
||||
</property>
|
||||
</widget>
|
||||
<spacer row="5" column="1" >
|
||||
<property>
|
||||
<name>name</name>
|
||||
<cstring>Spacer2</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>orientation</name>
|
||||
<enum>Vertical</enum>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>sizeType</name>
|
||||
<enum>Expanding</enum>
|
||||
</property>
|
||||
<property>
|
||||
<name>sizeHint</name>
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<widget row="0" column="0" rowspan="1" colspan="2" >
|
||||
<class>QLayoutWidget</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>Layout5</cstring>
|
||||
</property>
|
||||
<hbox>
|
||||
<property stdset="1">
|
||||
<name>margin</name>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>spacing</name>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget>
|
||||
<class>QLabel</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>newBranchLA</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&New:</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>buddy</name>
|
||||
<cstring>newBranchLE</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget>
|
||||
<class>QLineEdit</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>newBranchLE</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget>
|
||||
<class>QPushButton</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>addBranchPB</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&Add</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Add a new branch to the list</string>
|
||||
</property>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
<spacer row="1" column="1" >
|
||||
<property>
|
||||
<name>name</name>
|
||||
<cstring>Spacer3</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>orientation</name>
|
||||
<enum>Vertical</enum>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>sizeType</name>
|
||||
<enum>Expanding</enum>
|
||||
</property>
|
||||
<property>
|
||||
<name>sizeHint</name>
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</grid>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>branchesLV</tabstop>
|
||||
</tabstops>
|
||||
</UI>
|
121
src/frontends/qt2/ui/QBranchDialogBase.ui
Normal file
121
src/frontends/qt2/ui/QBranchDialogBase.ui
Normal file
@ -0,0 +1,121 @@
|
||||
<!DOCTYPE UI><UI>
|
||||
<class>QBranchDialogBase</class>
|
||||
<include location="global">config.h</include>
|
||||
<include location="local">qt_helpers.h</include>
|
||||
<widget>
|
||||
<class>QDialog</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>QBranchDialogBase</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>geometry</name>
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>188</width>
|
||||
<height>99</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>caption</name>
|
||||
<string>Branch Settings</string>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>sizeGripEnabled</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<grid>
|
||||
<property stdset="1">
|
||||
<name>margin</name>
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>spacing</name>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget row="1" column="0" >
|
||||
<class>QPushButton</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>okPB</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>OK</string>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>default</name>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="1" column="1" >
|
||||
<class>QPushButton</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>closePB</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&Close</string>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>default</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="0" column="0" rowspan="1" colspan="2" >
|
||||
<class>QLayoutWidget</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>Layout1</cstring>
|
||||
</property>
|
||||
<vbox>
|
||||
<property stdset="1">
|
||||
<name>margin</name>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>spacing</name>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget>
|
||||
<class>QLabel</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>branchLA</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&Available branches:</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>buddy</name>
|
||||
<cstring>branchCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget>
|
||||
<class>QComboBox</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>branchCO</cstring>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Select your branch</string>
|
||||
</property>
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>branchCO</sender>
|
||||
<signal>activated(int)</signal>
|
||||
<receiver>QBranchDialogBase</receiver>
|
||||
<slot>change_adaptor()</slot>
|
||||
</connection>
|
||||
<slot access="public">change_adaptor()</slot>
|
||||
</connections>
|
||||
</UI>
|
Loading…
Reference in New Issue
Block a user