X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FValidator.h;h=22e8d484d3d4b7ab02c3c50a817886eca23bd536;hb=1f10969bb5c5f36017bf5ba8671381b09945cf57;hp=e824659323652368a1ac8b87343fe97049529a16;hpb=566d1f1b0007a793ec76e956156502f4cfb97d04;p=lyx.git diff --git a/src/frontends/qt4/Validator.h b/src/frontends/qt4/Validator.h index e824659323..22e8d484d3 100644 --- a/src/frontends/qt4/Validator.h +++ b/src/frontends/qt4/Validator.h @@ -62,6 +62,7 @@ public: void setBottom(Length const &); void setBottom(GlueLength const &); Length bottom() const { return b_; } + void setUnsigned(bool const u) { unsigned_ = u; } //@} private: @@ -69,6 +70,7 @@ private: GlueLength g_; bool no_bottom_; bool glue_length_; + bool unsigned_; }; @@ -90,7 +92,7 @@ class LengthAutoValidator : public LengthValidator Q_OBJECT public: /// Define a validator for widget @c parent. - LengthAutoValidator(QWidget * parent, QString const autotext); + LengthAutoValidator(QWidget * parent, QString const & autotext); /** @returns QValidator::Acceptable if @c data is a GlueLength * or is "auto". If not, returns QValidator::Intermediate. @@ -102,7 +104,7 @@ private: }; /// @returns a new @c LengthAutoValidator that does not accept negative lengths. -LengthAutoValidator * unsignedLengthAutoValidator(QLineEdit *, QString const autotext); +LengthAutoValidator * unsignedLengthAutoValidator(QLineEdit *, QString const & autotext); /** @@ -114,7 +116,7 @@ class DoubleAutoValidator : public QDoubleValidator { Q_OBJECT public: - DoubleAutoValidator(QWidget * parent, QString const autotext); + DoubleAutoValidator(QWidget * parent, QString const & autotext); DoubleAutoValidator(double bottom, double top, int decimals, QObject * parent); QValidator::State validate(QString & input, int & pos) const;