QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
qfilenameedit.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 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 <QString>
22#include <QRegularExpression>
32class 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 QRegularExpression regexp_;
60};
61#endif
Definition qetregexpvalidator.h:25
Definition qfilenameedit.h:32
QRegularExpression regexp_
Definition qfilenameedit.h:57
QString tooltip_text_
Definition qfilenameedit.h:59
bool isEmpty()
Definition qfilenameedit.cpp:55
QETRegExpValidator * validator_
Definition qfilenameedit.h:58
~QFileNameEdit() override
Definition qfilenameedit.cpp:48
void displayToolTip()
Definition qfilenameedit.cpp:91
void validationFailed()
Definition qfilenameedit.cpp:104
bool isValid()
Definition qfilenameedit.cpp:63
QFileNameEdit(const QFileNameEdit &)
void init()
Definition qfilenameedit.cpp:71