2007-09-21 12:35:28 +00:00
|
|
|
|
#ifndef QET_DIAGRAM_EDITOR_H
|
|
|
|
|
#define QET_DIAGRAM_EDITOR_H
|
2007-04-12 03:13:13 +00:00
|
|
|
|
#include <QtGui>
|
|
|
|
|
class DiagramView;
|
|
|
|
|
class ElementsPanelWidget;
|
|
|
|
|
/**
|
|
|
|
|
Cette classe represente la fenetre principale de QElectroTech et,
|
|
|
|
|
ipso facto, la plus grande partie de l'interface graphique de QElectroTech.
|
|
|
|
|
Il s'agit d'un objet QMainWindow avec un QWorkSpace contenant des objets
|
|
|
|
|
<EFBFBD> Diagram <EFBFBD> en guise de widget central et un <EFBFBD> Panel d'Appareils <EFBFBD> en guise
|
|
|
|
|
de widget <EFBFBD> Dock <EFBFBD>.
|
|
|
|
|
*/
|
2007-09-21 12:35:28 +00:00
|
|
|
|
class QETDiagramEditor : public QMainWindow {
|
2007-04-12 03:13:13 +00:00
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
// constructeurs, destructeur
|
|
|
|
|
public:
|
2007-09-22 13:27:14 +00:00
|
|
|
|
QETDiagramEditor(const QStringList & = QStringList(), QWidget * = 0);
|
2007-09-21 12:35:28 +00:00
|
|
|
|
virtual ~QETDiagramEditor();
|
2007-04-12 03:13:13 +00:00
|
|
|
|
|
|
|
|
|
private:
|
2007-09-21 12:35:28 +00:00
|
|
|
|
QETDiagramEditor(const QETDiagramEditor &);
|
2007-04-12 03:13:13 +00:00
|
|
|
|
|
|
|
|
|
// methodes
|
|
|
|
|
public:
|
|
|
|
|
void closeEvent(QCloseEvent *);
|
|
|
|
|
void addDiagramView(DiagramView *);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void actions();
|
|
|
|
|
|
|
|
|
|
private:
|
2007-09-25 23:24:36 +00:00
|
|
|
|
DiagramView *currentDiagram() const;
|
2007-04-12 03:13:13 +00:00
|
|
|
|
void menus();
|
|
|
|
|
void toolbar();
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
void toggleFullScreen();
|
2007-09-29 12:54:01 +00:00
|
|
|
|
void aboutQET();
|
|
|
|
|
void printDialog();
|
|
|
|
|
void exportDialog();
|
|
|
|
|
bool saveAsDialog();
|
|
|
|
|
bool save();
|
|
|
|
|
bool newDiagram();
|
|
|
|
|
bool openDiagram();
|
|
|
|
|
bool closeDiagram();
|
2007-04-12 03:13:13 +00:00
|
|
|
|
void slot_editInfos();
|
2007-09-29 12:54:01 +00:00
|
|
|
|
void slot_cut();
|
|
|
|
|
void slot_copy();
|
|
|
|
|
void slot_paste();
|
|
|
|
|
void slot_zoomIn();
|
|
|
|
|
void slot_zoomOut();
|
2007-04-12 03:13:13 +00:00
|
|
|
|
void slot_zoomFit();
|
|
|
|
|
void slot_zoomReset();
|
|
|
|
|
void slot_selectAll();
|
|
|
|
|
void slot_selectNothing();
|
|
|
|
|
void slot_selectInvert();
|
2007-09-29 12:54:01 +00:00
|
|
|
|
void slot_delete();
|
|
|
|
|
void slot_rotate();
|
2007-04-12 03:13:13 +00:00
|
|
|
|
void slot_setSelectionMode();
|
|
|
|
|
void slot_setVisualisationMode();
|
|
|
|
|
void slot_updateActions();
|
2007-09-29 12:54:01 +00:00
|
|
|
|
void slot_updateWindowsMenu();
|
2007-04-12 03:13:13 +00:00
|
|
|
|
void slot_addColumn();
|
|
|
|
|
void slot_removeColumn();
|
|
|
|
|
void slot_expand();
|
|
|
|
|
void slot_shrink();
|
2007-10-03 17:02:39 +00:00
|
|
|
|
void slot_editConductor();
|
2007-10-06 18:37:21 +00:00
|
|
|
|
void slot_resetConductors();
|
2007-04-12 03:13:13 +00:00
|
|
|
|
|
|
|
|
|
// attributs
|
|
|
|
|
protected:
|
|
|
|
|
// Actions faisables au travers de menus dans l'application QElectroTech
|
|
|
|
|
QAction *mode_selection;
|
|
|
|
|
QAction *mode_visualise;
|
2007-09-29 12:54:01 +00:00
|
|
|
|
QAction *new_file;
|
|
|
|
|
QAction *open_file;
|
|
|
|
|
QAction *close_file;
|
|
|
|
|
QAction *save_file;
|
|
|
|
|
QAction *save_file_sous;
|
|
|
|
|
QAction *import_diagram;
|
|
|
|
|
QAction *export_diagram;
|
|
|
|
|
QAction *print;
|
|
|
|
|
QAction *quit_editor;
|
|
|
|
|
QAction *undo;
|
|
|
|
|
QAction *redo;
|
|
|
|
|
QAction *cut;
|
|
|
|
|
QAction *copy;
|
|
|
|
|
QAction *paste;
|
|
|
|
|
QAction *select_all;
|
|
|
|
|
QAction *select_nothing;
|
|
|
|
|
QAction *select_invert;
|
|
|
|
|
QAction *delete_selection;
|
|
|
|
|
QAction *rotate_selection;
|
2007-10-03 17:02:39 +00:00
|
|
|
|
QAction *conductor_prop;
|
2007-10-06 18:37:21 +00:00
|
|
|
|
QAction *conductor_reset;
|
2007-04-12 03:13:13 +00:00
|
|
|
|
QAction *infos_diagram;
|
|
|
|
|
QAction *add_column;
|
|
|
|
|
QAction *remove_column;
|
|
|
|
|
QAction *expand_diagram;
|
|
|
|
|
QAction *shrink_diagram;
|
2007-09-29 12:54:01 +00:00
|
|
|
|
QAction *zoom_in;
|
|
|
|
|
QAction *zoom_out;
|
|
|
|
|
QAction *zoom_fit;
|
2007-04-12 03:13:13 +00:00
|
|
|
|
QAction *zoom_reset;
|
2007-09-29 12:54:01 +00:00
|
|
|
|
QAction *about_qet;
|
|
|
|
|
QAction *about_qt;
|
|
|
|
|
QAction *configure;
|
|
|
|
|
QAction *fullscreen_on;
|
|
|
|
|
QAction *fullscreen_off;
|
|
|
|
|
QAction *tile_window;
|
|
|
|
|
QAction *cascade_window;
|
|
|
|
|
QAction *arrange_window;
|
|
|
|
|
QAction *prev_window;
|
|
|
|
|
QAction *next_window;
|
2007-04-12 03:13:13 +00:00
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
QWorkspace workspace;
|
|
|
|
|
QSignalMapper windowMapper;
|
|
|
|
|
/// Dock pour le Panel d'Appareils
|
|
|
|
|
QDockWidget *qdw_pa;
|
|
|
|
|
/// Panel d'Appareils
|
|
|
|
|
ElementsPanelWidget *pa;
|
2007-09-29 12:54:01 +00:00
|
|
|
|
QMenu *windows_menu;
|
2007-04-12 03:13:13 +00:00
|
|
|
|
QToolBar *barre_outils;
|
2007-09-25 23:24:36 +00:00
|
|
|
|
QUndoGroup undo_group;
|
2007-04-12 03:13:13 +00:00
|
|
|
|
};
|
2006-10-27 15:47:22 +00:00
|
|
|
|
#endif
|