QElectroTech  0.70
diagrampropertieseditordockwidget.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 DIAGRAMPROPERTIESEDITORDOCKWIDGET_H
19 #define DIAGRAMPROPERTIESEDITORDOCKWIDGET_H
20 
22 
23 class Diagram;
24 
26 {
27  Q_OBJECT
28 
29  public:
30  DiagramPropertiesEditorDockWidget(QWidget *parent = nullptr);
31 
32  void setDiagram(Diagram *diagram);
33 
34  private: //Make this method private because only this class manage the editor widget.
35  bool addEditor(PropertiesEditorWidget *editor, int index = 0) { return PropertiesEditorDockWidget::addEditor(editor, index); }
37 
38  private slots:
39  void selectionChanged();
40  void diagramWasDeleted();
41 
42  private:
45 };
46 
47 #endif // DIAGRAMPROPERTIESEDITORDOCKWIDGET_H
void diagramWasDeleted()
DiagramPropertiesEditorDockWidget::diagramWasDeleted Remove current editor and set m_diagram to nullp...
void selectionChanged()
DiagramPropertiesEditorDockWidget::selectionChanged The current selection of diagram was changed...
bool addEditor(PropertiesEditorWidget *editor, int index=0)
DiagramPropertiesEditorDockWidget(QWidget *parent=nullptr)
DiagramPropertiesEditorDockWidget::DiagramPropertiesEditorDockWidget Constructor. ...
bool removeEditor(PropertiesEditorWidget *editor)
The PropertiesEditorWidget class This class extend QWidget method for have common way to edit propert...
void setDiagram(Diagram *diagram)
DiagramPropertiesEditorDockWidget::setDiagram Set the diagram to edit the selection. Connect the diagram signal selectionChanged() to this slot selectionChanged(); If diagram = nullptr, we just disconnect all signal and remove editor.
bool removeEditor(PropertiesEditorWidget *editor)
PropertiesEditorDockWidget::removeEditor Remove from this dock. The editor wasn&#39;t delete a the end o...
bool addEditor(PropertiesEditorWidget *editor, int index=0)
PropertiesEditorDockWidget::addEditor Add an in this dock at in the main vertical layout (note the ...