|
QElectroTech
0.8-dev
|
Go to the documentation of this file.
18 #ifndef CUSTOM_ELEMENT_EDITOR_H
19 #define CUSTOM_ELEMENT_EDITOR_H
101 bool toFile(
const QString &);
110 void contextMenu(QPoint p, QList<QAction *> actions = QList<QAction*>());
Definition: lineeditor.h:32
bool exist() const
ElementsLocation::exist.
Definition: elementslocation.cpp:472
static bool isStyleEditable(QList< CustomElementPart * > cep_list)
StyleEditor::isStyleEditable.
Definition: styleeditor.cpp:553
Definition: newelementwizard.h:39
void setFileName(const QString &)
Definition: qetelementeditor.cpp:123
#define QET_MAX_PARTS_IN_ELEMENT_EDITOR_LIST
Definition: qetelementeditor.cpp:65
QAction * paste_in_area
Definition: qetelementeditor.h:74
bool canClose()
Definition: qetelementeditor.cpp:1315
void slot_updateMenus()
Definition: qetelementeditor.cpp:464
QIcon DocumentNew
Definition: qeticons.cpp:53
QIcon UserInformations
Definition: qeticons.cpp:169
QAction * deselectall
Definition: qetelementeditor.h:73
void openElement(const QString &)
Definition: qetelementeditor.cpp:1154
The DynamicTextFieldEditor class This class provide a widget used to edit the property of a dynamic t...
Definition: dynamictextfieldeditor.h:32
Definition: elementview.h:27
void addLine()
QETElementEditor::addLine Set line creation interface to scene.
Definition: qetelementeditor.cpp:1009
void slot_setNoDragToView()
Definition: qetelementeditor.cpp:602
QIcon ZoomFitBest
Definition: qeticons.cpp:178
QIcon EditCopy
Definition: qeticons.cpp:64
bool setXml(const QDomDocument &xml_document) const
ElementsLocation::setXml Replace the current xml description by xml_document; The document element of...
Definition: elementslocation.cpp:667
void closeEvent(QCloseEvent *) override
Definition: qetelementeditor.cpp:1390
Definition: texteditor.h:32
static QString realPath(const QString &)
QETApp::realPath Allows you to know the absolute path of the * .elmt file corresponding to a symbolic...
Definition: qetapp.cpp:842
ElementScene * m_elmt_scene
editing scene
Definition: qetelementeditor.h:55
The ESEventAddPolygon class This ESEvent manage creation of polygon in an ElementScene.
Definition: eseventaddpolygon.h:32
Definition: qetmainwindow.h:26
QIcon PartArc
Definition: qeticons.cpp:127
Definition: arceditor.h:32
QActionGroup * depthActionGroup(QObject *parent=nullptr)
QET::depthActionGroup.
Definition: qet.cpp:676
QIcon ZoomIn
Definition: qeticons.cpp:179
The ESEventAddArc class This ESEvent manage creation of arc in an ElementScene.
Definition: eseventaddarc.h:32
static QString customElementsDir()
QETApp::customElementsDir.
Definition: qetapp.cpp:657
QAction * reload
Definition: qetelementeditor.h:71
void slot_updateSelectionFromPartsList()
Definition: qetelementeditor.cpp:1467
QMenu * file_menu
menus
Definition: qetelementeditor.h:51
void slot_createPartsList()
Definition: qetelementeditor.cpp:1413
QAction * paste_from_elmt
Definition: qetelementeditor.h:74
QIcon ZoomOut
Definition: qeticons.cpp:181
QAction * m_edit_properties
Definition: qetelementeditor.h:76
bool toFile(const QString &)
QETElementEditor::toFile Save to file the drawed element.
Definition: qetelementeditor.cpp:906
QHash< QString, ElementItemEditor * > m_editors
Hash associating primitive names with their matching edition widget.
Definition: qetelementeditor.h:63
QIcon PartTextField
Definition: qeticons.cpp:135
void slot_setRubberBandToView()
Definition: qetelementeditor.cpp:595
The ESEventAddLine class This ESEvent manage creation of line in a ElementScene.
Definition: eseventaddline.h:32
QAction * edit_size_hs
Definition: qetelementeditor.h:76
QListWidget * m_parts_list
List of primitives.
Definition: qetelementeditor.h:69
The ESEventAddEllipse class This ESEvent manage creation of ellpise in an ElementScene.
Definition: eseventaddellipse.h:33
bool isWritable() const
ElementsLocation::isWritable.
Definition: elementslocation.cpp:499
QIcon EditUndo
Definition: qeticons.cpp:82
void addDynamicTextField()
QETElementEditor::addDynamicTextField Set dynamic text field creation interface to scene.
Definition: qetelementeditor.cpp:1065
bool isEditing(const ElementsLocation &)
Definition: qetelementeditor.cpp:948
void openRecentFile(const QString &)
Definition: qetelementeditor.cpp:1120
void copyAndPasteXml(const QDomDocument &)
Definition: qetelementeditor.cpp:1370
void slot_updateTitle()
Definition: qetelementeditor.cpp:500
QAction * quit
Definition: qetelementeditor.h:71
QAction * undo
Definition: qetelementeditor.h:75
ElementsLocation location_
location of the currently edited element
Definition: qetelementeditor.h:86
void setNames(const NamesList &)
Definition: qetelementeditor.h:162
void fromLocation(const ElementsLocation &)
QETElementEditor::fromLocation Location of the element to edit.
Definition: qetelementeditor.cpp:1555
QIcon PartText
Definition: qeticons.cpp:134
QAction * save_as_file
Definition: qetelementeditor.h:71
ElementScene * elementScene() const
Definition: qetelementeditor.h:183
QIcon XmlTextFile
Definition: qeticons.cpp:176
void firstActivation(QEvent *) override
Definition: qetelementeditor.cpp:1405
Definition: polygoneditor.h:32
bool event(QEvent *) override
Definition: qetmainwindow.cpp:233
QAction * open
Definition: qetelementeditor.h:71
QAction * new_element
actions for the "file" menu
Definition: qetelementeditor.h:71
~QETElementEditor() override
Destructeur.
Definition: qetelementeditor.cpp:96
bool opened_from_file
whether the currently edited element comes from a file or a location
Definition: qetelementeditor.h:88
void setReadOnly(bool)
Definition: qetelementeditor.cpp:989
void setLocation(const ElementsLocation &)
QETElementEditor::setLocation The new location to edit.
Definition: qetelementeditor.cpp:113
QIcon Element
Definition: qeticons.cpp:83
bool slot_saveAs()
QETElementEditor::slot_saveAs Ask a location to user and save the current edited element to this loca...
Definition: qetelementeditor.cpp:1245
QToolBar * main_toolbar
Definition: qetelementeditor.h:78
static ElementsLocation getOpenElementLocation(QWidget *parent=nullptr)
ElementDialog::getOpenElementLocation Display a dialog for open an element through her location.
Definition: elementdialog.cpp:280
void updateCurrentPartEditor()
Definition: qetelementeditor.cpp:1662
Definition: editorcommands.h:175
ElementView * m_view
view widget for the editing scene
Definition: qetelementeditor.h:53
QIcon EditSelectInvert
Definition: qeticons.cpp:71
QDockWidget * m_parts_dock
Container for the list of existing primitives.
Definition: qetelementeditor.h:67
void setupMenus()
QETElementEditor::setupMenus.
Definition: qetelementeditor.cpp:364
QAction * edit_names
Definition: qetelementeditor.h:76
bool isElement() const
ElementsLocation::isElement.
Definition: elementslocation.cpp:412
QAction * paste_from_file
Definition: qetelementeditor.h:74
QAction * open_dxf
Definition: qetelementeditor.h:71
Definition: styleeditor.h:35
QString min_title
minimum window title
Definition: qetelementeditor.h:82
void insertMenu(QMenu *, QMenu *, bool=true)
Definition: qetmainwindow.cpp:172
QMenu * edit_menu
Definition: qetelementeditor.h:51
bool checkElement()
QETElementEditor::checkElement Do several check about element. If error is occurred return false.
Definition: qetelementeditor.cpp:755
Definition: elementitemeditor.h:34
QAction * save_as
Definition: qetelementeditor.h:71
static RecentFiles * elementsRecentFiles()
QETApp::elementsRecentFiles.
Definition: qetapp.cpp:1395
QAction * paste
Definition: qetelementeditor.h:74
QIcon PartRectangle
Definition: qeticons.cpp:132
The ESEventAddDynamicTextField class This ESEvent manage creation of dynamic text field in an Element...
Definition: eseventadddynamictextfield.h:32
bool isNull() const
ElementsLocation::isNull.
Definition: elementslocation.cpp:387
QMessageBox::StandardButton question(QWidget *, const QString &, const QString &, QMessageBox::StandardButtons=QMessageBox::Ok, QMessageBox::StandardButton=QMessageBox::NoButton)
Definition: qetmessagebox.cpp:53
QIcon ElementEdit
Definition: qeticons.cpp:85
void addArc()
QETElementEditor::addArc Set arc creation interface to scene.
Definition: qetelementeditor.cpp:1041
QDomElement xml() const
ElementsLocation::xml.
Definition: elementslocation.cpp:575
QIcon FolderOpen
Definition: qeticons.cpp:99
void addEllipse()
QETElementEditor::addEllipse Set ellipse creation interface to scene.
Definition: qetelementeditor.cpp:1025
QAction * redo
Definition: qetelementeditor.h:75
void slot_reload()
QETElementEditor::slot_reload Reload the element from the file or location.
Definition: qetelementeditor.cpp:1177
static QPointF pasteOffset()
Definition: qetelementeditor.cpp:1520
bool isReadOnly() const
Definition: qetelementeditor.cpp:1001
static QString getOpenElementFileName(QWidget *=nullptr, const QString &=QString())
Definition: qetelementeditor.cpp:1534
void pasteFromElement()
QETElementEditor::pasteFromElement Ask an element to user, copy the xml definition of the element to ...
Definition: qetelementeditor.cpp:1630
The RectangleEditor class This class provides a widget to edit rectangles within the element editor.
Definition: rectangleeditor.h:36
QDockWidget * m_undo_dock
container for the undo list
Definition: qetelementeditor.h:65
QWidget * clearToolsDock()
Definition: qetelementeditor.cpp:1354
QETElementEditor(const QETElementEditor &)
Definition: eseventaddrect.h:29
void setupInterface()
QETElementEditor::setupInterface.
Definition: qetelementeditor.cpp:517
void readSettings()
QETElementEditor::readSettings Read settings.
Definition: qetelementeditor.cpp:1487
QIcon Names
Definition: qeticons.cpp:119
QMenu * display_menu
Definition: qetelementeditor.h:51
QString fileName() const
Definition: qetelementeditor.h:176
QActionGroup * parts
Action group.
Definition: qetelementeditor.h:80
QAction * open_file
Definition: qetelementeditor.h:71
bool slot_saveAsFile()
QETElementEditor::slot_saveAsFile Ask a file to user and save the current edited element to this file...
Definition: qetelementeditor.cpp:1272
QIcon EditSelectNone
Definition: qeticons.cpp:72
QIcon EditSelectAll
Definition: qeticons.cpp:70
bool writeXmlFile(QDomDocument &xml_doc, const QString &filepath, QString *error_message=nullptr)
Definition: qet.cpp:584
void addText()
QETElementEditor::addText Set text creation interface to scene.
Definition: qetelementeditor.cpp:1049
bool read_only
whether the editor is "read-only"
Definition: qetelementeditor.h:49
QStackedWidget * m_tools_dock_stack
Stack of widgets for tools_dock.
Definition: qetelementeditor.h:59
QIcon PartEllipse
Definition: qeticons.cpp:129
void slot_openDxf()
QETElementEditor::slot_openDxf.
Definition: qetelementeditor.cpp:1132
QToolBar * view_toolbar
Definition: qetelementeditor.h:78
void setupActions()
QETElementEditor::setupActions Create action used in Element editor.
Definition: qetelementeditor.cpp:138
QIcon ViewRefresh
Definition: qeticons.cpp:173
QIcon QETLogo
Definition: qeticons.cpp:151
QIcon EditRedo
Definition: qeticons.cpp:68
bool compareCanonicalFilePaths(const QString &, const QString &)
Definition: qet.cpp:559
QToolBar * depth_toolbar
Definition: qetelementeditor.h:78
QDockWidget * m_tools_dock
container for widgets dedicated to primitive edition
Definition: qetelementeditor.h:57
The ElementsLocation class This class represents the location, the location of an element or of a cat...
Definition: elementslocation.h:46
QMenu * settings_menu_
Settings menu.
Definition: qetmainwindow.h:65
void slot_openFile()
Definition: qetelementeditor.cpp:1103
static QETApp * instance()
QETApp::instance.
Definition: qetapp.cpp:153
QToolBar * element_toolbar
Definition: qetelementeditor.h:78
QIcon ZoomOriginal
Definition: qeticons.cpp:180
QIcon RunDxf
Definition: qeticons.cpp:157
QAction * copy
Definition: qetelementeditor.h:74
void addRect()
QETElementEditor::addRect Set rectangle creation interface to scene.
Definition: qetelementeditor.cpp:1017
QToolBar * parts_toolbar
toolbars
Definition: qetelementeditor.h:78
void slot_new()
Definition: qetelementeditor.cpp:1082
Definition: nameslist.h:30
bool toLocation(const ElementsLocation &location)
QETElementEditor::toLocation Save the element to Location.
Definition: qetelementeditor.cpp:929
QMenu * paste_from_menu
Definition: qetelementeditor.h:51
QIcon ro
Definition: qeticons.cpp:200
static bool clipboardMayContainElement()
ElementScene::clipboardMayContainElement.
Definition: elementscene.cpp:621
QAction * save
Definition: qetelementeditor.h:71
QMessageBox::StandardButton warning(QWidget *, const QString &, const QString &, QMessageBox::StandardButtons=QMessageBox::Ok, QMessageBox::StandardButton=QMessageBox::NoButton)
Definition: qetmessagebox.cpp:68
void addTerminal()
QETElementEditor::addTerminal Set terminal creation interface to scene.
Definition: qetelementeditor.cpp:1057
void slot_updatePartsList()
Definition: qetelementeditor.cpp:1444
The CustomElementPart class This abstract class represents a primitive of the visual representation o...
Definition: customelementpart.h:40
ElementsLocation location() const
Definition: qetelementeditor.h:169
QIcon EditPaste
Definition: qeticons.cpp:67
void writeSettings()
QETElementEditor::writeSettings Write the settings.
Definition: qetelementeditor.cpp:1510
QIcon DocumentSave
Definition: qeticons.cpp:58
QAction * selectall
actions for the "edit" menu
Definition: qetelementeditor.h:73
QIcon PartLine
Definition: qeticons.cpp:130
QString toString() const
ElementsLocation::toString.
Definition: elementslocation.cpp:396
void slot_updateInformations()
Definition: qetelementeditor.cpp:611
void slot_open()
Definition: qetelementeditor.cpp:1090
QActionGroup * m_depth_action_group
Definition: qetelementeditor.h:80
void pasteFromFile()
Definition: qetelementeditor.cpp:1597
static ElementsLocation getSaveElementLocation(QWidget *parent=nullptr)
ElementDialog::getSaveElementLocation Display a dialog that allow to user to select an element (exist...
Definition: elementdialog.cpp:290
The ESEventAddText class This ESEvent manage creation of text in an ElementScene.
Definition: eseventaddtext.h:32
QAction * inv_select
Definition: qetelementeditor.h:73
QMessageBox::StandardButton critical(QWidget *, const QString &, const QString &, QMessageBox::StandardButtons=QMessageBox::Ok, QMessageBox::StandardButton=QMessageBox::NoButton)
Definition: qetmessagebox.cpp:23
void saveToLocation(ElementsLocation loc)
QLabel * m_default_informations
label displayed when several primitives are selected
Definition: qetelementeditor.h:61
void contextMenu(QPoint p, QList< QAction * > actions=QList< QAction * >())
QETElementEditor::contextMenu Display a context menu, with all available action.
Definition: qetelementeditor.cpp:431
QIcon PartPolygon
Definition: qeticons.cpp:131
QAction * edit_delete
Definition: qetelementeditor.h:76
The ESEventAddTerminal class This ESEvent manage creation of terminal in an ElementScene.
Definition: eseventaddterminal.h:32
QIcon DocumentOpenRecent
Definition: qeticons.cpp:55
The ElementScene class This class is the canvas allowing the visual edition of an electrial element....
Definition: elementscene.h:40
QIcon EditDelete
Definition: qeticons.cpp:66
QActionGroup * m_zoom_ag
Definition: qetelementeditor.h:80
Definition: ellipseeditor.h:31
The TerminalEditor class This class provides a widget to edit terminals within the element editor....
Definition: terminaleditor.h:33
void addPolygon()
QETElementEditor::addPolygon Set polygon creation interface to scene.
Definition: qetelementeditor.cpp:1033
QString filename_
filename of the currently edited element
Definition: qetelementeditor.h:84
QETElementEditor(QWidget *=nullptr)
Definition: qetelementeditor.cpp:71
QIcon tr
Definition: qeticons.cpp:206
QIcon EditCut
Definition: qeticons.cpp:65
QAction * edit_author
Definition: qetelementeditor.h:76
QAction * cut
Definition: qetelementeditor.h:74
QIcon DocumentSaveAs
Definition: qeticons.cpp:60
QMenu * tools_menu
Definition: qetelementeditor.h:51
QIcon Cancel
Definition: qeticons.cpp:34
bool slot_save()
QETElementEditor::slot_save Save the current editing element. If the filepath or location is unknown,...
Definition: qetelementeditor.cpp:1206
void fromFile(const QString &)
Definition: qetelementeditor.cpp:842
Definition: qetelementeditor.h:33
QIcon Terminal
Definition: qeticons.cpp:164
QIcon ApplicationExit
Definition: qeticons.cpp:27
void UncheckAddPrimitive()
QETElementEditor::UncheckAddPrimitive Uncheck all action related to primitive.
Definition: qetelementeditor.cpp:1073