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 virtual 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);
43 virtual void noPercents();
44 /// remove a unit from the combo
45 virtual void removeUnit(lyx::Length::UNIT unit);
46 /// add a unit to the combo
47 virtual void addUnit(lyx::Length::UNIT unit);
50 virtual void hasActivated(int index);
52 /// the current selection has changed
53 void selectionChanged(lyx::Length::UNIT unit);
57 } // namesapce frontend
60 #endif // LENGTHCOMBO_H