Migration of signal/slot to method pointer continued. Mostly simple cases.

This commit is contained in:
Andre Rummler
2026-08-09 01:34:22 +02:00
parent c12137c5a0
commit 201bd4c5f6
15 changed files with 104 additions and 114 deletions
+4 -4
View File
@@ -79,7 +79,7 @@ DiagramView::DiagramView(Diagram *diagram, QWidget *parent) :
m_diagram->loadCndFolioSeq();
m_paste_here = new QAction(QET::Icons::EditPaste, tr("Coller ici", "context menu action"), this);
connect(m_paste_here, SIGNAL(triggered()), this, SLOT(pasteHere()));
connect(m_paste_here, &QAction::triggered, this, &DiagramView::pasteHere);
m_multi_paste = new QAction(QET::Icons::EditPaste, tr("Collage multiple"), this);
connect(m_multi_paste, &QAction::triggered, [this]() {
@@ -89,7 +89,7 @@ DiagramView::DiagramView(Diagram *diagram, QWidget *parent) :
// Setup the action to create a template
m_create_template = new QAction(tr("Créer un template", "context menu action"), this);
connect(m_create_template, SIGNAL(triggered()), this, SLOT(createTemplateFromSelection()));
connect(m_create_template, &QAction::triggered, this, &DiagramView::createTemplateFromSelection);
//setup three separators, to be use in context menu
for(int i=0 ; i<3 ; ++i)
@@ -98,10 +98,10 @@ DiagramView::DiagramView(Diagram *diagram, QWidget *parent) :
m_separators.last()->setSeparator(true);
}
connect(m_diagram, SIGNAL(showDiagram(Diagram*)), this, SIGNAL(showDiagram(Diagram*)));
connect(m_diagram, &Diagram::showDiagram, this, &DiagramView::showDiagram);
connect(m_diagram, &QGraphicsScene::sceneRectChanged, this, &DiagramView::adjustSceneRect);
connect(&(m_diagram -> border_and_titleblock), &BorderTitleBlock::informationChanged, this, &DiagramView::updateWindowTitle);
connect(diagram, SIGNAL(findElementRequired(ElementsLocation)), this, SIGNAL(findElementRequired(ElementsLocation)));
connect(diagram, &Diagram::findElementRequired, this, &DiagramView::findElementRequired);
QShortcut *edit_conductor_color_shortcut = new QShortcut(QKeySequence(Qt::Key_F2), this);
connect(edit_conductor_color_shortcut, &QShortcut::activated, [this]()
+28 -37
View File
@@ -96,44 +96,35 @@ ElementsPanelWidget::ElementsPanelWidget(QWidget *parent) : QWidget(parent) {
context_menu = new QMenu(this);
connect(open_directory, SIGNAL(triggered()), this, SLOT(openDirectoryForSelectedItem()));
connect(copy_path, SIGNAL(triggered()), this, SLOT(copyPathForSelectedItem()));
connect(prj_activate, SIGNAL(triggered()), this, SLOT(activateProject()));
connect(prj_close, SIGNAL(triggered()), this, SLOT(closeProject()));
connect(prj_edit_prop, SIGNAL(triggered()), this, SLOT(editProjectProperties()));
connect(prj_prop_diagram, SIGNAL(triggered()), this, SLOT(editDiagramProperties()));
connect(prj_add_diagram, SIGNAL(triggered()), this, SLOT(newDiagram()));
connect(prj_insert_diagram_above, SIGNAL(triggered()), this, SLOT(insertDiagramAbove()));
connect(prj_insert_diagram_below, SIGNAL(triggered()), this, SLOT(insertDiagramBelow()));
connect(prj_del_diagram, SIGNAL(triggered()), this, SLOT(deleteDiagram()));
connect(prj_duplicate_diagram, SIGNAL(triggered()), this, SLOT(duplicateDiagram()));
connect(prj_move_diagram_up, SIGNAL(triggered()), this, SLOT(moveDiagramUp()));
connect(prj_move_diagram_down, SIGNAL(triggered()), this, SLOT(moveDiagramDown()));
connect(prj_move_diagram_top, SIGNAL(triggered()), this, SLOT(moveDiagramUpTop()));
connect(prj_move_diagram_upx10, SIGNAL(triggered()), this, SLOT(moveDiagramUpx10()));
connect(prj_move_diagram_upx100, SIGNAL(triggered()), this, SLOT(moveDiagramUpx100()));
connect(prj_move_diagram_downx10, SIGNAL(triggered()), this, SLOT(moveDiagramDownx10()));
connect(prj_move_diagram_downx100,SIGNAL(triggered()), this, SLOT(moveDiagramDownx100()));
connect(tbt_add, SIGNAL(triggered()), this, SLOT(addTitleBlockTemplate()));
connect(tbt_edit, SIGNAL(triggered()), this, SLOT(editTitleBlockTemplate()));
connect(tbt_remove, SIGNAL(triggered()), this, SLOT(removeTitleBlockTemplate()));
connect(filter_textfield, SIGNAL(textChanged(const QString &)), this, SLOT(filterEdited(const QString &)));
connect(elements_panel, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(updateButtons()));
connect(elements_panel, &ElementsPanel::customContextMenuRequested, this, &ElementsPanelWidget::handleContextMenu);
connect(
elements_panel,
&ElementsPanel::requestForTitleBlockTemplate,
QETApp::instance(),
[app = QETApp::instance()](const TitleBlockTemplateLocation &location) { app->openTitleBlockTemplate(location); }
);
connect(open_directory, &QAction::triggered, this, &ElementsPanelWidget::openDirectoryForSelectedItem);
connect(copy_path, &QAction::triggered, this, &ElementsPanelWidget::copyPathForSelectedItem);
connect(prj_activate, &QAction::triggered, this, &ElementsPanelWidget::activateProject);
connect(prj_close, &QAction::triggered, this, &ElementsPanelWidget::closeProject);
connect(prj_edit_prop, &QAction::triggered, this, &ElementsPanelWidget::editProjectProperties);
connect(prj_prop_diagram, &QAction::triggered, this, &ElementsPanelWidget::editDiagramProperties);
connect(prj_add_diagram, &QAction::triggered, this, &ElementsPanelWidget::newDiagram);
connect(prj_insert_diagram_above, &QAction::triggered, this, &ElementsPanelWidget::insertDiagramAbove);
connect(prj_insert_diagram_below, &QAction::triggered, this, &ElementsPanelWidget::insertDiagramBelow);
connect(prj_del_diagram, &QAction::triggered, this, &ElementsPanelWidget::deleteDiagram);
connect(prj_duplicate_diagram, &QAction::triggered, this, &ElementsPanelWidget::duplicateDiagram);
connect(prj_move_diagram_up, &QAction::triggered, this, &ElementsPanelWidget::moveDiagramUp);
connect(prj_move_diagram_down, &QAction::triggered, this, &ElementsPanelWidget::moveDiagramDown);
connect(prj_move_diagram_top, &QAction::triggered, this, &ElementsPanelWidget::moveDiagramUpTop);
connect(prj_move_diagram_upx10, &QAction::triggered, this, &ElementsPanelWidget::moveDiagramUpx10);
connect(prj_move_diagram_upx100, &QAction::triggered, this, &ElementsPanelWidget::moveDiagramUpx100);
connect(prj_move_diagram_downx10, &QAction::triggered, this, &ElementsPanelWidget::moveDiagramDownx10);
connect(prj_move_diagram_downx100, &QAction::triggered, this, &ElementsPanelWidget::moveDiagramDownx100);
connect(tbt_add, &QAction::triggered, this, &ElementsPanelWidget::addTitleBlockTemplate);
connect(tbt_edit, &QAction::triggered, this, &ElementsPanelWidget::editTitleBlockTemplate);
connect(tbt_remove, &QAction::triggered, this, &ElementsPanelWidget::removeTitleBlockTemplate);
connect(filter_textfield, &QLineEdit::textChanged, this, &ElementsPanelWidget::filterEdited);
connect(elements_panel, &ElementsPanel::currentItemChanged, this, &ElementsPanelWidget::updateButtons);
// manage double click on TreeWidgetItem
connect(elements_panel, SIGNAL(requestForProjectPropertiesEdition()), this, SLOT(editProjectProperties()) );
connect(elements_panel, SIGNAL(requestForDiagramPropertiesEdition()), this, SLOT(editDiagramProperties()) );
// manage project activation
connect(elements_panel, SIGNAL(requestForProject(QETProject*)), this, SIGNAL(requestForProject(QETProject*)));
connect(elements_panel, &ElementsPanel::requestForProjectPropertiesEdition, this, &ElementsPanelWidget::editProjectProperties);
connect(elements_panel, &ElementsPanel::requestForDiagramPropertiesEdition, this, &ElementsPanelWidget::editDiagramProperties);
// manage project activation
connect(elements_panel, &ElementsPanel::requestForProject, this, &ElementsPanelWidget::requestForProject);
// disposition verticale
QVBoxLayout *vlayout = new QVBoxLayout(this);
+2 -2
View File
@@ -87,8 +87,8 @@ ExportDialog::ExportDialog(
deSelectAll -> setText(tr("Tout décocher"));
hLayout -> addWidget(selectAll);
hLayout -> addWidget(deSelectAll);
connect(selectAll, SIGNAL(clicked()), this, SLOT(slot_selectAllClicked()));
connect(deSelectAll, SIGNAL(clicked()), this, SLOT(slot_deSelectAllClicked()));
connect(selectAll, &QPushButton::clicked, this, &ExportDialog::slot_selectAllClicked);
connect(deSelectAll, &QPushButton::clicked, this, &ExportDialog::slot_deSelectAllClicked);
QVBoxLayout *layout = new QVBoxLayout(this);
+12 -12
View File
@@ -2405,17 +2405,17 @@ void QETApp::initSystemTray()
reduce_appli -> setToolTip(tr("Réduire QElectroTech dans le systray"));
restore_appli -> setToolTip(tr("Restaurer QElectroTech"));
connect(quitter_qet, SIGNAL(triggered()), this, SLOT(quitQET()));
connect(reduce_appli, SIGNAL(triggered()), this, SLOT(reduceEveryEditor()));
connect(restore_appli, SIGNAL(triggered()), this, SLOT(restoreEveryEditor()));
connect(reduce_diagrams, SIGNAL(triggered()), this, SLOT(reduceDiagramEditors()));
connect(restore_diagrams, SIGNAL(triggered()), this, SLOT(restoreDiagramEditors()));
connect(reduce_elements, SIGNAL(triggered()), this, SLOT(reduceElementEditors()));
connect(restore_elements, SIGNAL(triggered()), this, SLOT(restoreElementEditors()));
connect(reduce_templates, SIGNAL(triggered()), this, SLOT(reduceTitleBlockTemplateEditors()));
connect(restore_templates,SIGNAL(triggered()), this, SLOT(restoreTitleBlockTemplateEditors()));
connect(new_diagram, SIGNAL(triggered()), this, SLOT(newDiagramEditor()));
connect(new_element, SIGNAL(triggered()), this, SLOT(newElementEditor()));
connect(quitter_qet, &QAction::triggered, this, &QETApp::quitQET);
connect(reduce_appli, &QAction::triggered, this, &QETApp::reduceEveryEditor);
connect(restore_appli, &QAction::triggered, this, &QETApp::restoreEveryEditor);
connect(reduce_diagrams, &QAction::triggered, this, &QETApp::reduceDiagramEditors);
connect(restore_diagrams, &QAction::triggered, this, &QETApp::restoreDiagramEditors);
connect(reduce_elements, &QAction::triggered, this, &QETApp::reduceElementEditors);
connect(restore_elements, &QAction::triggered, this, &QETApp::restoreElementEditors);
connect(reduce_templates, &QAction::triggered, this, &QETApp::reduceTitleBlockTemplateEditors);
connect(restore_templates, &QAction::triggered, this, &QETApp::restoreTitleBlockTemplateEditors);
connect(new_diagram, &QAction::triggered, this, &QETApp::newDiagramEditor);
connect(new_element, &QAction::triggered, this, &QETApp::newElementEditor);
// initialization of the systray icon
// initialisation de l'icone du systray
@@ -2441,7 +2441,7 @@ template <class T> void QETApp::addWindowsListToMenu(
QAction *current_menu = menu -> addAction(window -> windowTitle());
current_menu -> setCheckable(true);
current_menu -> setChecked(window -> isVisible());
connect(current_menu, SIGNAL(triggered()), &signal_map, SLOT(map()));
connect(current_menu, &QAction::triggered, &signal_map, qOverload<>(&QSignalMapper::map));
signal_map.setMapping(current_menu, window);
}
}
+3 -3
View File
@@ -181,10 +181,10 @@ void QETDiagramEditor::setUpElementsPanel()
connect(pa, &ElementsPanelWidget::requestForProject, this, qOverload<QETProject*>(&QETDiagramEditor::activateProject));
connect(pa, &ElementsPanelWidget::requestForProjectClosing, this, qOverload<QETProject*>(&QETDiagramEditor::closeProject));
connect(pa, SIGNAL(requestForProjectPropertiesEdition (QETProject *)), this, SLOT(editProjectProperties(QETProject *)));
connect(pa, &ElementsPanelWidget::requestForProjectPropertiesEdition, this, qOverload<QETProject*>(&QETDiagramEditor::editProjectProperties));
connect(pa, &ElementsPanelWidget::requestForNewDiagram, this, &QETDiagramEditor::addDiagramToProject);
connect(pa, &ElementsPanelWidget::requestForNewDiagramAt, this, &QETDiagramEditor::addDiagramToProjectAt);
connect(pa, SIGNAL(requestForDiagramPropertiesEdition (Diagram *)), this, SLOT(editDiagramProperties(Diagram *)));
connect(pa, &ElementsPanelWidget::requestForDiagramPropertiesEdition, this, qOverload<Diagram*>(&QETDiagramEditor::editDiagramProperties));
connect(pa, &ElementsPanelWidget::requestForDiagramsDeletion, this, &QETDiagramEditor::removeDiagrams);
connect(pa, &ElementsPanelWidget::requestForDiagramMoveUp, this, &QETDiagramEditor::moveDiagramUp);
connect(pa, &ElementsPanelWidget::requestForDiagramMoveDown, this, &QETDiagramEditor::moveDiagramDown);
@@ -2133,7 +2133,7 @@ void QETDiagramEditor::slot_updateWindowsMenu()
action -> setStatusTip(QString(tr("Active le projet « %1 »")).arg(pv_title));
action -> setCheckable(true);
action -> setChecked(project_view == currentProjectView());
connect(action, SIGNAL(triggered()), &windowMapper, SLOT(map()));
connect(action, &QAction::triggered, &windowMapper, qOverload<>(&QSignalMapper::map));
windowMapper.setMapping(action, project_view);
}
}
+3 -3
View File
@@ -83,13 +83,13 @@ void QETMainWindow::initCommonActions()
fullscreen_action_ = new QAction(this);
updateFullScreenAction();
connect(fullscreen_action_, SIGNAL(triggered()), this, SLOT(toggleFullScreen()));
connect(fullscreen_action_, &QAction::triggered, this, &QETMainWindow::toggleFullScreen);
whatsthis_action_ = QWhatsThis::createAction(this);
about_qet_ = new QAction(QET::Icons::QETLogo, tr("À &propos de QElectroTech"), this);
about_qet_ -> setStatusTip(tr("Affiche des informations sur QElectroTech", "status bar tip"));
connect(about_qet_, SIGNAL(triggered()), qet_app, SLOT(aboutQET()));
connect(about_qet_, &QAction::triggered, qet_app, &QETApp::aboutQET);
manual_online_ = new QAction(QET::Icons::QETManual, tr("Manuel en ligne"), this);
manual_online_ -> setStatusTip(tr("Lance le navigateur par défaut vers le manuel en ligne de QElectroTech", "status bar tip"));
@@ -135,7 +135,7 @@ void QETMainWindow::initCommonActions()
about_qt_ = new QAction(QET::Icons::QtLogo, tr("À propos de &Qt"), this);
about_qt_ -> setStatusTip(tr("Affiche des informations sur la bibliothèque Qt", "status bar tip"));
connect(about_qt_, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
connect(about_qt_, &QAction::triggered, qApp, &QApplication::aboutQt);
diagnostics_action_ = new QAction(QET::Icons::DialogInformation, tr("Enregistrer un rapport de diagnostic..."), this);
diagnostics_action_ -> setStatusTip(tr("Génère un rapport avec les derniers messages de journalisation, pour l'inclure dans un rapport de bug", "status bar tip"));
+2 -2
View File
@@ -128,9 +128,9 @@ void QTextOrientationSpinBoxWidget::build()
// cliquer sur un des carres du QTextOrientationWidget revient a finir une saisie dans le SpinBox
connect(orientation_widget_,
SIGNAL(orientationChanged(double)),
&QTextOrientationWidget::orientationChanged,
spin_box_,
SIGNAL(editingFinished()));
&QDoubleSpinBox::editingFinished);
// lorsque l'utilisateur a change l'orientation,
// on emet un signal avec la valeur de la nouvelle orientation
+22 -22
View File
@@ -411,26 +411,26 @@ void QETTitleBlockTemplateEditor::initActions()
ShortcutManager::instance().registerAction(zoom_fit_, "titleblockeditor.zoom_fit", tr("Éditeur de cartouche"), Qt::CTRL | Qt::Key_9);
ShortcutManager::instance().registerAction(zoom_reset_, "titleblockeditor.zoom_reset", tr("Éditeur de cartouche"), Qt::CTRL | Qt::Key_0);
connect(new_, SIGNAL(triggered()), this, SLOT(newTemplate()));
connect(open_, SIGNAL(triggered()), this, SLOT(open()));
connect(open_from_file_, SIGNAL(triggered()), this, SLOT(openFromFile()));
connect(save_, SIGNAL(triggered()), this, SLOT(save()));
connect(save_as_, SIGNAL(triggered()), this, SLOT(saveAs()));
connect(save_as_file_, SIGNAL(triggered()), this, SLOT(saveAsFile()));
connect(quit_, SIGNAL(triggered()), this, SLOT(quit()));
connect(cut_, SIGNAL(triggered()), template_edition_area_view_, SLOT(cut()));
connect(copy_, SIGNAL(triggered()), template_edition_area_view_, SLOT(copy()));
connect(paste_, SIGNAL(triggered()), template_edition_area_view_, SLOT(paste()));
connect(zoom_in_, SIGNAL(triggered()), template_edition_area_view_, SLOT(zoomIn()));
connect(zoom_out_, SIGNAL(triggered()), template_edition_area_view_, SLOT(zoomOut()));
connect(zoom_fit_, SIGNAL(triggered()), template_edition_area_view_, SLOT(zoomFit()));
connect(zoom_reset_, SIGNAL(triggered()), template_edition_area_view_, SLOT(zoomReset()));
connect(edit_logos_, SIGNAL(triggered()), this, SLOT(editLogos()));
connect(edit_info_, SIGNAL(triggered()), this, SLOT(editTemplateInformation()));
connect(add_row_, SIGNAL(triggered()), template_edition_area_view_, SLOT(addRowAtEnd()));
connect(add_col_, SIGNAL(triggered()), template_edition_area_view_, SLOT(addColumnAtEnd()));
connect(merge_cells_, SIGNAL(triggered()), template_edition_area_view_, SLOT(mergeSelectedCells()));
connect(split_cell_, SIGNAL(triggered()), template_edition_area_view_, SLOT(splitSelectedCell()));
connect(new_, &QAction::triggered, this, &QETTitleBlockTemplateEditor::newTemplate);
connect(open_, &QAction::triggered, this, &QETTitleBlockTemplateEditor::open);
connect(open_from_file_, &QAction::triggered, this, &QETTitleBlockTemplateEditor::openFromFile);
connect(save_, &QAction::triggered, this, &QETTitleBlockTemplateEditor::save);
connect(save_as_, &QAction::triggered, this, qOverload<>(&QETTitleBlockTemplateEditor::saveAs));
connect(save_as_file_, &QAction::triggered, this, &QETTitleBlockTemplateEditor::saveAsFile);
connect(quit_, &QAction::triggered, this, &QETTitleBlockTemplateEditor::quit);
connect(cut_, &QAction::triggered, template_edition_area_view_, &TitleBlockTemplateView::cut);
connect(copy_, &QAction::triggered, template_edition_area_view_, &TitleBlockTemplateView::copy);
connect(paste_, &QAction::triggered, template_edition_area_view_, &TitleBlockTemplateView::paste);
connect(zoom_in_, &QAction::triggered, template_edition_area_view_, &TitleBlockTemplateView::zoomIn);
connect(zoom_out_, &QAction::triggered, template_edition_area_view_, &TitleBlockTemplateView::zoomOut);
connect(zoom_fit_, &QAction::triggered, template_edition_area_view_, &TitleBlockTemplateView::zoomFit);
connect(zoom_reset_, &QAction::triggered, template_edition_area_view_, &TitleBlockTemplateView::zoomReset);
connect(edit_logos_, &QAction::triggered, this, &QETTitleBlockTemplateEditor::editLogos);
connect(edit_info_, &QAction::triggered, this, &QETTitleBlockTemplateEditor::editTemplateInformation);
connect(add_row_, &QAction::triggered, template_edition_area_view_, &TitleBlockTemplateView::addRowAtEnd);
connect(add_col_, &QAction::triggered, template_edition_area_view_, &TitleBlockTemplateView::addColumnAtEnd);
connect(merge_cells_, &QAction::triggered, template_edition_area_view_, &TitleBlockTemplateView::mergeSelectedCells);
connect(split_cell_, &QAction::triggered, template_edition_area_view_, &TitleBlockTemplateView::splitSelectedCell);
}
/**
@@ -595,9 +595,9 @@ void QETTitleBlockTemplateEditor::initLogoManager()
logo_manager_ -> setReadOnly(read_only_);
connect(
logo_manager_,
SIGNAL(logosChanged(const TitleBlockTemplate *)),
&TitleBlockTemplateLogoManager::logosChanged,
template_cell_editor_widget_,
SLOT(updateLogosComboBox(const TitleBlockTemplate *))
&TitleBlockTemplateCellWidget::updateLogosComboBox
);
}
+3 -3
View File
@@ -145,19 +145,19 @@ void TitleBlockTemplateCellWidget::initWidgets()
setLayout(cell_editor_layout_);
// trigger the logo manager
connect(add_logo_input_, SIGNAL(released()), this, SIGNAL(logoEditionRequested()));
connect(add_logo_input_, &QPushButton::released, this, &TitleBlockTemplateCellWidget::logoEditionRequested);
// handle cell modifications
connect(cell_type_input_, qOverload<int>(&QComboBox::activated), this, &TitleBlockTemplateCellWidget::updateFormType);
connect(cell_type_input_, qOverload<int>(&QComboBox::activated), this, &TitleBlockTemplateCellWidget::editType);
connect(name_input_, &QLineEdit::editingFinished, this, &TitleBlockTemplateCellWidget::editName);
connect(label_checkbox_, SIGNAL(clicked(bool)), this, SLOT(editLabelDisplayed()));
connect(label_checkbox_, &QCheckBox::clicked, this, &TitleBlockTemplateCellWidget::editLabelDisplayed);
connect(label_edit_, &QPushButton::released, this, &TitleBlockTemplateCellWidget::editLabel);
connect(value_edit_, &QPushButton::released, this, &TitleBlockTemplateCellWidget::editValue);
connect(horiz_align_input_, qOverload<int>(&QComboBox::activated), this, &TitleBlockTemplateCellWidget::editAlignment);
connect(vert_align_input_, qOverload<int>(&QComboBox::activated), this, &TitleBlockTemplateCellWidget::editAlignment);
connect(font_size_input_, qOverload<int>(&QSpinBox::valueChanged), this, &TitleBlockTemplateCellWidget::editFontSize);
connect(font_adjust_input_, SIGNAL(clicked(bool)), this, SLOT(editAdjust()));
connect(font_adjust_input_, &QCheckBox::clicked, this, &TitleBlockTemplateCellWidget::editAdjust);
connect(logo_input_, qOverload<int>(&QComboBox::activated), this, &TitleBlockTemplateCellWidget::editLogo);
updateFormType(TitleBlockCell::TextCell);
+6 -7
View File
@@ -123,11 +123,10 @@ void TitleBlockTemplateLogoManager::initWidgets()
vlayout0_ -> addWidget(logo_box_);
setLayout(vlayout0_);
connect(
logos_view_,
SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)),
connect(logos_view_,
&QListWidget::currentItemChanged,
this,
SLOT(updateLogoInformations(QListWidgetItem *, QListWidgetItem *))
&TitleBlockTemplateLogoManager::updateLogoInformations
);
connect(add_button_, &QPushButton::released, this, &TitleBlockTemplateLogoManager::addLogo);
connect(export_button_, &QPushButton::released, this, &TitleBlockTemplateLogoManager::exportLogo);
@@ -214,9 +213,9 @@ QString TitleBlockTemplateLogoManager::confirmLogoName(const QString &initial_na
signal_mapper -> setMapping(replace_button, QDialogButtonBox::YesRole);
signal_mapper -> setMapping(rename_button, QDialogButtonBox::NoRole);
signal_mapper -> setMapping(cancel_button, QDialogButtonBox::RejectRole);
connect(replace_button, SIGNAL(clicked()), signal_mapper, SLOT(map()));
connect(rename_button, SIGNAL(clicked()), signal_mapper, SLOT(map()));
connect(cancel_button, SIGNAL(clicked()), signal_mapper, SLOT(map()));
connect(replace_button, &QPushButton::clicked, signal_mapper, qOverload<>(&QSignalMapper::map));
connect(rename_button, &QPushButton::clicked, signal_mapper, qOverload<>(&QSignalMapper::map));
connect(cancel_button, &QPushButton::clicked, signal_mapper, qOverload<>(&QSignalMapper::map));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // TODO Qt6 only: remove, mappedInt() always available
connect(signal_mapper, SIGNAL(mapped(int)), rename_dialog, SLOT(done(int)));
+10 -10
View File
@@ -584,15 +584,15 @@ void TitleBlockTemplateView::init()
delete_row_ = new QAction(QET::Icons::EditTableDeleteRow, tr("Supprimer cette ligne", "context menu"), this);
change_preview_width_ = new QAction( tr("Modifier la largeur de cet aperçu", "context menu"), this);
connect(add_column_before_, SIGNAL(triggered()), this, SLOT(addColumnBefore()));
connect(add_row_before_, SIGNAL(triggered()), this, SLOT(addRowBefore()));
connect(add_column_after_, SIGNAL(triggered()), this, SLOT(addColumnAfter()));
connect(add_row_after_, SIGNAL(triggered()), this, SLOT(addRowAfter()));
connect(edit_column_dim_, SIGNAL(triggered()), this, SLOT(editColumn()));
connect(edit_row_dim_, SIGNAL(triggered()), this, SLOT(editRow()));
connect(delete_column_, SIGNAL(triggered()), this, SLOT(deleteColumn()));
connect(delete_row_, SIGNAL(triggered()), this, SLOT(deleteRow()));
connect(change_preview_width_, SIGNAL(triggered()), this, SLOT(changePreviewWidth()));
connect(add_column_before_, &QAction::triggered, this, &TitleBlockTemplateView::addColumnBefore);
connect(add_row_before_, &QAction::triggered, this, &TitleBlockTemplateView::addRowBefore);
connect(add_column_after_, &QAction::triggered, this, &TitleBlockTemplateView::addColumnAfter);
connect(add_row_after_, &QAction::triggered, this, &TitleBlockTemplateView::addRowAfter);
connect(edit_column_dim_, &QAction::triggered, this, [this]() { editColumn(); });
connect(edit_row_dim_, &QAction::triggered, this, [this]() { editRow(); });
connect(delete_column_, &QAction::triggered, this, &TitleBlockTemplateView::deleteColumn);
connect(delete_row_, &QAction::triggered, this, &TitleBlockTemplateView::deleteRow);
connect(change_preview_width_, &QAction::triggered, this, &TitleBlockTemplateView::changePreviewWidth);
setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
setBackgroundBrush(QBrush(QColor(248, 255, 160)));
@@ -691,7 +691,7 @@ void TitleBlockTemplateView::applyRowsHeights(bool animate) {
animation -> setStartValue(QVariant(tbgrid_ -> rowMinimumHeight(ROW_OFFSET + i)));
animation -> setEndValue(QVariant(1.0 * heights.at(i)));
animation -> setDuration(500);
connect(animation, SIGNAL(finished()), this, SLOT(updateRowsHelperCells()));
connect(animation, &GridLayoutAnimation::finished, this, &TitleBlockTemplateView::updateRowsHelperCells);
animation -> start(QAbstractAnimation::DeleteWhenStopped);
}
+2 -2
View File
@@ -403,9 +403,9 @@ QWidget *ElementPropertiesWidget::generalWidget()
//button widget
QPushButton *find_in_panel = new QPushButton(QET::Icons::ZoomDraw, tr("Retrouver dans le panel"), general_widget);
connect(find_in_panel, SIGNAL(clicked()), this, SLOT(findInPanel()));
connect(find_in_panel, &QPushButton::clicked, this, &ElementPropertiesWidget::findInPanel);
QPushButton *edit_element = new QPushButton(QET::Icons::ElementEdit, tr("Éditer l'élément"), general_widget);
connect(edit_element, SIGNAL(clicked()), this, SLOT(editElement()));
connect(edit_element, &QPushButton::clicked, this, &ElementPropertiesWidget::editElement);
QHBoxLayout *hlayout_ = new QHBoxLayout;
hlayout_->addWidget(find_in_panel);
hlayout_->addWidget(edit_element);
+1 -1
View File
@@ -44,7 +44,7 @@ ProjectPropertiesDialog::ProjectPropertiesDialog(QETProject *project, QWidget *p
m_properties_dialog->addPage(new TerminalStripProjectConfigPage { project, parent });
connect(projectAutoNumConfigPage,SIGNAL(setAutoNum(QString)),newDiagramPage,SLOT(setFolioAutonum(QString)));
connect(projectAutoNumConfigPage, qOverload<QString>(&ProjectAutoNumConfigPage::setAutoNum), newDiagramPage, &NewDiagramPage::setFolioAutonum);
connect(projectAutoNumConfigPage, &ProjectAutoNumConfigPage::saveCurrentTbp, newDiagramPage, &NewDiagramPage::saveCurrentTbp);
connect(projectAutoNumConfigPage, &ProjectAutoNumConfigPage::loadSavedTbp, newDiagramPage, &NewDiagramPage::loadSavedTbp);
}
+4 -4
View File
@@ -353,13 +353,13 @@ void TitleBlockPropertiesWidget::initDialog(
this);
connect(m_tbt_edit,
SIGNAL(triggered()),
&QAction::triggered,
this,
SLOT(editCurrentTitleBlockTemplate()));
&TitleBlockPropertiesWidget::editCurrentTitleBlockTemplate);
connect(m_tbt_duplicate,
SIGNAL(triggered()),
&QAction::triggered,
this,
SLOT(duplicateCurrentTitleBlockTemplate()));
&TitleBlockPropertiesWidget::duplicateCurrentTitleBlockTemplate);
m_tbt_menu = new QMenu(tr("Title block templates actions"), ui->m_tbt_pb);
m_tbt_menu -> addAction(m_tbt_edit);
+2 -2
View File
@@ -120,8 +120,8 @@ void RotateTextsCommand::openDialog()
ori_widget->spinBox()->selectAll();
QDialogButtonBox buttons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QObject::connect(&buttons, SIGNAL(accepted()), &ori_text_dialog, SLOT(accept()));
QObject::connect(&buttons, SIGNAL(rejected()), &ori_text_dialog, SLOT(reject()));
QObject::connect(&buttons, &QDialogButtonBox::accepted, &ori_text_dialog, &QDialog::accept);
QObject::connect(&buttons, &QDialogButtonBox::rejected, &ori_text_dialog, &QDialog::reject);
QVBoxLayout layout_v(&ori_text_dialog);
layout_v.setSizeConstraint(QLayout::SetFixedSize);