PrintSupport: modernize connection signal/slot
Change-Id: I6e482cd9503e96cc43ead21122d3690cdb18151c Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
parent
6a3f41aa46
commit
0fe3ff5c51
@ -260,21 +260,21 @@ QPageSetupWidget::QPageSetupWidget(QWidget *parent)
|
||||
initUnits();
|
||||
initPagesPerSheet();
|
||||
|
||||
connect(m_ui.unitCombo, SIGNAL(activated(int)), this, SLOT(unitChanged()));
|
||||
connect(m_ui.unitCombo, QOverload<int>::of(&QComboBox::activated), this, &QPageSetupWidget::unitChanged);
|
||||
|
||||
connect(m_ui.pageSizeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(pageSizeChanged()));
|
||||
connect(m_ui.pageWidth, SIGNAL(valueChanged(double)), this, SLOT(pageSizeChanged()));
|
||||
connect(m_ui.pageHeight, SIGNAL(valueChanged(double)), this, SLOT(pageSizeChanged()));
|
||||
connect(m_ui.pageSizeCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &QPageSetupWidget::pageSizeChanged);
|
||||
connect(m_ui.pageWidth, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::pageSizeChanged);
|
||||
connect(m_ui.pageHeight, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::pageSizeChanged);
|
||||
|
||||
connect(m_ui.leftMargin, SIGNAL(valueChanged(double)), this, SLOT(leftMarginChanged(double)));
|
||||
connect(m_ui.topMargin, SIGNAL(valueChanged(double)), this, SLOT(topMarginChanged(double)));
|
||||
connect(m_ui.rightMargin, SIGNAL(valueChanged(double)), this, SLOT(rightMarginChanged(double)));
|
||||
connect(m_ui.bottomMargin, SIGNAL(valueChanged(double)), this, SLOT(bottomMarginChanged(double)));
|
||||
connect(m_ui.leftMargin, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::leftMarginChanged);
|
||||
connect(m_ui.topMargin, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::topMarginChanged);
|
||||
connect(m_ui.rightMargin, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::rightMarginChanged);
|
||||
connect(m_ui.bottomMargin, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::bottomMarginChanged);
|
||||
|
||||
connect(m_ui.portrait, SIGNAL(clicked()), this, SLOT(pageOrientationChanged()));
|
||||
connect(m_ui.landscape, SIGNAL(clicked()), this, SLOT(pageOrientationChanged()));
|
||||
connect(m_ui.portrait, &QRadioButton::clicked, this, &QPageSetupWidget::pageOrientationChanged);
|
||||
connect(m_ui.landscape, &QRadioButton::clicked, this, &QPageSetupWidget::pageOrientationChanged);
|
||||
|
||||
connect(m_ui.pagesPerSheetCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(pagesPerSheetChanged()));
|
||||
connect(m_ui.pagesPerSheetCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &QPageSetupWidget::pagesPerSheetChanged);
|
||||
}
|
||||
|
||||
// Init the Units combo box
|
||||
|
@ -251,8 +251,8 @@ QPrintPropertiesDialog::QPrintPropertiesDialog(QAbstractPrintDialog *parent)
|
||||
lay->addWidget(content);
|
||||
lay->addWidget(m_buttons);
|
||||
|
||||
connect(m_buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(accept()));
|
||||
connect(m_buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(m_buttons->button(QDialogButtonBox::Ok), &QPushButton::clicked, this, &QPrintPropertiesDialog::accept);
|
||||
connect(m_buttons->button(QDialogButtonBox::Cancel), &QPushButton::clicked, this, &QPrintPropertiesDialog::reject);
|
||||
|
||||
#if QT_CONFIG(cupsjobwidget)
|
||||
m_jobOptions = new QCupsJobWidget();
|
||||
|
@ -119,7 +119,7 @@ public:
|
||||
: QLineEdit(parent)
|
||||
{
|
||||
setContextMenuPolicy(Qt::NoContextMenu);
|
||||
connect(this, SIGNAL(returnPressed()), SLOT(handleReturnPressed()));
|
||||
connect(this, &LineEdit::returnPressed, this, &LineEdit::handleReturnPressed);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -104,7 +104,7 @@ void QCupsJobWidget::initJobHold()
|
||||
m_ui.jobHoldComboBox->addItem(tr("Weekend (Saturday to Sunday)"), QVariant::fromValue(QCUPSSupport::Weekend));
|
||||
m_ui.jobHoldComboBox->addItem(tr("Specific Time"), QVariant::fromValue(QCUPSSupport::SpecificTime));
|
||||
|
||||
connect(m_ui.jobHoldComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(toggleJobHoldTime()));
|
||||
connect(m_ui.jobHoldComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &QCupsJobWidget::toggleJobHoldTime);
|
||||
|
||||
setJobHold(QCUPSSupport::NoHold, QTime());
|
||||
toggleJobHoldTime();
|
||||
|
Loading…
Reference in New Issue
Block a user