]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/LengthCombo.h
If we are in a closeEvent, we don't want to close all buffers, because these may...
[lyx.git] / src / frontends / qt4 / LengthCombo.h
index 345d2bdc18162275ff0b65bee7cbcb8740044523..f47a178ba89ab1098a3aee91ce0ec330f84e5729 100644 (file)
@@ -20,7 +20,7 @@
 //namespace lyx {
 
 /**
- * A combo box for selecting LyXLength::UNIT types.
+ * A combo box for selecting Length::UNIT types.
  */
 class LengthCombo : public QComboBox {
        Q_OBJECT
@@ -29,21 +29,27 @@ public:
        LengthCombo(QWidget * parent);
 
        /// set the current item from unit
-       virtual void setCurrentItem(lyx::LyXLength::UNIT unit);
+       virtual void setCurrentItem(lyx::Length::UNIT unit);
+       /// set the current item from length string
+       virtual void setCurrentItem(QString const item);
        /// set the current item from int
        virtual void setCurrentItem(int item);
        /// get the current item
-       lyx::LyXLength::UNIT currentLengthItem() const;
+       lyx::Length::UNIT currentLengthItem() const;
        /// enable the widget
        virtual void setEnabled(bool b);
        /// use the %-items?
        virtual void noPercents();
+       /// remove a unit from the combo
+       virtual void removeUnit(lyx::Length::UNIT unit);
+       /// add a unit to the combo
+       virtual void addUnit(lyx::Length::UNIT unit);
 
 protected Q_SLOTS:
-       virtual void has_activated(int index);
+       virtual void hasActivated(int index);
 Q_SIGNALS:
        /// the current selection has changed
-       void selectionChanged(lyx::LyXLength::UNIT unit);
+       void selectionChanged(lyx::Length::UNIT unit);
 };