]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/lengthcombo.h
getting rid of even more qt3 convenience classes and unused headers...
[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
16 #include <QComboBox>
17
18 #include "vspace.h"
19
20 /**
21  * A combo box for selecting LyXLength::UNIT types.
22  */
23 class LengthCombo : public QComboBox {
24         Q_OBJECT
25 public:
26         LengthCombo(QWidget * parent, char * name);
27
28         LengthCombo(QWidget * parent);
29
30         /// set the current item from unit
31         virtual void setCurrentItem(LyXLength::UNIT unit);
32         /// set the current item from int
33         virtual void setCurrentItem(int item);
34         /// get the current item
35         LyXLength::UNIT currentLengthItem() const;
36         /// enable the widget
37         virtual void setEnabled(bool b);
38         /// use the %-items?
39         virtual void noPercents();
40
41 protected slots:
42         virtual void has_activated(int index);
43 signals:
44         /// the current selection has changed
45         void selectionChanged(LyXLength::UNIT unit);
46
47 };
48
49 #endif // LENGTHCOMBO_H