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.
23 * A combo box for selecting Length::UNIT types.
25 class LengthCombo : public QComboBox {
29 LengthCombo(QWidget * parent);
31 /// set the current item from unit
32 virtual void setCurrentItem(lyx::Length::UNIT unit);
33 /// set the current item from length string
34 virtual void setCurrentItem(QString const item);
35 /// set the current item from int
36 virtual void setCurrentItem(int item);
37 /// get the current item
38 lyx::Length::UNIT currentLengthItem() const;
40 virtual void setEnabled(bool b);
42 virtual void noPercents();
43 /// remove a unit from the combo
44 virtual void removeUnit(lyx::Length::UNIT unit);
45 /// add a unit to the combo
46 virtual void addUnit(lyx::Length::UNIT unit);
49 virtual void hasActivated(int index);
51 /// the current selection has changed
52 void selectionChanged(lyx::Length::UNIT unit);
58 #endif // LENGTHCOMBO_H