4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
24 * A combo box for selecting Length::UNIT types.
26 class LengthCombo : public QComboBox {
30 LengthCombo(QWidget * parent);
32 /// set the current item from unit
33 void setCurrentItem(lyx::Length::UNIT unit);
34 /// set the current item from length string
35 virtual void setCurrentItem(QString const & item);
36 /// set the current item from int
37 virtual void setCurrentItem(int item);
38 /// get the current item
39 lyx::Length::UNIT currentLengthItem() const;
41 virtual void setEnabled(bool b);
44 /// Remove EM, EX and MU units
45 void removeFontDependent();
46 /// remove a unit from the combo
47 void removeUnit(lyx::Length::UNIT unit);
48 /// add a unit to the combo
49 void addUnit(lyx::Length::UNIT unit);
52 virtual void hasActivated(int index);
54 /// the current selection has changed
55 void selectionChanged(lyx::Length::UNIT unit);
59 } // namespace frontend
62 #endif // LENGTHCOMBO_H