QETDiagramEditor : clean some code

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3571 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-12-26 19:41:00 +00:00
parent f93b0817d6
commit a3525b466d
2 changed files with 245 additions and 258 deletions

View File

@@ -44,10 +44,12 @@
#include <QMessageBox>
/**
constructeur
@param files Liste de fichiers a ouvrir
@param parent le widget parent de la fenetre principale
* @brief QETDiagramEditor::QETDiagramEditor
* Constructor
* @param files, list of files to open
* @param parent, parent widget
*/
QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) :
QETMainWindow(parent),
@@ -59,10 +61,10 @@ QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) :
m_file_actions_group (this),
open_dialog_dir (QDesktopServices::storageLocation(QDesktopServices::DesktopLocation))
{
// mise en place de l'interface MDI au centre de l'application
//Setup the mdi area at center of application
setCentralWidget(&workspace);
// nomme l'objet afin qu'il soit reperable par les feuilles de style
//Set object name to be retrieved by the stylesheets
workspace.setBackground(QBrush(Qt::NoBrush));
workspace.setObjectName("mdiarea");
@@ -70,16 +72,11 @@ QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) :
workspace.setTabsClosable(true);
#endif
// mise en place du signalmapper
//Set the signal mapper
connect(&windowMapper, SIGNAL(mapped(QWidget *)), this, SLOT(activateWidget(QWidget *)));
// titre de la fenetre
setWindowTitle(tr("QElectroTech", "window title"));
// icone de la fenetre
setWindowIcon(QET::Icons::QETLogo);
// barre de statut de la fenetre
statusBar() -> showMessage(tr("QElectroTech", "status bar message"));
setUpElementsPanel();
@@ -90,38 +87,28 @@ QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) :
tabifyDockWidget(qdw_undo, qdw_pa);
// la fenetre est maximisee par defaut
//By default the windows is maximised
setMinimumSize(QSize(500, 350));
setWindowState(Qt::WindowMaximized);
// connexions signaux / slots pour une interface sensee
connect (&workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(slot_updateWindowsMenu()));
connect (&workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(slot_updateUndoStack()));
connect (&workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(subWindowActivated(QMdiSubWindow*)));
connect (QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(slot_updatePasteAction()));
connect (&undo_group, SIGNAL(cleanChanged(bool)), this, SLOT(activeUndoStackCleanChanged(bool)));
// lecture des parametres
readSettings();
// affichage
show();
// si des chemins de fichiers valides sont passes en arguments
//If valid file path is given as arguments
uint opened_projects = 0;
if (files.count()) {
// alors on ouvre ces fichiers
foreach(QString file, files) {
bool project_opening = openAndAddProject(file, false);
if (project_opening) {
if (files.count())
{
//So we open this files
foreach(QString file, files)
if (openAndAddProject(file, false))
++ opened_projects;
}
}
}
slot_updateActions();
// si aucun schema n'a ete ouvert jusqu'a maintenant, on ouvre un nouveau schema
//if (!opened_projects) newProject();
}
/**
@@ -1155,38 +1142,36 @@ void QETDiagramEditor::slot_setVisualisationMode() {
}
/**
gere les actions
*/
void QETDiagramEditor::slot_updateActions() {
* @brief QETDiagramEditor::slot_updateActions
* Manage actions
*/
void QETDiagramEditor::slot_updateActions()
{
DiagramView *dv = currentDiagram();
ProjectView *pv = currentProject();
bool opened_project = pv;
bool opened_diagram = dv;
bool editable_project = (pv && !pv -> project() -> isReadOnly());
bool editable_diagram = (dv && !dv -> diagram() -> isReadOnly());
// actions ayant juste besoin d'un document ouvert
close_file -> setEnabled(opened_project);
save_file -> setEnabled(editable_project && undo_group.activeStack()->count());
save_file_as -> setEnabled(opened_project);
prj_edit_prop -> setEnabled(opened_project);
prj_add_diagram -> setEnabled(editable_project);
//prj_add_diagram_foliolist -> setEnabled(editable_project);
prj_del_diagram -> setEnabled(editable_project);
prj_clean -> setEnabled(editable_project);
prj_diagramList -> setEnabled(opened_project);
prj_nomenclature -> setEnabled(editable_project);
export_diagram -> setEnabled(opened_diagram);
print -> setEnabled(opened_diagram);
infos_diagram -> setEnabled(opened_diagram);
prj_nomenclature -> setEnabled(editable_project);
m_zoom_actions_group.setEnabled(opened_diagram);
m_select_actions_group.setEnabled(opened_diagram);
m_add_item_actions_group.setEnabled(editable_diagram);
m_row_column_actions_group.setEnabled(editable_diagram);
close_file -> setEnabled(opened_project);
save_file_as -> setEnabled(opened_project);
prj_edit_prop -> setEnabled(opened_project);
prj_add_diagram -> setEnabled(editable_project);
prj_del_diagram -> setEnabled(editable_project);
prj_clean -> setEnabled(editable_project);
prj_diagramList -> setEnabled(opened_project);
prj_nomenclature -> setEnabled(editable_project);
export_diagram -> setEnabled(opened_diagram);
print -> setEnabled(opened_diagram);
infos_diagram -> setEnabled(opened_diagram);
prj_nomenclature -> setEnabled(editable_project);
m_zoom_actions_group. setEnabled(opened_diagram);
m_select_actions_group. setEnabled(opened_diagram);
m_add_item_actions_group. setEnabled(editable_project);
m_row_column_actions_group.setEnabled(editable_project);
slot_updateUndoStack();
slot_updateModeActions();
slot_updatePasteAction();
slot_updateComplexActions();
@@ -1196,13 +1181,17 @@ void QETDiagramEditor::slot_updateActions() {
* @brief QETDiagramEditor::slot_updateUndoStack
* Update the undo stack view
*/
void QETDiagramEditor::slot_updateUndoStack() {
void QETDiagramEditor::slot_updateUndoStack()
{
ProjectView *pv = currentProject();
if (pv) {
if (pv)
{
undo_group.setActiveStack(pv->project()->undoStack());
undo -> setEnabled (undo_group.canUndo());
redo -> setEnabled (undo_group.canRedo());
save_file -> setEnabled (undo_group.activeStack()->count() && !pv -> project() -> isReadOnly());
save_file -> setEnabled (undo_group.activeStack() -> count() && !pv -> project() -> isReadOnly());
}
else
{
save_file -> setDisabled(true);
}
}
@@ -1308,63 +1297,46 @@ void QETDiagramEditor::slot_updatePasteAction() {
}
/**
Ajoute un projet dans l'espace de travail
@param project_view Le projet a ajouter dans l'espace de travail
*/
void QETDiagramEditor::addProjectView(ProjectView *project_view) {
* @brief QETDiagramEditor::addProjectView
* Add a new project view to workspace and
* build the connection between the projectview / project and this QETDiagramEditor.
* @param project_view, project view to add
*/
void QETDiagramEditor::addProjectView(ProjectView *project_view)
{
if (!project_view) return;
// on maximise la nouvelle fenetre si la fenetre en cours est inexistante ou bien maximisee
QWidget *current_window = workspace.activeSubWindow();
bool maximise = ((!current_window) || (current_window -> windowState() & Qt::WindowMaximized));
foreach(DiagramView *dv, project_view -> diagrams())
diagramWasAdded(dv);
// ajoute la fenetre
//Manage the close event of project
connect(project_view, SIGNAL(projectClosed(ProjectView*)), this, SLOT(projectWasClosed(ProjectView *)));
//Manage the adding of diagram
connect(project_view, SIGNAL(diagramAdded(DiagramView *)), this, SLOT(diagramWasAdded(DiagramView *)));
if (QETProject *project = project_view -> project())
connect(project, SIGNAL(readOnlyChanged(QETProject *, bool)), this, SLOT(slot_updateActions()));
//Manage request for edit or find element and titleblock
connect(project_view, SIGNAL(findElementRequired(const ElementsLocation &)), this, SLOT(findElementInPanel(const ElementsLocation &)));
connect(project_view, SIGNAL(editElementRequired(const ElementsLocation &)), this, SLOT(editElementInEditor(const ElementsLocation &)));
connect(project_view, SIGNAL(editTitleBlockTemplate(const TitleBlockTemplateLocation &, bool)), QETApp::instance(), SLOT(openTitleBlockTemplate(TitleBlockTemplateLocation, bool)));
// display error messages sent by the project view
connect(project_view, SIGNAL(errorEncountered(QString)), this, SLOT(showError(const QString &)));
//We maximise the new window if the current window is inexistent or maximized
QWidget *current_window = workspace.activeSubWindow();
bool maximise = ((!current_window) || (current_window -> windowState() & Qt::WindowMaximized));
//Add the new window
QMdiSubWindow *sub_window = workspace.addSubWindow(project_view);
sub_window -> setWindowIcon(project_view -> windowIcon());
sub_window -> systemMenu() -> clear();
// lie les schemas du projet a l'editeur :
// quand on change de schemas a l'interieur d'un projet, on met a jour les menus
connect(project_view, SIGNAL(diagramActivated(DiagramView *)), this, SLOT(slot_updateWindowsMenu()));
connect(project_view, SIGNAL(diagramActivated(DiagramView *)), this, SLOT(slot_updateActions()));
//connect(project_view->project(), SIGNAL(projectModified(QETProject*,bool)), save_file, SLOT(setEnabled(bool)));
foreach(DiagramView *dv, project_view -> diagrams()) {
diagramWasAdded(dv);
}
// gere la fermeture du projet
connect(project_view, SIGNAL(projectClosed(ProjectView*)), this, SLOT(projectWasClosed(ProjectView *)));
// gere l'ajout et le retrait de schema du projet
connect(project_view, SIGNAL(diagramAdded(DiagramView *)), this, SLOT(diagramWasAdded(DiagramView *)));
connect(project_view, SIGNAL(diagramAdded(DiagramView *)), this, SLOT(slot_updateActions()));
connect(project_view, SIGNAL(diagramRemoved(DiagramView *)), this, SLOT(slot_updateActions()));
if (QETProject *project = project_view -> project()) {
// on met aussi les menus a jour quand un projet passe en lecture seule ou non
connect(project, SIGNAL(readOnlyChanged(QETProject *, bool)), this, SLOT(slot_updateActions()));
}
// gere les demandes consistant a retrouver un element dans le panel
connect(project_view, SIGNAL(findElementRequired(const ElementsLocation &)), this, SLOT(findElementInPanel(const ElementsLocation &)));
// gere les demandes pour l'edition d'un element
connect(project_view, SIGNAL(editElementRequired(const ElementsLocation &)), this, SLOT(editElementInEditor(const ElementsLocation &)));
// handles requests to edit and/or duplicate an existing title block template
connect(
project_view, SIGNAL(editTitleBlockTemplate(const TitleBlockTemplateLocation &, bool)),
QETApp::instance(), SLOT(openTitleBlockTemplate(TitleBlockTemplateLocation, bool))
);
// display error messages sent by the project view
connect(project_view, SIGNAL(errorEncountered(QString)), this, SLOT(showError(const QString &)));
// affiche la fenetre
//Display the new window
if (maximise) project_view -> showMaximized();
else project_view -> show();
slot_updateActions();
else project_view -> show();
}
/**
@@ -1912,14 +1884,15 @@ void QETDiagramEditor::removeDiagramFromProject() {
}
/**
Gere l'ajout d'un schema dans un projet
@param dv DiagramView concerne
*/
void QETDiagramEditor::diagramWasAdded(DiagramView *dv) {
// quand on change qqc a l'interieur d'un schema, on met a jour les menus
connect(dv, SIGNAL(selectionChanged()), this, SLOT(slot_updateComplexActions()));
connect(dv, SIGNAL(modeChanged()), this, SLOT(slot_updateModeActions()));
connect(dv, SIGNAL(itemAdded()), this, SLOT(addItemFinish()));
* @brief QETDiagramEditor::diagramWasAdded
* Manage the adding of diagram view in a project
* @param dv, added diagram view
*/
void QETDiagramEditor::diagramWasAdded(DiagramView *dv)
{
connect(dv, SIGNAL(selectionChanged()), this, SLOT(slot_updateComplexActions()));
connect(dv, SIGNAL(modeChanged()), this, SLOT(slot_updateModeActions()));
connect(dv, SIGNAL(itemAdded()), this, SLOT(addItemFinish()));
}
/**
@@ -2014,6 +1987,19 @@ void QETDiagramEditor::addItemFinish() {
m_add_item_actions_group.checkedAction()->setChecked(false);
}
/**
* @brief QETDiagramEditor::subWindowActivated
* Slot used to update menu and undo stack when subwindows of MDIarea was activated
* @param subWindows
*/
void QETDiagramEditor::subWindowActivated(QMdiSubWindow *subWindows)
{
Q_UNUSED(subWindows);
slot_updateActions();
slot_updateWindowsMenu();
}
/**
* @brief QETDiagramEditor::activeUndoStackCleanChanged
* Enable the QAction save_file when @clean is set to false

View File

@@ -79,158 +79,159 @@ class QETDiagramEditor : public QETMainWindow {
QMdiSubWindow *subWindowForWidget(QWidget *) const;
public slots:
void printDialog();
void exportDialog();
void save();
void saveAs();
bool newProject();
bool openProject();
bool openRecentFile(const QString &);
bool closeProject(ProjectView *);
bool closeProject(QETProject *);
bool closeCurrentProject();
void slot_cut();
void slot_copy();
void slot_paste();
void slot_zoomIn();
void slot_zoomOut();
void slot_zoomFit();
void slot_zoomContent();
void slot_zoomReset();
void slot_selectAll();
void slot_selectNothing();
void slot_selectInvert();
void slot_delete();
void slot_rotate();
void slot_rotateTexts();
void slot_setSelectionMode();
void slot_setVisualisationMode();
void slot_updateActions();
void slot_updateUndoStack();
void slot_updateModeActions();
void slot_updateComplexActions();
void slot_updatePasteAction();
void slot_updateWindowsMenu();
void slot_addColumn();
void slot_removeColumn();
void slot_addRow();
void slot_removeRow();
void editSelectionProperties();
void slot_resetConductors();
void slot_addText();
void slot_addImage();
void slot_addLine();
void slot_addRectangle();
void slot_addEllipse();
void slot_addPolyline();
void slot_editSelection();
void setWindowedMode();
void setTabbedMode();
void readSettings();
void writeSettings();
void activateDiagram(Diagram *);
void activateProject(QETProject *);
void activateProject(ProjectView *);
void activateWidget(QWidget *);
void projectWasClosed(ProjectView *);
void editCurrentProjectProperties();
void editProjectProperties(ProjectView *);
void editProjectProperties(QETProject *);
void editCurrentDiagramProperties();
void editDiagramProperties(DiagramView *);
void editDiagramProperties(Diagram *);
void addDiagramToProject();
void addDiagramFolioListToProject();
void addDiagramToProject(QETProject *);
void removeDiagram(Diagram *);
void removeDiagramFromProject();
void moveDiagramUp(Diagram *);
void moveDiagramDown(Diagram *);
void moveDiagramUpx10(Diagram *);
void moveDiagramDownx10(Diagram *);
void cleanCurrentProject();
void nomenclatureProject();
void diagramWasAdded(DiagramView *);
void findElementInPanel(const ElementsLocation &);
void findSelectedElementInPanel();
void editElementInEditor(const ElementsLocation &);
void editSelectedElementInEditor();
void showError(const QETResult &);
void showError(const QString &);
void addItemFinish();
void printDialog();
void exportDialog();
void save();
void saveAs();
bool newProject();
bool openProject();
bool openRecentFile(const QString &);
bool closeProject(ProjectView *);
bool closeProject(QETProject *);
bool closeCurrentProject();
void slot_cut();
void slot_copy();
void slot_paste();
void slot_zoomIn();
void slot_zoomOut();
void slot_zoomFit();
void slot_zoomContent();
void slot_zoomReset();
void slot_selectAll();
void slot_selectNothing();
void slot_selectInvert();
void slot_delete();
void slot_rotate();
void slot_rotateTexts();
void slot_setSelectionMode();
void slot_setVisualisationMode();
void slot_updateActions();
void slot_updateUndoStack();
void slot_updateModeActions();
void slot_updateComplexActions();
void slot_updatePasteAction();
void slot_updateWindowsMenu();
void slot_addColumn();
void slot_removeColumn();
void slot_addRow();
void slot_removeRow();
void editSelectionProperties();
void slot_resetConductors();
void slot_addText();
void slot_addImage();
void slot_addLine();
void slot_addRectangle();
void slot_addEllipse();
void slot_addPolyline();
void slot_editSelection();
void setWindowedMode();
void setTabbedMode();
void readSettings();
void writeSettings();
void activateDiagram(Diagram *);
void activateProject(QETProject *);
void activateProject(ProjectView *);
void activateWidget(QWidget *);
void projectWasClosed(ProjectView *);
void editCurrentProjectProperties();
void editProjectProperties(ProjectView *);
void editProjectProperties(QETProject *);
void editCurrentDiagramProperties();
void editDiagramProperties(DiagramView *);
void editDiagramProperties(Diagram *);
void addDiagramToProject();
void addDiagramFolioListToProject();
void addDiagramToProject(QETProject *);
void removeDiagram(Diagram *);
void removeDiagramFromProject();
void moveDiagramUp(Diagram *);
void moveDiagramDown(Diagram *);
void moveDiagramUpx10(Diagram *);
void moveDiagramDownx10(Diagram *);
void cleanCurrentProject();
void nomenclatureProject();
void diagramWasAdded(DiagramView *);
void findElementInPanel(const ElementsLocation &);
void findSelectedElementInPanel();
void editElementInEditor(const ElementsLocation &);
void editSelectedElementInEditor();
void showError(const QETResult &);
void showError(const QString &);
void addItemFinish();
void subWindowActivated(QMdiSubWindow *subWindows);
private slots:
void activeUndoStackCleanChanged (bool clean);
void activeUndoStackCleanChanged (bool clean);
// attributes
// attributes
public:
// Actions reachable through menus within QElectroTech
QActionGroup *grp_visu_sel; ///< Action group for visualisation vs edition mode
QActionGroup *grp_view_mode; ///< Action group for project
QAction *tabbed_view_mode; ///< Display projects as tabs
QAction *windowed_view_mode; ///< Display projects as windows
QAction *mode_selection; ///< Set edition mode
QAction *mode_visualise; ///< Set visualisation mode
QAction *export_diagram; ///< Export diagrams of the current project as imagess
QAction *print; ///< Print diagrams of the current project
QAction *quit_editor; ///< Quit the diagram editor
QAction *undo; ///< Cancel the latest action
QAction *redo; ///< Redo the latest cancelled operation
QAction *cut; ///< Cut selection to clipboard
QAction *copy; ///< Copy selection to clipboard
QAction *paste; ///< Paste clipboard content on the current diagram
QAction *conductor_reset; ///< Reset paths of selected conductors
QAction *conductor_default; ///< Show a dialog to edit default conductor properties
QAction *infos_diagram; ///< Show a dialog to edit diagram properties
QAction *prj_edit_prop; ///< Edit the properties of the current project.
QAction *prj_add_diagram; ///< Add a diagram to the current project.
QAction *prj_del_diagram; ///< Delete a diagram from the current project
QAction *prj_clean; ///< Clean the content of the curent project by removing useless items
QAction *prj_diagramList; ///< Sommaire des schemas
QAction *prj_nomenclature; ///< generate nomenclature
QAction *tile_window; ///< Show MDI subwindows as tile
QAction *cascade_window; ///< Show MDI subwindows as cascade
QAction *prev_window; ///< Switch to the previous document
QAction *next_window; ///< Switch to the next document
QAction *edit_selection; ///< To edit selected item
// Actions reachable through menus within QElectroTech
QActionGroup *grp_visu_sel; ///< Action group for visualisation vs edition mode
QActionGroup *grp_view_mode; ///< Action group for project
QAction *tabbed_view_mode; ///< Display projects as tabs
QAction *windowed_view_mode; ///< Display projects as windows
QAction *mode_selection; ///< Set edition mode
QAction *mode_visualise; ///< Set visualisation mode
QAction *export_diagram; ///< Export diagrams of the current project as imagess
QAction *print; ///< Print diagrams of the current project
QAction *quit_editor; ///< Quit the diagram editor
QAction *undo; ///< Cancel the latest action
QAction *redo; ///< Redo the latest cancelled operation
QAction *cut; ///< Cut selection to clipboard
QAction *copy; ///< Copy selection to clipboard
QAction *paste; ///< Paste clipboard content on the current diagram
QAction *conductor_reset; ///< Reset paths of selected conductors
QAction *conductor_default; ///< Show a dialog to edit default conductor properties
QAction *infos_diagram; ///< Show a dialog to edit diagram properties
QAction *prj_edit_prop; ///< Edit the properties of the current project.
QAction *prj_add_diagram; ///< Add a diagram to the current project.
QAction *prj_del_diagram; ///< Delete a diagram from the current project
QAction *prj_clean; ///< Clean the content of the curent project by removing useless items
QAction *prj_diagramList; ///< Sommaire des schemas
QAction *prj_nomenclature; ///< generate nomenclature
QAction *tile_window; ///< Show MDI subwindows as tile
QAction *cascade_window; ///< Show MDI subwindows as cascade
QAction *prev_window; ///< Switch to the previous document
QAction *next_window; ///< Switch to the next document
QAction *edit_selection; ///< To edit selected item
QActionGroup m_add_item_actions_group; ///Action related to adding (add text image shape...)
QActionGroup m_add_item_actions_group; ///Action related to adding (add text image shape...)
QActionGroup m_zoom_actions_group; ///Action related to zoom for diagram
QList <QAction *> m_zoom_action_toolBar; ///Only zoom action must displayed in the toolbar
QActionGroup m_zoom_actions_group; ///Action related to zoom for diagram
QList <QAction *> m_zoom_action_toolBar; ///Only zoom action must displayed in the toolbar
QActionGroup m_select_actions_group; ///Action related to global selections
QActionGroup m_select_actions_group; ///Action related to global selections
QActionGroup m_selection_actions_group; ///Action related to edit a selected item
QAction *delete_selection; ///< Delete selection
QAction *rotate_selection; ///< Rotate selected elements and text items by 90 degrees
QAction *rotate_texts; ///< Direct selected text items to a specific angle
QAction *find_element; ///< Find the selected element in the panel
QAction *selection_prop; ///< Show a dialog describing the selection
QActionGroup m_selection_actions_group; ///Action related to edit a selected item
QAction *delete_selection; ///< Delete selection
QAction *rotate_selection; ///< Rotate selected elements and text items by 90 degrees
QAction *rotate_texts; ///< Direct selected text items to a specific angle
QAction *find_element; ///< Find the selected element in the panel
QAction *selection_prop; ///< Show a dialog describing the selection
QActionGroup m_row_column_actions_group; /// Action related to add/remove rows/column in diagram
QActionGroup m_row_column_actions_group; /// Action related to add/remove rows/column in diagram
QActionGroup m_file_actions_group; ///Actions related to file (open, close, save...)
QAction *close_file; ///< Close current project file
QAction *save_file; ///< Save current project
QAction *save_file_as; ///< Save current project as a specific file
QActionGroup m_file_actions_group; ///Actions related to file (open, close, save...)
QAction *close_file; ///< Close current project file
QAction *save_file; ///< Save current project
QAction *save_file_as; ///< Save current project as a specific file
private:
QMdiArea workspace;
QSignalMapper windowMapper;
/// Directory to use for file dialogs such as File > save
QDir open_dialog_dir;
/// Dock for the elements panel
QDockWidget *qdw_pa;
/// Dock for the undo list
QDockWidget *qdw_undo;
/// Elements panel
ElementsPanelWidget *pa;
QMenu *windows_menu;
QToolBar *main_bar;
QToolBar *view_bar;
QToolBar *diagram_bar;
QToolBar *m_add_item_toolBar;
QUndoGroup undo_group;
QMdiArea workspace;
QSignalMapper windowMapper;
/// Directory to use for file dialogs such as File > save
QDir open_dialog_dir;
/// Dock for the elements panel
QDockWidget *qdw_pa;
/// Dock for the undo list
QDockWidget *qdw_undo;
/// Elements panel
ElementsPanelWidget *pa;
QMenu *windows_menu;
QToolBar *main_bar;
QToolBar *view_bar;
QToolBar *diagram_bar;
QToolBar *m_add_item_toolBar;
QUndoGroup undo_group;
};
#endif