QElectroTech
0.70
|
#include <qetelementeditor.h>
Public Slots | |
void | addLine () |
QETElementEditor::addLine Set line creation interface to scene. More... | |
void | addRect () |
QETElementEditor::addRect Set rectangle creation interface to scene. More... | |
void | addEllipse () |
QETElementEditor::addEllipse Set ellipse creation interface to scene. More... | |
void | addPolygon () |
QETElementEditor::addPolygon Set polygon creation interface to scene. More... | |
void | addArc () |
QETElementEditor::addArc Set arc creation interface to scene. More... | |
void | addText () |
QETElementEditor::addText Set text creation interface to scene. More... | |
void | addTerminal () |
QETElementEditor::addTerminal Set terminal creation interface to scene. More... | |
void | addDynamicTextField () |
QETElementEditor::addDynamicTextField Set dynamic text field creation interface to scene. More... | |
void | UncheckAddPrimitive () |
QETElementEditor::UncheckAddPrimitive Uncheck all action related to primitive. More... | |
void | slot_new () |
void | slot_open () |
void | slot_openDxf () |
QETElementEditor::slot_openDxf. More... | |
void | slot_openFile () |
void | openRecentFile (const QString &) |
void | openElement (const QString &) |
void | slot_reload () |
QETElementEditor::slot_reload Reload the element from the file or location. More... | |
bool | slot_save () |
QETElementEditor::slot_save Save the current editing element. If the filepath or location is unknow, use save_as instead. More... | |
bool | slot_saveAs () |
QETElementEditor::slot_saveAs Ask a location to user and save the current edited element to this location. More... | |
bool | slot_saveAsFile () |
QETElementEditor::slot_saveAsFile Ask a file to user and save the current edited element to this file. More... | |
void | slot_setRubberBandToView () |
void | slot_setNoDragToView () |
void | slot_updateInformations () |
void | slot_updateMenus () |
void | slot_updateTitle () |
void | slot_createPartsList () |
void | slot_updatePartsList () |
void | slot_updateSelectionFromPartsList () |
bool | checkElement () |
QETElementEditor::checkElement Do several check about element. If error is occurred return false. More... | |
void | pasteFromFile () |
void | pasteFromElement () |
QETElementEditor::pasteFromElement Ask an element to user, copy the xml definition of the element to the clipboard and call ElementView::PasteInArea. More... | |
void | updateCurrentPartEditor () |
![]() | |
void | toggleFullScreen () |
void | updateFullScreenAction () |
void | checkToolbarsmenu () |
Signals | |
void | saveToLocation (ElementsLocation loc) |
Public Member Functions | |
QETElementEditor (QWidget *=nullptr) | |
~QETElementEditor () override | |
Destructeur. More... | |
void | setNames (const NamesList &) |
void | setLocation (const ElementsLocation &) |
QETElementEditor::setLocation The new location to edit. More... | |
ElementsLocation | location () const |
void | setFileName (const QString &) |
QString | fileName () const |
void | setReadOnly (bool) |
bool | isReadOnly () const |
void | fromFile (const QString &) |
void | fromLocation (const ElementsLocation &) |
QETElementEditor::fromLocation Location of the element to edit. More... | |
bool | toFile (const QString &) |
QETElementEditor::toFile Save to file the drawed element. More... | |
bool | toLocation (const ElementsLocation &location) |
QETElementEditor::toLocation Save the element to Location. More... | |
bool | isEditing (const ElementsLocation &) |
bool | isEditing (const QString &) |
ElementScene * | elementScene () const |
void | readSettings () |
QETElementEditor::readSettings Read settings. More... | |
void | writeSettings () |
QETElementEditor::writeSettings Write the settings. More... | |
void | contextMenu (QPoint p, QList< QAction *> actions=QList< QAction *>()) |
QETElementEditor::contextMenu Display a context menu, with all available action. More... | |
![]() | |
QETMainWindow (QWidget *=nullptr, Qt::WindowFlags=nullptr) | |
~QETMainWindow () override | |
Static Public Member Functions | |
static QPointF | pasteOffset () |
static QString | getOpenElementFileName (QWidget *=nullptr, const QString &=QString()) |
Protected Member Functions | |
void | closeEvent (QCloseEvent *) override |
void | firstActivation (QEvent *) override |
![]() | |
void | initCommonActions () |
void | initCommonMenus () |
void | insertMenu (QMenu *, QMenu *, bool=true) |
QAction * | actionForMenu (QMenu *) |
bool | event (QEvent *) override |
void | dragEnterEvent (QDragEnterEvent *e) override |
void | dropEvent (QDropEvent *e) override |
Private Member Functions | |
QETElementEditor (const QETElementEditor &) | |
void | setupActions () |
QETElementEditor::setupActions Create action used in Element editor. More... | |
void | setupMenus () |
QETElementEditor::setupMenus. More... | |
void | setupInterface () |
QETElementEditor::setupInterface. More... | |
bool | canClose () |
QWidget * | clearToolsDock () |
void | copyAndPasteXml (const QDomDocument &) |
Private Attributes | |
bool | read_only |
whether the editor is "read-only" More... | |
QMenu * | file_menu |
menus More... | |
QMenu * | edit_menu |
QMenu * | paste_from_menu |
QMenu * | display_menu |
QMenu * | tools_menu |
ElementView * | m_view |
view widget for the editing scene More... | |
ElementScene * | m_elmt_scene |
editing scene More... | |
QDockWidget * | m_tools_dock |
container for widgets dedicated to primitive edition More... | |
QStackedWidget * | m_tools_dock_stack |
Stack of widgets for tools_dock. More... | |
QLabel * | m_default_informations |
label displayed when several primitives are selected More... | |
QHash< QString, ElementItemEditor * > | m_editors |
Hash associating primitive names with their matching edition widget. More... | |
QDockWidget * | m_undo_dock |
container for the undo list More... | |
QDockWidget * | m_parts_dock |
Container for the list of existing primitives. More... | |
QListWidget * | m_parts_list |
List of primitives. More... | |
QAction * | new_element |
actions for the "file" menu More... | |
QAction * | open |
QAction * | open_dxf |
QAction * | open_file |
QAction * | save |
QAction * | save_as |
QAction * | save_as_file |
QAction * | reload |
QAction * | quit |
QAction * | selectall |
actions for the "edit" menu More... | |
QAction * | deselectall |
QAction * | inv_select |
QAction * | cut |
QAction * | copy |
QAction * | paste |
QAction * | paste_in_area |
QAction * | paste_from_file |
QAction * | paste_from_elmt |
QAction * | undo |
QAction * | redo |
QAction * | edit_delete |
QAction * | edit_size_hs |
QAction * | edit_names |
QAction * | edit_author |
QAction * | m_edit_properties |
QToolBar * | parts_toolbar |
toolbars More... | |
QToolBar * | main_toolbar |
QToolBar * | view_toolbar |
QToolBar * | depth_toolbar |
QToolBar * | element_toolbar |
QActionGroup * | parts |
Action group. More... | |
QActionGroup * | m_zoom_ag |
QActionGroup * | m_depth_action_group |
QString | min_title |
minimum window title More... | |
QString | filename_ |
filename of the currently edited element More... | |
ElementsLocation | location_ |
location of the currently edited element More... | |
bool | opened_from_file |
whether the currently edited element comes from a file or a location More... | |
Additional Inherited Members | |
![]() | |
QAction * | configure_action_ |
Launch the QElectroTech configuration dialog. More... | |
QAction * | fullscreen_action_ |
Toggle full screen. More... | |
QAction * | whatsthis_action_ |
Toggle "What's this" mode. More... | |
QAction * | about_qet_ |
Launch the "About QElectroTech" dialog. More... | |
QAction * | manual_online_ |
Launch browser on QElectroTech online manual. More... | |
QAction * | youtube_ |
Launch browser on QElectroTech Youtube channel. More... | |
QAction * | upgrade_ |
Launch browser on QElectroTech Windows Nightly builds. More... | |
QAction * | upgrade_M |
Launch browser on QElectroTech MAC_OS_X builds. More... | |
QAction * | donate_ |
Launch browser to donate link. More... | |
QAction * | about_qt_ |
launch the "About Qt" dialog More... | |
QMenu * | settings_menu_ |
Settings menu. More... | |
QMenu * | help_menu_ |
Help menu. More... | |
QMenu * | display_toolbars_ |
Show/hide toolbars/docks. More... | |
QHash< QMenu *, QAction * > | menu_actions_ |
Store actions retrieved when inserting menus. More... | |
bool | first_activation_ |
Used to detect whether the window is activated for the first time. More... | |
This class represents an element editor, allowing users to draw, change and configure a particular electrical element.
Definition at line 33 of file qetelementeditor.h.
QETElementEditor::QETElementEditor | ( | QWidget * | parent = nullptr | ) |
Constructeur
parent | QWidget parent |
Definition at line 71 of file qetelementeditor.cpp.
References min_title, QET::Icons::QETLogo, readSettings(), setupActions(), setupInterface(), setupMenus(), and slot_updateMenus().
|
override |
Destructeur.
Definition at line 97 of file qetelementeditor.cpp.
References clearToolsDock(), and m_editors.
|
private |
|
slot |
QETElementEditor::addArc Set arc creation interface to scene.
Definition at line 996 of file qetelementeditor.cpp.
References m_elmt_scene.
Referenced by setupActions().
|
slot |
QETElementEditor::addDynamicTextField Set dynamic text field creation interface to scene.
Definition at line 1020 of file qetelementeditor.cpp.
References m_elmt_scene, and ElementScene::setEventInterface().
Referenced by setupActions().
|
slot |
QETElementEditor::addEllipse Set ellipse creation interface to scene.
Definition at line 980 of file qetelementeditor.cpp.
References m_elmt_scene.
Referenced by setupActions().
|
slot |
QETElementEditor::addLine Set line creation interface to scene.
Definition at line 964 of file qetelementeditor.cpp.
References m_elmt_scene.
Referenced by setupActions().
|
slot |
QETElementEditor::addPolygon Set polygon creation interface to scene.
Definition at line 988 of file qetelementeditor.cpp.
References m_elmt_scene.
Referenced by setupActions().
|
slot |
QETElementEditor::addRect Set rectangle creation interface to scene.
Definition at line 972 of file qetelementeditor.cpp.
References m_elmt_scene.
Referenced by setupActions().
|
slot |
QETElementEditor::addTerminal Set terminal creation interface to scene.
Definition at line 1012 of file qetelementeditor.cpp.
References m_elmt_scene.
Referenced by setupActions().
|
slot |
QETElementEditor::addText Set text creation interface to scene.
Definition at line 1004 of file qetelementeditor.cpp.
References m_elmt_scene.
Referenced by setupActions().
|
private |
Definition at line 1265 of file qetelementeditor.cpp.
References QET::Icons::Cancel, m_elmt_scene, QET::QetMessageBox::question(), slot_save(), and QET::Icons::tr.
Referenced by closeEvent().
|
slot |
QETElementEditor::checkElement Do several check about element. If error is occurred return false.
Warning #1: Element haven't got terminal (except for report, because report must have one terminal and this checking is do below)
Check folio report element
Error folio report must have only one terminal
Definition at line 713 of file qetelementeditor.cpp.
References QET::QetMessageBox::critical(), m_elmt_scene, QET::Icons::tr, and QET::QetMessageBox::warning().
Referenced by slot_save(), slot_saveAs(), and slot_saveAsFile().
|
private |
Enleve et cache le widget affiche par le dock permettant d'editer les parties.
Definition at line 1294 of file qetelementeditor.cpp.
References m_tools_dock_stack.
Referenced by slot_updateInformations(), and ~QETElementEditor().
|
overrideprotected |
Permet de quitter l'editeur lors de la fermeture de la fenetre principale
qce | Le QCloseEvent correspondant a l'evenement de fermeture |
Definition at line 1331 of file qetelementeditor.cpp.
References canClose(), m_elmt_scene, and writeSettings().
void QETElementEditor::contextMenu | ( | QPoint | p, |
QList< QAction *> | actions = QList<QAction*>() |
||
) |
QETElementEditor::contextMenu Display a context menu, with all available action.
p,the | pos of the menu, in screen coordinate |
actions,a | list of actions who can be prepended to the context menu. |
Definition at line 432 of file qetelementeditor.cpp.
References copy, cut, deselectall, edit_delete, inv_select, m_depth_action_group, paste, paste_from_menu, paste_in_area, redo, selectall, and undo.
Referenced by PartPolygon::contextMenuEvent().
|
private |
Exporte le document XML xml_document vers le presse-papier puis declenche son collage dans l'editeur courant, avec selection de la zone de collage
xml_document | Document XML a copier/coller |
Definition at line 1311 of file qetelementeditor.cpp.
References m_view.
Referenced by pasteFromElement(), and pasteFromFile().
|
inline |
Definition at line 183 of file qetelementeditor.h.
References m_elmt_scene.
Referenced by DynamicTextFieldEditor::fillInfoComboBox(), and setupActions().
|
inline |
Definition at line 176 of file qetelementeditor.h.
References filename_.
|
overrideprotectedvirtual |
Executed the first time the window editor is displayed.
Reimplemented from QETMainWindow.
Definition at line 1343 of file qetelementeditor.cpp.
References QETMainWindow::event(), and m_view.
void QETElementEditor::fromFile | ( | const QString & | filepath | ) |
Charge un fichier
filepath | Chemin du fichier a charger |
Definition at line 796 of file qetelementeditor.cpp.
References QET::QetMessageBox::critical(), QETApp::elementsRecentFiles(), m_elmt_scene, setFileName(), setReadOnly(), slot_createPartsList(), slot_updateMenus(), QET::Icons::tr, and QET::QetMessageBox::warning().
Referenced by slot_reload().
void QETElementEditor::fromLocation | ( | const ElementsLocation & | location | ) |
QETElementEditor::fromLocation Location of the element to edit.
location |
Definition at line 1489 of file qetelementeditor.cpp.
References QET::QetMessageBox::critical(), ElementsLocation::exist(), ElementsLocation::isElement(), ElementsLocation::isWritable(), location(), m_elmt_scene, setLocation(), setReadOnly(), slot_createPartsList(), slot_updateMenus(), QET::Icons::tr, QET::QetMessageBox::warning(), and ElementsLocation::xml().
Referenced by slot_reload().
|
static |
Demande a l'utilisateur d'ouvrir un fichier sense etre un element.
parent | QWidget parent du dialogue d'ouverture de fichier |
initial_dir | Repertoire a afficher initialement - si une chaine vide est fournie, QETApp::customElementsDir() sera utilise. |
Definition at line 1468 of file qetelementeditor.cpp.
References QETApp::customElementsDir(), and QET::Icons::tr.
Referenced by pasteFromFile(), and slot_openFile().
bool QETElementEditor::isEditing | ( | const ElementsLocation & | provided_location | ) |
provided_location | Emplacement d'un element |
Definition at line 905 of file qetelementeditor.cpp.
References QET::compareCanonicalFilePaths(), filename_, location_, opened_from_file, QETApp::realPath(), and ElementsLocation::toString().
bool QETElementEditor::isEditing | ( | const QString & | provided_filepath | ) |
provided_filepath | Chemin d'un element sur un filesystem |
Definition at line 923 of file qetelementeditor.cpp.
References QET::compareCanonicalFilePaths(), filename_, location_, opened_from_file, QETApp::realPath(), and ElementsLocation::toString().
bool QETElementEditor::isReadOnly | ( | ) | const |
Definition at line 956 of file qetelementeditor.cpp.
References read_only.
Referenced by setFileName(), and slot_updateTitle().
|
inline |
Definition at line 169 of file qetelementeditor.h.
References location_.
Referenced by fromLocation(), pasteFromElement(), slot_open(), slot_saveAs(), and toLocation().
|
slot |
Ouvre un fichier element dans un nouvel editeur Cette methode ne controle pas si le fichier est deja ouvert
filepath | Fichier a ouvrir |
Definition at line 1103 of file qetelementeditor.cpp.
References QET::QetMessageBox::critical(), QETApp::instance(), and QET::Icons::tr.
Referenced by openRecentFile(), and slot_openFile().
|
slot |
Slot utilise pour ouvrir un fichier recent. Transfere filepath au slot openElement seulement si cet editeur est actif
filepath | Fichier a ouvrir |
Definition at line 1071 of file qetelementeditor.cpp.
References openElement().
Referenced by setupMenus().
|
slot |
QETElementEditor::pasteFromElement Ask an element to user, copy the xml definition of the element to the clipboard and call ElementView::PasteInArea.
Definition at line 1565 of file qetelementeditor.cpp.
References copyAndPasteXml(), QET::QetMessageBox::critical(), ElementsLocation::exist(), ElementDialog::getOpenElementLocation(), ElementsLocation::isElement(), ElementsLocation::isNull(), location(), QET::Icons::tr, and ElementsLocation::xml().
Referenced by setupActions().
|
slot |
Demande un fichier a l'utilisateur, l'ouvre en tant que fichier element, met son contenu dans le presse-papiers, et appelle ElementView::PasteInArea
Definition at line 1535 of file qetelementeditor.cpp.
References copyAndPasteXml(), QET::QetMessageBox::critical(), getOpenElementFileName(), and QET::Icons::tr.
Referenced by setupActions().
|
static |
Definition at line 1454 of file qetelementeditor.cpp.
Referenced by ElementView::pasteWithOffset().
void QETElementEditor::readSettings | ( | ) |
QETElementEditor::readSettings Read settings.
Definition at line 1423 of file qetelementeditor.cpp.
References m_elmt_scene.
Referenced by QETElementEditor().
|
signal |
void QETElementEditor::setFileName | ( | const QString & | fn | ) |
fn | Le nouveau nom de fichier de l'element edite |
Definition at line 125 of file qetelementeditor.cpp.
References filename_, isReadOnly(), opened_from_file, setReadOnly(), and slot_updateTitle().
Referenced by fromFile(), and slot_saveAsFile().
void QETElementEditor::setLocation | ( | const ElementsLocation & | el | ) |
QETElementEditor::setLocation The new location to edit.
el |
Definition at line 114 of file qetelementeditor.cpp.
References ElementsLocation::isWritable(), location_, opened_from_file, setReadOnly(), and slot_updateTitle().
Referenced by fromLocation(), and slot_saveAs().
|
inline |
nameslist | the new list of names for the currently edited element |
Definition at line 162 of file qetelementeditor.h.
References m_elmt_scene.
void QETElementEditor::setReadOnly | ( | bool | ro | ) |
specifie si l'editeur d'element doit etre en mode lecture seule
ro | true pour activer le mode lecture seule, false pour le desactiver |
Definition at line 944 of file qetelementeditor.cpp.
References m_view, read_only, QET::Icons::ro, and slot_updateMenus().
Referenced by fromFile(), fromLocation(), setFileName(), and setLocation().
|
private |
QETElementEditor::setupActions Create action used in Element editor.
Definition at line 140 of file qetelementeditor.cpp.
References addArc(), addDynamicTextField(), addEllipse(), addLine(), addPolygon(), addRect(), addTerminal(), addText(), QET::Icons::ApplicationExit, copy, cut, depth_toolbar, QET::depthActionGroup(), deselectall, QET::Icons::DocumentNew, QET::Icons::DocumentSave, QET::Icons::DocumentSaveAs, edit_author, edit_delete, edit_names, QET::Icons::EditCopy, QET::Icons::EditCut, QET::Icons::EditDelete, QET::Icons::EditPaste, QET::Icons::EditRedo, QET::Icons::EditSelectAll, QET::Icons::EditSelectInvert, QET::Icons::EditSelectNone, QET::Icons::EditUndo, QET::Icons::Element, element_toolbar, QET::Icons::ElementEdit, elementScene(), QET::Icons::FolderOpen, inv_select, m_depth_action_group, m_edit_properties, m_elmt_scene, m_view, m_zoom_ag, main_toolbar, QET::Icons::Names, new_element, open, open_dxf, open_file, QET::Icons::PartArc, QET::Icons::PartEllipse, QET::Icons::PartLine, QET::Icons::PartPolygon, QET::Icons::PartRectangle, parts, parts_toolbar, QET::Icons::PartText, QET::Icons::PartTextField, paste, paste_from_elmt, paste_from_file, paste_in_area, pasteFromElement(), pasteFromFile(), quit, redo, reload, QET::Icons::RunDxf, save, save_as, save_as_file, selectall, slot_new(), slot_open(), slot_openDxf(), slot_openFile(), slot_reload(), slot_save(), slot_saveAs(), slot_saveAsFile(), slot_updateInformations(), slot_updateMenus(), slot_updatePartsList(), slot_updateTitle(), QET::Icons::Terminal, QET::Icons::tr, UncheckAddPrimitive(), undo, ElementScene::undoStack(), QET::Icons::UserInformations, view_toolbar, QET::Icons::ViewRefresh, QET::Icons::XmlTextFile, QET::Icons::ZoomFitBest, QET::Icons::ZoomIn, QET::Icons::ZoomOriginal, and QET::Icons::ZoomOut.
Referenced by QETElementEditor().
|
private |
QETElementEditor::setupInterface.
Definition at line 515 of file qetelementeditor.cpp.
References m_default_informations, m_editors, m_elmt_scene, m_parts_dock, m_parts_list, m_tools_dock, m_tools_dock_stack, m_undo_dock, m_view, slot_createPartsList(), slot_setRubberBandToView(), slot_updateInformations(), slot_updatePartsList(), slot_updateSelectionFromPartsList(), and QET::Icons::tr.
Referenced by QETElementEditor().
|
private |
Definition at line 367 of file qetelementeditor.cpp.
References copy, cut, deselectall, display_menu, QET::Icons::DocumentOpenRecent, edit_author, edit_delete, edit_menu, edit_names, QET::Icons::EditPaste, QETApp::elementsRecentFiles(), file_menu, QETMainWindow::insertMenu(), inv_select, m_depth_action_group, m_edit_properties, m_zoom_ag, new_element, open, open_dxf, open_file, openRecentFile(), paste, paste_from_elmt, paste_from_file, paste_from_menu, paste_in_area, quit, redo, reload, save, save_as, save_as_file, selectall, QETMainWindow::settings_menu_, tools_menu, QET::Icons::tr, and undo.
Referenced by QETElementEditor().
|
slot |
Remplit la liste des parties
Definition at line 1351 of file qetelementeditor.cpp.
References m_elmt_scene, m_parts_list, QET_MAX_PARTS_IN_ELEMENT_EDITOR_LIST, and QET::Icons::tr.
Referenced by fromFile(), fromLocation(), setupInterface(), and slot_updatePartsList().
|
slot |
Lance l'assistant de creation d'un nouvel element.
Definition at line 1035 of file qetelementeditor.cpp.
Referenced by setupActions().
|
slot |
Ouvre un element
Definition at line 1043 of file qetelementeditor.cpp.
References ElementDialog::getOpenElementLocation(), QETApp::instance(), ElementsLocation::isNull(), and location().
Referenced by setupActions().
|
slot |
QETElementEditor::slot_openDxf.
Definition at line 1081 of file qetelementeditor.cpp.
Referenced by setupActions().
|
slot |
Ouvre un fichier Demande un fichier a l'utilisateur et ouvre ce fichier
Definition at line 1054 of file qetelementeditor.cpp.
References QETApp::customElementsDir(), filename_, getOpenElementFileName(), and openElement().
Referenced by setupActions().
|
slot |
QETElementEditor::slot_reload Reload the element from the file or location.
Definition at line 1124 of file qetelementeditor.cpp.
References QET::Icons::Cancel, filename_, fromFile(), fromLocation(), location_, m_elmt_scene, opened_from_file, QET::QetMessageBox::question(), and QET::Icons::tr.
Referenced by setupActions().
|
slot |
QETElementEditor::slot_save Save the current editing element. If the filepath or location is unknow, use save_as instead.
Definition at line 1151 of file qetelementeditor.cpp.
References checkElement(), QET::QetMessageBox::critical(), filename_, ElementsLocation::isNull(), location_, m_elmt_scene, opened_from_file, saveToLocation(), slot_saveAs(), slot_saveAsFile(), toFile(), toLocation(), and QET::Icons::tr.
Referenced by canClose(), and setupActions().
|
slot |
QETElementEditor::slot_saveAs Ask a location to user and save the current edited element to this location.
Definition at line 1192 of file qetelementeditor.cpp.
References checkElement(), QET::QetMessageBox::critical(), ElementDialog::getSaveElementLocation(), ElementsLocation::isNull(), location(), m_elmt_scene, saveToLocation(), setLocation(), toLocation(), QET::Icons::tr, and ElementScene::undoStack().
Referenced by setupActions(), and slot_save().
|
slot |
QETElementEditor::slot_saveAsFile Ask a file to user and save the current edited element to this file.
Definition at line 1221 of file qetelementeditor.cpp.
References checkElement(), QET::QetMessageBox::critical(), QETApp::customElementsDir(), QETApp::elementsRecentFiles(), filename_, m_elmt_scene, setFileName(), toFile(), and QET::Icons::tr.
Referenced by setupActions(), and slot_save().
|
slot |
Passe l'editeur d'element en mode immobile (utilise pour la lecture seule)
Definition at line 601 of file qetelementeditor.cpp.
References m_view.
Referenced by ESEventInterface::init().
|
slot |
Passe l'editeur d'element en mode selection : le pointeur deplace les elements selectionnes et il est possible d'utiliser un rectangle de selection.
Definition at line 594 of file qetelementeditor.cpp.
References m_view.
Referenced by setupInterface(), and ESEventInterface::~ESEventInterface().
|
slot |
Met a jour la zone d'information et d'edition des primitives. Si plusieurs primitives sont selectionnees, seule leur quantite est affichee. Sinon, un widget d'edition approprie est mis en place.
Definition at line 610 of file qetelementeditor.cpp.
References clearToolsDock(), StyleEditor::isStyleEditable(), m_default_informations, m_editors, m_elmt_scene, m_tools_dock_stack, ElementItemEditor::setPart(), and QET::Icons::tr.
Referenced by setupActions(), setupInterface(), and slot_updateSelectionFromPartsList().
|
slot |
Met a jour les menus
Definition at line 467 of file qetelementeditor.cpp.
References ElementScene::clipboardMayContainElement(), copy, cut, deselectall, edit_delete, inv_select, m_depth_action_group, m_elmt_scene, m_parts_list, parts, paste, paste_from_elmt, paste_from_file, paste_in_area, read_only, redo, save, selectall, and undo.
Referenced by fromFile(), fromLocation(), QETElementEditor(), setReadOnly(), setupActions(), and slot_updateSelectionFromPartsList().
|
slot |
Met a jour la selection dans la liste des parties
Definition at line 1381 of file qetelementeditor.cpp.
References m_elmt_scene, m_parts_list, QET_MAX_PARTS_IN_ELEMENT_EDITOR_LIST, and slot_createPartsList().
Referenced by setupActions(), and setupInterface().
|
slot |
Met a jour la selection des parties de l'element a partir de la liste des parties
Definition at line 1403 of file qetelementeditor.cpp.
References m_elmt_scene, m_parts_list, slot_updateInformations(), and slot_updateMenus().
Referenced by setupInterface().
|
slot |
Met a jour le titre de la fenetre
Definition at line 502 of file qetelementeditor.cpp.
References filename_, ElementsLocation::isNull(), isReadOnly(), location_, m_elmt_scene, min_title, and QET::Icons::tr.
Referenced by setFileName(), setLocation(), and setupActions().
bool QETElementEditor::toFile | ( | const QString & | fn | ) |
QETElementEditor::toFile Save to file the drawed element.
fn | : path of the file |
Definition at line 859 of file qetelementeditor.cpp.
References ElementScene::clearEventInterface(), m_elmt_scene, ElementScene::toXml(), QET::Icons::tr, UncheckAddPrimitive(), QET::QetMessageBox::warning(), and QET::writeXmlFile().
Referenced by slot_save(), and slot_saveAsFile().
bool QETElementEditor::toLocation | ( | const ElementsLocation & | location | ) |
QETElementEditor::toLocation Save the element to Location.
location | : location where we must save the current element |
Definition at line 884 of file qetelementeditor.cpp.
References ElementScene::clearEventInterface(), QET::QetMessageBox::critical(), location(), m_elmt_scene, ElementsLocation::setXml(), ElementScene::toXml(), QET::Icons::tr, and UncheckAddPrimitive().
Referenced by slot_save(), and slot_saveAs().
|
slot |
QETElementEditor::UncheckAddPrimitive Uncheck all action related to primitive.
Definition at line 1028 of file qetelementeditor.cpp.
References parts.
Referenced by setupActions(), toFile(), and toLocation().
|
slot |
Met a jour l'editeur de primitive actuellement visible. Si aucun editeur de primitive n'est visible, ce slot ne fait rien.
Definition at line 1599 of file qetelementeditor.cpp.
References m_tools_dock_stack.
void QETElementEditor::writeSettings | ( | ) |
QETElementEditor::writeSettings Write the settings.
Definition at line 1443 of file qetelementeditor.cpp.
Referenced by closeEvent().
|
private |
Definition at line 74 of file qetelementeditor.h.
Referenced by contextMenu(), setupActions(), setupMenus(), and slot_updateMenus().
|
private |
Definition at line 74 of file qetelementeditor.h.
Referenced by contextMenu(), setupActions(), setupMenus(), and slot_updateMenus().
|
private |
Definition at line 78 of file qetelementeditor.h.
Referenced by setupActions().
|
private |
Definition at line 73 of file qetelementeditor.h.
Referenced by contextMenu(), setupActions(), setupMenus(), and slot_updateMenus().
|
private |
Definition at line 51 of file qetelementeditor.h.
Referenced by setupMenus().
|
private |
Definition at line 76 of file qetelementeditor.h.
Referenced by setupActions(), and setupMenus().
|
private |
Definition at line 76 of file qetelementeditor.h.
Referenced by contextMenu(), setupActions(), setupMenus(), and slot_updateMenus().
|
private |
Definition at line 51 of file qetelementeditor.h.
Referenced by setupMenus().
|
private |
Definition at line 76 of file qetelementeditor.h.
Referenced by setupActions(), and setupMenus().
|
private |
Definition at line 76 of file qetelementeditor.h.
|
private |
Definition at line 78 of file qetelementeditor.h.
Referenced by setupActions().
|
private |
|
private |
filename of the currently edited element
Definition at line 84 of file qetelementeditor.h.
Referenced by fileName(), isEditing(), setFileName(), slot_openFile(), slot_reload(), slot_save(), slot_saveAsFile(), and slot_updateTitle().
|
private |
Definition at line 73 of file qetelementeditor.h.
Referenced by contextMenu(), setupActions(), setupMenus(), and slot_updateMenus().
|
private |
location of the currently edited element
Definition at line 86 of file qetelementeditor.h.
Referenced by isEditing(), location(), setLocation(), slot_reload(), slot_save(), and slot_updateTitle().
|
private |
label displayed when several primitives are selected
Definition at line 61 of file qetelementeditor.h.
Referenced by setupInterface(), and slot_updateInformations().
|
private |
Definition at line 80 of file qetelementeditor.h.
Referenced by contextMenu(), setupActions(), setupMenus(), and slot_updateMenus().
|
private |
Definition at line 76 of file qetelementeditor.h.
Referenced by setupActions(), and setupMenus().
|
private |
Hash associating primitive names with their matching edition widget.
Definition at line 63 of file qetelementeditor.h.
Referenced by setupInterface(), slot_updateInformations(), and ~QETElementEditor().
|
private |
editing scene
Definition at line 55 of file qetelementeditor.h.
Referenced by addArc(), addDynamicTextField(), addEllipse(), addLine(), addPolygon(), addRect(), addTerminal(), addText(), canClose(), checkElement(), closeEvent(), elementScene(), fromFile(), fromLocation(), readSettings(), setNames(), setupActions(), setupInterface(), slot_createPartsList(), slot_reload(), slot_save(), slot_saveAs(), slot_saveAsFile(), slot_updateInformations(), slot_updateMenus(), slot_updatePartsList(), slot_updateSelectionFromPartsList(), slot_updateTitle(), toFile(), and toLocation().
|
private |
Container for the list of existing primitives.
Definition at line 67 of file qetelementeditor.h.
Referenced by setupInterface().
|
private |
List of primitives.
Definition at line 69 of file qetelementeditor.h.
Referenced by setupInterface(), slot_createPartsList(), slot_updateMenus(), slot_updatePartsList(), and slot_updateSelectionFromPartsList().
|
private |
container for widgets dedicated to primitive edition
Definition at line 57 of file qetelementeditor.h.
Referenced by setupInterface().
|
private |
Stack of widgets for tools_dock.
Definition at line 59 of file qetelementeditor.h.
Referenced by clearToolsDock(), setupInterface(), slot_updateInformations(), and updateCurrentPartEditor().
|
private |
container for the undo list
Definition at line 65 of file qetelementeditor.h.
Referenced by setupInterface().
|
private |
view widget for the editing scene
Definition at line 53 of file qetelementeditor.h.
Referenced by copyAndPasteXml(), firstActivation(), setReadOnly(), setupActions(), setupInterface(), slot_setNoDragToView(), and slot_setRubberBandToView().
|
private |
Definition at line 80 of file qetelementeditor.h.
Referenced by setupActions(), and setupMenus().
|
private |
Definition at line 78 of file qetelementeditor.h.
Referenced by setupActions().
|
private |
minimum window title
Definition at line 82 of file qetelementeditor.h.
Referenced by QETElementEditor(), and slot_updateTitle().
|
private |
actions for the "file" menu
Definition at line 71 of file qetelementeditor.h.
Referenced by setupActions(), and setupMenus().
|
private |
Definition at line 71 of file qetelementeditor.h.
Referenced by setupActions(), and setupMenus().
|
private |
Definition at line 71 of file qetelementeditor.h.
Referenced by setupActions(), and setupMenus().
|
private |
Definition at line 71 of file qetelementeditor.h.
Referenced by setupActions(), and setupMenus().
|
private |
whether the currently edited element comes from a file or a location
Definition at line 88 of file qetelementeditor.h.
Referenced by isEditing(), setFileName(), setLocation(), slot_reload(), and slot_save().
|
private |
Action group.
Definition at line 80 of file qetelementeditor.h.
Referenced by setupActions(), slot_updateMenus(), and UncheckAddPrimitive().
|
private |
|
private |
Definition at line 74 of file qetelementeditor.h.
Referenced by contextMenu(), setupActions(), setupMenus(), and slot_updateMenus().
|
private |
Definition at line 74 of file qetelementeditor.h.
Referenced by setupActions(), setupMenus(), and slot_updateMenus().
|
private |
Definition at line 74 of file qetelementeditor.h.
Referenced by setupActions(), setupMenus(), and slot_updateMenus().
|
private |
Definition at line 51 of file qetelementeditor.h.
Referenced by contextMenu(), and setupMenus().
|
private |
Definition at line 74 of file qetelementeditor.h.
Referenced by contextMenu(), setupActions(), setupMenus(), and slot_updateMenus().
|
private |
Definition at line 71 of file qetelementeditor.h.
Referenced by setupActions(), and setupMenus().
|
private |
whether the editor is "read-only"
Definition at line 49 of file qetelementeditor.h.
Referenced by isReadOnly(), setReadOnly(), and slot_updateMenus().
|
private |
Definition at line 75 of file qetelementeditor.h.
Referenced by contextMenu(), setupActions(), setupMenus(), and slot_updateMenus().
|
private |
Definition at line 71 of file qetelementeditor.h.
Referenced by setupActions(), and setupMenus().
|
private |
Definition at line 71 of file qetelementeditor.h.
Referenced by setupActions(), setupMenus(), and slot_updateMenus().
|
private |
Definition at line 71 of file qetelementeditor.h.
Referenced by setupActions(), and setupMenus().
|
private |
Definition at line 71 of file qetelementeditor.h.
Referenced by setupActions(), and setupMenus().
|
private |
actions for the "edit" menu
Definition at line 73 of file qetelementeditor.h.
Referenced by contextMenu(), setupActions(), setupMenus(), and slot_updateMenus().
|
private |
Definition at line 51 of file qetelementeditor.h.
Referenced by setupMenus().
|
private |
Definition at line 75 of file qetelementeditor.h.
Referenced by contextMenu(), setupActions(), setupMenus(), and slot_updateMenus().
|
private |
Definition at line 78 of file qetelementeditor.h.
Referenced by setupActions().