QElectroTech  0.8-dev
elementscategoryeditor.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 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 ELEMENTS_CATEGORY_EDITOR_H
19 #define ELEMENTS_CATEGORY_EDITOR_H
20 
21 #include <QDialog>
22 #include "elementslocation.h"
23 
24 class NameListWidget;
25 class QFileNameEdit;
26 class QDialogButtonBox;
27 class QLabel;
28 
33 class ElementsCategoryEditor : public QDialog
34 {
35  Q_OBJECT
36 
37  public:
38  ElementsCategoryEditor(const ElementsLocation &location, bool edit = true, QWidget *parent = nullptr);
39  ~ElementsCategoryEditor() override;
40 
42 
43  private:
45 
46  private:
47  QDialogButtonBox *m_buttons;
49  QLabel *m_file_name;
54 
55  private:
56  void setUpWidget();
57 
58  public slots:
59  void acceptCreation();
60  void acceptUpdate();
61 };
62 #endif
ElementsLocation::exist
bool exist() const
ElementsLocation::exist.
Definition: elementslocation.cpp:472
qfilenameedit.h
NamesList::addName
void addName(const QString &, const QString &)
Definition: nameslist.cpp:43
NameListWidget::isEmpty
bool isEmpty() const
NameListWidget::isEmpty.
Definition: namelistwidget.cpp:125
ElementsCategoryEditor::m_names_list
NameListWidget * m_names_list
Definition: elementscategoryeditor.h:48
QET::Icons::nl
QIcon nl
Definition: qeticons.cpp:203
ElementsCategoryEditor::m_location
ElementsLocation m_location
Definition: elementscategoryeditor.h:52
ElementsCategoryEditor::acceptUpdate
void acceptUpdate()
ElementsCategoryEditor::acceptUpdate Valid the update of the category.
Definition: elementscategoryeditor.cpp:182
ElementsCategoryEditor::createdLocation
ElementsLocation createdLocation() const
ElementsCategoryEditor::createdLocation.
Definition: elementscategoryeditor.cpp:97
QFileNameEdit
Definition: qfilenameedit.h:32
ElementsLocation::isWritable
bool isWritable() const
ElementsLocation::isWritable.
Definition: elementslocation.cpp:499
qetmessagebox.h
ElementsCategoryEditor::ElementsCategoryEditor
ElementsCategoryEditor(const ElementsLocation &location, bool edit=true, QWidget *parent=nullptr)
ElementsCategoryEditor::ElementsCategoryEditor Constructor.
Definition: elementscategoryeditor.cpp:37
ElementsLocation::isElement
bool isElement() const
ElementsLocation::isElement.
Definition: elementslocation.cpp:412
ElementsCategoryEditor
The ElementsCategoryEditor class This class provides a dialog to edit an existing category or create ...
Definition: elementscategoryeditor.h:34
ElementCollectionHandler
The ElementCollectionHandler class Provide several method to copy element or directory from a collect...
Definition: elementcollectionhandler.h:109
ElementsCategoryEditor::m_file_name
QLabel * m_file_name
Definition: elementscategoryeditor.h:49
elementcollectionhandler.h
ElementsCategoryEditor::setUpWidget
void setUpWidget()
ElementsCategoryEditor::setUpWidget.
Definition: elementscategoryeditor.cpp:105
ElementsLocation::isNull
bool isNull() const
ElementsLocation::isNull.
Definition: elementslocation.cpp:387
qet.h
ElementsCategoryEditor::ElementsCategoryEditor
ElementsCategoryEditor(const ElementsCategoryEditor &)
ElementsLocation::addToPath
bool addToPath(const QString &)
ElementsLocation::addToPath Add a string to the actual path of this location.
Definition: elementslocation.cpp:320
elementslocation.h
elementscategoryeditor.h
ElementCollectionHandler::createDir
ElementsLocation createDir(ElementsLocation &parent, const QString &name, const NamesList &name_list)
ElementCollectionHandler::createDir Create a directorie with name as child of parent....
Definition: elementcollectionhandler.cpp:344
ElementsLocation::fileSystemPath
QString fileSystemPath() const
ElementsLocation::fileSystemPath.
Definition: elementslocation.cpp:193
ElementCollectionHandler::setNames
bool setNames(ElementsLocation &location, const NamesList &name_list)
ElementCollectionHandler::setNames Set the names stored in name_list as the names of the item represe...
Definition: elementcollectionhandler.cpp:454
NameListWidget::names
NamesList names() const
NameListWidget::names.
Definition: namelistwidget.cpp:82
ElementsLocation::nameList
NamesList nameList()
ElementsLocation::nameList.
Definition: elementslocation.cpp:532
ElementsLocation
The ElementsLocation class This class represents the location, the location of an element or of a cat...
Definition: elementslocation.h:46
ElementsCategoryEditor::m_file_line_edit
QFileNameEdit * m_file_line_edit
Definition: elementscategoryeditor.h:50
NamesList
Definition: nameslist.h:30
ElementsCategoryEditor::m_buttons
QDialogButtonBox * m_buttons
Definition: elementscategoryeditor.h:47
ElementsCategoryEditor::m_created_location
ElementsLocation m_created_location
Definition: elementscategoryeditor.h:53
QET::QetMessageBox::warning
QMessageBox::StandardButton warning(QWidget *, const QString &, const QString &, QMessageBox::StandardButtons=QMessageBox::Ok, QMessageBox::StandardButton=QMessageBox::NoButton)
Definition: qetmessagebox.cpp:68
NameListWidget
The NameListWidget class Provide a widget for let user define localized string;.
Definition: namelistwidget.h:33
QET::QetMessageBox::critical
QMessageBox::StandardButton critical(QWidget *, const QString &, const QString &, QMessageBox::StandardButtons=QMessageBox::Ok, QMessageBox::StandardButton=QMessageBox::NoButton)
Definition: qetmessagebox.cpp:23
namelistwidget.h
ElementsCategoryEditor::m_edit_mode
bool m_edit_mode
Definition: elementscategoryeditor.h:51
ElementsCategoryEditor::acceptCreation
void acceptCreation()
ElementsCategoryEditor::acceptCreation Valid the creation of the category.
Definition: elementscategoryeditor.cpp:131
ElementsCategoryEditor::~ElementsCategoryEditor
~ElementsCategoryEditor() override
ElementsCategoryEditor::~ElementsCategoryEditor Destructor.
Definition: elementscategoryeditor.cpp:90
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
QET::Icons::Cancel
QIcon Cancel
Definition: qeticons.cpp:34