]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/lengthcombo.h
Get rid of the static_casts.
[lyx.git] / src / frontends / qt2 / 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.h>
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         /// set the current item
29         virtual void setCurrentItem(LyXLength::UNIT unit);
30         /// get the current item
31         LyXLength::UNIT currentLengthItem() const;
32         /// enable the widget
33         virtual void setEnabled(bool b);
34
35 protected slots:
36         virtual void has_activated(int index);
37 signals:
38         /// the current selection has changed
39         void selectionChanged(LyXLength::UNIT unit);
40
41 };
42
43 #endif // LENGTHCOMBO_H