]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/lengthvalidator.h
Minipage is no more (long live the box inset)
[lyx.git] / src / frontends / qt2 / lengthvalidator.h
1 // -*- C++ -*-
2 /**
3  * \file lengthvalidator.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef LENGTHVALIDATOR_H
13 #define LENGTHVALIDATOR_H
14
15 #include "lyxlength.h"
16 #include <qvalidator.h>
17
18 class QWidget;
19
20
21 class Q_EXPORT LengthValidator : public QValidator
22 {
23         Q_OBJECT
24 public:
25         LengthValidator(QWidget * parent, const char *name = 0);
26
27         QValidator::State validate(QString &, int &) const;
28
29         void setBottom(LyXLength);
30         LyXLength bottom() const { return b_; }
31
32 private:
33 #if defined(Q_DISABLE_COPY)
34         LengthValidator( const LengthValidator & );
35         LengthValidator& operator=( const LengthValidator & );
36 #endif
37
38         LyXLength b_;
39         bool no_bottom_;
40 };
41
42 # endif // NOT LENGTHVALIDATOR_H