QElectroTech  0.70
qfilenameedit.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2019 The QElectroTech Team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef Q_FILENAME_EDIT_H
19 #define Q_FILENAME_EDIT_H
20 #include <QLineEdit>
21 #include <QRegExp>
22 #include <QString>
23 class QETRegExpValidator;
32 class QFileNameEdit : public QLineEdit {
33  Q_OBJECT
34 
35  // constructors, destructor
36  public:
37  QFileNameEdit(QWidget * = nullptr);
38  QFileNameEdit(const QString &, QWidget * = nullptr);
39  ~QFileNameEdit() override;
40  private:
42 
43  // methods
44  public:
45  bool isEmpty();
46  bool isValid();
47 
48  private:
49  void init();
50  void displayToolTip();
51 
52  private slots:
53  void validationFailed();
54 
55  // attributes
56  private:
57  QRegExp regexp_;
59  QString tooltip_text_;
60 };
61 #endif
QETRegExpValidator * validator_
Definition: qfilenameedit.h:58
void validationFailed()
QFileNameEdit(QWidget *=nullptr)
~QFileNameEdit() override
QRegExp regexp_
Definition: qfilenameedit.h:57
QString tooltip_text_
Definition: qfilenameedit.h:59
void displayToolTip()