]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/lengthcombo.h
enable Font cache only for MacOSX and inline width() for other platform.
[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);
27
28         /// set the current item from unit
29         virtual void setCurrentItem(LyXLength::UNIT unit);
30         /// set the current item from int
31         virtual void setCurrentItem(int item);
32         /// get the current item
33         LyXLength::UNIT currentLengthItem() const;
34         /// enable the widget
35         virtual void setEnabled(bool b);
36         /// use the %-items?
37         virtual void noPercents();
38
39 protected Q_SLOTS:
40         virtual void has_activated(int index);
41 Q_SIGNALS:
42         /// the current selection has changed
43         void selectionChanged(LyXLength::UNIT unit);
44
45 };
46
47 #endif // LENGTHCOMBO_H