1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #ifndef QUERY_H
8 #define QUERY_H
9 
10 #include <QDialog>
11 #include <QVBoxLayout>
12 #include <QGridLayout>
13 #include <QHBoxLayout>
14 class QLabel;
15 class QLineEdit;
16 class QPushButton;
17 class QString;
18 
19 #include "scribusapi.h"
20 
21 class SCRIBUS_API Query : public QDialog
22 {
23 	Q_OBJECT
24 
25 public:
26 	Query(QWidget* parent=nullptr, const char* name=nullptr, bool modal = false, const QString& text=0, const QString& titel=0 );
~Query()27 	~Query() {};
28 
29 	QString getEditText() const;
30 	void setEditText(const QString& newText, bool setSelected);
31 	void setTestList(const QStringList& tList);
32 	void setForbiddenList(const QStringList& tList);
33 	void setCheckMode(bool mode);
34 	void setValidator(const QRegExp& rx);
35 
36 public slots:
37 	void Leave();
38 
39 private:
40 	QVBoxLayout* queryLayout;
41 	QHBoxLayout* editLayout;
42 	QHBoxLayout* okCancelLayout;
43 	QPushButton* okButton;
44 	QPushButton* cancelButton;
45 	QLineEdit* answerEdit;
46 	QLabel* questionLabel;
47 	QStringList checkList;
48 	QStringList forbiddenList;
49 	bool checkMode;
50 };
51 
52 #endif // QUERY_H
53