#include <string>
+namespace lyx {
+namespace frontend {
+
LengthCombo::LengthCombo(QWidget * parent)
: QComboBox(parent)
{
for (int i = 0; i < lyx::num_units; i++) {
// mu does not make sense usually
// so it must be added manually, if needed
- if (QString(lyx::unit_name[i]) == "mu")
+ if (QLatin1String(lyx::unit_name[i]) == "mu")
continue;
QComboBox::addItem(lyx::qt_(lyx::unit_name_gui[i]),
lyx::toqstr(lyx::unit_name[i]));
}
-void LengthCombo::setCurrentItem(QString const item)
+void LengthCombo::setCurrentItem(QString const & item)
{
int num = QComboBox::count();
for (int i = 0; i < num; i++) {
}
+void LengthCombo::removeFontDependent()
+{
+ removeUnit(Length::EM);
+ removeUnit(Length::EX);
+ removeUnit(Length::MU);
+}
+
+
void LengthCombo::removeUnit(lyx::Length::UNIT unit)
{
QString const val = lyx::toqstr(lyx::stringFromUnit(unit));
lyx::toqstr(lyx::unit_name[int(unit)]));
}
+} // namespace frontend
+} // namespace lyx
#include "moc_LengthCombo.cpp"