QElectroTech  0.70
elementitemeditor.cpp
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 #include "elementitemeditor.h"
19 #include "qetelementeditor.h"
20 #include "editorcommands.h"
21 
28  QWidget(parent),
29  element_editor(editor)
30 {
31 }
32 
35  return(element_editor);
36 }
37 
40  return(element_editor -> elementScene());
41 }
42 
44 QUndoStack &ElementItemEditor::undoStack() const {
45  return(elementScene() -> undoStack());
46 }
47 
50  return(element_type_name);
51 }
52 
54 void ElementItemEditor::setElementTypeName(const QString &name) {
55  element_type_name = name;
56 }
57 
64  setPart(nullptr);
65 }
QETElementEditor * element_editor
virtual QString elementTypeName() const
virtual void setElementTypeName(const QString &)
virtual bool setPart(CustomElementPart *)=0
virtual void detach()
virtual QETElementEditor * elementEditor() const
virtual ElementScene * elementScene() const
ElementItemEditor(QETElementEditor *, QWidget *=nullptr)
virtual QUndoStack & undoStack() const