QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
newelementwizard.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 NEW_ELEMENT_WIZARD_H
19#define NEW_ELEMENT_WIZARD_H
20
22
23#include <QWizard>
24
25class NameListWidget;
26class QFileNameEdit;
27class QTreeView;
29
39class NewElementWizard : public QWizard
40{
41 Q_OBJECT
42
43 // constructors, destructor
44 public:
45 NewElementWizard(QWidget * = nullptr, Qt::WindowFlags = Qt::Widget);
46 ~NewElementWizard() override;
47
48 void preselectedLocation(const ElementsLocation &location);
49
50 private:
52
53 // attributes
54 private:
59 QTreeView *m_tree_view = nullptr;
62
63 // methods
64 private:
65 QWizardPage *buildStep1();
66 QWizardPage *buildStep2();
67 QWizardPage *buildStep3();
68 bool validStep1();
69 bool validStep2();
70 bool validateCurrentPage() override;
71 void createNewElement();
72};
73#endif
Definition elementscollectionmodel.h:33
The ElementsLocation class This class represents the location, the location of an element or of a cat...
Definition elementslocation.h:47
The NameListWidget class Provide a widget for let user define localized string;.
Definition namelistwidget.h:35
Definition newelementwizard.h:40
bool validStep1()
NewElementWizard::validStep1 Valid the setp 1.
Definition newelementwizard.cpp:181
ElementsLocation m_chosen_location
Definition newelementwizard.h:60
QString m_chosen_file
Definition newelementwizard.h:58
QWizardPage * buildStep2()
NewElementWizard::buildStep2.
Definition newelementwizard.cpp:108
QWizardPage * buildStep1()
NewElementWizard::buildStep1.
Definition newelementwizard.cpp:80
QFileNameEdit * m_qle_filename
Definition newelementwizard.h:56
QWizardPage * buildStep3()
NewElementWizard::buildStep3.
Definition newelementwizard.cpp:133
~NewElementWizard() override
Definition newelementwizard.cpp:58
WizardState
Definition newelementwizard.h:55
@ Category
Definition newelementwizard.h:55
@ Filename
Definition newelementwizard.h:55
@ Names
Definition newelementwizard.h:55
NameListWidget * m_names_list
Definition newelementwizard.h:57
bool validateCurrentPage() override
NewElementWizard::validateCurrentPage.
Definition newelementwizard.cpp:155
void preselectedLocation(const ElementsLocation &location)
NewElementWizard::preselectedLocation Select item in the tree view represented by location,...
Definition newelementwizard.cpp:67
void createNewElement()
NewElementWizard::createNewElement Launch an element editor to create the new element.
Definition newelementwizard.cpp:245
ElementsCollectionModel * m_model
Definition newelementwizard.h:61
NewElementWizard(const NewElementWizard &)
QTreeView * m_tree_view
Definition newelementwizard.h:59
bool validStep2()
NewElementWizard::validStep2 Valid the step 2.
Definition newelementwizard.cpp:213
Definition qfilenameedit.h:32