]> 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 36250bbdca924721211af2eb446d1e4a39937803..e824659323652368a1ac8b87343fe97049529a16 100644 (file)
@@ -124,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