QElectroTech  0.70
elementitemeditor.h
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 #ifndef ELEMENT_ITEM_EDITOR_H
19 #define ELEMENT_ITEM_EDITOR_H
20 
21 #include <QWidget>
22 
23 class QETElementEditor;
24 class ElementScene;
25 class CustomElementPart;
26 class QUndoStack;
27 
33 class ElementItemEditor : public QWidget
34 {
35  Q_OBJECT
36  // constructors, destructor
37  public:
38  ElementItemEditor(QETElementEditor *, QWidget * = nullptr);
39  ~ElementItemEditor() override {};
40  private:
42 
43  // methods
44  public:
45  virtual QETElementEditor *elementEditor() const;
46  virtual ElementScene *elementScene() const;
47  virtual QUndoStack &undoStack() const;
48 
49  virtual QString elementTypeName() const;
50  virtual void setElementTypeName(const QString &);
51  virtual void detach();
52 
53  virtual bool setPart(CustomElementPart *) = 0;
54  virtual bool setParts(QList <CustomElementPart *>) {return false;}
55 
56  virtual CustomElementPart *currentPart() const = 0;
57  virtual void updateForm() = 0;
58 
59  // attributes
60  private:
63 };
64 #endif
virtual bool setParts(QList< CustomElementPart *>)
QETElementEditor * element_editor
virtual QString elementTypeName() const
virtual void setElementTypeName(const QString &)
virtual bool setPart(CustomElementPart *)=0
virtual CustomElementPart * currentPart() const =0
virtual void detach()
virtual void updateForm()=0
~ElementItemEditor() override
virtual QETElementEditor * elementEditor() const
virtual ElementScene * elementScene() const
ElementItemEditor(QETElementEditor *, QWidget *=nullptr)
virtual QUndoStack & undoStack() const