QElectroTech
0.8-dev
|
#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 unknown, 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 () |
Public Slots inherited from QETMainWindow | |
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... | |
Public Member Functions inherited from QETMainWindow | |
QETMainWindow (QWidget *=nullptr, Qt::WindowFlags=Qt::Widget) | |
~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 |
Protected Member Functions inherited from QETMainWindow | |
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 | |
Protected Attributes inherited from QETMainWindow | |
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.
QETElementEditor::QETElementEditor | ( | QWidget * | parent = nullptr | ) |
Constructeur
parent | QWidget parent |
|
override |
Destructeur.
|
private |
|
slot |
QETElementEditor::addArc Set arc creation interface to scene.
|
slot |
QETElementEditor::addDynamicTextField Set dynamic text field creation interface to scene.
|
slot |
QETElementEditor::addEllipse Set ellipse creation interface to scene.
|
slot |
QETElementEditor::addLine Set line creation interface to scene.
|
slot |
QETElementEditor::addPolygon Set polygon creation interface to scene.
|
slot |
QETElementEditor::addRect Set rectangle creation interface to scene.
|
slot |
QETElementEditor::addTerminal Set terminal creation interface to scene.
|
slot |
QETElementEditor::addText Set text creation interface to scene.
|
private |
|
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
|
private |
Enleve et cache le widget affiche par le dock permettant d'editer les parties.
|
overrideprotected |
Permet de quitter l'editeur lors de la fermeture de la fenetre principale
qce | Le QCloseEvent correspondant a l'evenement de fermeture |
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. |
|
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 |
|
inline |
|
inline |
|
overrideprotectedvirtual |
Executed the first time the window editor is displayed.
Reimplemented from QETMainWindow.
void QETElementEditor::fromFile | ( | const QString & | filepath | ) |
Charge un fichier
filepath | Chemin du fichier a charger |
void QETElementEditor::fromLocation | ( | const ElementsLocation & | location | ) |
QETElementEditor::fromLocation Location of the element to edit.
location |
|
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. |
bool QETElementEditor::isEditing | ( | const ElementsLocation & | provided_location | ) |
provided_location | Emplacement d'un element |
bool QETElementEditor::isEditing | ( | const QString & | provided_filepath | ) |
provided_filepath | Chemin d'un element sur un filesystem |
bool QETElementEditor::isReadOnly | ( | ) | const |
|
inline |
|
slot |
Ouvre un fichier element dans un nouvel editeur Cette methode ne controle pas si le fichier est deja ouvert
filepath | Fichier a ouvrir |
|
slot |
Slot utilise pour ouvrir un fichier recent. Transfere filepath au slot openElement seulement si cet editeur est actif
filepath | Fichier a ouvrir |
|
slot |
QETElementEditor::pasteFromElement Ask an element to user, copy the xml definition of the element to the clipboard and call ElementView::PasteInArea.
|
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
|
static |
void QETElementEditor::readSettings | ( | ) |
|
signal |
void QETElementEditor::setFileName | ( | const QString & | fn | ) |
fn | Le nouveau nom de fichier de l'element edite |
void QETElementEditor::setLocation | ( | const ElementsLocation & | el | ) |
QETElementEditor::setLocation The new location to edit.
el |
|
inline |
nameslist | the new list of names for the currently edited element |
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 |
|
private |
QETElementEditor::setupActions Create action used in Element editor.
|
private |
QETElementEditor::setupInterface.
|
private |
|
slot |
Remplit la liste des parties
|
slot |
Lance l'assistant de creation d'un nouvel element.
|
slot |
Ouvre un element
|
slot |
|
slot |
Ouvre un fichier Demande un fichier a l'utilisateur et ouvre ce fichier
|
slot |
QETElementEditor::slot_reload Reload the element from the file or location.
|
slot |
QETElementEditor::slot_save Save the current editing element. If the filepath or location is unknown, use save_as instead.
|
slot |
QETElementEditor::slot_saveAs Ask a location to user and save the current edited element to this location.
|
slot |
QETElementEditor::slot_saveAsFile Ask a file to user and save the current edited element to this file.
|
slot |
Passe l'editeur d'element en mode immobile (utilise pour la lecture seule)
|
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.
|
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.
|
slot |
Met a jour les menus
|
slot |
Met a jour la selection dans la liste des parties
|
slot |
Met a jour la selection des parties de l'element a partir de la liste des parties
|
slot |
Met a jour le titre de la fenetre
bool QETElementEditor::toFile | ( | const QString & | fn | ) |
QETElementEditor::toFile Save to file the drawed element.
fn | : path of the file |
bool QETElementEditor::toLocation | ( | const ElementsLocation & | location | ) |
QETElementEditor::toLocation Save the element to Location.
location | : location where we must save the current element |
|
slot |
QETElementEditor::UncheckAddPrimitive Uncheck all action related to primitive.
|
slot |
Met a jour l'editeur de primitive actuellement visible. Si aucun editeur de primitive n'est visible, ce slot ne fait rien.
void QETElementEditor::writeSettings | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
menus
|
private |
filename of the currently edited element
|
private |
|
private |
location of the currently edited element
|
private |
label displayed when several primitives are selected
|
private |
|
private |
|
private |
Hash associating primitive names with their matching edition widget.
|
private |
editing scene
|
private |
Container for the list of existing primitives.
|
private |
List of primitives.
|
private |
container for widgets dedicated to primitive edition
|
private |
Stack of widgets for tools_dock.
|
private |
container for the undo list
|
private |
view widget for the editing scene
|
private |
|
private |
|
private |
minimum window title
|
private |
actions for the "file" menu
|
private |
|
private |
|
private |
|
private |
whether the currently edited element comes from a file or a location
|
private |
Action group.
|
private |
toolbars
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
whether the editor is "read-only"
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
actions for the "edit" menu
|
private |
|
private |
|
private |