QElectroTech  0.8-dev
qetdiagrameditor.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 QET_DIAGRAM_EDITOR_H
19 #define QET_DIAGRAM_EDITOR_H
20 
21 #include <QActionGroup>
22 #include <QMdiArea>
23 #include <QSignalMapper>
24 #include <QDir>
25 #include <QUndoGroup>
26 
27 #include "qetmainwindow.h"
28 #include "searchandreplacewidget.h"
29 
30 class QMdiSubWindow;
31 class QETProject;
32 class QETResult;
33 class ProjectView;
34 class CustomElement;
35 class Diagram;
36 class DiagramView;
37 class Element;
39 class ElementsLocation;
40 class RecentFiles;
44 class KAutoSaveFile;
45 
51 {
52  Q_OBJECT
53 
54  public:
55  QETDiagramEditor(const QStringList & = QStringList(),
56  QWidget * = nullptr);
57  ~QETDiagramEditor() override;
58 
59  private:
61 
62  public:
63  void closeEvent (QCloseEvent *) override;
64  QList<ProjectView *> openedProjects () const;
65  void addProjectView (ProjectView *);
66  bool openAndAddProject (const QString &, bool = true);
67  QList<QString> editedFiles () const;
68  ProjectView *viewForFile (const QString &) const;
70  QETProject *currentProject() const;
71  bool drawGrid() const;
72  void openBackupFiles (QList<KAutoSaveFile *> backup_files);
73 
74  protected:
75  bool event(QEvent *) override;
76 
77  private:
78  void setUpElementsPanel ();
80  void setUpUndoStack ();
83  void setUpActions ();
84  void setUpToolBar ();
85  void setUpMenu ();
86 
87  bool addProject(QETProject *, bool = true);
89  Element *currentElement() const;
93  ProjectView *findProject(const QString &) const;
94  QMdiSubWindow *subWindowForWidget(QWidget *) const;
95 
96  public slots:
97  void save();
98  void saveAs();
99  bool newProject();
100  bool openProject();
101  bool openRecentFile(const QString &);
102  bool closeProject(ProjectView *);
103  bool closeProject(QETProject *);
104  void zoomGroupTriggered (QAction *action);
105  void selectGroupTriggered (QAction *action);
106  void addItemGroupTriggered (QAction *action);
107  void selectionGroupTriggered (QAction *action);
108  void rowColumnGroupTriggered (QAction *action);
109  void slot_updateActions();
110  void slot_updateUndoStack();
111  void slot_updateModeActions();
113  void slot_updatePasteAction();
114  void slot_updateWindowsMenu();
115  void slot_updateAutoNumDock();
116  void generateTerminalBlock();
117  void setWindowedMode();
118  void setTabbedMode();
119  void readSettings();
120  void writeSettings();
121  void activateDiagram(Diagram *);
122  void activateProject(QETProject *);
124  void activateWidget(QWidget *);
131  void removeDiagram(Diagram *);
133  void moveDiagramUp(Diagram *);
134  void moveDiagramDown(Diagram *);
135  void moveDiagramUpTop(Diagram *);
136  void moveDiagramUpx10(Diagram *);
137  void moveDiagramDownx10(Diagram *);
138  void reloadOldElementPanel();
140  void findElementInPanel(const ElementsLocation &);
143  void showError(const QETResult &);
144  void showError(const QString &);
145  void subWindowActivated(QMdiSubWindow *subWindows);
146 
147  private slots:
148  void selectionChanged();
149 
150  public:
152  QAction *m_conductor_reset;
153  QAction *m_cut;
154  QAction *m_copy;
155 
158  QActionGroup *m_depth_action_group = nullptr;
159 
160  private:
161  QActionGroup *grp_visu_sel;
162  QActionGroup *m_group_view_mode;
164  QActionGroup m_zoom_actions_group;
165  QActionGroup m_select_actions_group;
166  QActionGroup m_file_actions_group;
167 
170  QAction *m_mode_selection;
171  QAction *m_mode_visualise;
172  QAction *m_export_diagram;
173  QAction *m_print;
174  QAction *m_quit_editor;
175  QAction *undo;
176  QAction *redo;
177  QAction *m_paste;
178  QAction *m_auto_conductor;
179  QAction *conductor_default;
180  QAction *m_grey_background;
181  QAction *m_draw_grid;
185  QAction *m_clean_project;
187  QAction *m_csv_export;
189  QAction *m_add_summary;
193  QAction *m_tile_window;
194  QAction *m_cascade_window;
195  QAction *m_previous_window;
196  QAction *m_next_window;
197  QAction *m_edit_selection;
198  QList <QAction *> m_zoom_action_toolBar;
201  QAction *m_rotate_texts;
202  QAction *m_find_element;
203  QAction *m_group_selected_texts = nullptr;
204  QAction *m_close_file;
205  QAction *m_save_file;
206  QAction *m_save_file_as;
207  QAction *m_find = nullptr;
208 
209  QMdiArea m_workspace;
210  QSignalMapper windowMapper;
212  QDockWidget *qdw_pa;
213  QDockWidget *m_qdw_elmt_collection;
214  QDockWidget *qdw_undo;
216 
220  QMenu *windows_menu;
221 
222  QToolBar *main_tool_bar = nullptr,
223  *view_tool_bar = nullptr,
224  *diagram_tool_bar = nullptr,
226  *m_depth_tool_bar = nullptr;
227 
228  QUndoGroup undo_group;
231  bool m_first_show = true;
233 };
234 #endif
DiagramView::editSelection
void editSelection()
DiagramView::editSelection Edit the selected item if he can be edited and if only one item is selecte...
Definition: diagramview.cpp:1118
QETDiagramEditor::slot_updateComplexActions
void slot_updateComplexActions()
QETDiagramEditor::slot_updateComplexActions Manage the actions who need some conditions to be enable ...
Definition: qetdiagrameditor.cpp:1497
QET::Icons::ConductorEdit
QIcon ConductorEdit
Definition: qeticons.cpp:36
DiagramView::selectAll
void selectAll()
Definition: diagramview.cpp:122
DialogWaiting::dropInstance
static void dropInstance()
Definition: dialogwaiting.h:54
Diagram::clipboardMayContainDiagram
static bool clipboardMayContainDiagram()
Diagram::clipboardMayContainDiagram.
Definition: diagram.cpp:2312
BorderProperties::rows_count
int rows_count
Rows count.
Definition: borderproperties.h:51
QETDiagramEditor::m_next_window
QAction * m_next_window
Switch to the next document.
Definition: qetdiagrameditor.h:196
Diagram::background_color
static QColor background_color
background color of diagram
Definition: diagram.h:99
QetShapeItem::Rectangle
@ Rectangle
Definition: qetshapeitem.h:58
QETDiagramEditor::m_autonumbering_dock
AutoNumberingDockWidget * m_autonumbering_dock
Definition: qetdiagrameditor.h:229
QETDiagramEditor::m_workspace
QMdiArea m_workspace
Definition: qetdiagrameditor.h:209
QET::Icons::ObjectRotateRight
QIcon ObjectRotateRight
Definition: qeticons.cpp:124
BorderProperties
The BorderProperties class This class is a container for dimensions and display properties of a diagr...
Definition: borderproperties.h:29
Diagram::setEventInterface
void setEventInterface(DiagramEventInterface *event_interface)
Diagram::setEventInterface Set event_interface has current interface. Diagram become the ownership of...
Definition: diagram.cpp:531
RotateSelectionCommand
The RotateSelectionCommand class Rotate the selected items in the given diagram.
Definition: rotateselectioncommand.h:33
QET::Icons::Grid
QIcon Grid
Definition: qeticons.cpp:112
QET::Icons::ProjectClose
QIcon ProjectClose
Definition: qeticons.cpp:144
DiagramContent::Images
@ Images
Definition: diagramcontent.h:57
QETDiagramEditor::editDiagramProperties
void editDiagramProperties(DiagramView *)
Definition: qetdiagrameditor.cpp:1862
QETDiagramEditor::grp_visu_sel
QActionGroup * grp_visu_sel
Action group for visualisation vs edition mode.
Definition: qetdiagrameditor.h:161
ConductorNumExport
The ConductorNumExport class A class to export the num of conductors into a csv file.
Definition: conductornumexport.h:31
QETDiagramEditor::moveDiagramUpx10
void moveDiagramUpx10(Diagram *)
Definition: qetdiagrameditor.cpp:2109
QET::Icons::ZoomFitBest
QIcon ZoomFitBest
Definition: qeticons.cpp:178
QETDiagramEditor::windows_menu
QMenu * windows_menu
Definition: qetdiagrameditor.h:220
DynamicElementTextItem
The DynamicElementTextItem class This class provide a simple text field of element who can be added o...
Definition: dynamicelementtextitem.h:39
QET::Icons::EditCopy
QIcon EditCopy
Definition: qeticons.cpp:64
QetGraphicsTableFactory::createAndAddSummary
static void createAndAddSummary(Diagram *diagram)
QetGraphicsTableFactory::createAndAddSummary Open a dialog for ask user the config of the table,...
Definition: qetgraphicstablefactory.cpp:61
QETDiagramEditor::addProject
bool addProject(QETProject *, bool=true)
Definition: qetdiagrameditor.cpp:1089
QET::Icons::textGroup
QIcon textGroup
Definition: qeticons.cpp:217
diagrampropertieseditordockwidget.h
QETDiagramEditor::closeProject
bool closeProject(ProjectView *)
Definition: qetdiagrameditor.cpp:951
Diagram::canRotateSelection
bool canRotateSelection() const
Diagram::canRotateSelection.
Definition: diagram.cpp:2395
diagramcommands.h
QET::Icons::DocumentOpen
QIcon DocumentOpen
Definition: qeticons.cpp:54
BorderTitleBlock::exportBorder
BorderProperties exportBorder()
BorderTitleBlock::exportBorder.
Definition: bordertitleblock.cpp:333
SearchAndReplaceWidget::setEditor
void setEditor(QETDiagramEditor *editor)
SearchAndReplaceWidget::setEditor Set the diagram editor of this widget.
Definition: searchandreplacewidget.cpp:144
ConductorNumExport::toCsv
bool toCsv()
ConductorNumExport::toCsv Export the num of conductors into a csv file.
Definition: conductornumexport.cpp:45
QETDiagramEditor::m_mode_visualise
QAction * m_mode_visualise
Set visualisation mode.
Definition: qetdiagrameditor.h:171
QETDiagramEditor::slot_updateActions
void slot_updateActions()
QETDiagramEditor::slot_updateActions Manage actions.
Definition: qetdiagrameditor.cpp:1430
QETDiagramEditor::findElementInPanel
void findElementInPanel(const ElementsLocation &)
QETDiagramEditor::findElementInPanel Find the item for location in the element panel.
Definition: qetdiagrameditor.cpp:2181
QWidgetAnimation::lastSize
@ lastSize
Definition: qwidgetanimation.h:53
QET::Icons::EditTableInsertRowUnder
QIcon EditTableInsertRowUnder
Definition: qeticons.cpp:80
QET::Icons::EditTableDeleteColumn
QIcon EditTableDeleteColumn
Definition: qeticons.cpp:75
QETMainWindow
Definition: qetmainwindow.h:26
QETDiagramEditor::setUpMenu
void setUpMenu()
QETDiagramEditor::setUpMenu.
Definition: qetdiagrameditor.cpp:714
QETDiagramEditor::m_first_show
bool m_first_show
Definition: qetdiagrameditor.h:231
QETDiagramEditor::rowColumnGroupTriggered
void rowColumnGroupTriggered(QAction *action)
Definition: qetdiagrameditor.cpp:1403
QET::depthActionGroup
QActionGroup * depthActionGroup(QObject *parent=nullptr)
QET::depthActionGroup.
Definition: qet.cpp:676
diagrameventaddimage.h
QET::Icons::ZoomIn
QIcon ZoomIn
Definition: qeticons.cpp:179
qwidgetanimation.h
SearchAndReplaceWidget
Definition: searchandreplacewidget.h:38
diagrameventaddshape.h
DiagramView::adjustSceneRect
void adjustSceneRect()
DiagramView::adjustSceneRect Calcul and set the area of the scene visualized by this view.
Definition: diagramview.cpp:837
qetmainwindow.h
QETDiagramEditor::m_cascade_window
QAction * m_cascade_window
Show MDI subwindows as cascade.
Definition: qetdiagrameditor.h:194
QETDiagramEditor::m_export_project_db
QAction * m_export_project_db
Definition: qetdiagrameditor.h:192
QETDiagramEditor::m_delete_selection
QAction * m_delete_selection
Only zoom action must displayed in the toolbar.
Definition: qetdiagrameditor.h:199
QETDiagramEditor::m_group_view_mode
QActionGroup * m_group_view_mode
Action group for project.
Definition: qetdiagrameditor.h:162
QET::Icons::ProjectProperties
QIcon ProjectProperties
Definition: qeticons.cpp:149
QETDiagramEditor::m_project_edit_properties
QAction * m_project_edit_properties
Edit the properties of the current project.
Definition: qetdiagrameditor.h:182
QETDiagramEditor::activateProject
void activateProject(QETProject *)
Definition: qetdiagrameditor.cpp:1953
BOMExportDialog::exec
virtual int exec() override
BOMExportDialog::exec.
Definition: bomexportdialog.cpp:59
QETDiagramEditor::setTabbedMode
void setTabbedMode()
Definition: qetdiagrameditor.cpp:1892
QETDiagramEditor::QETDiagramEditor
QETDiagramEditor(const QETDiagramEditor &)
QET::Icons::ZoomOut
QIcon ZoomOut
Definition: qeticons.cpp:181
QETDiagramEditor::setUpAutonumberingWidget
void setUpAutonumberingWidget()
QETDiagramEditor::setUpAutonumberingWidget Setup the dock for AutoNumbering Selection.
Definition: qetdiagrameditor.cpp:221
QETDiagramEditor::setUpUndoStack
void setUpUndoStack()
QETDiagramEditor::setUpUndoStack Setup the undostack and undo stack widget.
Definition: qetdiagrameditor.cpp:187
conductortextitem.h
QET::Icons::PartTextField
QIcon PartTextField
Definition: qeticons.cpp:135
DeleteQGraphicsItemCommand
Definition: deleteqgraphicsitemcommand.h:31
QETApp::registerProject
static bool registerProject(QETProject *)
QETApp::registerProject.
Definition: qetapp.cpp:2368
DiagramPropertiesEditorDockWidget
Definition: diagrampropertieseditordockwidget.h:26
BOMExportDialog
The BOMExportDialog class.
Definition: bomexportdialog.h:34
RecentFiles
Definition: recentfiles.h:26
QETDiagramEditor::currentElement
Element * currentElement() const
Definition: qetdiagrameditor.cpp:1175
ElementsPanelWidget::reloadAndFilter
void reloadAndFilter()
Definition: elementspanelwidget.cpp:153
AutoNumberingDockWidget
Definition: autonumberingdockwidget.h:30
QETDiagramEditor::addDiagramToProject
void addDiagramToProject(QETProject *)
QETDiagramEditor::addDiagramToProject Add a diagram to project.
Definition: qetdiagrameditor.cpp:2012
QETDiagramEditor::setUpSelectionPropertiesEditor
void setUpSelectionPropertiesEditor()
QETDiagramEditor::setUpSelectionPropertiesEditor Setup the dock for edit the current selection.
Definition: qetdiagrameditor.cpp:210
bomexportdialog.h
QET::Icons::EditUndo
QIcon EditUndo
Definition: qeticons.cpp:82
QETDiagramEditor::selectionChanged
void selectionChanged()
QETDiagramEditor::selectionChanged This slot is called when a diagram selection was changed.
Definition: qetdiagrameditor.cpp:2238
ElementsCollectionWidget::removeProject
void removeProject(QETProject *project)
Definition: elementscollectionwidget.cpp:101
QETDiagramEditor::editSelectedElementInEditor
void editSelectedElementInEditor()
Definition: qetdiagrameditor.cpp:2199
DiagramContent
Definition: diagramcontent.h:46
autonumberingdockwidget.h
DiagramContent::m_elements
QList< Element * > m_elements
Definition: diagramcontent.h:69
elementscollectionwidget.h
QET::Icons::DocumentExport
QIcon DocumentExport
Definition: qeticons.cpp:50
QETDiagramEditor::m_depth_tool_bar
QToolBar * m_depth_tool_bar
Definition: qetdiagrameditor.h:226
QETDiagramEditor::m_previous_window
QAction * m_previous_window
Switch to the previous document.
Definition: qetdiagrameditor.h:195
QET::Icons::ProjectNew
QIcon ProjectNew
Definition: qeticons.cpp:145
QETDiagramEditor::currentProject
QETProject * currentProject() const
QETDiagramEditor::currentProject.
Definition: qetdiagrameditor.cpp:1147
QETDiagramEditor::editedFiles
QList< QString > editedFiles() const
Definition: qetdiagrameditor.cpp:1745
qetmessagebox.h
ElementsCollectionWidget
The ElementsCollectionWidget class This widget embedd a tree view that display the element collection...
Definition: elementscollectionwidget.h:43
elementspanelwidget.h
QET::Icons::DialogInformation
QIcon DialogInformation
Definition: qeticons.cpp:47
QET::Icons::ConductorSettings
QIcon ConductorSettings
Definition: qeticons.cpp:37
QETDiagramEditor::selectGroupTriggered
void selectGroupTriggered(QAction *action)
QETDiagramEditor::selectGroupTriggered This slot is called when selection need to change.
Definition: qetdiagrameditor.cpp:1295
QETMainWindow::event
bool event(QEvent *) override
Definition: qetmainwindow.cpp:233
QETApp::diagramEditorForFile
static QETDiagramEditor * diagramEditorForFile(const QString &)
QETApp::diagramEditorForFile.
Definition: qetapp.cpp:940
QETDiagramEditor::editElementInEditor
void editElementInEditor(const ElementsLocation &)
Definition: qetdiagrameditor.cpp:2190
DiagramContent::hasCopiableItems
bool hasCopiableItems() const
DiagramContent::hasCopiableItems.
Definition: diagramcontent.cpp:213
QETDiagramEditor::m_rotate_texts
QAction * m_rotate_texts
Direct selected text items to a specific angle.
Definition: qetdiagrameditor.h:201
QET::Icons::PartSelect
QIcon PartSelect
Definition: qeticons.cpp:133
addelementtextcommand.h
QETDiagramEditor::showError
void showError(const QETResult &)
Definition: qetdiagrameditor.cpp:2208
QETApp::unregisterProject
static bool unregisterProject(QETProject *)
QETApp::unregisterProject Cancel the recording of the project project.
Definition: qetapp.cpp:2395
DiagramEventAddShape
The DiagramEventAddShape class This event manage the creation of a shape.
Definition: diagrameventaddshape.h:29
QETDiagramEditor::m_depth_action_group
QActionGroup * m_depth_action_group
Action related to edit a selected item.
Definition: qetdiagrameditor.h:158
QETDiagramEditor::currentDiagramView
DiagramView * currentDiagramView() const
Definition: qetdiagrameditor.cpp:1162
QETMainWindow::help_menu_
QMenu * help_menu_
Help menu.
Definition: qetmainwindow.h:66
QET::Icons::DocumentPrint
QIcon DocumentPrint
Definition: qeticons.cpp:56
QETDiagramEditor::projectWasClosed
void projectWasClosed(ProjectView *)
Definition: qetdiagrameditor.cpp:1970
QETDiagramEditor::redo
QAction * redo
Redo the latest cancelled operation.
Definition: qetdiagrameditor.h:176
QETDiagramEditor::zoomGroupTriggered
void zoomGroupTriggered(QAction *action)
Definition: qetdiagrameditor.cpp:1271
RotateSelectionCommand::isValid
bool isValid()
RotateSelectionCommand::isValid.
Definition: rotateselectioncommand.cpp:117
QETDiagramEditor::undo
QAction * undo
Cancel the latest action.
Definition: qetdiagrameditor.h:175
Diagram::border_and_titleblock
BorderTitleBlock border_and_titleblock
Diagram dimensions and title block.
Definition: diagram.h:83
AddTextsGroupCommand
The AddTextsGroupCommand class Manage the adding of a texts group.
Definition: addelementtextcommand.h:54
DiagramView::selectNothing
void selectNothing()
Definition: diagramview.cpp:129
QET::Icons::EditSelectInvert
QIcon EditSelectInvert
Definition: qeticons.cpp:71
QETDiagramEditor::m_add_summary
QAction * m_add_summary
Add summary graphics item.
Definition: qetdiagrameditor.h:189
QETDiagramEditor::moveDiagramDownx10
void moveDiagramDownx10(Diagram *)
Definition: qetdiagrameditor.cpp:2128
QETDiagramEditor::m_draw_grid
QAction * m_draw_grid
Switch the background grid display or not.
Definition: qetdiagrameditor.h:181
QET::Icons::DocumentSpreadsheet
QIcon DocumentSpreadsheet
Definition: qeticons.cpp:51
QETDiagramEditor::main_tool_bar
QToolBar * main_tool_bar
Definition: qetdiagrameditor.h:222
ProjectView::project
QETProject * project()
Definition: projectview.cpp:65
ElementsCollectionWidget::setCurrentLocation
void setCurrentLocation(const ElementsLocation &location)
ElementsCollectionWidget::setCurrentLocation Set the current item to be the item for location.
Definition: elementscollectionwidget.cpp:122
QetShapeItem::Ellipse
@ Ellipse
Definition: qetshapeitem.h:59
QETMainWindow::insertMenu
void insertMenu(QMenu *, QMenu *, bool=true)
Definition: qetmainwindow.cpp:172
QETDiagramEditor::openRecentFile
bool openRecentFile(const QString &)
Definition: qetdiagrameditor.cpp:917
QETDiagramEditor::activateWidget
void activateWidget(QWidget *)
Definition: qetdiagrameditor.cpp:1264
rotatetextscommand.h
QETDiagramEditor::setUpActions
void setUpActions()
QETDiagramEditor::setUpActions Set up all Qaction.
Definition: qetdiagrameditor.cpp:233
Diagram
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition: diagram.h:56
DynamicElementTextItem::Type
@ Type
Definition: dynamicelementtextitem.h:61
QETDiagramEditor::m_file_actions_group
QActionGroup m_file_actions_group
Action related to global selections.
Definition: qetdiagrameditor.h:166
QETDiagramEditor::subWindowActivated
void subWindowActivated(QMdiSubWindow *subWindows)
QETDiagramEditor::subWindowActivated Slot used to update menu and undo stack when subwindows of MDIar...
Definition: qetdiagrameditor.cpp:2226
QETDiagramEditor::m_add_item_tool_bar
QToolBar * m_add_item_tool_bar
Definition: qetdiagrameditor.h:225
QETDiagramEditor::m_export_diagram
QAction * m_export_diagram
Export diagrams of the current project as imagess.
Definition: qetdiagrameditor.h:172
QET::Icons::PartRectangle
QIcon PartRectangle
Definition: qeticons.cpp:132
qeticons.h
QETDiagramEditor::activeSubWindowIndex
int activeSubWindowIndex
Definition: qetdiagrameditor.h:230
QETProject::diagrams
QList< Diagram * > diagrams() const
Definition: qetproject.cpp:217
QetGraphicsTableFactory::createAndAddNomenclature
static void createAndAddNomenclature(Diagram *diagram)
QetGraphicsTableFactory::createAndAddNomenclature Open a dialog for ask user the config of the table,...
Definition: qetgraphicstablefactory.cpp:42
QETDiagramEditor::m_find
QAction * m_find
Definition: qetdiagrameditor.h:207
QETResult::isOk
bool isOk() const
Definition: qetresult.cpp:47
QETDiagramEditor::m_quit_editor
QAction * m_quit_editor
Quit the diagram editor.
Definition: qetdiagrameditor.h:174
DiagramContent::selectedTextsGroup
QList< ElementTextItemGroup * > selectedTextsGroup() const
DiagramContent::selectedTextsGroup.
Definition: diagramcontent.cpp:150
QETDiagramEditor::m_save_file
QAction * m_save_file
Save current project.
Definition: qetdiagrameditor.h:205
QETDiagramEditor::writeSettings
void writeSettings()
QETDiagramEditor::writeSettings Write the settings.
Definition: qetdiagrameditor.cpp:1927
QET::Icons::TableOfContent
QIcon TableOfContent
Definition: qeticons.cpp:163
QET::Icons::TerminalStrip
QIcon TerminalStrip
Definition: qeticons.cpp:210
diagramview.h
rotateselectioncommand.h
QET::Icons::ElementEdit
QIcon ElementEdit
Definition: qeticons.cpp:85
QETDiagramEditor::m_selection_actions_group
QActionGroup m_selection_actions_group
Action related to add/remove rows/column in diagram.
Definition: qetdiagrameditor.h:157
projectDataBase::exportDb
static void exportDb(projectDataBase *db, QWidget *parent=nullptr, const QString &caption=QString(), const QString &dir=QString())
projectDataBase::exportDb
Definition: projectdatabase.cpp:539
DiagramView::selectInvert
void selectInvert()
Definition: diagramview.cpp:136
Diagram::isReadOnly
bool isReadOnly() const
Diagram::isReadOnly.
Definition: diagram.cpp:2363
QETDiagramEditor::~QETDiagramEditor
~QETDiagramEditor() override
Definition: qetdiagrameditor.cpp:131
QETDiagramEditor::m_add_nomenclature
QAction * m_add_nomenclature
Add nomenclature graphics item;.
Definition: qetdiagrameditor.h:188
QETDiagramEditor::slot_updateUndoStack
void slot_updateUndoStack()
QETDiagramEditor::slot_updateUndoStack Update the undo stack view.
Definition: qetdiagrameditor.cpp:1486
QETDiagramEditor::setUpElementsCollectionWidget
void setUpElementsCollectionWidget()
QETDiagramEditor::setUpElementsCollectionWidget Set up the dock widget of element collection.
Definition: qetdiagrameditor.cpp:169
QETDiagramEditor::removeDiagramFromProject
void removeDiagramFromProject()
Definition: qetdiagrameditor.cpp:2149
QETDiagramEditor::openAndAddProject
bool openAndAddProject(const QString &, bool=true)
Definition: qetdiagrameditor.cpp:980
QETDiagramEditor::moveDiagramDown
void moveDiagramDown(Diagram *)
Definition: qetdiagrameditor.cpp:2070
QETDiagramEditor::removeDiagram
void removeDiagram(Diagram *)
Definition: qetdiagrameditor.cpp:2029
ProjectView::editElementRequired
void editElementRequired(const ElementsLocation &)
QETDiagramEditor::m_selection_properties_editor
DiagramPropertiesEditorDockWidget * m_selection_properties_editor
Definition: qetdiagrameditor.h:217
QETDiagramEditor::closeEvent
void closeEvent(QCloseEvent *) override
Definition: qetdiagrameditor.cpp:807
Diagram::changeZValue
void changeZValue(QET::DepthOption option)
Diagram::changeZValue Change the Z value of the current selected item, according to option.
Definition: diagram.cpp:1784
recentfiles.h
QET::Icons::EditText
QIcon EditText
Definition: qeticons.cpp:81
QETProject::filePath
QString filePath()
Definition: qetproject.cpp:250
QET::DepthOption
DepthOption
List the various kind of changes for the zValue.
Definition: qet.h:45
QETDiagramEditor::open_dialog_dir
QDir open_dialog_dir
Definition: qetdiagrameditor.h:211
QET::Icons::EditSelectNone
QIcon EditSelectNone
Definition: qeticons.cpp:72
QETDiagramEditor::activateDiagram
void activateDiagram(Diagram *)
Definition: qetdiagrameditor.cpp:1938
QetShapeItem::Polygon
@ Polygon
Definition: qetshapeitem.h:60
QET::Icons::EditSelectAll
QIcon EditSelectAll
Definition: qeticons.cpp:70
DiagramView::zoom
void zoom(const qreal zoom_factor)
DiagramView::zoom Zomm the view. A zoom_factor > 1 zoom in. A zoom_factor < 1 zoom out.
Definition: diagramview.cpp:294
QWidgetAnimation
The QWidgetAnimation class This class animate the show and hide function of a QWidget.
Definition: qwidgetanimation.h:46
QETDiagramEditor::m_project_export_conductor_num
QAction * m_project_export_conductor_num
Export the wire num to csv.
Definition: qetdiagrameditor.h:191
QETDiagramEditor::m_find_element
QAction * m_find_element
Find the selected element in the panel.
Definition: qetdiagrameditor.h:202
DiagramPropertiesEditorDockWidget::setDiagram
void setDiagram(Diagram *diagram)
DiagramPropertiesEditorDockWidget::setDiagram Set the diagram to edit the selection....
Definition: diagrampropertieseditordockwidget.cpp:41
QET::Icons::PartEllipse
QIcon PartEllipse
Definition: qeticons.cpp:129
DiagramView::zoomReset
void zoomReset()
Definition: diagramview.cpp:335
QETDiagramEditor::editProjectProperties
void editProjectProperties(ProjectView *)
Definition: qetdiagrameditor.cpp:1993
QETDiagramEditor::m_group_selected_texts
QAction * m_group_selected_texts
Definition: qetdiagrameditor.h:203
QET::Icons::ZoomDraw
QIcon ZoomDraw
Definition: qeticons.cpp:177
Element
Definition: element.h:41
QETDiagramEditor::pa
ElementsPanelWidget * pa
Elements panel.
Definition: qetdiagrameditor.h:219
Diagram::undoStack
QUndoStack & undoStack()
Diagram::undoStack.
Definition: diagram.h:397
QETDiagramEditor::addProjectView
void addProjectView(ProjectView *)
QETDiagramEditor::addProjectView Add a new project view to workspace and build the connection between...
Definition: qetdiagrameditor.cpp:1689
dialogwaiting.h
QET::Icons::QETLogo
QIcon QETLogo
Definition: qeticons.cpp:151
QET::Icons::TransformRotate
QIcon TransformRotate
Definition: qeticons.cpp:168
QET::Icons::EditRedo
QIcon EditRedo
Definition: qeticons.cpp:68
QETDiagramEditor::selectionGroupTriggered
void selectionGroupTriggered(QAction *action)
QETDiagramEditor::selectionGroupTriggered This slot is called when an action should be made on the cu...
Definition: qetdiagrameditor.cpp:1366
ElementsCollectionWidget::expandFirstItems
void expandFirstItems()
ElementsCollectionWidget::expandFirstItems Expand each first item in the tree view.
Definition: elementscollectionwidget.cpp:73
DiagramContent::hasDeletableItems
bool hasDeletableItems() const
DiagramContent::hasDeletableItems.
Definition: diagramcontent.cpp:190
BorderProperties::columns_count
int columns_count
Columns count.
Definition: borderproperties.h:46
QETResult::errorMessage
QString errorMessage() const
Definition: qetresult.cpp:61
QETDiagramEditor::undo_group
QUndoGroup undo_group
Definition: qetdiagrameditor.h:228
DiagramContent::count
int count(int=All) const
DiagramContent::count.
Definition: diagramcontent.cpp:401
AutoNumberingDockWidget::setProject
void setProject(QETProject *, ProjectView *)
AutoNumberingDockWidget::setProject.
Definition: autonumberingdockwidget.cpp:75
QETDiagramEditor::conductor_default
QAction * conductor_default
Show a dialog to edit default conductor properties.
Definition: qetdiagrameditor.h:179
DiagramEventAddImage::isNull
bool isNull() const
DiagramEventAddImage::isNull.
Definition: diagrameventaddimage.cpp:142
ElementsLocation
The ElementsLocation class This class represents the location, the location of an element or of a cat...
Definition: elementslocation.h:46
searchandreplacewidget.h
QET::Icons::ConfigureToolbars
QIcon ConfigureToolbars
Definition: qeticons.cpp:39
QETMainWindow::settings_menu_
QMenu * settings_menu_
Settings menu.
Definition: qetmainwindow.h:65
QETDiagramEditor::slot_updateModeActions
void slot_updateModeActions()
QETDiagramEditor::slot_updateModeActions Manage action who need an opened diagram or project to be up...
Definition: qetdiagrameditor.cpp:1638
QETDiagramEditor::viewForFile
ProjectView * viewForFile(const QString &) const
Definition: qetdiagrameditor.cpp:1762
QETDiagramEditor::openProject
bool openProject()
Definition: qetdiagrameditor.cpp:928
QETApp::instance
static QETApp * instance()
QETApp::instance.
Definition: qetapp.cpp:153
QETApp::projectsRecentFiles
static RecentFiles * projectsRecentFiles()
QETApp::projectsRecentFiles.
Definition: qetapp.cpp:1386
DiagramTextItem
Definition: diagramtextitem.h:34
QET::Icons::ZoomOriginal
QIcon ZoomOriginal
Definition: qeticons.cpp:180
DialogWaiting::instance
static DialogWaiting * instance(QWidget *parent=nullptr)
Definition: dialogwaiting.h:33
QETProject
Definition: qetproject.h:51
DiagramView::zoomContent
void zoomContent()
Definition: diagramview.cpp:327
QETDiagramEditor::m_remove_diagram_from_project
QAction * m_remove_diagram_from_project
Delete a diagram from the current project.
Definition: qetdiagrameditor.h:184
DiagramContent::m_element_texts
QSet< DynamicElementTextItem * > m_element_texts
Definition: diagramcontent.h:77
QETDiagramEditor::diagram_tool_bar
QToolBar * diagram_tool_bar
Definition: qetdiagrameditor.h:224
QETDiagramEditor::setWindowedMode
void setWindowedMode()
Definition: qetdiagrameditor.cpp:1883
QETDiagramEditor::m_paste
QAction * m_paste
Paste clipboard content on the current diagram.
Definition: qetdiagrameditor.h:177
qetgraphicstableitem.h
QETResult
Definition: qetresult.h:26
ProjectView
The ProjectView class This class provides a widget displaying the diagrams of a particular project us...
Definition: projectview.h:79
QETDiagramEditor::QETDiagramEditor
QETDiagramEditor(const QStringList &=QStringList(), QWidget *=nullptr)
QETDiagramEditor::QETDiagramEditor Constructor.
Definition: qetdiagrameditor.cpp:52
QETDiagramEditor::moveDiagramUpTop
void moveDiagramUpTop(Diagram *)
Definition: qetdiagrameditor.cpp:2089
QETDiagramEditor::m_windowed_view_mode
QAction * m_windowed_view_mode
Display projects as windows.
Definition: qetdiagrameditor.h:169
DiagramView::diagram
Diagram * diagram()
Definition: diagramview.h:67
QETDiagramEditor::addItemGroupTriggered
void addItemGroupTriggered(QAction *action)
QETDiagramEditor::addItemGroupTriggered This slot is called when an item must be added to the curent ...
Definition: qetdiagrameditor.cpp:1316
QETDiagramEditor::m_tabbed_view_mode
QAction * m_tabbed_view_mode
Actions related to file (open, close, save...)
Definition: qetdiagrameditor.h:168
DiagramContent::SelectedOnly
@ SelectedOnly
Definition: diagramcontent.h:66
QETDiagramEditor::m_zoom_actions_group
QActionGroup m_zoom_actions_group
Action related to adding (add text image shape...)
Definition: qetdiagrameditor.h:164
QETDiagramEditor
Definition: qetdiagrameditor.h:51
QET::Icons::ro
QIcon ro
Definition: qeticons.cpp:200
conductornumexport.h
QETDiagramEditor::m_print
QAction * m_print
Print diagrams of the current project.
Definition: qetdiagrameditor.h:173
QETDiagramEditor::qdw_undo
QDockWidget * qdw_undo
Definition: qetdiagrameditor.h:214
QETDiagramEditor::moveDiagramUp
void moveDiagramUp(Diagram *)
Definition: qetdiagrameditor.cpp:2051
QETDiagramEditor::m_rotate_selection
QAction * m_rotate_selection
Rotate selected elements and text items by 90 degrees.
Definition: qetdiagrameditor.h:200
QET::Icons::EditClear
QIcon EditClear
Definition: qeticons.cpp:62
QETDiagramEditor::newProject
bool newProject()
QETDiagramEditor::newProject Create a new project with an empty diagram.
Definition: qetdiagrameditor.cpp:900
QET::Vertical
@ Vertical
Vertical segment.
Definition: qet.h:90
QET::QetMessageBox::warning
QMessageBox::StandardButton warning(QWidget *, const QString &, const QString &, QMessageBox::StandardButtons=QMessageBox::Ok, QMessageBox::StandardButton=QMessageBox::NoButton)
Definition: qetmessagebox.cpp:68
QETDiagramEditor::diagramWasAdded
void diagramWasAdded(DiagramView *)
QETDiagramEditor::diagramWasAdded Manage the adding of diagram view in a project.
Definition: qetdiagrameditor.cpp:2163
QETDiagramEditor::setUpToolBar
void setUpToolBar()
QETDiagramEditor::setUpToolBar.
Definition: qetdiagrameditor.cpp:659
QETDiagramEditor::m_edit_diagram_properties
QAction * m_edit_diagram_properties
Show a dialog to edit diagram properties.
Definition: qetdiagrameditor.h:151
QETDiagramEditor::slot_updatePasteAction
void slot_updatePasteAction()
QETDiagramEditor::slot_updatePasteAction Gere les actions ayant besoin du presse-papier.
Definition: qetdiagrameditor.cpp:1675
ElementsCollectionWidget::highlightUnusedElement
void highlightUnusedElement()
ElementsCollectionWidget::highlightUnusedElement highlight the unused element.
Definition: elementscollectionwidget.cpp:111
QETDiagramEditor::slot_updateAutoNumDock
void slot_updateAutoNumDock()
QETDiagramEditor::slot_updateAutoNumDock Update Auto Num Dock Widget when changing Project.
Definition: qetdiagrameditor.cpp:1473
QetShapeItem::Line
@ Line
Definition: qetshapeitem.h:57
DiagramContent::selectedTexts
QList< DiagramTextItem * > selectedTexts() const
DiagramContent::selectedTexts.
Definition: diagramcontent.cpp:130
QETDiagramEditor::generateTerminalBlock
void generateTerminalBlock()
QETDiagramEditor::generateTerminalBlock.
Definition: qetdiagrameditor.cpp:2251
QET::Icons::DiagramAdd
QIcon DiagramAdd
Definition: qeticons.cpp:42
QET::Icons::EditPaste
QIcon EditPaste
Definition: qeticons.cpp:67
QETDiagramEditor::m_search_and_replace_widget
SearchAndReplaceWidget m_search_and_replace_widget
Definition: qetdiagrameditor.h:232
QET::Icons::DocumentSave
QIcon DocumentSave
Definition: qeticons.cpp:58
QETDiagramEditor::m_mode_selection
QAction * m_mode_selection
Set edition mode.
Definition: qetdiagrameditor.h:170
QETDiagramEditor::save
void save()
QETDiagramEditor::save Ask the current active project to save.
Definition: qetdiagrameditor.cpp:853
QET::Icons::PartLine
QIcon PartLine
Definition: qeticons.cpp:130
QETDiagramEditor::m_auto_conductor
QAction * m_auto_conductor
Enable/Disable the use of auto conductor.
Definition: qetdiagrameditor.h:178
DiagramContent::Shapes
@ Shapes
Definition: diagramcontent.h:62
qetdiagrameditor.h
DiagramContent::items
QList< QGraphicsItem * > items(int=All) const
DiagramContent::items.
Definition: diagramcontent.cpp:374
QETDiagramEditor::m_row_column_actions_group
QActionGroup m_row_column_actions_group
Definition: qetdiagrameditor.h:156
ConductorTextItem::Type
@ Type
Definition: conductortextitem.h:42
QETDiagramEditor::m_zoom_action_toolBar
QList< QAction * > m_zoom_action_toolBar
Definition: qetdiagrameditor.h:198
QETDiagramEditor::drawGrid
bool drawGrid() const
QETDiagramEditor::drawGrid.
Definition: qetdiagrameditor.cpp:1783
DiagramEventAddText
The DiagramEventAddText class This diagram event handle the creation of a new text in a diagram.
Definition: diagrameventaddtext.h:30
QET::QetMessageBox::critical
QMessageBox::StandardButton critical(QWidget *, const QString &, const QString &, QMessageBox::StandardButtons=QMessageBox::Ok, QMessageBox::StandardButton=QMessageBox::NoButton)
Definition: qetmessagebox.cpp:23
dynamicelementtextitem.h
QET::Icons::EditTableInsertColumnRight
QIcon EditTableInsertColumnRight
Definition: qeticons.cpp:78
QETDiagramEditor::m_save_file_as
QAction * m_save_file_as
Save current project as a specific file.
Definition: qetdiagrameditor.h:206
DiagramView
Definition: diagramview.h:38
QETDiagramEditor::findProject
ProjectView * findProject(DiagramView *) const
Definition: qetdiagrameditor.cpp:1193
QET::Icons::DiagramBg
QIcon DiagramBg
Definition: qeticons.cpp:44
QETDiagramEditor::m_edit_selection
QAction * m_edit_selection
To edit selected item.
Definition: qetdiagrameditor.h:197
QETDiagramEditor::windowMapper
QSignalMapper windowMapper
Definition: qetdiagrameditor.h:210
QETDiagramEditor::m_close_file
QAction * m_close_file
Close current project file.
Definition: qetdiagrameditor.h:204
QETDiagramEditor::reloadOldElementPanel
void reloadOldElementPanel()
Definition: qetdiagrameditor.cpp:2142
QETDiagramEditor::m_csv_export
QAction * m_csv_export
generate nomenclature
Definition: qetdiagrameditor.h:187
QETDiagramEditor::m_tile_window
QAction * m_tile_window
Export to file the internal database of the current project.
Definition: qetdiagrameditor.h:193
DiagramEventAddImage
The DiagramEventAddImage class This diagram event, handle the adding of an image in a diagram.
Definition: diagrameventaddimage.h:31
QETDiagramEditor::setUpElementsPanel
void setUpElementsPanel()
QETDiagramEditor::setUpElementsPanel Setup the element panel and element panel widget.
Definition: qetdiagrameditor.cpp:138
QET::Icons::PartPolygon
QIcon PartPolygon
Definition: qeticons.cpp:131
QETDiagramEditor::readSettings
void readSettings()
QETDiagramEditor::readSettings Read the settings.
Definition: qetdiagrameditor.cpp:1902
QETDiagramEditor::m_cut
QAction * m_cut
Cut selection to clipboard.
Definition: qetdiagrameditor.h:153
QETDiagramEditor::m_project_terminalBloc
QAction * m_project_terminalBloc
generate terminal block
Definition: qetdiagrameditor.h:190
DiagramEventInterface
The DiagramEventInterface class isRunning() return true if action is running (do something)....
Definition: diagrameventinterface.h:46
QET::Icons::DocumentOpenRecent
QIcon DocumentOpenRecent
Definition: qeticons.cpp:55
Diagram::selectedConductors
QSet< Conductor * > selectedConductors() const
Diagram::selectedConductors.
Definition: diagram.cpp:2297
QETDiagramEditor::m_project_add_diagram
QAction * m_project_add_diagram
Add a diagram to the current project.
Definition: qetdiagrameditor.h:183
qetgraphicstablefactory.h
QET::Icons::EditDelete
QIcon EditDelete
Definition: qeticons.cpp:66
QETDiagramEditor::m_clean_project
QAction * m_clean_project
Clean the content of the curent project by removing useless items.
Definition: qetdiagrameditor.h:185
QETProject::FileOpenDiscard
@ FileOpenDiscard
the parsing of the XML content failed
Definition: qetproject.h:61
RotateTextsCommand
The RotateTextsCommand class Open a dialog for edit the rotation of the current selected texts and te...
Definition: rotatetextscommand.h:34
DiagramContent::Elements
@ Elements
Definition: diagramcontent.h:54
QETDiagramEditor::m_grey_background
QAction * m_grey_background
Switch the background color in white or grey.
Definition: qetdiagrameditor.h:180
DiagramView::zoomFit
void zoomFit()
Definition: diagramview.cpp:318
ElementsPanelWidget
The ElementsPanelWidget class This class embeds an elements panel under a toolbar providing various a...
Definition: elementspanelwidget.h:29
QET::Icons::Autoconnect
QIcon Autoconnect
Definition: qeticons.cpp:32
QETProject::state
ProjectState state() const
Definition: qetproject.cpp:210
QETDiagramEditor::m_conductor_reset
QAction * m_conductor_reset
Reset paths of selected conductors.
Definition: qetdiagrameditor.h:152
ProjectView::findElementRequired
void findElementRequired(const ElementsLocation &)
QET::Icons::ViewMove
QIcon ViewMove
Definition: qeticons.cpp:172
QETDiagramEditor::slot_updateWindowsMenu
void slot_updateWindowsMenu()
Definition: qetdiagrameditor.cpp:1818
QETProject::Ok
@ Ok
Definition: qetproject.h:56
QETDiagramEditor::m_select_actions_group
QActionGroup m_select_actions_group
Action related to zoom for diagram.
Definition: qetdiagrameditor.h:165
diagrameventaddtext.h
QETDiagramEditor::m_qdw_elmt_collection
QDockWidget * m_qdw_elmt_collection
Dock for the elements panel.
Definition: qetdiagrameditor.h:213
QETDiagramEditor::openedProjects
QList< ProjectView * > openedProjects() const
Definition: qetdiagrameditor.cpp:1114
QETDiagramEditor::event
bool event(QEvent *) override
QETDiagramEditor::event Reimplemented to : -Load elements collection when WindowActivate.
Definition: qetdiagrameditor.cpp:839
QETDiagramEditor::openBackupFiles
void openBackupFiles(QList< KAutoSaveFile * > backup_files)
QETDiagramEditor::openBackupFiles.
Definition: qetdiagrameditor.cpp:1791
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
QETDiagramEditor::m_copy
QAction * m_copy
Copy selection to clipboard.
Definition: qetdiagrameditor.h:154
QET::Icons::EditCut
QIcon EditCut
Definition: qeticons.cpp:65
QETDiagramEditor::saveAs
void saveAs()
QETDiagramEditor::saveAs Ask the current active project to save as.
Definition: qetdiagrameditor.cpp:877
QETDiagramEditor::subWindowForWidget
QMdiSubWindow * subWindowForWidget(QWidget *) const
Definition: qetdiagrameditor.cpp:1252
QETDiagramEditor::m_add_item_actions_group
QActionGroup m_add_item_actions_group
Definition: qetdiagrameditor.h:163
QETDiagramEditor::m_element_collection_widget
ElementsCollectionWidget * m_element_collection_widget
Dock for the undo list.
Definition: qetdiagrameditor.h:215
QET::Icons::DiagramDelete
QIcon DiagramDelete
Definition: qeticons.cpp:45
QETDiagramEditor::currentProjectView
ProjectView * currentProjectView() const
Definition: qetdiagrameditor.cpp:1129
QETDiagramEditor::view_tool_bar
QToolBar * view_tool_bar
Definition: qetdiagrameditor.h:223
QET::Icons::DocumentSaveAs
QIcon DocumentSaveAs
Definition: qeticons.cpp:60
ChangeBorderCommand
The ChangeBorderCommand class This command changes the border properties of a particular diagram.
Definition: diagramcommands.h:306
QETDiagramEditor::m_project_folio_list
QAction * m_project_folio_list
Sommaire des schemas.
Definition: qetdiagrameditor.h:186
QET::Icons::resize_image
QIcon resize_image
Definition: qeticons.cpp:183
QETDiagramEditor::qdw_pa
QDockWidget * qdw_pa
Directory to use for file dialogs such as File > save.
Definition: qetdiagrameditor.h:212
QET::Icons::ApplicationExit
QIcon ApplicationExit
Definition: qeticons.cpp:27
QET::Icons::EditTableDeleteRow
QIcon EditTableDeleteRow
Definition: qeticons.cpp:76
ElementsCollectionWidget::addProject
void addProject(QETProject *project)
ElementsCollectionWidget::addProject Add project to be displayed.
Definition: elementscollectionwidget.cpp:87
QET::Icons::adding_image
QIcon adding_image
Definition: qeticons.cpp:182