Add a button to show network page of ukui-control-center when click

This commit is contained in:
you name 2021-03-29 20:46:54 +08:00
parent 5cf2b7c394
commit 2cc2431944
4 changed files with 26 additions and 1 deletions

View File

@ -56,6 +56,9 @@ OneConnForm::OneConnForm(QWidget *parent, MainWindow *mainWindow, ConfForm *conf
leQssLow = "QLineEdit{border:none;background:transparent;font-size:14px;}";
leQssHigh = "QLineEdit{border:none;background:transparent;font-size:14px;}";
funcBtnQss = "QPushButton{border:0px;border-radius:4px;background-color:rgba(255,255,255,0);color:rgba(107,142,235,0.97);font-size:14px;}"
"QPushButton:Hover{border:0px;border-radius:4px;background-color:rgba(255,255,255,0);color:rgba(151,175,241,0.97);font-size:14px;}"
"QPushButton:Pressed{border-radius:4px;background-color:rgba(255,255,255,0);color:rgba(61,107,229,0.97);font-size:14px;}";
ui->leInfo_1->setStyleSheet(leQssLow);
ui->leInfo_2->setStyleSheet(leQssLow);
@ -122,6 +125,15 @@ OneConnForm::OneConnForm(QWidget *parent, MainWindow *mainWindow, ConfForm *conf
ui->lbWaitingIcon->hide();
ui->btnInfo->hide();
btnProperty = new QPushButton(ui->wbg_3);
btnProperty->resize(60, 20);
btnProperty->move(335, 108);
btnProperty->setText(tr("Property"));//"属性"
btnProperty->setStyleSheet(funcBtnQss);
btnProperty->setFocusPolicy(Qt::NoFocus);
btnProperty->show();
connect(btnProperty,SIGNAL(clicked()),this,SLOT(onBtnPropertyClicked()));
this->mw = mainWindow;
this->cf = confForm;
this->ks = ksnm;
@ -189,6 +201,12 @@ void OneConnForm::mousePressEvent(QMouseEvent *)
emit selectedOneWifiForm(wifiBSsid, H_WIFI_ITEM_BIG_EXTEND);
}
void OneConnForm::onBtnPropertyClicked()
{
qDebug() <<"----------------> hhhhhhhhhh";
system("ukui-control-centor --netconnect");
}
//事件过滤器
bool OneConnForm::eventFilter(QObject *obj, QEvent *event)
{

View File

@ -98,6 +98,7 @@ public slots:
void waitAnimStep();
void startWaiting(bool isToConnect);
void stopWaiting();
void onBtnPropertyClicked();
protected:
void mousePressEvent(QMouseEvent *event);
@ -142,7 +143,8 @@ private:
QString leQssLow, leQssHigh;
QLabel * lbNameText = nullptr;
QHBoxLayout * lbNameLyt = nullptr;
QString key_mgmt;
QString key_mgmt, funcBtnQss;
QPushButton *btnProperty = nullptr;
signals:
void selectedOneWifiForm(QString wifiName, int extendLength);

Binary file not shown.

View File

@ -1629,6 +1629,11 @@
<source>Disconnect</source>
<translation></translation>
</message>
<message>
<location filename="../src/oneconnform.cpp" line="131"/>
<source>Property</source>
<translation> </translation>
</message>
<message>
<source>Input Password...</source>
<translation type="obsolete">...</translation>