修改变量名

This commit is contained in:
zhangyuanyuan1 2022-12-31 16:58:35 +08:00
parent 6d8218869d
commit 5c8caf778d
2 changed files with 10 additions and 10 deletions

View File

@ -45,8 +45,8 @@ void FirewallDialog::initUI()
m_iconLabel = new QLabel(this);
m_contentLabel = new FixLabel(this);
m_suggestLabel = new FixLabel(this);
m_YesBtn = new QPushButton(this);
m_NoBtn = new QPushButton(this);
m_PublicBtn = new QPushButton(this);
m_PrivateBtn = new QPushButton(this);
m_dialogLayout = new QVBoxLayout(this);
m_contentLabel->setFixedWidth(405);
@ -66,8 +66,8 @@ void FirewallDialog::initUI()
btnLayout->setContentsMargins(0, 0, 0, 0);
btnLayout->setSpacing(16);
btnLayout->addStretch();
btnLayout->addWidget(m_YesBtn);
btnLayout->addWidget(m_NoBtn);
btnLayout->addWidget(m_PublicBtn);
btnLayout->addWidget(m_PrivateBtn);
m_dialogLayout->setContentsMargins(22, 16, 22, 24);
m_dialogLayout->setSpacing(0);
@ -86,15 +86,15 @@ void FirewallDialog::initUI()
//不建议在公共网络上开启此功能
m_suggestLabel->setLabelText(tr("It is not recommended to enable this feature on public networks"));
m_YesBtn->setText(tr("Not allowed (recommended)"));
m_NoBtn->setText(tr("Allowed"));
m_PublicBtn->setText(tr("Not allowed (recommended)"));
m_PrivateBtn->setText(tr("Allowed"));
this->closeButton();
this->mainWidget()->setLayout(m_dialogLayout);
onPaletteChanged();
connect(m_YesBtn, &QPushButton::clicked, this, &FirewallDialog::setPublicNetMode);
connect(m_NoBtn, &QPushButton::clicked, this, &FirewallDialog::setPrivateNetMode);
connect(m_PublicBtn, &QPushButton::clicked, this, &FirewallDialog::setPublicNetMode);
connect(m_PrivateBtn, &QPushButton::clicked, this, &FirewallDialog::setPrivateNetMode);
}
void FirewallDialog::centerToScreen()

View File

@ -54,8 +54,8 @@ private:
FixLabel * m_contentLabel = nullptr;
FixLabel * m_suggestLabel = nullptr;
QVBoxLayout *m_dialogLayout = nullptr;
QPushButton *m_YesBtn = nullptr;
QPushButton *m_NoBtn = nullptr;
QPushButton *m_PublicBtn = nullptr;
QPushButton *m_PrivateBtn = nullptr;
Q_SIGNALS:
void setPublicNetMode();