chore: use modern connections
This commit is contained in:
parent
80503cd2c6
commit
159f49c5ee
3 changed files with 19 additions and 9 deletions
|
|
@ -39,25 +39,33 @@ AddClientDialog::AddClientDialog(const QString &clientName, QWidget *parent)
|
||||||
m_pButtonLeft->setIcon(icon);
|
m_pButtonLeft->setIcon(icon);
|
||||||
m_pButtonLeft->setIconSize(IconSize);
|
m_pButtonLeft->setIconSize(IconSize);
|
||||||
gridLayout->addWidget(m_pButtonLeft, 2, 0, 1, 1, Qt::AlignCenter);
|
gridLayout->addWidget(m_pButtonLeft, 2, 0, 1, 1, Qt::AlignCenter);
|
||||||
connect(m_pButtonLeft, SIGNAL(clicked()), this, SLOT(handleButtonLeft()));
|
connect(
|
||||||
|
m_pButtonLeft, &QPushButton::clicked, this,
|
||||||
|
&AddClientDialog::handleButtonLeft);
|
||||||
|
|
||||||
m_pButtonUp = new QPushButton(this);
|
m_pButtonUp = new QPushButton(this);
|
||||||
m_pButtonUp->setIcon(icon);
|
m_pButtonUp->setIcon(icon);
|
||||||
m_pButtonUp->setIconSize(IconSize);
|
m_pButtonUp->setIconSize(IconSize);
|
||||||
gridLayout->addWidget(m_pButtonUp, 1, 1, 1, 1, Qt::AlignCenter);
|
gridLayout->addWidget(m_pButtonUp, 1, 1, 1, 1, Qt::AlignCenter);
|
||||||
connect(m_pButtonUp, SIGNAL(clicked()), this, SLOT(handleButtonUp()));
|
connect(
|
||||||
|
m_pButtonUp, &QPushButton::clicked, this,
|
||||||
|
&AddClientDialog::handleButtonUp);
|
||||||
|
|
||||||
m_pButtonRight = new QPushButton(this);
|
m_pButtonRight = new QPushButton(this);
|
||||||
m_pButtonRight->setIcon(icon);
|
m_pButtonRight->setIcon(icon);
|
||||||
m_pButtonRight->setIconSize(IconSize);
|
m_pButtonRight->setIconSize(IconSize);
|
||||||
gridLayout->addWidget(m_pButtonRight, 2, 2, 1, 1, Qt::AlignCenter);
|
gridLayout->addWidget(m_pButtonRight, 2, 2, 1, 1, Qt::AlignCenter);
|
||||||
connect(m_pButtonRight, SIGNAL(clicked()), this, SLOT(handleButtonRight()));
|
connect(
|
||||||
|
m_pButtonRight, &QPushButton::clicked, this,
|
||||||
|
&AddClientDialog::handleButtonRight);
|
||||||
|
|
||||||
m_pButtonDown = new QPushButton(this);
|
m_pButtonDown = new QPushButton(this);
|
||||||
m_pButtonDown->setIcon(icon);
|
m_pButtonDown->setIcon(icon);
|
||||||
m_pButtonDown->setIconSize(IconSize);
|
m_pButtonDown->setIconSize(IconSize);
|
||||||
gridLayout->addWidget(m_pButtonDown, 3, 1, 1, 1, Qt::AlignCenter);
|
gridLayout->addWidget(m_pButtonDown, 3, 1, 1, 1, Qt::AlignCenter);
|
||||||
connect(m_pButtonDown, SIGNAL(clicked()), this, SLOT(handleButtonDown()));
|
connect(
|
||||||
|
m_pButtonDown, &QPushButton::clicked, this,
|
||||||
|
&AddClientDialog::handleButtonDown);
|
||||||
|
|
||||||
m_pLabelCenter = new QLabel(this);
|
m_pLabelCenter = new QLabel(this);
|
||||||
m_pLabelCenter->setPixmap(QPixmap(":res/icons/64x64/video-display.png"));
|
m_pLabelCenter->setPixmap(QPixmap(":res/icons/64x64/video-display.png"));
|
||||||
|
|
@ -69,7 +77,9 @@ AddClientDialog::AddClientDialog(const QString &clientName, QWidget *parent)
|
||||||
|
|
||||||
QPushButton *advanced =
|
QPushButton *advanced =
|
||||||
m_pDialogButtonBox->addButton("Advanced", QDialogButtonBox::HelpRole);
|
m_pDialogButtonBox->addButton("Advanced", QDialogButtonBox::HelpRole);
|
||||||
connect(advanced, SIGNAL(clicked()), this, SLOT(handleButtonAdvanced()));
|
connect(
|
||||||
|
advanced, &QPushButton::clicked, this,
|
||||||
|
&AddClientDialog::handleButtonAdvanced);
|
||||||
}
|
}
|
||||||
|
|
||||||
AddClientDialog::~AddClientDialog() {
|
AddClientDialog::~AddClientDialog() {
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ DataDownloader::DataDownloader(QObject *parent)
|
||||||
m_pReply(nullptr),
|
m_pReply(nullptr),
|
||||||
m_IsFinished(false) {
|
m_IsFinished(false) {
|
||||||
connect(
|
connect(
|
||||||
&m_NetworkManager, SIGNAL(finished(QNetworkReply *)),
|
&m_NetworkManager, &QNetworkAccessManager::finished, this,
|
||||||
SLOT(complete(QNetworkReply *)));
|
&DataDownloader::complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
DataDownloader::~DataDownloader() {}
|
DataDownloader::~DataDownloader() {}
|
||||||
|
|
|
||||||
|
|
@ -107,8 +107,8 @@ ServerConfigDialog::ServerConfigDialog(
|
||||||
|
|
||||||
m_pButtonAddComputer->setEnabled(!model().isFull());
|
m_pButtonAddComputer->setEnabled(!model().isFull());
|
||||||
connect(
|
connect(
|
||||||
m_pTrashScreenWidget, SIGNAL(screenRemoved()), this,
|
m_pTrashScreenWidget, &TrashScreenWidget::screenRemoved, this,
|
||||||
SLOT(onScreenRemoved()));
|
&ServerConfigDialog::onScreenRemoved);
|
||||||
|
|
||||||
onChange();
|
onChange();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue