| 1 | /* | 
|---|
| 2 | * Copyright (C) 2020-2022 Roy Qu (royqh1979@gmail.com) | 
|---|
| 3 | * | 
|---|
| 4 | * This program is free software: you can redistribute it and/or modify | 
|---|
| 5 | * it under the terms of the GNU General Public License as published by | 
|---|
| 6 | * the Free Software Foundation, either version 3 of the License, or | 
|---|
| 7 | * (at your option) any later version. | 
|---|
| 8 | * | 
|---|
| 9 | * This program is distributed in the hope that it will be useful, | 
|---|
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
| 12 | * GNU General Public License for more details. | 
|---|
| 13 | * | 
|---|
| 14 | * You should have received a copy of the GNU General Public License | 
|---|
| 15 | * along with this program.  If not, see <https://www.gnu.org/licenses/>. | 
|---|
| 16 | */ | 
|---|
| 17 | #ifndef NEWCLASSDIALOG_H | 
|---|
| 18 | #define NEWCLASSDIALOG_H | 
|---|
| 19 |  | 
|---|
| 20 | #include <QDialog> | 
|---|
| 21 |  | 
|---|
| 22 | namespace Ui { | 
|---|
| 23 | class NewClassDialog; | 
|---|
| 24 | } | 
|---|
| 25 |  | 
|---|
| 26 | class NewClassDialog : public QDialog | 
|---|
| 27 | { | 
|---|
| 28 | Q_OBJECT | 
|---|
| 29 |  | 
|---|
| 30 | public: | 
|---|
| 31 | explicit NewClassDialog(QWidget *parent = nullptr); | 
|---|
| 32 | ~NewClassDialog(); | 
|---|
| 33 |  | 
|---|
| 34 | QString className() const; | 
|---|
| 35 | QString baseClass() const; | 
|---|
| 36 | QString () const; | 
|---|
| 37 | QString sourceName() const; | 
|---|
| 38 | QString path() const; | 
|---|
| 39 | void setPath(const QString& location); | 
|---|
| 40 |  | 
|---|
| 41 | private slots: | 
|---|
| 42 | void on_btnCancel_clicked(); | 
|---|
| 43 |  | 
|---|
| 44 | void on_btnCreate_clicked(); | 
|---|
| 45 |  | 
|---|
| 46 | void on_btnBrowsePath_clicked(); | 
|---|
| 47 |  | 
|---|
| 48 | void on_txtClassName_textChanged(const QString &arg1); | 
|---|
| 49 |  | 
|---|
| 50 | private: | 
|---|
| 51 | Ui::NewClassDialog *ui; | 
|---|
| 52 |  | 
|---|
| 53 | private: | 
|---|
| 54 | void onUpdateIcons(); | 
|---|
| 55 |  | 
|---|
| 56 | // QWidget interface | 
|---|
| 57 | protected: | 
|---|
| 58 | void closeEvent(QCloseEvent *event) override; | 
|---|
| 59 | }; | 
|---|
| 60 |  | 
|---|
| 61 | #endif // NEWCLASSDIALOG_H | 
|---|
| 62 |  | 
|---|