需求94645 前端界面支持热点管控
This commit is contained in:
commit
fe9d7143a2
|
@ -25,6 +25,7 @@ Build-Depends: debhelper (>=9),
|
|||
libukui-log4qt-dev,
|
||||
libkysdk-qtwidgets-dev(>= 1.2.0),
|
||||
libukui-common-dev,
|
||||
libkysdk-waylandhelper-dev(>= 1.2.0kylin2),
|
||||
libkysec-dev,
|
||||
Standards-Version: 4.5.0
|
||||
Rules-Requires-Root: no
|
||||
|
@ -37,6 +38,7 @@ Architecture: any
|
|||
Depends: network-manager (>=1.2.6),
|
||||
ukui-control-center (>= 3.1.1+1217),
|
||||
libkysdk-qtwidgets(>= 1.2.0),
|
||||
libkysdk-waylandhelper(>= 1.2.0kylin2),
|
||||
${shlibs:Depends},
|
||||
${misc:Depends}
|
||||
Description: Gui Applet tool for display and edit network simply
|
||||
|
|
|
@ -10,4 +10,5 @@ SUBDIRS = \
|
|||
TRANSLATIONS += \
|
||||
translations/kylin-nm_zh_CN.ts \
|
||||
translations/kylin-nm_tr.ts \
|
||||
translations/kylin-nm_bo.ts
|
||||
translations/kylin-nm_bo.ts \
|
||||
translations/kylin-nm_bo_CN.ts
|
||||
|
|
|
@ -128,5 +128,6 @@
|
|||
<file>res/s/conning-b/10.png</file>
|
||||
<file>res/s/conning-b/11.png</file>
|
||||
<file>res/s/conning-b/12.png</file>
|
||||
<file>translations/kylin-nm_bo_CN.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -48,4 +48,5 @@ INSTALLS += target \
|
|||
TRANSLATIONS += \
|
||||
translations/zh_CN.ts \
|
||||
translations/tr.ts \
|
||||
translations/bo.ts
|
||||
translations/bo.ts\
|
||||
translations/bo_CN.ts
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "mobilehotspotwidget.h"
|
||||
#include <QDebug>
|
||||
#include <QFormLayout>
|
||||
|
||||
#define LABEL_RECT 17, 0, 105, 23
|
||||
#define CONTENTS_MARGINS 0, 0, 0, 0
|
||||
|
@ -7,11 +8,16 @@
|
|||
#define FRAME_MIN_SIZE 550, 60
|
||||
#define FRAME_MAX_SIZE 16777215, 16777215
|
||||
#define CONTECT_FRAME_MAX_SIZE 16777215, 60
|
||||
#define HINT_TEXT_MARGINS 8, 0, 0, 0
|
||||
#define FRAME_MIN_SIZE 550, 60
|
||||
#define LABLE_MIN_WIDTH 188
|
||||
#define COMBOBOX_MIN_WIDTH 200
|
||||
#define LINE_MAX_SIZE 16777215, 1
|
||||
#define LINE_MIN_SIZE 0, 1
|
||||
#define ICON_SIZE 24,24
|
||||
#define PASSWORD_FRAME_MIN_SIZE 550, 60
|
||||
#define PASSWORD_FRAME_MAX_SIZE 16777215, 86
|
||||
#define PASSWORD_ITEM_MARGINS 16, 12, 16, 14
|
||||
|
||||
#define WIRELESS 1
|
||||
|
||||
|
@ -86,7 +92,6 @@ MobileHotspotWidget::MobileHotspotWidget(QWidget *parent) : QWidget(parent)
|
|||
m_connectDevPage->refreshStalist();
|
||||
m_blacklistPage->refreshBlacklist();
|
||||
this->update();
|
||||
|
||||
}
|
||||
|
||||
MobileHotspotWidget::~MobileHotspotWidget()
|
||||
|
@ -102,8 +107,9 @@ bool MobileHotspotWidget::eventFilter(QObject *watched, QEvent *event)
|
|||
return true;
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::MouseButtonRelease) {
|
||||
if (watched == m_switchBtn) {
|
||||
|
||||
if (watched == m_switchBtn) {
|
||||
if (event->type() == QEvent::MouseButtonRelease) {
|
||||
if (!m_interface->isValid()) {
|
||||
return true;
|
||||
}
|
||||
|
@ -125,15 +131,15 @@ bool MobileHotspotWidget::eventFilter(QObject *watched, QEvent *event)
|
|||
return true;
|
||||
}
|
||||
if (m_pwdNameLine->text().length() < 8) {
|
||||
showDesktopNotify(tr("can not create hotspot with password length less than eight!"));
|
||||
// showDesktopNotify(tr("can not create hotspot with password length less than eight!"));
|
||||
return true;
|
||||
}
|
||||
showDesktopNotify(tr("start to open hotspot ") + m_apNameLine->text());
|
||||
QDBusReply<void> reply = m_interface->call("activeWirelessAp",
|
||||
m_apNameLine->text(),
|
||||
m_pwdNameLine->text(),
|
||||
m_freqBandComboBox->currentText(),
|
||||
m_interfaceComboBox->currentText());
|
||||
m_apNameLine->text(),
|
||||
m_pwdNameLine->text(),
|
||||
m_freqBandComboBox->currentText(),
|
||||
m_interfaceComboBox->currentText());
|
||||
if (!reply.isValid()) {
|
||||
qDebug() << "[MobileHotspotWidget] call activeWirelessAp failed ";
|
||||
return true;
|
||||
|
@ -226,6 +232,7 @@ void MobileHotspotWidget::initDbusConnect()
|
|||
|
||||
connect(m_connectDevPage, SIGNAL(setStaIntoBlacklist(QString)), m_blacklistPage, SLOT(onsetStaIntoBlacklist(QString)));
|
||||
|
||||
connect(m_pwdNameLine, SIGNAL(textChanged(QString)), this, SLOT(onPwdTextChanged()));
|
||||
}
|
||||
|
||||
void MobileHotspotWidget::onApLineEditTextEdit(QString text)
|
||||
|
@ -243,6 +250,18 @@ void MobileHotspotWidget::onApLineEditTextEdit(QString text)
|
|||
m_apNameLine->setText(text.left(i));
|
||||
}
|
||||
|
||||
void MobileHotspotWidget::onPwdTextChanged()
|
||||
{
|
||||
if (m_pwdNameLine->text().length() < 8) {
|
||||
m_pwdHintLabel->show();
|
||||
m_pwdHintLabel->setText(tr("Contains at least 8 characters")); //至少包含8个字符
|
||||
} else {
|
||||
m_pwdHintLabel->clear();
|
||||
m_pwdHintLabel->hide();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MobileHotspotWidget::onActiveConnectionChanged(QString deviceName, QString ssid, QString uuid, int status)
|
||||
{
|
||||
if(m_uuid == uuid && status == 4) {
|
||||
|
@ -425,8 +444,8 @@ void MobileHotspotWidget::setPasswordFrame()
|
|||
/* Password */
|
||||
m_passwordFrame = new QFrame(this);
|
||||
m_passwordFrame->setFrameShape(QFrame::Shape::NoFrame);
|
||||
m_passwordFrame->setMinimumSize(FRAME_MIN_SIZE);
|
||||
m_passwordFrame->setMaximumSize(CONTECT_FRAME_MAX_SIZE);
|
||||
m_passwordFrame->setMinimumSize(PASSWORD_FRAME_MIN_SIZE);
|
||||
m_passwordFrame->setMaximumSize(PASSWORD_FRAME_MAX_SIZE);
|
||||
|
||||
QHBoxLayout *passwordHLayout = new QHBoxLayout(m_passwordFrame);
|
||||
|
||||
|
@ -435,12 +454,27 @@ void MobileHotspotWidget::setPasswordFrame()
|
|||
m_pwdNameLine = new KPasswordEdit(this);
|
||||
m_pwdNameLine->setClearButtonEnabled(false);//禁用ClearBtn按钮X
|
||||
m_pwdNameLine->setMinimumWidth(COMBOBOX_MIN_WIDTH);
|
||||
passwordHLayout->setContentsMargins(ITEM_MARGINS);
|
||||
passwordHLayout->setSpacing(0);
|
||||
passwordHLayout->addWidget(m_pwdLabel);
|
||||
passwordHLayout->addWidget(m_pwdNameLine);
|
||||
m_pwdHintLabel= new QLabel(this);
|
||||
m_pwdHintLabel->setFixedHeight(20);
|
||||
m_pwdHintLabel->setContentsMargins(HINT_TEXT_MARGINS);
|
||||
|
||||
m_passwordFrame->setLayout(passwordHLayout);
|
||||
QPalette hintTextColor;
|
||||
hintTextColor.setColor(QPalette::WindowText, Qt::red);
|
||||
m_pwdHintLabel->setPalette(hintTextColor);
|
||||
|
||||
QWidget *pwdInputWidget = new QWidget(this);
|
||||
QVBoxLayout *pwdInputVLayout = new QVBoxLayout(pwdInputWidget);
|
||||
pwdInputVLayout->setContentsMargins(CONTENTS_MARGINS);
|
||||
pwdInputVLayout->setSpacing(0);
|
||||
pwdInputVLayout->addWidget(m_pwdNameLine);
|
||||
pwdInputVLayout->addWidget(m_pwdHintLabel);
|
||||
|
||||
QFormLayout *pwdLayout = new QFormLayout(m_passwordFrame);
|
||||
pwdLayout->setContentsMargins(PASSWORD_ITEM_MARGINS);
|
||||
pwdLayout->setSpacing(0);
|
||||
pwdLayout->addRow(m_pwdLabel, pwdInputWidget);
|
||||
|
||||
m_pwdNameLine->installEventFilter(this);
|
||||
}
|
||||
|
||||
void MobileHotspotWidget::setFreqBandFrame()
|
||||
|
|
|
@ -50,12 +50,10 @@ private:
|
|||
QLabel *m_switchLabel;
|
||||
QLabel *m_apNameLabel;
|
||||
QLabel *m_pwdLabel;
|
||||
QLabel *m_pwdHintLabel;
|
||||
QLabel *m_freqBandLabel;
|
||||
QLabel *m_interfaceLabel;
|
||||
|
||||
|
||||
QPushButton *m_pwdShowBox;
|
||||
|
||||
QFrame *switchAndApNameLine;
|
||||
QFrame *apNameAndPwdLine;
|
||||
QFrame *pwdAndfreqBandLine;
|
||||
|
@ -137,6 +135,8 @@ private slots:
|
|||
void onActiveConnectionChanged(QString deviceName, QString ssid, QString uuid, int status);
|
||||
|
||||
void onApLineEditTextEdit(QString text);
|
||||
|
||||
void onPwdTextChanged();
|
||||
};
|
||||
|
||||
#endif // MOBILEHOTSPOTWIDGET_H
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<context>
|
||||
<name>BlacklistItem</name>
|
||||
<message>
|
||||
<location filename="../blacklistitem.cpp" line="30"/>
|
||||
<location filename="../blacklistitem.cpp" line="32"/>
|
||||
<source>Remove</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<context>
|
||||
<name>BlacklistPage</name>
|
||||
<message>
|
||||
<location filename="../blacklistpage.cpp" line="24"/>
|
||||
<location filename="../blacklistpage.cpp" line="26"/>
|
||||
<source>Blacklist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<context>
|
||||
<name>ConnectDevListItem</name>
|
||||
<message>
|
||||
<location filename="../connectdevlistitem.cpp" line="30"/>
|
||||
<location filename="../connectdevlistitem.cpp" line="31"/>
|
||||
<source>drag into blacklist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<context>
|
||||
<name>ConnectdevPage</name>
|
||||
<message>
|
||||
<location filename="../connectdevpage.cpp" line="25"/>
|
||||
<location filename="../connectdevpage.cpp" line="27"/>
|
||||
<source>Connect device</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -56,79 +56,79 @@
|
|||
<context>
|
||||
<name>MobileHotspotWidget</name>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="30"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="38"/>
|
||||
<source>ukui control center</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="33"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="41"/>
|
||||
<source>ukui control center desktop message</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="101"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="117"/>
|
||||
<source>wirless switch is close or no wireless device</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="105"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="121"/>
|
||||
<source>start to close hotspot</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="114"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="130"/>
|
||||
<source>hotpots name or device is invalid</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="118"/>
|
||||
<source>can not create hotspot with password length less than eight!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="121"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="137"/>
|
||||
<source>start to open hotspot </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="154"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="257"/>
|
||||
<source>Contains at least 8 characters</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="172"/>
|
||||
<source>Hotspot</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="226"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="519"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="268"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="582"/>
|
||||
<source>hotspot already close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="366"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="408"/>
|
||||
<source>Open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="387"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="429"/>
|
||||
<source>Wi-Fi Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="410"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="452"/>
|
||||
<source>Password</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="433"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="490"/>
|
||||
<source>Frequency band</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="459"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="516"/>
|
||||
<source>Net card</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="535"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="543"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="611"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="619"/>
|
||||
<source>hotspot already open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="bo_CN">
|
||||
<context>
|
||||
<name>MobileHotspot</name>
|
||||
<message>
|
||||
<location filename="../mobilehotspot.cpp" line="35"/>
|
||||
<source>MobileHotspot</source>
|
||||
<translation>སྒུལ་བདེའི་ཧའོ་ཚི་ཀུང་སི།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspot.cpp" line="101"/>
|
||||
<source>mobilehotspot</source>
|
||||
<translation>སྒུལ་བདེའི་འཕྲུལ་ཆས།</translation>
|
||||
<extra-contents_path>/mobilehotspot/mobilehotspot</extra-contents_path>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspot.cpp" line="103"/>
|
||||
<source>mobilehotspot open</source>
|
||||
<translation>སྒུལ་བདེའི་འཕྲུལ་ཆས་ཀྱི་སྒོ་ཕྱེ་བ།</translation>
|
||||
<extra-contents_path>/mobilehotspot/mobilehotspot open</extra-contents_path>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MobileHotspotWidget</name>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="36"/>
|
||||
<source>ukui control center</source>
|
||||
<translation>ཝུའུ་ཁི་ལན་གྱི་ཚོད་འཛིན་ལྟེ་གནས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="39"/>
|
||||
<source>ukui control center desktop message</source>
|
||||
<translation>ukui ཚོད་འཛིན་ལྟེ་གནས་ཀྱི་ཅོག་ངོས་ཆ་འཕྲིན།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="100"/>
|
||||
<source>wirless switch is close or no wireless device</source>
|
||||
<translation>སྐུད་མེད་གློག་སྒོ་རྒྱག་པའམ་ཡང་ན་སྐུད་མེད་སྒྲིག་ཆས་མེད་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="104"/>
|
||||
<source>start to close hotspot</source>
|
||||
<translation>སྒོ་རྒྱག་འགོ་བརྩམས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="113"/>
|
||||
<source>hotpots name or device is invalid</source>
|
||||
<translation>ཚ་བ་ཆེ་བའི་མིང་ངམ་སྒྲིག་ཆས་ལ་ནུས་པ་མེད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="117"/>
|
||||
<source>can not create hotspot with password length less than eight!</source>
|
||||
<translation>གསང་གྲངས་ཀྱི་རིང་ཚད་ནི་གླེང་མང་བའི་གནད་དོན་བརྒྱད་ལས་ཆུང་བ་བྱེད་མི་རུང་།!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="120"/>
|
||||
<source>start to open hotspot </source>
|
||||
<translation>ཚ་ཚ་འུར་འུར་གྱི་སྒོ་མོ་ཕྱེ་འགོ་བརྩམས། </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="135"/>
|
||||
<source>Contains at least 8 characters</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="159"/>
|
||||
<source>Hotspot</source>
|
||||
<translation>ཚ་བ་ཆེ་བ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="231"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="537"/>
|
||||
<source>hotspot already close</source>
|
||||
<translation>ཚ་བ་ཆེ་བའི་གནད་དོན་ཐག་ཉེ་རུ་སོང་ཡོད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="371"/>
|
||||
<source>Open</source>
|
||||
<translation>སྒོ་ཕྱེ་བ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="392"/>
|
||||
<source>Wi-Fi Name</source>
|
||||
<translation>Wi-Fiཡི་མིང་།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="413"/>
|
||||
<source>Password</source>
|
||||
<translation>གསང་གྲངས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="451"/>
|
||||
<source>Frequency band</source>
|
||||
<translation>ཐེངས་གྲངས་ཀྱི་རོལ་ཆའི་རུ་ཁག</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="477"/>
|
||||
<source>Net card</source>
|
||||
<translation>དྲ་རྒྱའི་བྱང་བུ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="553"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="561"/>
|
||||
<source>hotspot already open</source>
|
||||
<translation>ཚ་བ་ཆེ་བའི་གནད་དོན་དེ་སྒོ་ཕྱེ་ཟིན།</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
|
@ -4,7 +4,7 @@
|
|||
<context>
|
||||
<name>BlacklistItem</name>
|
||||
<message>
|
||||
<location filename="../blacklistitem.cpp" line="30"/>
|
||||
<location filename="../blacklistitem.cpp" line="32"/>
|
||||
<source>Remove</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<context>
|
||||
<name>BlacklistPage</name>
|
||||
<message>
|
||||
<location filename="../blacklistpage.cpp" line="24"/>
|
||||
<location filename="../blacklistpage.cpp" line="26"/>
|
||||
<source>Blacklist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<context>
|
||||
<name>ConnectDevListItem</name>
|
||||
<message>
|
||||
<location filename="../connectdevlistitem.cpp" line="30"/>
|
||||
<location filename="../connectdevlistitem.cpp" line="31"/>
|
||||
<source>drag into blacklist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<context>
|
||||
<name>ConnectdevPage</name>
|
||||
<message>
|
||||
<location filename="../connectdevpage.cpp" line="25"/>
|
||||
<location filename="../connectdevpage.cpp" line="27"/>
|
||||
<source>Connect device</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -56,79 +56,79 @@
|
|||
<context>
|
||||
<name>MobileHotspotWidget</name>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="30"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="38"/>
|
||||
<source>ukui control center</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="33"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="41"/>
|
||||
<source>ukui control center desktop message</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="101"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="117"/>
|
||||
<source>wirless switch is close or no wireless device</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="105"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="121"/>
|
||||
<source>start to close hotspot</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="114"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="130"/>
|
||||
<source>hotpots name or device is invalid</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="118"/>
|
||||
<source>can not create hotspot with password length less than eight!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="121"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="137"/>
|
||||
<source>start to open hotspot </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="154"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="257"/>
|
||||
<source>Contains at least 8 characters</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="172"/>
|
||||
<source>Hotspot</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="226"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="519"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="268"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="582"/>
|
||||
<source>hotspot already close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="366"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="408"/>
|
||||
<source>Open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="387"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="429"/>
|
||||
<source>Wi-Fi Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="410"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="452"/>
|
||||
<source>Password</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="433"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="490"/>
|
||||
<source>Frequency band</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="459"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="516"/>
|
||||
<source>Net card</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="535"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="543"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="611"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="619"/>
|
||||
<source>hotspot already open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
Binary file not shown.
|
@ -4,7 +4,7 @@
|
|||
<context>
|
||||
<name>BlacklistItem</name>
|
||||
<message>
|
||||
<location filename="../blacklistitem.cpp" line="30"/>
|
||||
<location filename="../blacklistitem.cpp" line="32"/>
|
||||
<source>Remove</source>
|
||||
<translation>移出</translation>
|
||||
</message>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<context>
|
||||
<name>BlacklistPage</name>
|
||||
<message>
|
||||
<location filename="../blacklistpage.cpp" line="24"/>
|
||||
<location filename="../blacklistpage.cpp" line="26"/>
|
||||
<source>Blacklist</source>
|
||||
<translation>设备黑名单</translation>
|
||||
</message>
|
||||
|
@ -20,22 +20,15 @@
|
|||
<context>
|
||||
<name>ConnectDevListItem</name>
|
||||
<message>
|
||||
<location filename="../connectdevlistitem.cpp" line="30"/>
|
||||
<location filename="../connectdevlistitem.cpp" line="31"/>
|
||||
<source>drag into blacklist</source>
|
||||
<translation>添加进黑名单</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ConnectDeviceListItem</name>
|
||||
<message>
|
||||
<source>drag into blacklist</source>
|
||||
<translation type="vanished">添加进黑名单</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ConnectdevPage</name>
|
||||
<message>
|
||||
<location filename="../connectdevpage.cpp" line="25"/>
|
||||
<location filename="../connectdevpage.cpp" line="27"/>
|
||||
<source>Connect device</source>
|
||||
<translation>连接设备</translation>
|
||||
</message>
|
||||
|
@ -63,85 +56,85 @@
|
|||
<context>
|
||||
<name>MobileHotspotWidget</name>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="30"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="38"/>
|
||||
<source>ukui control center</source>
|
||||
<translation>控制面板</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="33"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="41"/>
|
||||
<source>ukui control center desktop message</source>
|
||||
<translation>控制面板桌面通知</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="101"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="117"/>
|
||||
<source>wirless switch is close or no wireless device</source>
|
||||
<translation>无线开关已关闭或不存在有热点功能的无线网卡</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="105"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="121"/>
|
||||
<source>start to close hotspot</source>
|
||||
<translation>开始关闭热点</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="114"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="130"/>
|
||||
<source>hotpots name or device is invalid</source>
|
||||
<translation>热点名称或设备错误</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="118"/>
|
||||
<source>can not create hotspot with password length less than eight!</source>
|
||||
<translation>不能创建密码长度小于八位的热点!</translation>
|
||||
<translation type="vanished">不能创建密码长度小于八位的热点!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="121"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="137"/>
|
||||
<source>start to open hotspot </source>
|
||||
<translation>开始创建热点</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="154"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="257"/>
|
||||
<source>Contains at least 8 characters</source>
|
||||
<translation>至少包含8个字符</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="172"/>
|
||||
<source>Hotspot</source>
|
||||
<translation>移动热点</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="226"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="519"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="268"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="582"/>
|
||||
<source>hotspot already close</source>
|
||||
<translation>热点已关闭</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="366"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="408"/>
|
||||
<source>Open</source>
|
||||
<translation>开启</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="387"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="429"/>
|
||||
<source>Wi-Fi Name</source>
|
||||
<translation>Wi-Fi名称</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="410"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="452"/>
|
||||
<source>Password</source>
|
||||
<translation>网络密码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="433"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="490"/>
|
||||
<source>Frequency band</source>
|
||||
<translation>网络频带</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="459"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="516"/>
|
||||
<source>Net card</source>
|
||||
<translation>共享网卡端口</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="535"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="543"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="611"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="619"/>
|
||||
<source>hotspot already open</source>
|
||||
<translation>热点已开启</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Connect device</source>
|
||||
<translation type="vanished">连接设备</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
|
@ -207,8 +207,8 @@ void NetConnect::initComponent() {
|
|||
getDeviceStatusMap(deviceStatusMap);
|
||||
if (deviceStatusMap.isEmpty()) {
|
||||
qDebug() << "[Netconnect] no device exist when init, set switch disable";
|
||||
wiredSwitch->setCheckable(false);
|
||||
wiredSwitch->setChecked(false);
|
||||
wiredSwitch->setCheckable(false);
|
||||
}
|
||||
initNet();
|
||||
|
||||
|
@ -593,8 +593,8 @@ void NetConnect::onDeviceStatusChanged()
|
|||
}
|
||||
deviceStatusMap = map;
|
||||
if (deviceStatusMap.isEmpty()) {
|
||||
wiredSwitch->setCheckable(false);
|
||||
wiredSwitch->setChecked(false);
|
||||
wiredSwitch->setCheckable(false);
|
||||
} else {
|
||||
wiredSwitch->setCheckable(true);
|
||||
setSwitchStatus();
|
||||
|
|
|
@ -50,4 +50,5 @@ INSTALLS += target \
|
|||
TRANSLATIONS += \
|
||||
translations/zh_CN.ts \
|
||||
translations/tr.ts \
|
||||
translations/bo.ts
|
||||
translations/bo.ts \
|
||||
translations/bo_CN.ts
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="bo_CN">
|
||||
<context>
|
||||
<name>AddNetBtn</name>
|
||||
<message>
|
||||
<location filename="../addnetbtn.cpp" line="22"/>
|
||||
<source>Add WiredNetork</source>
|
||||
<translation>སྐུད་ཡོད་བརྙན་འཕྲིན་ཁ་སྣོན་བྱས་ཡོད།</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>NetConnect</name>
|
||||
<message>
|
||||
<location filename="../netconnect.ui" line="50"/>
|
||||
<location filename="../netconnect.cpp" line="152"/>
|
||||
<source>Wired Network</source>
|
||||
<translation>སྐུད་ཡོད་བརྙན་འཕྲིན་དྲ་བ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../netconnect.ui" line="112"/>
|
||||
<location filename="../netconnect.cpp" line="154"/>
|
||||
<source>open</source>
|
||||
<translation>སྒོ་ཕྱེ་བ།</translation>
|
||||
<extra-contents_path>/netconnect/open</extra-contents_path>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../netconnect.ui" line="198"/>
|
||||
<location filename="../netconnect.cpp" line="151"/>
|
||||
<source>Advanced settings</source>
|
||||
<translation>སྔོན་ཐོན་གྱི་སྒྲིག་བཀོད།</translation>
|
||||
<extra-contents_path>/netconnect/Advanced settings"</extra-contents_path>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../netconnect.cpp" line="63"/>
|
||||
<source>ukui control center</source>
|
||||
<translation>ཝུའུ་ཁི་ལན་གྱི་ཚོད་འཛིན་ལྟེ་གནས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../netconnect.cpp" line="66"/>
|
||||
<source>ukui control center desktop message</source>
|
||||
<translation>ukui ཚོད་འཛིན་ལྟེ་གནས་ཀྱི་ཅོག་ངོས་ཆ་འཕྲིན།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../netconnect.cpp" line="80"/>
|
||||
<source>WiredConnect</source>
|
||||
<translation>སྐུད་ཡོད་སྦྲེལ་མཐུད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../netconnect.cpp" line="177"/>
|
||||
<source>No ethernet device avaliable</source>
|
||||
<translation>ཨེ་ཙི་དྲ་རྒྱའི་སྒྲིག་ཆས་ལ་བཙན་འཛུལ་བྱས་མི་ཆོག།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../netconnect.cpp" line="426"/>
|
||||
<location filename="../netconnect.cpp" line="833"/>
|
||||
<source>connected</source>
|
||||
<translation>འབྲེལ་མཐུད་བྱེད་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../netconnect.cpp" line="490"/>
|
||||
<source>card</source>
|
||||
<translation>བྱང་བུ།</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
Binary file not shown.
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="bo_CN">
|
||||
<context>
|
||||
<name>WlanConnect</name>
|
||||
<message>
|
||||
<location filename="../wlanconnect.ui" line="14"/>
|
||||
<location filename="../wlanconnect.cpp" line="97"/>
|
||||
<source>WlanConnect</source>
|
||||
<translation>ཝུའུ་ལན་འབྲེལ་མཐུད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../wlanconnect.ui" line="35"/>
|
||||
<location filename="../wlanconnect.cpp" line="168"/>
|
||||
<source>WLAN</source>
|
||||
<translation>སྐུད་མེད་ཅུས་ཁོངས་ཀྱི་དྲ་བ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../wlanconnect.ui" line="94"/>
|
||||
<location filename="../wlanconnect.cpp" line="170"/>
|
||||
<source>open</source>
|
||||
<translation>སྒོ་ཕྱེ་བ།</translation>
|
||||
<extra-contents_path>/wlanconnect/open</extra-contents_path>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../wlanconnect.ui" line="147"/>
|
||||
<location filename="../wlanconnect.cpp" line="167"/>
|
||||
<source>Advanced settings</source>
|
||||
<translation>སྔོན་ཐོན་གྱི་སྒྲིག་བཀོད།</translation>
|
||||
<extra-contents_path>/wlanconnect/Advanced settings"</extra-contents_path>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../wlanconnect.cpp" line="80"/>
|
||||
<source>ukui control center</source>
|
||||
<translation>ཝུའུ་ཁི་ལན་གྱི་ཚོད་འཛིན་ལྟེ་གནས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../wlanconnect.cpp" line="83"/>
|
||||
<source>ukui control center desktop message</source>
|
||||
<translation>ངོས་ལེབ་ངོས་ཀྱི་བརྡ་ཐོ་ཚོད་འཛིན་བྱ་དགོས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../wlanconnect.cpp" line="192"/>
|
||||
<source>No wireless network card detected</source>
|
||||
<translation>སྐུད་མེད་དྲ་རྒྱའི་བྱང་བུ་མ་རྙེད་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../wlanconnect.cpp" line="330"/>
|
||||
<location filename="../wlanconnect.cpp" line="933"/>
|
||||
<location filename="../wlanconnect.cpp" line="995"/>
|
||||
<source>connected</source>
|
||||
<translation>འབྲེལ་མཐུད་བྱེད་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../wlanconnect.cpp" line="879"/>
|
||||
<source>card</source>
|
||||
<translation>བྱང་བུ།</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
|
@ -267,8 +267,8 @@ void WlanConnect::initComponent() {
|
|||
getDeviceList(deviceList);
|
||||
if (deviceList.isEmpty()) {
|
||||
qDebug() << "[WlanConnect]no device exist when init, set switch disable";
|
||||
m_wifiSwitch->setCheckable(false);
|
||||
m_wifiSwitch->setChecked(false);
|
||||
m_wifiSwitch->setCheckable(false);
|
||||
}
|
||||
initNet();
|
||||
|
||||
|
@ -525,8 +525,8 @@ void WlanConnect::onDeviceStatusChanged()
|
|||
}
|
||||
deviceList = list;
|
||||
if (deviceList.isEmpty()) {
|
||||
m_wifiSwitch->setCheckable(false);
|
||||
m_wifiSwitch->setChecked(false);
|
||||
m_wifiSwitch->setCheckable(false);
|
||||
} else {
|
||||
m_wifiSwitch->setCheckable(true);
|
||||
setSwitchStatus();
|
||||
|
|
|
@ -50,4 +50,5 @@ INSTALLS += target \
|
|||
TRANSLATIONS += \
|
||||
translations/zh_CN.ts \
|
||||
translations/tr.ts \
|
||||
translations/bo.ts
|
||||
translations/bo.ts \
|
||||
translations/bo_CN.ts
|
||||
|
|
|
@ -167,7 +167,7 @@ void LanListItem::onInfoButtonClicked()
|
|||
}
|
||||
|
||||
netDetail = new NetDetail(m_deviceName, m_lanConnectItem.m_connectName,
|
||||
m_lanConnectItem.m_connectUuid, isActivated,false, false, this);
|
||||
m_lanConnectItem.m_connectUuid, isActivated,false, false);
|
||||
|
||||
connect(netDetail, &NetDetail::destroyed, [&](){
|
||||
if (netDetail != nullptr) {
|
||||
|
|
|
@ -233,6 +233,7 @@ void WlanListItem::initWlanUI()
|
|||
m_pwdLineEdit = new KPasswordEdit(m_pwdFrame);
|
||||
m_pwdLineEdit->setFixedWidth(LINEEDIT_WIDTH);
|
||||
m_pwdLineEdit->setClearButtonEnabled(false); //禁用ClearBtn按钮
|
||||
m_pwdLineEdit->setAttribute(Qt::WA_InputMethodEnabled, true); //打开输入法
|
||||
// m_pwdLineEdit->setAttribute(Qt::WA_InputMethodEnabled, false);
|
||||
// m_pwdLineEdit->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
|
||||
|
@ -402,7 +403,7 @@ void WlanListItem::onInfoButtonClicked()
|
|||
|
||||
netDetail = new NetDetail(m_wlanDevice, m_wirelessNetItem.m_NetSsid,
|
||||
m_wirelessNetItem.m_connectUuid, isActive, true,
|
||||
!m_wirelessNetItem.m_isConfigured, this);
|
||||
!m_wirelessNetItem.m_isConfigured);
|
||||
connect(netDetail, &NetDetail::destroyed, [&](){
|
||||
if (netDetail != nullptr) {
|
||||
netDetail = nullptr;
|
||||
|
@ -441,7 +442,7 @@ void WlanListItem::onNetButtonClicked()
|
|||
KWindowSystem::raiseWindow(enterpriseWlanDialog->winId());
|
||||
return;
|
||||
} else {
|
||||
enterpriseWlanDialog = new EnterpriseWlanDialog(m_wirelessNetItem, m_wlanDevice, this);
|
||||
enterpriseWlanDialog = new EnterpriseWlanDialog(m_wirelessNetItem, m_wlanDevice);
|
||||
connect(enterpriseWlanDialog, &EnterpriseWlanDialog::enterpriseWlanDialogClose, this, &WlanListItem::onEnterpriseWlanDialogClose);
|
||||
enterpriseWlanDialog->show();
|
||||
isEnterpriseWlanDialogShow = true;
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
#include "kylinnetworkdeviceresource.h"
|
||||
#include "../backend/dbus-interface/kylinagentinterface.h"
|
||||
|
||||
#include "ukuistylehelper/ukuistylehelper.h"
|
||||
#include "windowmanager/windowmanager.h"
|
||||
|
||||
|
||||
#define MAINWINDOW_WIDTH 420
|
||||
#define MAINWINDOW_HEIGHT 476
|
||||
|
@ -44,13 +47,16 @@ void MainWindow::showMainwindow()
|
|||
/**
|
||||
* 设置主界面跳过任务栏和分页器的属性,隐藏再次展示有可能辉冲刷掉该属性,需要展示时重新设置
|
||||
*/
|
||||
const KWindowInfo info(this->winId(), NET::WMState);
|
||||
if (!info.hasState(NET::SkipTaskbar) || !info.hasState(NET::SkipPager)) {
|
||||
KWindowSystem::setState(this->winId(), NET::SkipTaskbar | NET::SkipPager);
|
||||
QString platform = QGuiApplication::platformName();
|
||||
if(!platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive))
|
||||
{
|
||||
const KWindowInfo info(this->winId(), NET::WMState);
|
||||
if (!info.hasState(NET::SkipTaskbar) || !info.hasState(NET::SkipPager)) {
|
||||
KWindowSystem::setState(this->winId(), NET::SkipTaskbar | NET::SkipPager);
|
||||
}
|
||||
}
|
||||
|
||||
this->resetWindowPosition();
|
||||
this->showNormal();
|
||||
this->showByWaylandHelper();
|
||||
this->raise();
|
||||
this->activateWindow();
|
||||
emit this->mainWindowVisibleChanged(true);
|
||||
|
@ -164,11 +170,15 @@ void MainWindow::initWindowProperties()
|
|||
this->setAttribute(Qt::WA_TranslucentBackground, true); //透明
|
||||
this->setFocusPolicy(Qt::NoFocus);
|
||||
|
||||
QPainterPath path;
|
||||
auto rect = this->rect();
|
||||
// path.addRoundedRect(rect, 12, 12);
|
||||
path.addRect(rect);
|
||||
KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); //背景模糊
|
||||
QString platform = QGuiApplication::platformName();
|
||||
if(!platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive))
|
||||
{
|
||||
QPainterPath path;
|
||||
auto rect = this->rect();
|
||||
// path.addRoundedRect(rect, 12, 12);
|
||||
path.addRect(rect);
|
||||
KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); //背景模糊
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::paintEvent(QPaintEvent *event)
|
||||
|
@ -335,7 +345,10 @@ void MainWindow::resetWindowPosition()
|
|||
|
||||
if (m_isShowInCenter) {
|
||||
QRect availableGeometry = qApp->primaryScreen()->availableGeometry();
|
||||
this->move((availableGeometry.width() - this->width())/2, (availableGeometry.height() - this->height())/2);
|
||||
QRect rect((availableGeometry.width() - this->width())/2, (availableGeometry.height() - this->height())/2,
|
||||
this->width(), this->height());
|
||||
kdk::WindowManager::setGeometry(this->windowHandle(), rect);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -350,11 +363,12 @@ void MainWindow::resetWindowPosition()
|
|||
"org.ukui.panel",
|
||||
QDBusConnection::sessionBus());
|
||||
}
|
||||
QRect rect;
|
||||
QDBusReply<QVariantList> reply = m_positionInterface->call("GetPrimaryScreenGeometry");
|
||||
//reply获取的参数共5个,分别是 主屏可用区域的起点x坐标,主屏可用区域的起点y坐标,主屏可用区域的宽度,主屏可用区域高度,任务栏位置
|
||||
if (!m_positionInterface->isValid() || !reply.isValid() || reply.value().size() < 5) {
|
||||
qCritical() << QDBusConnection::sessionBus().lastError().message();
|
||||
this->setGeometry(0, 0, this->width(), this->height());
|
||||
kdk::WindowManager::setGeometry(this->windowHandle(), QRect(0, 0, this->width(), this->height()));
|
||||
return;
|
||||
}
|
||||
QVariantList position_list = reply.value();
|
||||
|
@ -362,29 +376,30 @@ void MainWindow::resetWindowPosition()
|
|||
switch(position){
|
||||
case PANEL_TOP:
|
||||
//任务栏位于上方
|
||||
this->setGeometry(position_list.at(0).toInt() + position_list.at(2).toInt() - this->width() - MARGIN,
|
||||
position_list.at(1).toInt() + MARGIN,
|
||||
this->width(), this->height());
|
||||
rect = QRect(position_list.at(0).toInt() + position_list.at(2).toInt() - this->width() - MARGIN,
|
||||
position_list.at(1).toInt() + MARGIN,
|
||||
this->width(), this->height());
|
||||
break;
|
||||
//任务栏位于左边
|
||||
case PANEL_LEFT:
|
||||
this->setGeometry(position_list.at(0).toInt() + MARGIN,
|
||||
position_list.at(1).toInt() + reply.value().at(3).toInt() - this->height() - MARGIN,
|
||||
this->width(), this->height());
|
||||
rect = QRect(position_list.at(0).toInt() + MARGIN,
|
||||
position_list.at(1).toInt() + reply.value().at(3).toInt() - this->height() - MARGIN,
|
||||
this->width(), this->height());
|
||||
break;
|
||||
//任务栏位于右边
|
||||
case PANEL_RIGHT:
|
||||
this->setGeometry(position_list.at(0).toInt() + position_list.at(2).toInt() - this->width() - MARGIN,
|
||||
position_list.at(1).toInt() + reply.value().at(3).toInt() - this->height() - MARGIN,
|
||||
this->width(), this->height());
|
||||
rect = QRect(position_list.at(0).toInt() + position_list.at(2).toInt() - this->width() - MARGIN,
|
||||
position_list.at(1).toInt() + reply.value().at(3).toInt() - this->height() - MARGIN,
|
||||
this->width(), this->height());
|
||||
break;
|
||||
//任务栏位于下方
|
||||
default:
|
||||
this->setGeometry(position_list.at(0).toInt() + position_list.at(2).toInt() - this->width() - MARGIN,
|
||||
position_list.at(1).toInt() + reply.value().at(3).toInt() - this->height() - MARGIN,
|
||||
this->width(), this->height());
|
||||
rect = QRect(position_list.at(0).toInt() + position_list.at(2).toInt() - this->width() - MARGIN,
|
||||
position_list.at(1).toInt() + reply.value().at(3).toInt() - this->height() - MARGIN,
|
||||
this->width(), this->height());
|
||||
break;
|
||||
}
|
||||
kdk::WindowManager::setGeometry(this->windowHandle(), rect);
|
||||
qDebug() << " Position of ukui-panel is " << position << "; Position of mainwindow is " << this->geometry() << "." << Q_FUNC_INFO << __LINE__;
|
||||
}
|
||||
|
||||
|
@ -461,6 +476,16 @@ void MainWindow::showControlCenter()
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::showByWaylandHelper()
|
||||
{
|
||||
//去除窗管标题栏,传入参数为QWidget*
|
||||
kdk::UkuiStyleHelper::self()->removeHeader(this);
|
||||
this->show();
|
||||
resetWindowPosition();
|
||||
//设置窗体位置,传入参数为QWindow*,QRect
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief MainWindow::onTrayIconActivated 点击托盘图标的槽函数
|
||||
*/
|
||||
|
|
|
@ -133,6 +133,7 @@ private:
|
|||
void initWindowTheme();
|
||||
void resetWindowTheme();
|
||||
void showControlCenter();
|
||||
void showByWaylandHelper();
|
||||
double m_transparency=1.0; //透明度
|
||||
QGSettings * m_transGsettings; //透明度配置文件
|
||||
int currentIconIndex=0;
|
||||
|
|
|
@ -10,7 +10,7 @@ extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int tran
|
|||
DetailPage::DetailPage(bool isWlan, bool isCreate, QWidget *parent)
|
||||
: m_IsWlan(isWlan), m_IsCreate(isCreate), QFrame(parent)
|
||||
{
|
||||
this->setFrameShape(QFrame::Shape::StyledPanel);
|
||||
// this->setFrameShape(QFrame::Shape::StyledPanel);
|
||||
this->setMaximumWidth(960);
|
||||
initUI();
|
||||
if (isCreate) {
|
||||
|
@ -133,27 +133,29 @@ QPalette DetailPage::getTheme()
|
|||
{
|
||||
//获取当前主题的颜色
|
||||
QPalette pal = qApp->palette();
|
||||
QGSettings * styleGsettings = nullptr;
|
||||
const QByteArray style_id(THEME_SCHAME);
|
||||
if (QGSettings::isSchemaInstalled(style_id)) {
|
||||
styleGsettings = new QGSettings(style_id);
|
||||
QString currentTheme = styleGsettings->get(COLOR_THEME).toString();
|
||||
if(currentTheme == "ukui-default"){
|
||||
pal = lightPalette(this);
|
||||
}
|
||||
}
|
||||
if (styleGsettings != nullptr) {
|
||||
delete styleGsettings;
|
||||
styleGsettings = nullptr;
|
||||
}
|
||||
// QGSettings * styleGsettings = nullptr;
|
||||
// const QByteArray style_id(THEME_SCHAME);
|
||||
// if (QGSettings::isSchemaInstalled(style_id)) {
|
||||
// styleGsettings = new QGSettings(style_id);
|
||||
// QString currentTheme = styleGsettings->get(COLOR_THEME).toString();
|
||||
// if(currentTheme == "ukui-default"){
|
||||
// pal = lightPalette(this);
|
||||
// }
|
||||
// }
|
||||
// if (styleGsettings != nullptr) {
|
||||
// delete styleGsettings;
|
||||
// styleGsettings = nullptr;
|
||||
// }
|
||||
return pal;
|
||||
}
|
||||
|
||||
void DetailPage::initUI() {
|
||||
m_layout = new QVBoxLayout(this);
|
||||
m_layout->setContentsMargins(0,0,0,0);
|
||||
m_layout->setSpacing(0);
|
||||
|
||||
QWidget *mDetailFrame = new QFrame(this);
|
||||
mDetailFrame->setFixedHeight(362);
|
||||
m_DetailLayout = new QVBoxLayout(mDetailFrame);
|
||||
m_DetailLayout->setContentsMargins(0,0,0,0);
|
||||
|
||||
|
@ -163,6 +165,8 @@ void DetailPage::initUI() {
|
|||
m_listWidget->setFocusPolicy(Qt::FocusPolicy::NoFocus);
|
||||
m_DetailLayout->addWidget(m_listWidget);
|
||||
|
||||
m_listWidget->setFrameShape(QFrame::Shape::StyledPanel);
|
||||
|
||||
if (!m_IsCreate) {
|
||||
m_SSIDLabel = new QLabel(this);
|
||||
m_SSIDLabel->adjustSize();
|
||||
|
@ -241,7 +245,9 @@ void DetailPage::initUI() {
|
|||
m_forgetNetBox = new QCheckBox(this);
|
||||
|
||||
m_autoConnect->setText(tr("Auto Connection"));
|
||||
m_AutoLayout = new QHBoxLayout(this);
|
||||
|
||||
m_autoConWidget = new QWidget(this);
|
||||
m_AutoLayout = new QHBoxLayout(m_autoConWidget);
|
||||
QSpacerItem *horizontalSpacer;
|
||||
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
|
||||
|
@ -273,8 +279,10 @@ void DetailPage::initUI() {
|
|||
|
||||
m_layout->addWidget(mDetailFrame);
|
||||
if (m_IsWlan) {
|
||||
m_layout->addLayout(m_AutoLayout);
|
||||
// m_layout->addLayout(m_AutoLayout);
|
||||
m_layout->addWidget(m_autoConWidget);
|
||||
}
|
||||
m_layout->addStretch();
|
||||
}
|
||||
|
||||
void DetailPage::setEnableOfSaveBtn() {
|
||||
|
|
|
@ -87,6 +87,8 @@ private:
|
|||
bool m_IsWlan;
|
||||
bool m_IsCreate;
|
||||
|
||||
QWidget *m_autoConWidget;
|
||||
|
||||
QString m_formerSSID;
|
||||
QString m_formerIPV6;
|
||||
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
#include "netdetail.h"
|
||||
#include "math.h"
|
||||
|
||||
#define LAYOUT_MARGINS 0,0,0,0
|
||||
#define LAYOUT_SPACING 0
|
||||
#define HINT_TEXT_MARGINS 8, 1, 0, 3
|
||||
#define LABEL_HEIGHT 24
|
||||
|
||||
Ipv4Page::Ipv4Page(QWidget *parent):QFrame(parent)
|
||||
{
|
||||
initUI();
|
||||
|
@ -23,6 +28,24 @@ void Ipv4Page::initUI() {
|
|||
m_dnsLabel = new QLabel(this);
|
||||
m_secDnsLabel = new QLabel(this);
|
||||
|
||||
m_configEmptyLabel = new QLabel(this);
|
||||
m_configEmptyLabel->setFixedHeight(LABEL_HEIGHT);
|
||||
|
||||
m_addressHintLabel = new QLabel(this);
|
||||
m_addressHintLabel->setFixedHeight(LABEL_HEIGHT);
|
||||
m_addressHintLabel->setContentsMargins(HINT_TEXT_MARGINS);
|
||||
|
||||
m_maskHintLabel = new QLabel(this);
|
||||
m_maskHintLabel->setFixedHeight(LABEL_HEIGHT);
|
||||
m_maskHintLabel->setContentsMargins(HINT_TEXT_MARGINS);
|
||||
|
||||
m_gateWayEmptyLabel = new QLabel(this);
|
||||
m_gateWayEmptyLabel->setFixedHeight(LABEL_HEIGHT);
|
||||
|
||||
m_firstDnsEmptyLabel = new QLabel(this);
|
||||
m_firstDnsEmptyLabel->setFixedHeight(LABEL_HEIGHT);
|
||||
|
||||
|
||||
m_configLabel->setText(tr("Ipv4Config"));
|
||||
m_addressLabel->setText(tr("Address"));
|
||||
m_maskLabel->setText(tr("Netmask"));
|
||||
|
@ -30,12 +53,36 @@ void Ipv4Page::initUI() {
|
|||
m_dnsLabel->setText(tr("Prefs DNS"));
|
||||
m_secDnsLabel->setText(tr("Alternative DNS"));
|
||||
|
||||
QPalette hintTextColor;
|
||||
hintTextColor.setColor(QPalette::WindowText, Qt::red);
|
||||
m_addressHintLabel->setPalette(hintTextColor);
|
||||
m_maskHintLabel->setPalette(hintTextColor);
|
||||
|
||||
QWidget *addressWidget = new QWidget(this);
|
||||
QVBoxLayout *addressLayout = new QVBoxLayout(addressWidget);
|
||||
addressLayout->setContentsMargins(LAYOUT_MARGINS);
|
||||
addressLayout->setSpacing(LAYOUT_SPACING);
|
||||
addressLayout->addWidget(ipv4addressEdit);
|
||||
addressLayout->addWidget(m_addressHintLabel);
|
||||
|
||||
QWidget *maskWidget = new QWidget(this);
|
||||
QVBoxLayout *maskLayout = new QVBoxLayout(maskWidget);
|
||||
maskLayout->setContentsMargins(LAYOUT_MARGINS);
|
||||
maskLayout->setSpacing(LAYOUT_SPACING);
|
||||
maskLayout->addWidget(netMaskEdit);
|
||||
maskLayout->addWidget(m_maskHintLabel);
|
||||
|
||||
m_detailLayout = new QFormLayout(this);
|
||||
m_detailLayout->setVerticalSpacing(0);
|
||||
m_detailLayout->setContentsMargins(LAYOUT_MARGINS);
|
||||
m_detailLayout->addRow(m_configLabel,ipv4ConfigCombox);
|
||||
m_detailLayout->addRow(m_addressLabel,ipv4addressEdit);
|
||||
m_detailLayout->addRow(m_maskLabel,netMaskEdit);
|
||||
m_detailLayout->addRow(m_configEmptyLabel);
|
||||
m_detailLayout->addRow(m_addressLabel,addressWidget);
|
||||
m_detailLayout->addRow(m_maskLabel,maskWidget);
|
||||
m_detailLayout->addRow(m_gateWayLabel,gateWayEdit);
|
||||
m_detailLayout->addRow(m_gateWayEmptyLabel);
|
||||
m_detailLayout->addRow(m_dnsLabel,firstDnsEdit);
|
||||
m_detailLayout->addRow(m_firstDnsEmptyLabel);
|
||||
m_detailLayout->addRow(m_secDnsLabel,secondDnsEdit);
|
||||
|
||||
ipv4ConfigCombox->addItem(tr("Auto(DHCP)")); //"自动(DHCP)"
|
||||
|
@ -57,6 +104,9 @@ void Ipv4Page::initUI() {
|
|||
netMaskEdit->setValidator(new QRegExpValidator(rx, this));
|
||||
firstDnsEdit->setValidator(new QRegExpValidator(rx, this));
|
||||
secondDnsEdit->setValidator(new QRegExpValidator(rx, this));
|
||||
|
||||
ipv4addressEdit->installEventFilter(this);
|
||||
netMaskEdit->installEventFilter(this);
|
||||
}
|
||||
|
||||
void Ipv4Page::initComponent() {
|
||||
|
@ -67,6 +117,9 @@ void Ipv4Page::initComponent() {
|
|||
}
|
||||
connect(ipv4ConfigCombox, SIGNAL(currentIndexChanged(int)), this, SLOT(configChanged(int)));
|
||||
|
||||
connect(ipv4addressEdit, SIGNAL(textChanged(QString)), this, SLOT(onAddressTextChanged()));
|
||||
connect(netMaskEdit, SIGNAL(textChanged(QString)), this, SLOT(onNetMaskTextChanged()));
|
||||
|
||||
connect(ipv4ConfigCombox, SIGNAL(currentIndexChanged(int)), this, SLOT(setEnableOfSaveBtn()));
|
||||
connect(ipv4addressEdit, SIGNAL(textChanged(QString)), this, SLOT(setEnableOfSaveBtn()));
|
||||
connect(netMaskEdit, SIGNAL(textChanged(QString)), this, SLOT(setEnableOfSaveBtn()));
|
||||
|
@ -208,13 +261,27 @@ void Ipv4Page::configChanged(int index) {
|
|||
}
|
||||
}
|
||||
|
||||
void Ipv4Page::setLineEnabled(bool check) {
|
||||
void Ipv4Page::onAddressTextChanged()
|
||||
{
|
||||
if (!getTextEditState(ipv4addressEdit->text())) {
|
||||
m_addressHintLabel->setText(tr("Invalid address"));
|
||||
qDebug() << "ipv4address invalid";
|
||||
} else {
|
||||
m_addressHintLabel->clear();
|
||||
}
|
||||
}
|
||||
|
||||
ipv4addressEdit->setEnabled(check);
|
||||
netMaskEdit->setEnabled(check);
|
||||
gateWayEdit->setEnabled(check);
|
||||
firstDnsEdit->setEnabled(check);
|
||||
secondDnsEdit->setEnabled(check);
|
||||
void Ipv4Page::onNetMaskTextChanged()
|
||||
{
|
||||
if (!netMaskIsValide(netMaskEdit->text())) {
|
||||
m_maskHintLabel->setText(tr("Invalid subnet mask"));
|
||||
qDebug() << "ipv4 netMask invalid";
|
||||
} else {
|
||||
m_maskHintLabel->clear();
|
||||
}
|
||||
}
|
||||
|
||||
void Ipv4Page::setLineEnabled(bool check) {
|
||||
|
||||
if (!check) {
|
||||
ipv4addressEdit->clear();
|
||||
|
@ -222,7 +289,20 @@ void Ipv4Page::setLineEnabled(bool check) {
|
|||
gateWayEdit->clear();
|
||||
firstDnsEdit->clear();
|
||||
secondDnsEdit->clear();
|
||||
|
||||
ipv4addressEdit->setPlaceholderText(" ");
|
||||
netMaskEdit->setPlaceholderText(" ");
|
||||
|
||||
} else {
|
||||
ipv4addressEdit->setPlaceholderText(tr("Required")); //必填
|
||||
netMaskEdit->setPlaceholderText(tr("Required")); //必填
|
||||
}
|
||||
|
||||
ipv4addressEdit->setEnabled(check);
|
||||
netMaskEdit->setEnabled(check);
|
||||
gateWayEdit->setEnabled(check);
|
||||
firstDnsEdit->setEnabled(check);
|
||||
secondDnsEdit->setEnabled(check);
|
||||
}
|
||||
|
||||
void Ipv4Page::setEnableOfSaveBtn() {
|
||||
|
|
|
@ -28,6 +28,7 @@ public:
|
|||
void setGateWay(const QString &gateWay);
|
||||
|
||||
bool checkIsChanged(const ConInfo info, KyConnectSetting &setting);
|
||||
|
||||
private:
|
||||
QComboBox *ipv4ConfigCombox;
|
||||
LineEdit *ipv4addressEdit;
|
||||
|
@ -45,6 +46,12 @@ private:
|
|||
QLabel *m_gateWayLabel;
|
||||
QLabel *m_dnsLabel;
|
||||
QLabel *m_secDnsLabel;
|
||||
|
||||
QLabel *m_configEmptyLabel;
|
||||
QLabel *m_addressHintLabel;
|
||||
QLabel *m_maskHintLabel;
|
||||
QLabel *m_gateWayEmptyLabel;
|
||||
QLabel *m_firstDnsEmptyLabel;
|
||||
private:
|
||||
void initUI();
|
||||
void initComponent();
|
||||
|
@ -59,6 +66,9 @@ private:
|
|||
private slots:
|
||||
void setEnableOfSaveBtn();
|
||||
void configChanged(int index);
|
||||
void onAddressTextChanged();
|
||||
void onNetMaskTextChanged();
|
||||
|
||||
Q_SIGNALS:
|
||||
void setIpv4PageState(bool);
|
||||
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
#include "ipv6page.h"
|
||||
#include "netdetail.h"
|
||||
|
||||
#define LAYOUT_MARGINS 0,0,0,0
|
||||
#define LAYOUT_SPACING 0
|
||||
#define HINT_TEXT_MARGINS 8, 1, 0, 3
|
||||
#define LABEL_HEIGHT 24
|
||||
|
||||
Ipv6Page::Ipv6Page(QWidget *parent):QFrame(parent)
|
||||
{
|
||||
initUI();
|
||||
|
@ -104,6 +109,23 @@ void Ipv6Page::initUI() {
|
|||
m_dnsLabel = new QLabel(this);
|
||||
m_secDnsLabel = new QLabel(this);
|
||||
|
||||
m_configEmptyLabel = new QLabel(this);
|
||||
m_configEmptyLabel->setFixedHeight(LABEL_HEIGHT);
|
||||
|
||||
m_addressHintLabel = new QLabel(this);
|
||||
m_addressHintLabel->setFixedHeight(LABEL_HEIGHT);
|
||||
m_addressHintLabel->setContentsMargins(HINT_TEXT_MARGINS);
|
||||
|
||||
m_gateWayHintLabel = new QLabel(this);
|
||||
m_gateWayHintLabel->setFixedHeight(LABEL_HEIGHT);
|
||||
m_gateWayHintLabel->setContentsMargins(HINT_TEXT_MARGINS);
|
||||
|
||||
m_subnetEmptyLabel = new QLabel(this);
|
||||
m_subnetEmptyLabel->setFixedHeight(LABEL_HEIGHT);
|
||||
|
||||
m_firstDnsEmptyLabel = new QLabel(this);
|
||||
m_firstDnsEmptyLabel->setFixedHeight(LABEL_HEIGHT);
|
||||
|
||||
|
||||
m_configLabel->setText(tr("Ipv6Config"));
|
||||
m_addressLabel->setText(tr("Address"));
|
||||
|
@ -112,13 +134,36 @@ void Ipv6Page::initUI() {
|
|||
m_dnsLabel->setText(tr("Prefs DNS"));
|
||||
m_secDnsLabel->setText(tr("Alternative DNS"));
|
||||
|
||||
QPalette hintTextColor;
|
||||
hintTextColor.setColor(QPalette::WindowText, Qt::red);
|
||||
m_addressHintLabel->setPalette(hintTextColor);
|
||||
m_gateWayHintLabel->setPalette(hintTextColor);
|
||||
|
||||
QWidget *addressWidget = new QWidget(this);
|
||||
QVBoxLayout *addressLayout = new QVBoxLayout(addressWidget);
|
||||
addressLayout->setContentsMargins(LAYOUT_MARGINS);
|
||||
addressLayout->setSpacing(LAYOUT_SPACING);
|
||||
addressLayout->addWidget(ipv6AddressEdit);
|
||||
addressLayout->addWidget(m_addressHintLabel);
|
||||
|
||||
QWidget *gateWayWidget = new QWidget(this);
|
||||
QVBoxLayout *gateWayLayout = new QVBoxLayout(gateWayWidget);
|
||||
gateWayLayout->setContentsMargins(LAYOUT_MARGINS);
|
||||
gateWayLayout->setSpacing(LAYOUT_SPACING);
|
||||
gateWayLayout->addWidget(gateWayEdit);
|
||||
gateWayLayout->addWidget(m_gateWayHintLabel);
|
||||
|
||||
m_detailLayout = new QFormLayout(this);
|
||||
m_detailLayout->setContentsMargins(0, 0, 0, 0);
|
||||
m_detailLayout->setVerticalSpacing(0);
|
||||
m_detailLayout->addRow(m_configLabel,ipv6ConfigCombox);
|
||||
m_detailLayout->addRow(m_addressLabel,ipv6AddressEdit);
|
||||
m_detailLayout->addRow(m_configEmptyLabel);
|
||||
m_detailLayout->addRow(m_addressLabel,addressWidget);
|
||||
m_detailLayout->addRow(m_subnetLabel,lengthEdit);
|
||||
m_detailLayout->addRow(m_gateWayLabel,gateWayEdit);
|
||||
m_detailLayout->addRow(m_subnetEmptyLabel);
|
||||
m_detailLayout->addRow(m_gateWayLabel,gateWayWidget);
|
||||
m_detailLayout->addRow(m_dnsLabel,firstDnsEdit);
|
||||
m_detailLayout->addRow(m_firstDnsEmptyLabel);
|
||||
m_detailLayout->addRow(m_secDnsLabel,secondDnsEdit);
|
||||
|
||||
ipv6ConfigCombox->addItem(tr("Auto(DHCP)")); //"自动(DHCP)"
|
||||
|
@ -132,6 +177,9 @@ void Ipv6Page::initUI() {
|
|||
|
||||
QRegExp prefix_rx("\\b(?:(?:12[0-8]|1[0-1][0-9]|^[1-9][0-9]?$)\\.){3}(?:12[0-8]|1[0-1][0-9]|^[1-9][0-9]?$)\\b");
|
||||
lengthEdit->setValidator(new QRegExpValidator(prefix_rx,this));
|
||||
|
||||
ipv6AddressEdit->installEventFilter(this);
|
||||
gateWayEdit->installEventFilter(this);
|
||||
}
|
||||
|
||||
void Ipv6Page::initComponent() {
|
||||
|
@ -142,6 +190,9 @@ void Ipv6Page::initComponent() {
|
|||
}
|
||||
connect(ipv6ConfigCombox, SIGNAL(currentIndexChanged(int)), this, SLOT(configChanged(int)));
|
||||
|
||||
connect(ipv6AddressEdit, SIGNAL(textChanged(QString)), this, SLOT(onAddressTextChanged()));
|
||||
connect(gateWayEdit, SIGNAL(textChanged(QString)), this, SLOT(onGatewayTextChanged()));
|
||||
|
||||
connect(ipv6ConfigCombox, SIGNAL(currentIndexChanged(int)), this, SLOT(setEnableOfSaveBtn()));
|
||||
connect(ipv6AddressEdit, SIGNAL(textChanged(QString)), this, SLOT(setEnableOfSaveBtn()));
|
||||
connect(lengthEdit, SIGNAL(textChanged(QString)), this, SLOT(setEnableOfSaveBtn()));
|
||||
|
@ -161,19 +212,27 @@ void Ipv6Page::configChanged(int index) {
|
|||
|
||||
void Ipv6Page::setControlEnabled(bool check)
|
||||
{
|
||||
ipv6AddressEdit->setEnabled(check);
|
||||
lengthEdit->setEnabled(check);
|
||||
gateWayEdit->setEnabled(check);
|
||||
firstDnsEdit->setEnabled(check);
|
||||
secondDnsEdit->setEnabled(check);
|
||||
|
||||
if (!check) {
|
||||
ipv6AddressEdit->clear();
|
||||
lengthEdit->clear();
|
||||
gateWayEdit->clear();
|
||||
firstDnsEdit->clear();
|
||||
secondDnsEdit->clear();
|
||||
|
||||
ipv6AddressEdit->setPlaceholderText(" ");
|
||||
lengthEdit->setPlaceholderText(" ");
|
||||
gateWayEdit->setPlaceholderText(" ");
|
||||
} else {
|
||||
ipv6AddressEdit->setPlaceholderText(tr("Required")); //必填
|
||||
lengthEdit->setPlaceholderText(tr("Required")); //必填
|
||||
gateWayEdit->setPlaceholderText(tr("Required")); //必填
|
||||
}
|
||||
|
||||
ipv6AddressEdit->setEnabled(check);
|
||||
lengthEdit->setEnabled(check);
|
||||
gateWayEdit->setEnabled(check);
|
||||
firstDnsEdit->setEnabled(check);
|
||||
secondDnsEdit->setEnabled(check);
|
||||
}
|
||||
|
||||
void Ipv6Page::setEnableOfSaveBtn()
|
||||
|
@ -181,6 +240,26 @@ void Ipv6Page::setEnableOfSaveBtn()
|
|||
emit setIpv6PageState(checkConnectBtnIsEnabled());
|
||||
}
|
||||
|
||||
void Ipv6Page::onAddressTextChanged()
|
||||
{
|
||||
if (!getIpv6EditState(ipv6AddressEdit->text())) {
|
||||
m_addressHintLabel->setText(tr("Invalid address"));
|
||||
qDebug() << "ipv6address invalid";
|
||||
} else {
|
||||
m_addressHintLabel->clear();
|
||||
}
|
||||
}
|
||||
|
||||
void Ipv6Page::onGatewayTextChanged()
|
||||
{
|
||||
if (!getIpv6EditState(gateWayEdit->text())) {
|
||||
m_gateWayHintLabel->setText(tr("Invalid gateway"));
|
||||
qDebug() << "ipv6 gateway invalid";
|
||||
} else {
|
||||
m_gateWayHintLabel->clear();
|
||||
}
|
||||
}
|
||||
|
||||
bool Ipv6Page::checkConnectBtnIsEnabled()
|
||||
{
|
||||
if (ipv6ConfigCombox->currentIndex() == AUTO_CONFIG) {
|
||||
|
|
|
@ -46,6 +46,12 @@ private:
|
|||
QLabel *m_gateWayLabel;
|
||||
QLabel *m_dnsLabel;
|
||||
QLabel *m_secDnsLabel;
|
||||
|
||||
QLabel *m_configEmptyLabel;
|
||||
QLabel *m_addressHintLabel;
|
||||
QLabel *m_subnetEmptyLabel;
|
||||
QLabel *m_gateWayHintLabel;
|
||||
QLabel *m_firstDnsEmptyLabel;
|
||||
private:
|
||||
void initUI();
|
||||
void initComponent();
|
||||
|
@ -58,6 +64,8 @@ private:
|
|||
private slots:
|
||||
void configChanged(int index);
|
||||
void setEnableOfSaveBtn();
|
||||
void onAddressTextChanged();
|
||||
void onGatewayTextChanged();
|
||||
|
||||
signals:
|
||||
void setIpv6PageState(bool);
|
||||
|
|
|
@ -11,12 +11,13 @@
|
|||
#include <QMenu>
|
||||
#include <QToolTip>
|
||||
|
||||
#include "windowmanager/windowmanager.h"
|
||||
|
||||
#define WINDOW_WIDTH 520
|
||||
#define WINDOW_HEIGHT 590
|
||||
#define BUTTON_SIZE 30
|
||||
#define WINDOW_HEIGHT 562
|
||||
#define ICON_SIZE 22,22
|
||||
#define TITLE_LAYOUT_MARGINS 9,9,0,0
|
||||
#define LAYOUT_MARGINS 24,0,24,0
|
||||
#define LAYOUT_MARGINS 0,0,0,0
|
||||
#define BOTTOM_LAYOUT_SPACING 16
|
||||
#define PAGE_LAYOUT_SPACING 1
|
||||
#define DETAIL_PAGE_NUM 0
|
||||
|
@ -25,8 +26,8 @@
|
|||
#define SECURITY_PAGE_NUM 3
|
||||
#define CREATE_NET_PAGE_NUM 4
|
||||
#define PAGE_MIN_HEIGHT 40
|
||||
#define LAN_TAB_WIDTH 300
|
||||
#define WLAN_TAB_WIDTH 400
|
||||
#define LAN_TAB_WIDTH 180
|
||||
#define WLAN_TAB_WIDTH 240
|
||||
|
||||
//extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed);
|
||||
|
||||
|
@ -135,15 +136,15 @@ void NetDetail::onPaletteChanged()
|
|||
{
|
||||
QPalette pal = qApp->palette();
|
||||
|
||||
QGSettings * styleGsettings = nullptr;
|
||||
const QByteArray style_id(THEME_SCHAME);
|
||||
if (QGSettings::isSchemaInstalled(style_id)) {
|
||||
styleGsettings = new QGSettings(style_id);
|
||||
QString currentTheme = styleGsettings->get(COLOR_THEME).toString();
|
||||
if(currentTheme == "ukui-default"){
|
||||
pal = lightPalette(this);
|
||||
}
|
||||
}
|
||||
// QGSettings * styleGsettings = nullptr;
|
||||
// const QByteArray style_id(THEME_SCHAME);
|
||||
// if (QGSettings::isSchemaInstalled(style_id)) {
|
||||
// styleGsettings = new QGSettings(style_id);
|
||||
// QString currentTheme = styleGsettings->get(COLOR_THEME).toString();
|
||||
// if(currentTheme == "ukui-default"){
|
||||
// pal = lightPalette(this);
|
||||
// }
|
||||
// }
|
||||
|
||||
this->setPalette(pal);
|
||||
|
||||
|
@ -160,10 +161,10 @@ void NetDetail::onPaletteChanged()
|
|||
detailPage->m_listWidget->setAlternatingRowColors(true);
|
||||
detailPage->m_listWidget->setPalette(listwidget_pal);
|
||||
|
||||
if (styleGsettings != nullptr) {
|
||||
delete styleGsettings;
|
||||
styleGsettings = nullptr;
|
||||
}
|
||||
// if (styleGsettings != nullptr) {
|
||||
// delete styleGsettings;
|
||||
// styleGsettings = nullptr;
|
||||
// }
|
||||
|
||||
QColor colorTabBar = pal.color(QPalette::Disabled, QPalette::Highlight);
|
||||
m_netTabBar->setBackgroundColor(colorTabBar);
|
||||
|
@ -176,6 +177,12 @@ void NetDetail::currentRowChangeSlot(int row)
|
|||
|
||||
void NetDetail::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QPalette pal = qApp->palette();
|
||||
QPainter painter(this);
|
||||
painter.setBrush(pal.color(QPalette::Base));
|
||||
painter.drawRect(this->rect());
|
||||
painter.fillRect(rect(), QBrush(pal.color(QPalette::Base)));
|
||||
|
||||
return QWidget::paintEvent(event);
|
||||
}
|
||||
|
||||
|
@ -195,12 +202,16 @@ void NetDetail::centerToScreen()
|
|||
int x = this->width();
|
||||
int y = this->height();
|
||||
this->move(desk_x / 2 - x / 2 + desk_rect.left(), desk_y / 2 - y / 2 + desk_rect.top());
|
||||
// kdk::WindowManager::setGeometry(this->windowHandle(), QRect(desk_x / 2 - x / 2 + desk_rect.left(),
|
||||
// desk_y / 2 - y / 2 + desk_rect.top(),
|
||||
// this->width(),
|
||||
// this->height()));
|
||||
}
|
||||
|
||||
void NetDetail::initUI()
|
||||
{
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setContentsMargins(9,9,14,24);
|
||||
mainLayout->setContentsMargins(24,9,24,24);
|
||||
|
||||
detailPage = new DetailPage(isWlan, m_name.isEmpty(), this);
|
||||
|
||||
|
@ -231,7 +242,9 @@ void NetDetail::initUI()
|
|||
pageLayout->setSpacing(PAGE_LAYOUT_SPACING);
|
||||
|
||||
// TabBar
|
||||
m_netTabBar = new KTabBar(KTabBarStyle::SegmentDark, this);
|
||||
// m_netTabBar = new KTabBar(KTabBarStyle::SegmentDark, this);
|
||||
m_netTabBar = new NetTabBar(this);
|
||||
m_netTabBar->setTabBarStyle(KTabBarStyle::SegmentDark);
|
||||
m_netTabBar->addTab(tr("Detail")); //详情
|
||||
m_netTabBar->addTab(tr("Ipv4"));//Ipv4
|
||||
m_netTabBar->addTab(tr("Ipv6"));//Ipv6
|
||||
|
@ -264,6 +277,7 @@ void NetDetail::initUI()
|
|||
QVBoxLayout *centerlayout = new QVBoxLayout(centerWidget);
|
||||
centerlayout->setContentsMargins(LAYOUT_MARGINS);
|
||||
centerlayout->addWidget(pageFrame);
|
||||
centerlayout->addSpacing(4);
|
||||
centerlayout->addWidget(stackWidget);
|
||||
|
||||
QHBoxLayout *bottomLayout = new QHBoxLayout(bottomWidget);
|
||||
|
@ -950,3 +964,24 @@ bool NetDetail::eventFilter(QObject *w, QEvent *event)
|
|||
}
|
||||
return QWidget::eventFilter(w, event);
|
||||
}
|
||||
|
||||
NetTabBar::NetTabBar(QWidget *parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
NetTabBar::~NetTabBar()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QSize NetTabBar::sizeHint() const
|
||||
{
|
||||
return QSize(TAB_WIDTH, TAB_HEIGHT);
|
||||
}
|
||||
|
||||
QSize NetTabBar::minimumTabSizeHint(int index) const
|
||||
{
|
||||
Q_UNUSED(index)
|
||||
return QSize(TAB_WIDTH, TAB_HEIGHT);
|
||||
}
|
||||
|
|
|
@ -32,6 +32,20 @@
|
|||
|
||||
using namespace kdk;
|
||||
|
||||
#define TAB_WIDTH 60
|
||||
#define TAB_HEIGHT 36
|
||||
|
||||
class NetTabBar : public KTabBar
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit NetTabBar(QWidget *parent = nullptr);
|
||||
~NetTabBar();
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize minimumTabSizeHint(int index) const;
|
||||
};
|
||||
|
||||
class NetDetail : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -104,7 +118,7 @@ private:
|
|||
QPushButton * confimBtn;
|
||||
|
||||
QFrame * pageFrame;
|
||||
KTabBar *m_netTabBar = nullptr;
|
||||
NetTabBar *m_netTabBar = nullptr;
|
||||
|
||||
QString m_name;
|
||||
QString m_uuid;
|
||||
|
|
|
@ -52,6 +52,7 @@ void SecurityPage::initUI()
|
|||
|
||||
|
||||
mSecuLayout = new QFormLayout(this);
|
||||
mSecuLayout->setContentsMargins(0, 0, 0, 0);
|
||||
mSecuLayout->addRow(secuTypeLabel, secuTypeCombox);
|
||||
mSecuLayout->addRow(pwdLabel, pwdEdit);
|
||||
mSecuLayout->addRow(eapTypeLabel, eapTypeCombox);
|
||||
|
|
|
@ -629,8 +629,8 @@ void LanPage::onDeviceRemove(QString deviceName)
|
|||
|
||||
m_devList.removeOne(deviceName);
|
||||
if (m_devList.count() == 0) {
|
||||
m_netSwitch->setCheckable(false);
|
||||
m_netSwitch->setChecked(false);
|
||||
m_netSwitch->setCheckable(false);
|
||||
qDebug() << "[wiredSwitch]set not enable after device remove";
|
||||
}
|
||||
|
||||
|
@ -1183,8 +1183,8 @@ bool LanPage::eventFilter(QObject *watched, QEvent *event)
|
|||
|
||||
if (m_devList.count() == 0) {
|
||||
this->showDesktopNotify(tr("No ethernet device avaliable"), "networkwrong");
|
||||
m_netSwitch->setCheckable(false);
|
||||
m_netSwitch->setChecked(false);
|
||||
m_netSwitch->setCheckable(false);
|
||||
} else {
|
||||
m_netSwitch->setCheckable(true);
|
||||
if (m_netSwitch->isChecked()) {
|
||||
|
@ -1239,7 +1239,7 @@ void LanPage::showDetailPage(QString devName, QString uuid)
|
|||
return;
|
||||
}
|
||||
|
||||
NetDetail *netDetail = new NetDetail(devName, p_item->m_connectName, uuid, isActive, false, false, this);
|
||||
NetDetail *netDetail = new NetDetail(devName, p_item->m_connectName, uuid, isActive, false, false);
|
||||
netDetail->show();
|
||||
|
||||
delete p_item;
|
||||
|
|
|
@ -58,24 +58,25 @@ WlanPage::WlanPage(QWidget *parent) : TabPage(parent)
|
|||
|
||||
bool WlanPage::eventFilter(QObject *w, QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::MouseButtonRelease) {
|
||||
if (w == m_settingsBtn) {
|
||||
if (w == m_settingsBtn) {
|
||||
if (e->type() == QEvent::MouseButtonRelease) {
|
||||
//ZJP_TODO 打开控制面板
|
||||
qDebug() << LOG_FLAG <<"recive event show control center";
|
||||
showControlCenter();
|
||||
} else if (w == m_netSwitch) {
|
||||
}
|
||||
} else if (w == m_netSwitch) {
|
||||
if (e->type() == QEvent::MouseButtonRelease) {
|
||||
if (m_devList.isEmpty()) {
|
||||
showDesktopNotify(tr("No wireless network card detected"), "networkwrong");
|
||||
//检测不到无线网卡不再触发click信号
|
||||
m_netSwitch->setCheckable(false);
|
||||
m_netSwitch->setChecked(false);
|
||||
m_netSwitch->setCheckable(false);
|
||||
} else {
|
||||
m_wirelessConnectOpreation->setWirelessEnabled(!m_netSwitch->isChecked());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return QWidget::eventFilter(w,e);
|
||||
}
|
||||
|
||||
|
@ -122,35 +123,41 @@ void WlanPage::onWlanSwithGsettingsChanged(const QString &key)
|
|||
m_wlanSwitchEnable = m_switchGsettings->get(WIRELESS_SWITCH).toBool();
|
||||
qDebug() << LOG_FLAG << "wlan switch state" << m_wlanSwitchEnable;
|
||||
|
||||
m_netSwitch->setChecked(m_wlanSwitchEnable);
|
||||
if (m_wirelessConnectOpreation->getWirelessEnabled() != m_wlanSwitchEnable) {
|
||||
// 根据Gsetting更新开关状态
|
||||
m_wirelessConnectOpreation->setWirelessEnabled(m_wlanSwitchEnable);
|
||||
}
|
||||
|
||||
m_netSwitch->setChecked(m_wlanSwitchEnable);
|
||||
initDeviceCombox();
|
||||
initWlanArea();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void WlanPage::initWlanSwitchState()
|
||||
{
|
||||
bool wirelessGsetting = true;
|
||||
if (QGSettings::isSchemaInstalled(GSETTINGS_SCHEMA)) {
|
||||
m_switchGsettings = new QGSettings(GSETTINGS_SCHEMA);
|
||||
if (m_switchGsettings->keys().contains(WIRELESS_SWITCH)) {
|
||||
if (m_devList.isEmpty()) {
|
||||
m_netSwitch->setCheckable(false);
|
||||
m_netSwitch->setChecked(false);
|
||||
m_netSwitch->setCheckable(false);
|
||||
} else {
|
||||
bool wiredGsetting = m_switchGsettings->get(WIRELESS_SWITCH).toBool();
|
||||
wirelessGsetting = m_switchGsettings->get(WIRELESS_SWITCH).toBool();
|
||||
if (m_wirelessConnectOpreation->getWirelessEnabled()
|
||||
!= wiredGsetting) {
|
||||
!= wirelessGsetting) {
|
||||
//以gsetting为准
|
||||
m_wirelessConnectOpreation->setWirelessEnabled(wiredGsetting);
|
||||
m_wirelessConnectOpreation->setWirelessEnabled(wirelessGsetting);
|
||||
}
|
||||
m_netSwitch->setChecked(wiredGsetting);
|
||||
m_netSwitch->setChecked(wirelessGsetting);
|
||||
}
|
||||
connect(m_switchGsettings, &QGSettings::changed, this, &WlanPage::onWlanSwithGsettingsChanged);
|
||||
}
|
||||
}
|
||||
m_netSwitch->setChecked(wirelessGsetting);
|
||||
m_wlanSwitchEnable = wirelessGsetting;
|
||||
return;
|
||||
}
|
||||
|
||||
void WlanPage::initTimer()
|
||||
|
@ -711,8 +718,8 @@ void WlanPage::onDeviceRemove(QString deviceName)
|
|||
deleteDeviceFromCombox(deviceName);
|
||||
|
||||
if (m_devList.isEmpty()) {
|
||||
m_netSwitch->setCheckable(false);
|
||||
m_netSwitch->setChecked(false);
|
||||
m_netSwitch->setCheckable(false);
|
||||
}
|
||||
|
||||
if (originalDeviceName == deviceName) {
|
||||
|
@ -1001,7 +1008,7 @@ void WlanPage::requestScan()
|
|||
void WlanPage::onHiddenWlanClicked()
|
||||
{
|
||||
qDebug() << "[wlanPage] AddHideWifi Clicked! " << Q_FUNC_INFO << __LINE__ ;
|
||||
NetDetail *netDetail = new NetDetail(m_currentDevice, "", "", false, true, true, this);
|
||||
NetDetail *netDetail = new NetDetail(m_currentDevice, "", "", false, true, true);
|
||||
netDetail->show();
|
||||
}
|
||||
|
||||
|
@ -1019,6 +1026,7 @@ void WlanPage::onWifiEnabledChanged(bool isWifiOn)
|
|||
{
|
||||
//监听外部命令导致wifi状态变化,更新界面
|
||||
qDebug() << "[WlanPage] onWifiEnabledChanged wifi state" << isWifiOn;
|
||||
isWifiOn = m_wirelessConnectOpreation->getWirelessEnabled();
|
||||
|
||||
//应该先检测是否有无线网卡可用,才改变开关状态
|
||||
if (m_devList.isEmpty()) {
|
||||
|
@ -1029,9 +1037,9 @@ void WlanPage::onWifiEnabledChanged(bool isWifiOn)
|
|||
if (m_wlanSwitchEnable == isWifiOn) {
|
||||
return;
|
||||
} else {
|
||||
if (!m_netSwitch->isChecked()) {
|
||||
m_netSwitch->setChecked(true);
|
||||
}
|
||||
// if (!m_netSwitch->isChecked()) {
|
||||
// m_netSwitch->setChecked(true);
|
||||
// }
|
||||
m_switchGsettings->set(WIRELESS_SWITCH, isWifiOn);
|
||||
}
|
||||
|
||||
|
@ -1380,7 +1388,7 @@ void WlanPage::showDetailPage(QString devName, QString ssid)
|
|||
|
||||
bool isActive = m_connectResource->isActivatedConnection(wirelessNetItem.m_connectUuid);
|
||||
|
||||
NetDetail *netDetail = new NetDetail(devName, ssid, wirelessNetItem.m_connectUuid, isActive, true, !wirelessNetItem.m_isConfigured, this);
|
||||
NetDetail *netDetail = new NetDetail(devName, ssid, wirelessNetItem.m_connectUuid, isActive, true, !wirelessNetItem.m_isConfigured);
|
||||
netDetail->show();
|
||||
|
||||
return;
|
||||
|
@ -1402,13 +1410,13 @@ void WlanPage::setWirelessSwitchEnable(bool enable)
|
|||
if (m_devList.isEmpty()) {
|
||||
qDebug() << "have no device to use " << Q_FUNC_INFO << __LINE__;
|
||||
//检测不到无线网卡不再触发click信号
|
||||
// m_netSwitch->setSwitchStatus(false);
|
||||
m_netSwitch->setEnabled(false);
|
||||
m_netSwitch->setChecked(false);
|
||||
m_netSwitch->setCheckable(false);
|
||||
}else{
|
||||
m_wirelessConnectOpreation->setWirelessEnabled(enable);
|
||||
if (!enable) {
|
||||
// m_netSwitch->setEnabled(false);
|
||||
m_netSwitch->setChecked(false);
|
||||
m_netSwitch->setCheckable(false);
|
||||
m_activatedNetFrame->hide();
|
||||
m_activatedNetDivider->hide();
|
||||
m_inactivatedNetFrame->hide();
|
||||
|
|
12
src/main.cpp
12
src/main.cpp
|
@ -153,13 +153,13 @@ int main(int argc, char *argv[])
|
|||
w.setProperty("useStyleWindowManager", false); //禁用拖动
|
||||
//设置窗口无边框,阴影
|
||||
|
||||
MotifWmHints window_hints;
|
||||
window_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
|
||||
window_hints.functions = MWM_FUNC_ALL;
|
||||
window_hints.decorations = MWM_DECOR_BORDER;
|
||||
XAtomHelper::getInstance()->setWindowMotifHint(w.winId(), window_hints);
|
||||
// MotifWmHints window_hints;
|
||||
// window_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
|
||||
// window_hints.functions = MWM_FUNC_ALL;
|
||||
// window_hints.decorations = MWM_DECOR_BORDER;
|
||||
// XAtomHelper::getInstance()->setWindowMotifHint(w.winId(), window_hints);
|
||||
|
||||
// w.setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint);
|
||||
// w.setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint /*| Qt::X11BypassWindowManagerHint*/);
|
||||
|
||||
|
||||
DbusAdaptor adaptor(&w);
|
||||
|
|
|
@ -14,7 +14,7 @@ TEMPLATE = app
|
|||
CONFIG += c++14 qt warn_on link_pkgconfig
|
||||
#CONFIG += release
|
||||
|
||||
PKGCONFIG +=gio-2.0 glib-2.0 gio-unix-2.0 libnm libnma libsecret-1 gtk+-3.0 gsettings-qt libcap kysdk-qtwidgets
|
||||
PKGCONFIG +=gio-2.0 glib-2.0 gio-unix-2.0 libnm libnma libsecret-1 gtk+-3.0 gsettings-qt libcap kysdk-qtwidgets kysdk-waylandhelper
|
||||
|
||||
INCLUDEPATH += /usr/include/KF5/NetworkManagerQt
|
||||
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -98,82 +98,82 @@
|
|||
<context>
|
||||
<name>DetailPage</name>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="234"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="247"/>
|
||||
<source>Auto Connection</source>
|
||||
<translation>自动连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="190"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="283"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="203"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="300"/>
|
||||
<source>SSID:</source>
|
||||
<translation>SSID:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="120"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="129"/>
|
||||
<source>Copied successfully!</source>
|
||||
<translation>复制成功!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="164"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="177"/>
|
||||
<source>Copy all</source>
|
||||
<translation>复制全部</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="184"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="197"/>
|
||||
<source>Please input SSID:</source>
|
||||
<translation>请输入SSID:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="194"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="284"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="207"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="301"/>
|
||||
<source>Protocol:</source>
|
||||
<translation>协议:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="198"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="285"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="211"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="302"/>
|
||||
<source>Security Type:</source>
|
||||
<translation>安全类型:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="202"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="286"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="215"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="303"/>
|
||||
<source>Hz:</source>
|
||||
<translation>网络频带:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="206"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="287"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="219"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="304"/>
|
||||
<source>Chan:</source>
|
||||
<translation>网络通道:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="210"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="288"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="223"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="305"/>
|
||||
<source>BandWidth:</source>
|
||||
<translation>带宽:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="224"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="291"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="237"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="308"/>
|
||||
<source>IPV6:</source>
|
||||
<translation>本地链接IPV6地址:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="214"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="289"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="227"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="306"/>
|
||||
<source>IPV4:</source>
|
||||
<translation>IPV4地址:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="218"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="290"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="231"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="307"/>
|
||||
<source>IPV4 Dns:</source>
|
||||
<translation>IPV4 DNS服务器:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="228"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="292"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="241"/>
|
||||
<location filename="../src/frontend/netdetails/detailpage.cpp" line="309"/>
|
||||
<source>Mac:</source>
|
||||
<translation>物理地址:</translation>
|
||||
</message>
|
||||
|
@ -433,88 +433,121 @@
|
|||
<context>
|
||||
<name>Ipv4Page</name>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="26"/>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="64"/>
|
||||
<source>Ipv4Config</source>
|
||||
<translation>Ipv4配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="27"/>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="65"/>
|
||||
<source>Address</source>
|
||||
<translation>地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="28"/>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="66"/>
|
||||
<source>Netmask</source>
|
||||
<translation>子网掩码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="29"/>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="67"/>
|
||||
<source>Default Gateway</source>
|
||||
<translation>默认网关</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="30"/>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="68"/>
|
||||
<source>Prefs DNS</source>
|
||||
<translation>首选DNS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="31"/>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="69"/>
|
||||
<source>Alternative DNS</source>
|
||||
<translation>备选DNS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="41"/>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="103"/>
|
||||
<source>Auto(DHCP)</source>
|
||||
<translation>自动</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="42"/>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="104"/>
|
||||
<source>Manual</source>
|
||||
<translation>手动</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="239"/>
|
||||
<source>Invalid address</source>
|
||||
<translation>无效地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="249"/>
|
||||
<source>Invalid subnet mask</source>
|
||||
<translation>无效子网掩码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="299"/>
|
||||
<location filename="../src/frontend/netdetails/ipv4page.cpp" line="300"/>
|
||||
<source>Required</source>
|
||||
<translation>必填</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Ipv6Page</name>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="108"/>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="145"/>
|
||||
<source>Ipv6Config</source>
|
||||
<translation>Ipv6配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="109"/>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="146"/>
|
||||
<source>Address</source>
|
||||
<translation>地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="110"/>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="147"/>
|
||||
<source>Subnet prefix Length</source>
|
||||
<translation>子网前缀长度</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="111"/>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="148"/>
|
||||
<source>Default Gateway</source>
|
||||
<translation>默认网关</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="112"/>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="149"/>
|
||||
<source>Prefs DNS</source>
|
||||
<translation>首选DNS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="113"/>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="150"/>
|
||||
<source>Alternative DNS</source>
|
||||
<translation>备选DNS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="124"/>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="184"/>
|
||||
<source>Auto(DHCP)</source>
|
||||
<translation>自动</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="125"/>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="185"/>
|
||||
<source>Manual</source>
|
||||
<translation>手动</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="238"/>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="239"/>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="240"/>
|
||||
<source>Required</source>
|
||||
<translation>必填</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="265"/>
|
||||
<source>Invalid address</source>
|
||||
<translation>无效地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/ipv6page.cpp" line="280"/>
|
||||
<source>Invalid gateway</source>
|
||||
<translation>无效网关</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LanListItem</name>
|
||||
|
@ -544,27 +577,27 @@
|
|||
<context>
|
||||
<name>LanPage</name>
|
||||
<message>
|
||||
<location filename="../src/frontend/tab-pages/lanpage.cpp" line="202"/>
|
||||
<location filename="../src/frontend/tab-pages/lanpage.cpp" line="1185"/>
|
||||
<source>No ethernet device avaliable</source>
|
||||
<translation>未检测到有线设备</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/tab-pages/lanpage.cpp" line="756"/>
|
||||
<location filename="../src/frontend/tab-pages/lanpage.cpp" line="735"/>
|
||||
<source>LAN</source>
|
||||
<translation>有线网络</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/tab-pages/lanpage.cpp" line="758"/>
|
||||
<location filename="../src/frontend/tab-pages/lanpage.cpp" line="737"/>
|
||||
<source>Activated LAN</source>
|
||||
<translation>我的网络</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/tab-pages/lanpage.cpp" line="767"/>
|
||||
<location filename="../src/frontend/tab-pages/lanpage.cpp" line="746"/>
|
||||
<source>Inactivated LAN</source>
|
||||
<translation>其他网络</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/tab-pages/lanpage.cpp" line="869"/>
|
||||
<location filename="../src/frontend/tab-pages/lanpage.cpp" line="849"/>
|
||||
<source>LAN Disconnected Successfully</source>
|
||||
<translation>有线网络已断开</translation>
|
||||
</message>
|
||||
|
@ -574,7 +607,7 @@
|
|||
<translation>未插入网线</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/tab-pages/lanpage.cpp" line="845"/>
|
||||
<location filename="../src/frontend/tab-pages/lanpage.cpp" line="825"/>
|
||||
<source>LAN Connected Successfully</source>
|
||||
<translation>有线网络已连接</translation>
|
||||
</message>
|
||||
|
@ -582,12 +615,12 @@
|
|||
<context>
|
||||
<name>ListItem</name>
|
||||
<message>
|
||||
<location filename="../src/frontend/list-items/listitem.cpp" line="62"/>
|
||||
<location filename="../src/frontend/list-items/listitem.cpp" line="69"/>
|
||||
<source>Kylin NM</source>
|
||||
<translation>麒麟网络设置工具</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/list-items/listitem.cpp" line="65"/>
|
||||
<location filename="../src/frontend/list-items/listitem.cpp" line="72"/>
|
||||
<source>kylin network applet desktop message</source>
|
||||
<translation>网络提示消息</translation>
|
||||
</message>
|
||||
|
@ -595,30 +628,30 @@
|
|||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../src/frontend/mainwindow.cpp" line="121"/>
|
||||
<location filename="../src/frontend/mainwindow.cpp" line="237"/>
|
||||
<location filename="../src/frontend/mainwindow.cpp" line="166"/>
|
||||
<location filename="../src/frontend/mainwindow.cpp" line="287"/>
|
||||
<source>kylin-nm</source>
|
||||
<translation>网络工具</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/mainwindow.cpp" line="199"/>
|
||||
<location filename="../src/frontend/mainwindow.cpp" line="249"/>
|
||||
<source>LAN</source>
|
||||
<translatorcomment>有线网络</translatorcomment>
|
||||
<translation>有线网络</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/mainwindow.cpp" line="201"/>
|
||||
<location filename="../src/frontend/mainwindow.cpp" line="251"/>
|
||||
<source>WLAN</source>
|
||||
<translatorcomment>无线局域网</translatorcomment>
|
||||
<translation>无线局域网</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/mainwindow.cpp" line="234"/>
|
||||
<location filename="../src/frontend/mainwindow.cpp" line="284"/>
|
||||
<source>Show MainWindow</source>
|
||||
<translation>打开网络工具</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/mainwindow.cpp" line="235"/>
|
||||
<location filename="../src/frontend/mainwindow.cpp" line="285"/>
|
||||
<source>Settings</source>
|
||||
<translatorcomment>设置网络项</translatorcomment>
|
||||
<translation>设置网络项</translation>
|
||||
|
@ -627,32 +660,32 @@
|
|||
<context>
|
||||
<name>NetDetail</name>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="38"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="48"/>
|
||||
<source>Kylin NM</source>
|
||||
<translation>麒麟网络设置工具</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="41"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="51"/>
|
||||
<source>kylin network desktop message</source>
|
||||
<translation>网络提示消息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="218"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="248"/>
|
||||
<source>Detail</source>
|
||||
<translation>详情</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="223"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="249"/>
|
||||
<source>Ipv4</source>
|
||||
<translation>Ipv4</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="227"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="250"/>
|
||||
<source>Ipv6</source>
|
||||
<translation>Ipv6</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="231"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="252"/>
|
||||
<source>Security</source>
|
||||
<translation>安全</translation>
|
||||
</message>
|
||||
|
@ -661,84 +694,84 @@
|
|||
<translation type="vanished">关闭</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="250"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="267"/>
|
||||
<source>Confirm</source>
|
||||
<translation>确定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="253"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="270"/>
|
||||
<source>Cancel</source>
|
||||
<translation>取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="256"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="273"/>
|
||||
<source>Forget this network</source>
|
||||
<translation>忘记此网络</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="286"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="304"/>
|
||||
<source>Add Lan Connect</source>
|
||||
<translation>添加有线网络</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="295"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="309"/>
|
||||
<source>connect hiddin wlan</source>
|
||||
<translation>连接到隐藏WLAN</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="453"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="465"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="932"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="455"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="467"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="934"/>
|
||||
<source>None</source>
|
||||
<translation>无</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="564"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="565"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="566"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="567"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="568"/>
|
||||
<source>Auto</source>
|
||||
<translation>自动</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="682"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="684"/>
|
||||
<source>start check ipv4 address conflict</source>
|
||||
<translation>开始检测ipv4地址冲突</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="699"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="701"/>
|
||||
<source>start check ipv6 address conflict</source>
|
||||
<translation>开始检测ipv6地址冲突</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="745"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="796"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="884"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="747"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="798"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="886"/>
|
||||
<source>ipv4 address conflict!</source>
|
||||
<translation>ipv4地址冲突!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="804"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="892"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="806"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="894"/>
|
||||
<source>ipv6 address conflict!</source>
|
||||
<translation>ipv6地址冲突!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="928"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="930"/>
|
||||
<source>this wifi no support enterprise type</source>
|
||||
<translation>此wifi不支持企业网类型</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="933"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="935"/>
|
||||
<source>this wifi no support None type</source>
|
||||
<translation>此wifi不支持空类型</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="938"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="940"/>
|
||||
<source>this wifi no support WPA2 type</source>
|
||||
<translation>此wifi不支持WPA2类型</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="941"/>
|
||||
<location filename="../src/frontend/netdetails/netdetail.cpp" line="943"/>
|
||||
<source>this wifi no support WPA3 type</source>
|
||||
<translation>此wifi不支持WPA3类型</translation>
|
||||
</message>
|
||||
|
@ -849,63 +882,63 @@
|
|||
<context>
|
||||
<name>SecurityPage</name>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="71"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="72"/>
|
||||
<source>Security</source>
|
||||
<translation>安全性</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="72"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="87"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="73"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="88"/>
|
||||
<source>Password</source>
|
||||
<translation>密钥</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="74"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="75"/>
|
||||
<source>EAP type</source>
|
||||
<translation>EAP方法</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="76"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="77"/>
|
||||
<source>Identity</source>
|
||||
<translation>匿名身份</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="77"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="78"/>
|
||||
<source>Domain</source>
|
||||
<translation>域</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="78"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="79"/>
|
||||
<source>CA certficate</source>
|
||||
<translation>CA 证书</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="79"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="80"/>
|
||||
<source>no need for CA certificate</source>
|
||||
<translation>不需要CA证书</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="80"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="81"/>
|
||||
<source>User certificate</source>
|
||||
<translation>用户证书</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="81"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="82"/>
|
||||
<source>User private key</source>
|
||||
<translation>用户私钥</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="82"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="83"/>
|
||||
<source>User key password</source>
|
||||
<translation>用户密钥密码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="85"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="86"/>
|
||||
<source>Ineer authentication</source>
|
||||
<translation>内部认证</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="86"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="87"/>
|
||||
<source>Usename</source>
|
||||
<translation>用户名</translation>
|
||||
</message>
|
||||
|
@ -915,56 +948,56 @@
|
|||
<translation type="vanished">用户名</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="88"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="89"/>
|
||||
<source>Ask pwd each query</source>
|
||||
<translation>每次询问密码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="90"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="100"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="103"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="106"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="228"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="727"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="782"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="804"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="827"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="91"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="101"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="104"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="107"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="176"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="675"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="696"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="718"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="741"/>
|
||||
<source>None</source>
|
||||
<translation>无</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="91"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="92"/>
|
||||
<source>WPA&WPA2 Personal</source>
|
||||
<translation>WPA&WPA2 个人</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="92"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="93"/>
|
||||
<source>WPA&WPA2 Enterprise</source>
|
||||
<translation>WPA&WPA2 企业</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="93"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="94"/>
|
||||
<source>WPA3 Personal</source>
|
||||
<translation>WPA3 个人</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="101"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="104"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="107"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="102"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="105"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="108"/>
|
||||
<source>Choose from file...</source>
|
||||
<translation>从文件选择...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="772"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="795"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="817"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="686"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="709"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="731"/>
|
||||
<source>Choose a CA certificate</source>
|
||||
<translation>选择一个CA证书</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="773"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="796"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="818"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="687"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="710"/>
|
||||
<location filename="../src/frontend/netdetails/securitypage.cpp" line="732"/>
|
||||
<source>CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx)</source>
|
||||
<translation>CA 证书 (*.pem *.der *.p12 *.crt *.cer *.pfx)</translation>
|
||||
</message>
|
||||
|
@ -987,12 +1020,12 @@
|
|||
<translation>网络设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/tab-pages/tabpage.cpp" line="148"/>
|
||||
<location filename="../src/frontend/tab-pages/tabpage.cpp" line="154"/>
|
||||
<source>Kylin NM</source>
|
||||
<translation>麒麟网络设置工具</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/tab-pages/tabpage.cpp" line="151"/>
|
||||
<location filename="../src/frontend/tab-pages/tabpage.cpp" line="157"/>
|
||||
<source>kylin network applet desktop message</source>
|
||||
<translation>网络提示消息</translation>
|
||||
</message>
|
||||
|
@ -1043,31 +1076,31 @@
|
|||
<context>
|
||||
<name>WlanListItem</name>
|
||||
<message>
|
||||
<location filename="../src/frontend/list-items/wlanlistitem.cpp" line="42"/>
|
||||
<location filename="../src/frontend/list-items/wlanlistitem.cpp" line="43"/>
|
||||
<source>Not connected</source>
|
||||
<translation>未连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/list-items/wlanlistitem.cpp" line="138"/>
|
||||
<location filename="../src/frontend/list-items/wlanlistitem.cpp" line="136"/>
|
||||
<location filename="../src/frontend/list-items/wlanlistitem.cpp" line="565"/>
|
||||
<source>Disconnect</source>
|
||||
<translation>断开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/list-items/wlanlistitem.cpp" line="140"/>
|
||||
<location filename="../src/frontend/list-items/wlanlistitem.cpp" line="267"/>
|
||||
<location filename="../src/frontend/list-items/wlanlistitem.cpp" line="138"/>
|
||||
<location filename="../src/frontend/list-items/wlanlistitem.cpp" line="251"/>
|
||||
<location filename="../src/frontend/list-items/wlanlistitem.cpp" line="563"/>
|
||||
<source>Connect</source>
|
||||
<translation>连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/list-items/wlanlistitem.cpp" line="147"/>
|
||||
<location filename="../src/frontend/list-items/wlanlistitem.cpp" line="145"/>
|
||||
<location filename="../src/frontend/list-items/wlanlistitem.cpp" line="570"/>
|
||||
<source>Forget</source>
|
||||
<translation>忘记此网络</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/list-items/wlanlistitem.cpp" line="288"/>
|
||||
<location filename="../src/frontend/list-items/wlanlistitem.cpp" line="272"/>
|
||||
<source>Auto Connect</source>
|
||||
<translation>自动加入该网络</translation>
|
||||
</message>
|
||||
|
@ -1087,22 +1120,22 @@
|
|||
<context>
|
||||
<name>WlanPage</name>
|
||||
<message>
|
||||
<location filename="../src/frontend/tab-pages/wlanpage.cpp" line="74"/>
|
||||
<location filename="../src/frontend/tab-pages/wlanpage.cpp" line="85"/>
|
||||
<source>WLAN</source>
|
||||
<translation>无线局域网</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/tab-pages/wlanpage.cpp" line="127"/>
|
||||
<location filename="../src/frontend/tab-pages/wlanpage.cpp" line="70"/>
|
||||
<source>No wireless network card detected</source>
|
||||
<translation>未检测到无线网卡</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/tab-pages/wlanpage.cpp" line="76"/>
|
||||
<location filename="../src/frontend/tab-pages/wlanpage.cpp" line="87"/>
|
||||
<source>Activated WLAN</source>
|
||||
<translation>我的网络</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/tab-pages/wlanpage.cpp" line="86"/>
|
||||
<location filename="../src/frontend/tab-pages/wlanpage.cpp" line="97"/>
|
||||
<source>Other WLAN</source>
|
||||
<translation>其他网络</translation>
|
||||
</message>
|
||||
|
@ -1111,13 +1144,13 @@
|
|||
<translation type="vanished">更多...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/tab-pages/wlanpage.cpp" line="810"/>
|
||||
<location filename="../src/frontend/tab-pages/wlanpage.cpp" line="797"/>
|
||||
<source>WLAN Connected Successfully</source>
|
||||
<translation>无线网络已连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/frontend/tab-pages/wlanpage.cpp" line="554"/>
|
||||
<location filename="../src/frontend/tab-pages/wlanpage.cpp" line="806"/>
|
||||
<location filename="../src/frontend/tab-pages/wlanpage.cpp" line="542"/>
|
||||
<location filename="../src/frontend/tab-pages/wlanpage.cpp" line="793"/>
|
||||
<source>WLAN Disconnected Successfully</source>
|
||||
<translation>无线网络已断开</translation>
|
||||
</message>
|
||||
|
@ -1177,4 +1210,22 @@
|
|||
<translation type="obsolete">不需要CA证书</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>main</name>
|
||||
<message>
|
||||
<location filename="../src/main.cpp" line="96"/>
|
||||
<source>kylinnm</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/main.cpp" line="100"/>
|
||||
<source>show kylin-nm wifi page</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/main.cpp" line="101"/>
|
||||
<source>show kylin-nm lan page</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
Loading…
Reference in New Issue