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(heightCB, SIGNAL(stateChanged(int)), this, SLOT(heightChecked(int)));
connect(halignCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
connect(ialignCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
connect(innerBoxCO, SIGNAL(activated(const QString&)),
}
-void GuiBoxDialog::heightChecked(int checkState)
-{
- if (checkState == Qt::Unchecked) {
- heightED->setEnabled(false);
- heightUnitsLC->setEnabled(false);
- } else {
- heightED->setEnabled(true);
- heightUnitsLC->setEnabled(true);
- }
-}
-
void GuiBoxDialog::restoreClicked()
{
setInnerType(true, 2);
lengthToWidgets(heightED, heightUnitsLC,
(controller().params().height).asString(), default_unit);
-
+
string const height_special = controller().params().height_special;
if (!height_special.empty() && height_special != "none") {
QString hspc;
}
}
}
+ // set no optional height when the value is the default "1\height"
+ // (special units like \height are handled as "in",
+ if (height_special == "totalheight" &&
+ controller().params().height == Length("1in"))
+ heightCB->setCheckState(Qt::Unchecked);
+ else
+ heightCB->setCheckState(Qt::Checked);
+
heightCB->setEnabled(ibox);
}
<string>&Height (optional):</string>
</property>
<property name="checked" >
- <bool>true</bool>
+ <bool>false</bool>
</property>
<property name="tristate" >
<bool>false</bool>
</item>
<item>
<widget class="QLineEdit" name="heightED" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
</widget>
</item>
<item>
- <widget class="LengthCombo" name="heightUnitsLC" />
+ <widget class="LengthCombo" name="heightUnitsLC" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ </widget>
</item>
</layout>
</widget>
<include location="local" >qt_helpers.h</include>
</includes>
<resources/>
- <connections/>
+ <connections>
+ <connection>
+ <sender>heightCB</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>heightED</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>75</x>
+ <y>83</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>171</x>
+ <y>83</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>heightCB</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>heightUnitsLC</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>86</x>
+ <y>100</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>283</x>
+ <y>100</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
</ui>
// (special units like \height are handled as "in")
// but when the user has chosen a non-default inner_pos, the height
// must be given: \minipage[pos][height][inner-pos]{width}
- if (params_.height != Length("1in") ||
+ if ((params_.height != Length("1in") ||
+ params_.height_special != "totalheight") ||
params_.inner_pos != params_.pos) {
// FIXME UNICODE
os << "[" << params_.height.value()