]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Validator.h
Cleanup private part of Layout Box on destructor (probably not really an
[lyx.git] / src / frontends / qt4 / Validator.h
index 81e46b0f571d175bc716272093775bfbff3a29e7..e824659323652368a1ac8b87343fe97049529a16 100644 (file)
@@ -75,6 +75,13 @@ private:
 /// @returns a new @c LengthValidator that does not accept negative lengths.
 LengthValidator * unsignedLengthValidator(QLineEdit *);
 
+
+/** @returns a new @c LengthValidator that does not accept negative lengths.
+ *  but glue lengths.
+ */
+LengthValidator * unsignedGlueLengthValidator(QLineEdit *);
+
+
 /** A class to ascertain whether the data passed to the @c validate()
  *  member function can be interpretted as a GlueLength or is @param autotext.
  */
@@ -117,6 +124,18 @@ private:
 };
 
 
+// A class to ascertain that no newline characters are passed.
+class NoNewLineValidator : public QValidator
+{
+       Q_OBJECT
+public:
+       // Define a validator.
+       NoNewLineValidator(QWidget *);
+       // Remove newline characters from input.
+       QValidator::State validate(QString &, int &) const;
+};
+
+
 /** A class to ascertain whether the data passed to the @c validate()
  *  member function is a valid file path.
  *  The test is active only when the path is to be stored in a LaTeX