mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 08:10:52 +01:00
* Added the m_rotate_action to qetelementeditor.ui * Adding QAction to qetelementeditor.cpp and connecting it to new slot RotateElementsCommand defined in editorcommands.cpp
* Some types of elements need to specialize the setRotation method in order to behave correctly : - PartTerminal needs to call setOrientation - PartLine, PartRectangle and PartPolygon need a different rotation center.
This commit is contained in:
committed by
Laurent Trinques
parent
9135099dbf
commit
c640d96bca
@@ -109,6 +109,7 @@ void QETElementEditor::contextMenu(QPoint p, QList<QAction *> actions)
|
||||
menu.addAction(ui->m_delete_action);
|
||||
menu.addAction(ui->m_cut_action);
|
||||
menu.addAction(ui->m_copy_action);
|
||||
menu.addAction((ui->m_rotate_action));
|
||||
menu.addSeparator();
|
||||
menu.addAction(ui->m_paste_action);
|
||||
menu.addAction(ui->m_paste_in_area_action);
|
||||
@@ -1018,7 +1019,10 @@ void QETElementEditor::setupActions()
|
||||
depth_toolbar -> addActions(m_depth_action_group -> actions());
|
||||
addToolBar(Qt::TopToolBarArea, depth_toolbar);
|
||||
|
||||
//Zoom action
|
||||
//Rotate action
|
||||
connect(ui->m_rotate_action, &QAction::triggered, [this]() {this -> elementScene() -> undoStack().push(new RotateElementsCommand(this->elementScene()));});
|
||||
|
||||
//Zoom action
|
||||
ui->m_zoom_in_action -> setShortcut(QKeySequence::ZoomIn);
|
||||
ui->m_zoom_out_action -> setShortcut(QKeySequence::ZoomOut);
|
||||
ui->m_zoom_fit_best_action -> setShortcut(QKeySequence(tr("Ctrl+9")));
|
||||
|
||||
Reference in New Issue
Block a user