]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/LengthCombo.h
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / frontends / qt4 / LengthCombo.h
1 // -*- C++ -*-
2 /**
3  * \file LengthCombo.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef LENGTHCOMBO_H
13 #define LENGTHCOMBO_H
14
15 #include <QComboBox>
16
17 #include "VSpace.h"
18
19
20 //namespace lyx {
21
22 /**
23  * A combo box for selecting Length::UNIT types.
24  */
25 class LengthCombo : public QComboBox {
26         Q_OBJECT
27
28 public:
29         LengthCombo(QWidget * parent);
30
31         /// set the current item from unit
32         virtual void setCurrentItem(lyx::Length::UNIT unit);
33         /// set the current item from int
34         virtual void setCurrentItem(int item);
35         /// get the current item
36         lyx::Length::UNIT currentLengthItem() const;
37         /// enable the widget
38         virtual void setEnabled(bool b);
39         /// use the %-items?
40         virtual void noPercents();
41
42 protected Q_SLOTS:
43         virtual void has_activated(int index);
44 Q_SIGNALS:
45         /// the current selection has changed
46         void selectionChanged(lyx::Length::UNIT unit);
47 };
48
49
50 //} // namespace lyx
51
52 #endif // LENGTHCOMBO_H