mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Merge pull request #354 from plc-user/master
a few translated shortcuts were still there ... fixed!
This commit is contained in:
@@ -996,6 +996,7 @@ void QETElementEditor::setupActions()
|
|||||||
addToolBar(Qt::TopToolBarArea, depth_toolbar);
|
addToolBar(Qt::TopToolBarArea, depth_toolbar);
|
||||||
|
|
||||||
//Rotate action
|
//Rotate action
|
||||||
|
ui->m_rotate_action -> setShortcut(Qt::Key_Space);
|
||||||
connect(ui->m_rotate_action, &QAction::triggered, [this]() {this -> elementScene() -> undoStack().push(new RotateElementsCommand(this->elementScene()));});
|
connect(ui->m_rotate_action, &QAction::triggered, [this]() {this -> elementScene() -> undoStack().push(new RotateElementsCommand(this->elementScene()));});
|
||||||
|
|
||||||
//Zoom action
|
//Zoom action
|
||||||
|
|||||||
@@ -492,9 +492,6 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Rotation</string>
|
<string>Rotation</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
|
||||||
<string>Space</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
</action>
|
||||||
<action name="m_import_dxf">
|
<action name="m_import_dxf">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ void QETDiagramEditor::setUpActions()
|
|||||||
|
|
||||||
//Print
|
//Print
|
||||||
m_print = new QAction(QET::Icons::DocumentPrint, tr("Imprimer"), this);
|
m_print = new QAction(QET::Icons::DocumentPrint, tr("Imprimer"), this);
|
||||||
m_print->setShortcut(QKeySequence(QKeySequence::Print));
|
m_print->setShortcut(QKeySequence::Print);
|
||||||
m_print->setStatusTip(tr("Imprime un ou plusieurs folios du projet courant", "status bar tip"));
|
m_print->setStatusTip(tr("Imprime un ou plusieurs folios du projet courant", "status bar tip"));
|
||||||
connect(m_print, &QAction::triggered, [this]() {
|
connect(m_print, &QAction::triggered, [this]() {
|
||||||
auto project = currentProject();
|
auto project = currentProject();
|
||||||
@@ -548,7 +548,7 @@ void QETDiagramEditor::setUpActions()
|
|||||||
open_file ->setShortcut(QKeySequence::Open);
|
open_file ->setShortcut(QKeySequence::Open);
|
||||||
m_close_file ->setShortcut(QKeySequence::Close);
|
m_close_file ->setShortcut(QKeySequence::Close);
|
||||||
m_save_file ->setShortcut(QKeySequence::Save);
|
m_save_file ->setShortcut(QKeySequence::Save);
|
||||||
m_save_file_as ->setShortcut(tr("Ctrl+Shift+S"));
|
m_save_file_as ->setShortcut(Qt::CTRL | Qt::SHIFT | Qt::Key_S);
|
||||||
|
|
||||||
new_file ->setStatusTip( tr("Crée un nouveau projet", "status bar tip") );
|
new_file ->setStatusTip( tr("Crée un nouveau projet", "status bar tip") );
|
||||||
open_file ->setStatusTip( tr("Ouvre un projet existant", "status bar tip") );
|
open_file ->setStatusTip( tr("Ouvre un projet existant", "status bar tip") );
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ void QetGraphicsTableItem::adjustTableToFolio(
|
|||||||
--size_.rwidth(); }
|
--size_.rwidth(); }
|
||||||
table->setSize(size_);
|
table->setSize(size_);
|
||||||
|
|
||||||
//Calcul the maximum row to display to fit the nomenclature into diagram
|
//Calculate the maximum row to display to fit the nomenclature into diagram
|
||||||
auto available_height = drawable_rect.height() - table->pos().y();
|
auto available_height = drawable_rect.height() - table->pos().y();
|
||||||
auto min_row_height = table->minimumRowHeight();
|
auto min_row_height = table->minimumRowHeight();
|
||||||
table->setDisplayNRow(int(floor(available_height/min_row_height))); //Convert a double to int, but max_row_to_display is already rounded an integer so we assume everything is ok
|
table->setDisplayNRow(int(floor(available_height/min_row_height))); //Convert a double to int, but max_row_to_display is already rounded an integer so we assume everything is ok
|
||||||
|
|||||||
@@ -824,7 +824,7 @@ void Conductor::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsSce
|
|||||||
//Position of the last point
|
//Position of the last point
|
||||||
QPointF p = m_moved_segment -> middle();
|
QPointF p = m_moved_segment -> middle();
|
||||||
|
|
||||||
//Calcul the movement
|
//Calculate the movement
|
||||||
m_moved_segment -> moveX(pos_.x() - p.x());
|
m_moved_segment -> moveX(pos_.x() - p.x());
|
||||||
m_moved_segment -> moveY(pos_.y() - p.y());
|
m_moved_segment -> moveY(pos_.y() - p.y());
|
||||||
|
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ void CrossRefItem::updateLabel()
|
|||||||
*/
|
*/
|
||||||
void CrossRefItem::autoPos()
|
void CrossRefItem::autoPos()
|
||||||
{
|
{
|
||||||
//We calcul the position according to the snapTo of the xrefproperties
|
//We calculate the position according to the snapTo of the xrefproperties
|
||||||
if (m_properties.snapTo() == XRefProperties::Bottom)
|
if (m_properties.snapTo() == XRefProperties::Bottom)
|
||||||
QGIUtility::centerToBottomDiagram(this,
|
QGIUtility::centerToBottomDiagram(this,
|
||||||
m_element,
|
m_element,
|
||||||
@@ -564,7 +564,7 @@ void CrossRefItem::setUpCrossBoundingRect(QPainter &painter)
|
|||||||
*/
|
*/
|
||||||
void CrossRefItem::drawAsCross(QPainter &painter)
|
void CrossRefItem::drawAsCross(QPainter &painter)
|
||||||
{
|
{
|
||||||
//calcul the size of the cross
|
//calculate the size of the cross
|
||||||
setUpCrossBoundingRect(painter);
|
setUpCrossBoundingRect(painter);
|
||||||
m_hovered_contacts_map.clear();
|
m_hovered_contacts_map.clear();
|
||||||
|
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ void QetGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
|||||||
QPointF expected_pos = event->scenePos() + m_mouse_to_origin_movement;
|
QPointF expected_pos = event->scenePos() + m_mouse_to_origin_movement;
|
||||||
setPos(expected_pos); // setPos() will snap the expected position to the grid
|
setPos(expected_pos); // setPos() will snap the expected position to the grid
|
||||||
|
|
||||||
//we calcul the real movement apply by setPos()
|
//we calculate the real movement applied by setPos()
|
||||||
QPointF effective_movement = pos() - old_pos;
|
QPointF effective_movement = pos() - old_pos;
|
||||||
if (diagram()) {
|
if (diagram()) {
|
||||||
//we signal the real movement apply to diagram,
|
//we signal the real movement apply to diagram,
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const qreal Terminal::Z = 1000;
|
|||||||
*/
|
*/
|
||||||
void Terminal::init()
|
void Terminal::init()
|
||||||
{
|
{
|
||||||
//Calcul the docking point of the element
|
//Calculate the docking point of the element
|
||||||
//m_pos of d is the docking point of conductor
|
//m_pos of d is the docking point of conductor
|
||||||
dock_elmt_ = d->m_pos;
|
dock_elmt_ = d->m_pos;
|
||||||
switch(d->m_orientation) {
|
switch(d->m_orientation) {
|
||||||
@@ -53,7 +53,7 @@ void Terminal::init()
|
|||||||
case Qet::South: dock_elmt_ += QPointF(0, -Terminal::terminalSize); break;
|
case Qet::South: dock_elmt_ += QPointF(0, -Terminal::terminalSize); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Calcul the bounding rect
|
//Calculate the bounding rect
|
||||||
qreal dcx = d->m_pos.x();
|
qreal dcx = d->m_pos.x();
|
||||||
qreal dcy = d->m_pos.y();
|
qreal dcy = d->m_pos.y();
|
||||||
qreal dex = dock_elmt_.x();
|
qreal dex = dock_elmt_.x();
|
||||||
|
|||||||
@@ -461,19 +461,19 @@ RichTextEditorToolBar::RichTextEditorToolBar(RichTextEditor *editor,
|
|||||||
m_bold_action = createCheckableAction(
|
m_bold_action = createCheckableAction(
|
||||||
QIcon(":/ico/32x32/format-text-bold.png"),
|
QIcon(":/ico/32x32/format-text-bold.png"),
|
||||||
tr("Texte en gras"), editor, SLOT(setFontBold(bool)), this);
|
tr("Texte en gras"), editor, SLOT(setFontBold(bool)), this);
|
||||||
m_bold_action->setShortcut(tr("CTRL+B"));
|
m_bold_action->setShortcut(Qt::CTRL | Qt::Key_B);
|
||||||
addAction(m_bold_action);
|
addAction(m_bold_action);
|
||||||
|
|
||||||
m_italic_action = createCheckableAction(
|
m_italic_action = createCheckableAction(
|
||||||
QIcon(":/ico/32x32/format-text-italic.png"),
|
QIcon(":/ico/32x32/format-text-italic.png"),
|
||||||
tr("Texte en italique"), editor, SLOT(setFontItalic(bool)), this);
|
tr("Texte en italique"), editor, SLOT(setFontItalic(bool)), this);
|
||||||
m_italic_action->setShortcut(tr("CTRL+I"));
|
m_italic_action->setShortcut(Qt::CTRL | Qt::Key_I);
|
||||||
addAction(m_italic_action);
|
addAction(m_italic_action);
|
||||||
|
|
||||||
m_underline_action = createCheckableAction(
|
m_underline_action = createCheckableAction(
|
||||||
QIcon(":/ico/32x32/format-text-underline.png"),
|
QIcon(":/ico/32x32/format-text-underline.png"),
|
||||||
tr("Texte souligé"), editor, SLOT(setFontUnderline(bool)), this);
|
tr("Texte souligé"), editor, SLOT(setFontUnderline(bool)), this);
|
||||||
m_underline_action->setShortcut(tr("CTRL+U"));
|
m_underline_action->setShortcut(Qt::CTRL | Qt::Key_U);
|
||||||
addAction(m_underline_action);
|
addAction(m_underline_action);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ void MoveGraphicsItemCommand::move(const QPointF &movement)
|
|||||||
conductor->pos() + movement);
|
conductor->pos() + movement);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Recalcul the path of other conductors
|
//Recalculate the path of other conductors
|
||||||
for (const auto &conductor : qAsConst(m_content.m_conductors_to_update)) {
|
for (const auto &conductor : qAsConst(m_content.m_conductors_to_update)) {
|
||||||
setupAnimation(conductor, "animPath", 1, 1);
|
setupAnimation(conductor, "animPath", 1, 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user