GuiBox::GuiBox(GuiView & lv)
- : GuiDialog(lv, "box", qt_("Box Settings")), params_("")
+ : InsetDialog(lv, BOX_CODE, LFUN_BOX_INSERT, "box", "Box Settings")
{
setupUi(this);
for (int i = 0; i != ids_spec_.size(); ++i)
heightUnitsLC->addItem(gui_names_spec_[i], ids_spec_[i]);
- connect(restorePB, SIGNAL(clicked()), this, SLOT(slotRestore()));
- connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
- connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
- connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
-
- connect(widthED, SIGNAL(textChanged(QString)),
- this, SLOT(change_adaptor()));
+ connect(widthED, SIGNAL(textChanged(QString)), this, SLOT(applyView()));
connect(widthUnitsLC, SIGNAL(selectionChanged(lyx::Length::UNIT)),
- this, SLOT(change_adaptor()));
- connect(valignCO, SIGNAL(highlighted(QString)),
- this, SLOT(change_adaptor()));
- connect(heightCB, SIGNAL(stateChanged(int)),
- this, SLOT(change_adaptor()));
- connect(heightED, SIGNAL(textChanged(QString)),
- this, SLOT(change_adaptor()));
+ this, SLOT(applyView()));
+ connect(valignCO, SIGNAL(highlighted(QString)), this, SLOT(applyView()));
+ connect(heightCB, SIGNAL(stateChanged(int)), this, SLOT(applyView()));
+ connect(heightED, SIGNAL(textChanged(QString)), this, SLOT(applyView()));
connect(heightUnitsLC, SIGNAL(selectionChanged(lyx::Length::UNIT)),
- this, SLOT(change_adaptor()));
- connect(restorePB, SIGNAL(clicked()), this, SLOT(restoreClicked()));
- connect(typeCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
- connect(typeCO, SIGNAL(activated(int)), this, SLOT(typeChanged(int)));
- connect(halignCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
- connect(ialignCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
- connect(innerBoxCO, SIGNAL(activated(QString)),
- this, SLOT(innerBoxChanged(QString)));
- connect(innerBoxCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
- connect(pagebreakCB, SIGNAL(stateChanged(int)),
- this, SLOT(pagebreakClicked()));
+ this, SLOT(applyView()));
+ connect(innerBoxCO, SIGNAL(activated(int)), this, SLOT(applyView()));
+ connect(typeCO, SIGNAL(activated(int)), this, SLOT(applyView()));
+ connect(halignCO, SIGNAL(activated(int)), this, SLOT(applyView()));
+ connect(ialignCO, SIGNAL(activated(int)), this, SLOT(applyView()));
heightED->setValidator(unsignedLengthValidator(heightED));
widthED->setValidator(unsignedLengthValidator(widthED));
- bc().setPolicy(ButtonPolicy::OkApplyCancelReadOnlyPolicy);
-
- bc().addReadOnly(typeCO);
- bc().addReadOnly(innerBoxCO);
- bc().addReadOnly(valignCO);
- bc().addReadOnly(ialignCO);
- bc().addReadOnly(halignCO);
- bc().addReadOnly(widthED);
- bc().addReadOnly(widthUnitsLC);
- bc().addReadOnly(heightCB);
- bc().addReadOnly(heightED);
- bc().addReadOnly(heightUnitsLC);
- bc().addReadOnly(pagebreakCB);
-
- bc().setRestore(restorePB);
- bc().setOK(okPB);
- bc().setApply(applyPB);
- bc().setCancel(closePB);
-
// initialize the length validator
- bc().addCheckedLineEdit(widthED, widthLA);
- bc().addCheckedLineEdit(heightED, heightCB);
+ addCheckedWidget(widthED, widthLA);
+ addCheckedWidget(heightED, heightCB);
+
+ initDialog();
}
-void GuiBox::change_adaptor()
+void GuiBox::enableView(bool enable)
{
- changed();
+ typeCO->setEnabled(enable);
+ innerBoxCO->setEnabled(enable);
+ valignCO->setEnabled(enable);
+ ialignCO->setEnabled(enable);
+ halignCO->setEnabled(enable);
+ widthED->setEnabled(enable);
+ widthUnitsLC->setEnabled(enable);
+ heightCB->setEnabled(enable);
+ heightED->setEnabled(enable);
+ heightUnitsLC->setEnabled(enable);
+ pagebreakCB->setEnabled(enable);
}
-void GuiBox::innerBoxChanged(QString const & str)
+void GuiBox::on_innerBoxCO_activated(QString const & str)
{
bool const ibox = (str != qt_("None"));
valignCO->setEnabled(ibox);
halignCO->setEnabled(!ibox);
heightCB->setEnabled(ibox);
pagebreakCB->setEnabled(!ibox && typeCO->currentIndex() == 1);
- heightED->setEnabled(heightCB->checkState() == Qt::Checked && ibox);
- heightUnitsLC->setEnabled(heightCB->checkState() == Qt::Checked && ibox);
setSpecial(ibox);
+ applyView();
}
-void GuiBox::typeChanged(int index)
+void GuiBox::on_typeCO_activated(int index)
{
bool const frameless = (index == 0);
if (frameless) {
ialignCO->setEnabled(true);
halignCO->setEnabled(false);
heightCB->setEnabled(true);
- heightED->setEnabled(heightCB->checkState() == Qt::Checked);
- heightUnitsLC->setEnabled(heightCB->checkState() == Qt::Checked);
setSpecial(true);
}
if (index != 1)
widthED->setEnabled(index != 5);
widthUnitsLC->setEnabled(index != 5);
setInnerType(frameless, itype);
+ applyView();
}
-void GuiBox::restoreClicked()
+void GuiBox::initDialog()
{
setInnerType(true, 2);
widthED->setText("100");
}
-void GuiBox::pagebreakClicked()
+void GuiBox::on_heightCB_stateChanged(int state)
+{
+ bool const enable = (innerBoxCO->currentText() != qt_("None"))
+ && (state == Qt::Checked);
+ heightED->setEnabled(enable);
+ heightUnitsLC->setEnabled(enable);
+}
+
+
+void GuiBox::on_pagebreakCB_stateChanged()
{
bool pbreak = (pagebreakCB->checkState() == Qt::Checked);
innerBoxCO->setEnabled(!pbreak);
heightUnitsLC->setEnabled(false);
setSpecial(false);
} else {
- typeChanged(typeCO->currentIndex());
+ on_typeCO_activated(typeCO->currentIndex());
}
- change_adaptor();
+ applyView();
}
-void GuiBox::updateContents()
+void GuiBox::paramsToDialog(Inset const * inset)
{
- QString type = toqstr(params_.type);
+ InsetBox const * box = static_cast<InsetBox const *>(inset);
+ InsetBoxParams const & params = box->params();
+ QString type = toqstr(params.type);
if (type == "Framed") {
pagebreakCB->setChecked(true);
type = "Boxed";
pagebreakCB->setChecked(false);
}
- pagebreakCB->setEnabled(type == "Boxed" && !params_.inner_box);
+ pagebreakCB->setEnabled(type == "Boxed" && !params.inner_box);
for (int i = 0; i != gui_names_.size(); ++i) {
if (type == ids_[i])
// default: minipage
int inner_type = 2;
- if (!params_.inner_box)
+ if (!params.inner_box)
// none
inner_type = 0;
- if (params_.use_parbox)
+ if (params.use_parbox)
// parbox
inner_type = 1;
- bool frameless = (params_.type == "Frameless");
+ bool frameless = (params.type == "Frameless");
setInnerType(frameless, inner_type);
- char c = params_.pos;
+ char c = params.pos;
valignCO->setCurrentIndex(string("tcb").find(c, 0));
- c = params_.inner_pos;
+ c = params.inner_pos;
ialignCO->setCurrentIndex(string("tcbs").find(c, 0));
- c = params_.hor_pos;
+ c = params.hor_pos;
halignCO->setCurrentIndex(string("lcrs").find(c, 0));
- bool ibox = params_.inner_box;
+ bool ibox = params.inner_box;
valignCO->setEnabled(ibox);
ialignCO->setEnabled(ibox);
halignCO->setEnabled(!ibox);
Length::UNIT const default_unit = Length::defaultUnit();
lengthToWidgets(widthED, widthUnitsLC,
- (params_.width).asString(), default_unit);
+ (params.width).asString(), default_unit);
- QString const special = toqstr(params_.special);
+ QString const special = toqstr(params.special);
if (!special.isEmpty() && special != "none")
widthUnitsLC->setCurrentItem(special);
lengthToWidgets(heightED, heightUnitsLC,
- (params_.height).asString(), default_unit);
+ (params.height).asString(), default_unit);
- QString const height_special = toqstr(params_.height_special);
+ QString const height_special = toqstr(params.height_special);
if (!height_special.isEmpty() && height_special != "none")
heightUnitsLC->setCurrentItem(height_special);
// set no optional height if the value is the default "1\height"
// (special units like \height are handled as "in",
- if (height_special == "totalheight" && params_.height == Length("1in"))
+ // FIXME: this is a very bad UI, this check box should be disabled in
+ // this case, not forced to 'unchecked' state.
+ if (height_special == "totalheight" && params.height == Length("1in"))
heightCB->setCheckState(Qt::Unchecked);
else
heightCB->setCheckState(Qt::Checked);
}
-void GuiBox::applyView()
+docstring GuiBox::dialogToParams() const
{
- bool pagebreak =
+ bool const pagebreak =
pagebreakCB->isEnabled() && pagebreakCB->isChecked();
+ string box_type;
if (pagebreak)
- params_.type = "Framed";
+ box_type = "Framed";
else
- params_.type = fromqstr(ids_[typeCO->currentIndex()]);
+ box_type = fromqstr(ids_[typeCO->currentIndex()]);
- params_.inner_box =
+ InsetBoxParams params(box_type);
+ params.inner_box =
(!pagebreak && innerBoxCO->currentText() != qt_("None"));
- params_.use_parbox =
+ params.use_parbox =
(!pagebreak && innerBoxCO->currentText() == qt_("Parbox"));
- params_.pos = "tcb"[valignCO->currentIndex()];
- params_.inner_pos = "tcbs"[ialignCO->currentIndex()];
- params_.hor_pos = "lcrs"[halignCO->currentIndex()];
+ params.pos = "tcb"[valignCO->currentIndex()];
+ params.inner_pos = "tcbs"[ialignCO->currentIndex()];
+ params.hor_pos = "lcrs"[halignCO->currentIndex()];
QString unit =
widthUnitsLC->itemData(widthUnitsLC->currentIndex()).toString();
QString value = widthED->text();
if (ids_spec_.contains(unit) && !isValidLength(fromqstr(value))) {
- params_.special = fromqstr(unit);
+ params.special = fromqstr(unit);
// Note: the unit is simply ignored in this case
- params_.width = Length(value.toDouble(), Length::IN);
+ params.width = Length(value.toDouble(), Length::IN);
} else {
- params_.special = "none";
- params_.width = Length(widgetsToLength(widthED, widthUnitsLC));
+ params.special = "none";
+ params.width = Length(widgetsToLength(widthED, widthUnitsLC));
}
// the height parameter is omitted if the value
// 1in + "Total Height" means "1\height" which is the LaTeX default
// if no height is given
if (heightCB->checkState() == Qt::Unchecked) {
- params_.height = Length("1in");
- params_.height_special = "totalheight";
+ params.height = Length("1in");
+ params.height_special = "totalheight";
} else {
unit = heightUnitsLC->itemData(heightUnitsLC->currentIndex()).toString();
value = heightED->text();
if (ids_spec_.contains(unit) && !isValidLength(fromqstr(value))) {
- params_.height_special = fromqstr(unit);
+ params.height_special = fromqstr(unit);
// Note: the unit is simply ignored in this case
- params_.height = Length(value.toDouble(), Length::IN);
+ params.height = Length(value.toDouble(), Length::IN);
} else {
- params_.height_special = "none";
- params_.height =
+ params.height_special = "none";
+ params.height =
Length(widgetsToLength(heightED, heightUnitsLC));
}
}
+ return from_ascii(InsetBox::params2string(params));
}
}
}
-bool GuiBox::initialiseParams(string const & data)
-{
- InsetBox::string2params(data, params_);
- return true;
-}
-
-
-void GuiBox::clearParams()
-{
- params_ = InsetBoxParams("");
-}
-
-
-void GuiBox::dispatchParams()
-{
- dispatch(FuncRequest(getLfun(), InsetBox::params2string(params_)));
-}
-
Dialog * createGuiBox(GuiView & lv) { return new GuiBox(lv); }
#ifndef GUIBOX_H
#define GUIBOX_H
-#include "GuiDialog.h"
+#include "InsetDialog.h"
#include "ui_BoxUi.h"
#include "insets/InsetBox.h"
namespace lyx {
namespace frontend {
-class GuiBox : public GuiDialog, public Ui::BoxUi
+class GuiBox : public InsetDialog, public Ui::BoxUi
{
Q_OBJECT
GuiBox(GuiView & lv);
private Q_SLOTS:
- void change_adaptor();
- void innerBoxChanged(QString const &);
- void typeChanged(int);
- void restoreClicked();
- void pagebreakClicked();
+ void on_innerBoxCO_activated(QString const &);
+ void on_typeCO_activated(int);
+ void initDialog();
+ void on_heightCB_stateChanged(int state);
+ void on_pagebreakCB_stateChanged();
private:
+ /// \name Dialog inerited methods
+ //@{
+ void enableView(bool enable);
+ //@}
+
+ /// \name InsetDialog inherited methods
+ //@{
+ void paramsToDialog(Inset const *);
+ docstring dialogToParams() const;
+ //@}
+
/// add and remove special lengths
void setSpecial(bool ibox);
/// only show valid inner box items
void setInnerType(bool frameless, int i);
- /// Apply changes
- void applyView();
- /// update
- void updateContents();
-
- ///
- bool initialiseParams(std::string const & data);
- ///
- void clearParams();
- ///
- void dispatchParams();
- ///
- bool isBufferDependent() const { return true; }
-
- ///
QStringList ids_;
///
QStringList gui_names_;
QStringList ids_spec_;
///
QStringList gui_names_spec_;
-
- ///
- InsetBoxParams params_;
};
} // namespace frontend
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>BoxUi</class>
- <widget class="QDialog" name="BoxUi" >
- <property name="geometry" >
+ <widget class="QDialog" name="BoxUi">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<height>288</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string/>
</property>
- <property name="sizeGripEnabled" >
+ <property name="sizeGripEnabled">
<bool>true</bool>
</property>
- <layout class="QGridLayout" >
- <property name="margin" >
+ <layout class="QGridLayout">
+ <property name="margin">
<number>9</number>
</property>
- <property name="spacing" >
+ <property name="spacing">
<number>6</number>
</property>
- <item row="4" column="0" colspan="2" >
- <widget class="QCheckBox" name="pagebreakCB" >
- <property name="toolTip" >
+ <item row="4" column="0" colspan="2">
+ <widget class="QCheckBox" name="pagebreakCB">
+ <property name="toolTip">
<string>Check this if the box should break across pages</string>
</property>
- <property name="text" >
+ <property name="text">
<string>Allow &page breaks</string>
</property>
</widget>
</item>
- <item row="5" column="0" colspan="3" >
- <widget class="QGroupBox" name="groupBox_2" >
- <property name="title" >
+ <item row="5" column="0" colspan="3">
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="title">
<string>Alignment</string>
</property>
- <property name="flat" >
+ <property name="flat">
<bool>true</bool>
</property>
- <layout class="QGridLayout" >
- <property name="margin" >
+ <layout class="QGridLayout">
+ <property name="margin">
<number>9</number>
</property>
- <property name="spacing" >
+ <property name="spacing">
<number>6</number>
</property>
- <item row="1" column="2" >
- <widget class="QComboBox" name="halignCO" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
+ <item row="1" column="2">
+ <widget class="QComboBox" name="halignCO">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="toolTip" >
+ <property name="toolTip">
<string>Horizontal alignment of the content inside the box</string>
</property>
<item>
- <property name="text" >
+ <property name="text">
<string>Left</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Center</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Right</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Stretch</string>
</property>
</item>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QComboBox" name="ialignCO" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
+ <item row="1" column="1">
+ <widget class="QComboBox" name="ialignCO">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="toolTip" >
+ <property name="toolTip">
<string>Vertical alignment of the content inside the box</string>
</property>
<item>
- <property name="text" >
+ <property name="text">
<string>Top</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Middle</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Bottom</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Stretch</string>
</property>
</item>
</widget>
</item>
- <item row="2" column="1" >
- <widget class="QComboBox" name="valignCO" >
- <property name="toolTip" >
+ <item row="2" column="1">
+ <widget class="QComboBox" name="valignCO">
+ <property name="toolTip">
<string>Vertical alignment of the box (with regard to baseline)</string>
</property>
<item>
- <property name="text" >
+ <property name="text">
<string>Top</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Middle</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Bottom</string>
</property>
</item>
</widget>
</item>
- <item row="2" column="0" >
- <widget class="QLabel" name="valignLA" >
- <property name="toolTip" >
+ <item row="2" column="0">
+ <widget class="QLabel" name="valignLA">
+ <property name="toolTip">
<string>Vertical alignment of the box (with regard to baseline)</string>
</property>
- <property name="text" >
+ <property name="text">
<string>&Box:</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>valignCO</cstring>
</property>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="label" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
<string>Co&ntent:</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>ialignCO</cstring>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QLabel" name="ialignLA" >
- <property name="toolTip" >
+ <item row="0" column="1">
+ <widget class="QLabel" name="ialignLA">
+ <property name="toolTip">
<string>Vertical alignment of the content inside the box</string>
</property>
- <property name="text" >
+ <property name="text">
<string>Vertical</string>
</property>
</widget>
</item>
- <item row="0" column="2" >
- <widget class="QLabel" name="halignLA" >
- <property name="toolTip" >
+ <item row="0" column="2">
+ <widget class="QLabel" name="halignLA">
+ <property name="toolTip">
<string>Horizontal alignment of the content inside the box</string>
</property>
- <property name="text" >
+ <property name="text">
<string>Horizontal</string>
</property>
</widget>
</layout>
</widget>
</item>
- <item row="6" column="0" colspan="3" >
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
+ <item row="6" column="0" colspan="3">
+ <layout class="QHBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
- <item>
- <widget class="QPushButton" name="restorePB" >
- <property name="toolTip" >
- <string/>
- </property>
- <property name="text" >
- <string>&Restore</string>
- </property>
- <property name="autoDefault" >
- <bool>false</bool>
- </property>
- <property name="default" >
- <bool>false</bool>
- </property>
- </widget>
- </item>
+ <property name="margin">
+ <number>0</number>
+ </property>
<item>
<spacer>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeType" >
+ <property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</spacer>
</item>
<item>
- <widget class="QPushButton" name="okPB" >
- <property name="toolTip" >
- <string/>
- </property>
- <property name="text" >
- <string>&OK</string>
- </property>
- <property name="default" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="applyPB" >
- <property name="toolTip" >
+ <widget class="QPushButton" name="newPB">
+ <property name="toolTip">
<string/>
</property>
- <property name="text" >
- <string>&Apply</string>
+ <property name="text">
+ <string>&New</string>
</property>
- <property name="autoDefault" >
+ <property name="autoDefault">
<bool>false</bool>
</property>
- <property name="default" >
+ <property name="default">
<bool>false</bool>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="closePB" >
- <property name="text" >
+ <widget class="QPushButton" name="closePB">
+ <property name="text">
<string>&Close</string>
</property>
- <property name="autoDefault" >
+ <property name="autoDefault">
<bool>false</bool>
</property>
- <property name="default" >
+ <property name="default">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
- <item row="3" column="2" >
- <widget class="LengthCombo" name="heightUnitsLC" >
- <property name="enabled" >
+ <item row="3" column="2">
+ <widget class="LengthCombo" name="heightUnitsLC">
+ <property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
- <item row="3" column="0" >
- <widget class="QCheckBox" name="heightCB" >
- <property name="toolTip" >
+ <item row="3" column="0">
+ <widget class="QCheckBox" name="heightCB">
+ <property name="toolTip">
<string/>
</property>
- <property name="text" >
+ <property name="text">
<string>&Height:</string>
</property>
- <property name="checked" >
+ <property name="checked">
<bool>false</bool>
</property>
- <property name="tristate" >
+ <property name="tristate">
<bool>false</bool>
</property>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="innerBoxLA" >
- <property name="toolTip" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="innerBoxLA">
+ <property name="toolTip">
<string/>
</property>
- <property name="text" >
+ <property name="text">
<string>Inner Bo&x:</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>innerBoxCO</cstring>
</property>
</widget>
</item>
- <item row="2" column="2" >
- <widget class="LengthCombo" name="widthUnitsLC" />
+ <item row="2" column="2">
+ <widget class="LengthCombo" name="widthUnitsLC"/>
</item>
- <item row="0" column="0" >
- <widget class="QLabel" name="typeLA" >
- <property name="toolTip" >
+ <item row="0" column="0">
+ <widget class="QLabel" name="typeLA">
+ <property name="toolTip">
<string/>
</property>
- <property name="text" >
+ <property name="text">
<string>&Decoration:</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>typeCO</cstring>
</property>
</widget>
</item>
- <item row="2" column="0" >
- <widget class="QLabel" name="widthLA" >
- <property name="toolTip" >
+ <item row="2" column="0">
+ <widget class="QLabel" name="widthLA">
+ <property name="toolTip">
<string/>
</property>
- <property name="text" >
+ <property name="text">
<string>&Width:</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>widthED</cstring>
</property>
</widget>
</item>
- <item row="3" column="1" >
- <widget class="QLineEdit" name="heightED" >
- <property name="enabled" >
+ <item row="3" column="1">
+ <widget class="QLineEdit" name="heightED">
+ <property name="enabled">
<bool>false</bool>
</property>
- <property name="toolTip" >
+ <property name="toolTip">
<string>Height value</string>
</property>
</widget>
</item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="widthED" >
- <property name="toolTip" >
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="widthED">
+ <property name="toolTip">
<string>Width value</string>
</property>
</widget>
</item>
- <item row="1" column="1" colspan="2" >
- <widget class="QComboBox" name="innerBoxCO" >
- <property name="toolTip" >
+ <item row="1" column="1" colspan="2">
+ <widget class="QComboBox" name="innerBoxCO">
+ <property name="toolTip">
<string>Inner box -- needed for fixed width & line breaks</string>
</property>
<item>
- <property name="text" >
+ <property name="text">
<string>None</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Parbox</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Minipage</string>
</property>
</item>
</widget>
</item>
- <item row="0" column="1" colspan="2" >
- <widget class="QComboBox" name="typeCO" >
- <property name="toolTip" >
+ <item row="0" column="1" colspan="2">
+ <widget class="QComboBox" name="typeCO">
+ <property name="toolTip">
<string>Supported box types</string>
</property>
</widget>
<tabstop>ialignCO</tabstop>
<tabstop>halignCO</tabstop>
<tabstop>valignCO</tabstop>
- <tabstop>restorePB</tabstop>
- <tabstop>okPB</tabstop>
<tabstop>closePB</tabstop>
- <tabstop>applyPB</tabstop>
+ <tabstop>newPB</tabstop>
</tabstops>
<includes>
- <include location="local" >qt_i18n.h</include>
+ <include location="local">qt_i18n.h</include>
</includes>
<resources/>
<connections>
<receiver>heightED</receiver>
<slot>setEnabled(bool)</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>75</x>
<y>83</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>171</x>
<y>83</y>
</hint>
<receiver>heightUnitsLC</receiver>
<slot>setEnabled(bool)</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>86</x>
<y>100</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>283</x>
<y>100</y>
</hint>
static std::string params2string(InsetBoxParams const &);
///
static void string2params(std::string const &, InsetBoxParams &);
+ ///
+ InsetBoxParams const & params() const { return params_; }
private:
///
friend class InsetBoxParams;
///
void validate(LaTeXFeatures &) const;
///
- InsetBoxParams const & params() const { return params_; }
- ///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
///
void doDispatch(Cursor & cur, FuncRequest & cmd);