add HowToConnectDialog for guiding wireless device connections

This commit is contained in:
uncor3
2026-04-06 14:42:41 +00:00
parent 8981efff32
commit 166fc8b2f5
4 changed files with 177 additions and 1 deletions
+20 -1
View File
@@ -64,9 +64,23 @@ void WelcomeWidget::setupUI()
m_imageLabel->setAlignment(Qt::AlignCenter);
imageAndWirelessDevicesLayout->addWidget(m_imageLabel, 0, Qt::AlignHCenter);
QVBoxLayout *explorerWithIntructionLayout = new QVBoxLayout();
NetworkDevicesToConnectWidget *networkDevicesWidget =
new NetworkDevicesToConnectWidget();
imageAndWirelessDevicesLayout->addWidget(networkDevicesWidget);
m_howToConnectLabel = createStyledLabel("How to connect a wireless device?",
12, true, COLOR_HYPERLINK);
m_howToConnectLabel->setWordWrap(false);
QPalette howToConnectLabelPalette = m_howToConnectLabel->palette();
howToConnectLabelPalette.setColor(QPalette::WindowText, COLOR_HYPERLINK);
m_howToConnectLabel->setPalette(howToConnectLabelPalette);
m_howToConnectLabel->setCursor(Qt::PointingHandCursor);
connect(m_howToConnectLabel, &ZLabel::clicked, this,
&WelcomeWidget::showHowToConnectDialog);
explorerWithIntructionLayout->addWidget(networkDevicesWidget);
explorerWithIntructionLayout->addWidget(m_howToConnectLabel, 0,
Qt::AlignCenter);
imageAndWirelessDevicesLayout->addLayout(explorerWithIntructionLayout);
m_mainLayout->addLayout(imageAndWirelessDevicesLayout);
m_mainLayout->addSpacing(10);
@@ -135,3 +149,8 @@ ZLabel *WelcomeWidget::createStyledLabel(const QString &text, int fontSize,
return label;
}
void WelcomeWidget::showHowToConnectDialog()
{
HowToConnectDialog(this).exec();
}