]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/LengthCombo.h
Use the command-alternatives sequence as defined in menus.bind
[lyx.git] / src / frontends / qt4 / LengthCombo.h
index a0cebec003927cd6f0ca0c89436b8f833fabc15a..2545a9660634a9baa792110229c7a2cf38210691 100644 (file)
 
 #include <QComboBox>
 
-#include "vspace.h"
+#include "Length.h"
 
 
-//namespace lyx {
+namespace lyx {
+namespace frontend {
 
 /**
- * A combo box for selecting LyXLength::UNIT types.
+ * A combo box for selecting Length::UNIT types.
  */
 class LengthCombo : public QComboBox {
        Q_OBJECT
@@ -29,24 +30,33 @@ public:
        LengthCombo(QWidget * parent);
 
        /// set the current item from unit
-       virtual void setCurrentItem(lyx::LyXLength::UNIT unit);
+       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();
+       void noPercents();
+       /// Remove EM, EX and MU units
+       void removeFontDependent();
+       /// remove a unit from the combo
+       void removeUnit(lyx::Length::UNIT unit);
+       /// add a unit to the combo
+       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);
 };
 
 
-//} // namespace lyx
+} // namespace frontend
+} // namespace lyx
 
 #endif // LENGTHCOMBO_H