merge:合并最新代码
This commit is contained in:
commit
569963c2ac
|
@ -1,3 +1,9 @@
|
||||||
|
kylin-nm (4.0.0.0-ok8.2) yangtze; urgency=medium
|
||||||
|
|
||||||
|
* issue #I7GT8M #I7GST6 #I7YPFI #I73HNK #I72PU4
|
||||||
|
|
||||||
|
-- zhaoshixu <zhaoshixu@kylinos.cn> Tue, 26 Sep 2023 14:58:15 +0800
|
||||||
|
|
||||||
kylin-nm (4.0.0.0-ok8.1) yangtze; urgency=medium
|
kylin-nm (4.0.0.0-ok8.1) yangtze; urgency=medium
|
||||||
|
|
||||||
* rebuild with no changes.
|
* rebuild with no changes.
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
MobileHotspot::MobileHotspot() : mFirstLoad(true) {
|
MobileHotspot::MobileHotspot() : mFirstLoad(true) {
|
||||||
|
|
||||||
|
@ -113,23 +113,31 @@ bool MobileHotspot::isExitWirelessDevice()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDBusMessage result = interface->call(QStringLiteral("getDeviceListAndEnabled"),1);
|
QDBusReply<QVariantMap> reply = interface->call(QStringLiteral("getDeviceListAndEnabled"),1);
|
||||||
if(result.type() == QDBusMessage::ErrorMessage) {
|
if(!reply.isValid()) {
|
||||||
qWarning() << "getWirelessDeviceList error:" << result.errorMessage();
|
qWarning() << "getWirelessDeviceList error:" << reply.error().message();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto dbusArg = result.arguments().at(0).value<QDBusArgument>();
|
|
||||||
QMap<QString, bool> deviceListMap;
|
QMap<QString, bool> deviceListMap;
|
||||||
dbusArg >> deviceListMap;
|
QVariantMap::const_iterator itemIter = reply.value().cbegin();
|
||||||
|
while (itemIter != reply.value().cend()) {
|
||||||
|
deviceListMap.insert(itemIter.key(), itemIter.value().toBool());
|
||||||
|
itemIter ++;
|
||||||
|
}
|
||||||
|
|
||||||
QDBusReply<QMap<QString, int> > capReply = interface->call("getWirelessDeviceCap");
|
QDBusReply<QVariantMap> capReply = interface->call("getWirelessDeviceCap");
|
||||||
if (!capReply.isValid()) {
|
if (!capReply.isValid()) {
|
||||||
qDebug()<<"execute dbus method 'getWirelessDeviceCap' is invalid in func initInterfaceInfo()" <<capReply.error().type() ;
|
qDebug()<<"execute dbus method 'getWirelessDeviceCap' is invalid in func initInterfaceInfo()" <<capReply.error().type() ;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
QMap<QString, int> devCapMap = capReply.value();
|
|
||||||
|
|
||||||
|
QMap<QString, int> devCapMap;
|
||||||
|
QVariantMap::const_iterator item = reply.value().cbegin();
|
||||||
|
while (item != reply.value().cend()) {
|
||||||
|
devCapMap.insert(item.key(), item.value().toInt());
|
||||||
|
item ++;
|
||||||
|
}
|
||||||
|
|
||||||
if (deviceListMap.isEmpty()) {
|
if (deviceListMap.isEmpty()) {
|
||||||
qDebug() << "no wireless device";
|
qDebug() << "no wireless device";
|
||||||
|
|
|
@ -316,28 +316,23 @@ void MobileHotspotWidget::onInterfaceChanged()
|
||||||
{
|
{
|
||||||
m_interfaceName = m_interfaceComboBox->currentText();
|
m_interfaceName = m_interfaceComboBox->currentText();
|
||||||
if(m_interface->isValid()) {
|
if(m_interface->isValid()) {
|
||||||
QDBusMessage result = m_interface->call(QStringLiteral("getWirelessList"));
|
QDBusReply<QVariantList> reply = m_interface->call(QStringLiteral("getWirelessList"), m_interfaceName);
|
||||||
if(result.type() == QDBusMessage::ErrorMessage)
|
if(!reply.isValid())
|
||||||
{
|
{
|
||||||
qWarning() << "getWirelessList error:" << result.errorMessage();
|
qWarning() << "getWirelessList error:" << reply.error().message();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bool flag = false;
|
bool flag = false;
|
||||||
auto dbusArg = result.arguments().at(0).value<QDBusArgument>();
|
|
||||||
QMap<QString, QVector<QStringList>> variantList;
|
QList<QStringList> variantList;
|
||||||
dbusArg >> variantList;
|
for (int j = 0; j < reply.value().size(); ++j) {
|
||||||
if (variantList.size() != 0) {
|
variantList << reply.value().at(j).toStringList();
|
||||||
QMap<QString, QVector<QStringList>>::iterator iter;
|
}
|
||||||
for (iter = variantList.begin(); iter != variantList.end(); iter++) {
|
|
||||||
if (m_interfaceName == iter.key()) {
|
if (!variantList.isEmpty() && variantList.at(0).size() > 1) {
|
||||||
QVector<QStringList> wlanListInfo = iter.value();
|
|
||||||
if (!wlanListInfo.isEmpty() && wlanListInfo.at(0).size() > 1) {
|
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (flag) {
|
if (flag) {
|
||||||
m_interfaceWarnLabel->setText(tr("use ") + m_interfaceName +
|
m_interfaceWarnLabel->setText(tr("use ") + m_interfaceName +
|
||||||
tr(" share network, will interrupt local wireless connection"));
|
tr(" share network, will interrupt local wireless connection"));
|
||||||
|
@ -392,22 +387,32 @@ void MobileHotspotWidget::initInterfaceInfo()
|
||||||
m_interfaceComboBox->hidePopup();
|
m_interfaceComboBox->hidePopup();
|
||||||
}
|
}
|
||||||
m_interfaceComboBox->clear();
|
m_interfaceComboBox->clear();
|
||||||
QDBusReply<QMap<QString, bool> > reply = m_interface->call("getDeviceListAndEnabled",WIRELESS);
|
QDBusReply<QVariantMap> reply = m_interface->call(QStringLiteral("getDeviceListAndEnabled"),WIRELESS);
|
||||||
|
if(!reply.isValid()) {
|
||||||
if (!reply.isValid()) {
|
qWarning() << "[WlanConnect]getWirelessDeviceList error:" << reply.error().message();
|
||||||
qDebug() << LOG_HEAD <<"execute dbus method 'getDeviceListAndEnabled' is invalid in func initInterfaceInfo()";
|
|
||||||
setWidgetHidden(true);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QMap<QString, bool> devMap = reply.value();
|
|
||||||
|
|
||||||
QDBusReply<QMap<QString, int> > capReply = m_interface->call("getWirelessDeviceCap");
|
QMap<QString, bool> devMap;
|
||||||
|
QVariantMap::const_iterator item = reply.value().cbegin();
|
||||||
|
while (item != reply.value().cend()) {
|
||||||
|
devMap.insert(item.key(), item.value().toBool());
|
||||||
|
item ++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QDBusReply<QVariantMap> capReply = m_interface->call("getWirelessDeviceCap");
|
||||||
if (!capReply.isValid()) {
|
if (!capReply.isValid()) {
|
||||||
qDebug() << LOG_HEAD <<"execute dbus method 'getWirelessDeviceCap' is invalid in func initInterfaceInfo()" <<capReply.error().type() ;
|
qDebug() << LOG_HEAD <<"execute dbus method 'getWirelessDeviceCap' is invalid in func initInterfaceInfo()" <<capReply.error().type() ;
|
||||||
setWidgetHidden(true);
|
setWidgetHidden(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QMap<QString, int> devCapMap = capReply.value();
|
QMap<QString, int> devCapMap;
|
||||||
|
QVariantMap::const_iterator itemIter = capReply.value().cbegin();
|
||||||
|
while (itemIter != capReply.value().cend()) {
|
||||||
|
devCapMap.insert(itemIter.key(), itemIter.value().toInt());
|
||||||
|
itemIter ++;
|
||||||
|
}
|
||||||
|
|
||||||
if (devMap.isEmpty()) {
|
if (devMap.isEmpty()) {
|
||||||
qDebug() << LOG_HEAD << "no wireless device";
|
qDebug() << LOG_HEAD << "no wireless device";
|
||||||
|
@ -827,7 +832,7 @@ void MobileHotspotWidget::updateBandCombox()
|
||||||
{
|
{
|
||||||
QString tmp = m_freqBandComboBox->currentText();
|
QString tmp = m_freqBandComboBox->currentText();
|
||||||
m_freqBandComboBox->clear();
|
m_freqBandComboBox->clear();
|
||||||
QDBusReply<QMap<QString, int> > capReply = m_interface->call("getWirelessDeviceCap");
|
QDBusReply<QVariantMap> capReply = m_interface->call("getWirelessDeviceCap");
|
||||||
if (!capReply.isValid()) {
|
if (!capReply.isValid()) {
|
||||||
qDebug()<<"execute dbus method 'getWirelessDeviceCap' is invalid in func initInterfaceInfo()" << capReply.error().message();
|
qDebug()<<"execute dbus method 'getWirelessDeviceCap' is invalid in func initInterfaceInfo()" << capReply.error().message();
|
||||||
setWidgetHidden(true);
|
setWidgetHidden(true);
|
||||||
|
@ -835,7 +840,14 @@ void MobileHotspotWidget::updateBandCombox()
|
||||||
}
|
}
|
||||||
|
|
||||||
m_isUserSelect = false;
|
m_isUserSelect = false;
|
||||||
QMap<QString, int> devCapMap = capReply.value();
|
|
||||||
|
QMap<QString, int> devCapMap;
|
||||||
|
QVariantMap::const_iterator itemIter = capReply.value().cbegin();
|
||||||
|
while (itemIter != capReply.value().cend()) {
|
||||||
|
devCapMap.insert(itemIter.key(), itemIter.value().toInt());
|
||||||
|
itemIter ++;
|
||||||
|
}
|
||||||
|
|
||||||
if (devCapMap[m_interfaceName] & 0x02) {
|
if (devCapMap[m_interfaceName] & 0x02) {
|
||||||
m_freqBandComboBox->addItem("2.4GHz");
|
m_freqBandComboBox->addItem("2.4GHz");
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,9 @@ void NetConnect::showDesktopNotify(const QString &message)
|
||||||
|
|
||||||
|
|
||||||
NetConnect::NetConnect() : mFirstLoad(true) {
|
NetConnect::NetConnect() : mFirstLoad(true) {
|
||||||
|
qDBusRegisterMetaType<QStringList>();
|
||||||
|
qDBusRegisterMetaType<QList<QStringList>>();
|
||||||
|
|
||||||
QTranslator* translator = new QTranslator(this);
|
QTranslator* translator = new QTranslator(this);
|
||||||
translator->load("/usr/share/kylin-nm/netconnect/" + QLocale::system().name());
|
translator->load("/usr/share/kylin-nm/netconnect/" + QLocale::system().name());
|
||||||
QApplication::installTranslator(translator);
|
QApplication::installTranslator(translator);
|
||||||
|
@ -83,7 +86,15 @@ NetConnect::NetConnect() : mFirstLoad(true) {
|
||||||
pluginName = tr("LAN");
|
pluginName = tr("LAN");
|
||||||
pluginType = NETWORK;
|
pluginType = NETWORK;
|
||||||
|
|
||||||
needLoad = isExitWiredDevice();
|
m_interface = new QDBusInterface("com.kylin.network",
|
||||||
|
"/com/kylin/network",
|
||||||
|
"com.kylin.network",
|
||||||
|
QDBusConnection::sessionBus());
|
||||||
|
if(!m_interface->isValid()) {
|
||||||
|
qWarning() << qPrintable(QDBusConnection::sessionBus().lastError().message());
|
||||||
|
}
|
||||||
|
updatePluginShowSettings();
|
||||||
|
connect(m_interface, SIGNAL(deviceStatusChanged()), this, SLOT(updatePluginShowSettings()),Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
NetConnect::~NetConnect() {
|
NetConnect::~NetConnect() {
|
||||||
|
@ -111,7 +122,7 @@ QWidget *NetConnect::pluginUi() {
|
||||||
pluginWidget = new QWidget;
|
pluginWidget = new QWidget;
|
||||||
pluginWidget->setAttribute(Qt::WA_DeleteOnClose);
|
pluginWidget->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
ui->setupUi(pluginWidget);
|
ui->setupUi(pluginWidget);
|
||||||
qDBusRegisterMetaType<QVector<QStringList>>();
|
|
||||||
m_interface = new QDBusInterface("com.kylin.network",
|
m_interface = new QDBusInterface("com.kylin.network",
|
||||||
"/com/kylin/network",
|
"/com/kylin/network",
|
||||||
"com.kylin.network",
|
"com.kylin.network",
|
||||||
|
@ -119,6 +130,9 @@ QWidget *NetConnect::pluginUi() {
|
||||||
if(!m_interface->isValid()) {
|
if(!m_interface->isValid()) {
|
||||||
qWarning() << qPrintable(QDBusConnection::sessionBus().lastError().message());
|
qWarning() << qPrintable(QDBusConnection::sessionBus().lastError().message());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qDBusRegisterMetaType<QVector<QStringList>>();
|
||||||
|
|
||||||
initSearchText();
|
initSearchText();
|
||||||
initComponent();
|
initComponent();
|
||||||
}
|
}
|
||||||
|
@ -132,7 +146,54 @@ const QString NetConnect::name() const {
|
||||||
|
|
||||||
bool NetConnect::isEnable() const
|
bool NetConnect::isEnable() const
|
||||||
{
|
{
|
||||||
return needLoad;
|
//get isEnable
|
||||||
|
QDBusInterface dbus("com.kylin.network", "/com/kylin/network",
|
||||||
|
"com.kylin.network",
|
||||||
|
QDBusConnection::sessionBus());
|
||||||
|
if (!dbus.isValid()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMap<QString,bool> map;
|
||||||
|
QDBusReply<QVariantMap> reply = dbus.call(QStringLiteral("getDeviceListAndEnabled"),0);
|
||||||
|
if(!reply.isValid())
|
||||||
|
{
|
||||||
|
qWarning() << "[NetConnect]getWiredDeviceList error:" << reply.error().message();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
QVariantMap::const_iterator item = reply.value().cbegin();
|
||||||
|
while (item != reply.value().cend()) {
|
||||||
|
map.insert(item.key(), item.value().toBool());
|
||||||
|
item ++;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isEnabled = !map.isEmpty();
|
||||||
|
|
||||||
|
const QByteArray schema("org.ukui.control-center.plugins");
|
||||||
|
if (QGSettings::isSchemaInstalled(schema)) {
|
||||||
|
return isEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
//get gsettings
|
||||||
|
QGSettings *showSettings;
|
||||||
|
QString path("/org/ukui/control-center/plugins/netconnect/");
|
||||||
|
showSettings = new QGSettings(schema, path.toUtf8());
|
||||||
|
|
||||||
|
QVariant enabledState = showSettings->get("show");
|
||||||
|
|
||||||
|
//set gsettings
|
||||||
|
if (!enabledState.isValid() || enabledState.isNull()) {
|
||||||
|
qWarning() << "QGSettins get plugin show status error";
|
||||||
|
} else {
|
||||||
|
if (enabledState.toBool() != isEnabled) {
|
||||||
|
showSettings->set("show", isEnabled);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delete showSettings;
|
||||||
|
showSettings = nullptr;
|
||||||
|
|
||||||
|
return isEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -156,7 +217,8 @@ void NetConnect::initSearchText() {
|
||||||
ui->detailBtn->setText(tr("Advanced settings"));
|
ui->detailBtn->setText(tr("Advanced settings"));
|
||||||
ui->titleLabel->setText(tr("LAN"));
|
ui->titleLabel->setText(tr("LAN"));
|
||||||
//~ contents_path /netconnect/open
|
//~ contents_path /netconnect/open
|
||||||
ui->openLabel->setText(tr("open"));
|
tr("open");
|
||||||
|
ui->openLabel->setText(tr("LAN"));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NetConnect::eventFilter(QObject *w, QEvent *e) {
|
bool NetConnect::eventFilter(QObject *w, QEvent *e) {
|
||||||
|
@ -255,16 +317,21 @@ void NetConnect::getDeviceStatusMap(QMap<QString, bool> &map)
|
||||||
if (m_interface == nullptr || !m_interface->isValid()) {
|
if (m_interface == nullptr || !m_interface->isValid()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
map.clear();
|
||||||
qDebug() << "[NetConnect]call getDeviceListAndEnabled" << __LINE__;
|
qDebug() << "[NetConnect]call getDeviceListAndEnabled" << __LINE__;
|
||||||
QDBusMessage result = m_interface->call(QStringLiteral("getDeviceListAndEnabled"),0);
|
QDBusReply<QVariantMap> reply = m_interface->call(QStringLiteral("getDeviceListAndEnabled"),0);
|
||||||
qDebug() << "[NetConnect]call getDeviceListAndEnabled Respond" << __LINE__;
|
qDebug() << "[NetConnect]call getDeviceListAndEnabled Respond" << __LINE__;
|
||||||
if(result.type() == QDBusMessage::ErrorMessage)
|
if(!reply.isValid())
|
||||||
{
|
{
|
||||||
qWarning() << "[NetConnect]getWiredDeviceList error:" << result.errorMessage();
|
qWarning() << "[NetConnect]getWiredDeviceList error:" << reply.error().message();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto dbusArg = result.arguments().at(0).value<QDBusArgument>();
|
|
||||||
dbusArg >> map;
|
QVariantMap::const_iterator item = reply.value().cbegin();
|
||||||
|
while (item != reply.value().cend()) {
|
||||||
|
map.insert(item.key(), item.value().toBool());
|
||||||
|
item ++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//lanUpdate
|
//lanUpdate
|
||||||
|
@ -406,26 +473,17 @@ void NetConnect::initNetListFromDevice(QString deviceName)
|
||||||
if (m_interface == nullptr || !m_interface->isValid()) {
|
if (m_interface == nullptr || !m_interface->isValid()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
qDebug() << "[NetConnect]call getWiredList" << __LINE__;
|
|
||||||
QDBusMessage result = m_interface->call(QStringLiteral("getWiredList"));
|
QMap<QString, QList<QStringList>> variantList = getWiredList();
|
||||||
qDebug() << "[NetConnect]call getWiredList respond" << __LINE__;
|
|
||||||
if(result.type() == QDBusMessage::ErrorMessage)
|
|
||||||
{
|
|
||||||
qWarning() << "getWiredList error:" << result.errorMessage();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
auto dbusArg = result.arguments().at(0).value<QDBusArgument>();
|
|
||||||
QMap<QString, QVector<QStringList>> variantList;
|
|
||||||
dbusArg >> variantList;
|
|
||||||
if (variantList.size() == 0) {
|
if (variantList.size() == 0) {
|
||||||
qDebug() << "[NetConnect]initNetListFromDevice " << deviceName << " list empty";
|
qDebug() << "[NetConnect]initNetListFromDevice " << deviceName << " list empty";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QMap<QString, QVector<QStringList>>::iterator iter;
|
|
||||||
|
|
||||||
|
QMap<QString, QList<QStringList>>::iterator iter;
|
||||||
for (iter = variantList.begin(); iter != variantList.end(); iter++) {
|
for (iter = variantList.begin(); iter != variantList.end(); iter++) {
|
||||||
if (deviceName == iter.key()) {
|
if (deviceName == iter.key()) {
|
||||||
QVector<QStringList> wlanListInfo = iter.value();
|
QList<QStringList> wlanListInfo = iter.value();
|
||||||
//处理列表 已连接
|
//处理列表 已连接
|
||||||
qDebug() << "[NetConnect]initNetListFromDevice " << deviceName << " acitved lan " << wlanListInfo.at(0);
|
qDebug() << "[NetConnect]initNetListFromDevice " << deviceName << " acitved lan " << wlanListInfo.at(0);
|
||||||
addLanItem(deviceFrameMap[deviceName], deviceName, wlanListInfo.at(0), true);
|
addLanItem(deviceFrameMap[deviceName], deviceName, wlanListInfo.at(0), true);
|
||||||
|
@ -513,22 +571,25 @@ void NetConnect::addDeviceFrame(QString devName)
|
||||||
qDebug() << "[NetConnect]addDeviceFrame " << devName;
|
qDebug() << "[NetConnect]addDeviceFrame " << devName;
|
||||||
|
|
||||||
qDebug() << "[NetConnect]call getDeviceListAndEnabled" << __LINE__;
|
qDebug() << "[NetConnect]call getDeviceListAndEnabled" << __LINE__;
|
||||||
QDBusMessage result = m_interface->call(QStringLiteral("getDeviceListAndEnabled"),0);
|
QDBusReply<QVariantMap> reply = m_interface->call(QStringLiteral("getDeviceListAndEnabled"),0);
|
||||||
qDebug() << "[NetConnect]call getDeviceListAndEnabled Respond" << __LINE__;
|
qDebug() << "[NetConnect]call getDeviceListAndEnabled Respond" << __LINE__;
|
||||||
if(result.type() == QDBusMessage::ErrorMessage)
|
if(!reply.isValid()) {
|
||||||
{
|
qWarning() << "[NetConnect]getWiredDeviceList error:" << reply.error().message();
|
||||||
qWarning() << "[NetConnect]getWiredDeviceList error:" << result.errorMessage();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto dbusArg = result.arguments().at(0).value<QDBusArgument>();
|
|
||||||
QMap<QString,bool> map;
|
QMap<QString,bool> map;
|
||||||
dbusArg >> map;
|
QVariantMap::const_iterator item = reply.value().cbegin();
|
||||||
|
while (item != reply.value().cend()) {
|
||||||
|
map.insert(item.key(), item.value().toBool());
|
||||||
|
item ++;
|
||||||
|
}
|
||||||
|
|
||||||
bool enable = true;
|
bool enable = true;
|
||||||
if (map.contains(devName)) {
|
if (map.contains(devName)) {
|
||||||
enable = map[devName];
|
enable = map[devName];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ItemFrame *itemFrame = new ItemFrame(devName, pluginWidget);
|
ItemFrame *itemFrame = new ItemFrame(devName, pluginWidget);
|
||||||
ui->availableLayout->addWidget(itemFrame);
|
ui->availableLayout->addWidget(itemFrame);
|
||||||
itemFrame->deviceFrame->deviceLabel->setText(tr("card")+/*QString("%1").arg(count)+*/":"+devName);
|
itemFrame->deviceFrame->deviceLabel->setText(tr("card")+/*QString("%1").arg(count)+*/":"+devName);
|
||||||
|
@ -926,17 +987,9 @@ int NetConnect::getInsertPos(QString connName, QString deviceName)
|
||||||
if(m_interface == nullptr || !m_interface->isValid()) {
|
if(m_interface == nullptr || !m_interface->isValid()) {
|
||||||
index = 0;
|
index = 0;
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "[NetConnect]call getWiredList" << __LINE__;
|
|
||||||
QDBusMessage result = m_interface->call(QStringLiteral("getWiredList"));
|
QMap<QString, QList<QStringList>> variantList = getWiredList();
|
||||||
qDebug() << "[NetConnect]call getWiredList respond" << __LINE__;
|
|
||||||
if(result.type() == QDBusMessage::ErrorMessage)
|
|
||||||
{
|
|
||||||
qWarning() << "getWiredList error:" << result.errorMessage();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
auto dbusArg = result.arguments().at(0).value<QDBusArgument>();
|
|
||||||
QMap<QString, QVector<QStringList>> variantList;
|
|
||||||
dbusArg >> variantList;
|
|
||||||
if (!variantList.contains(deviceName)) {
|
if (!variantList.contains(deviceName)) {
|
||||||
qDebug() << "[NetConnect] getInsertPos but " << deviceName << "not exist";
|
qDebug() << "[NetConnect] getInsertPos but " << deviceName << "not exist";
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -971,30 +1024,33 @@ bool NetConnect::LaunchApp(QString desktopFile)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NetConnect::isExitWiredDevice()
|
QMap<QString, QList<QStringList>> NetConnect::getWiredList()
|
||||||
{
|
{
|
||||||
QDBusInterface *interface = new QDBusInterface("com.kylin.network", "/com/kylin/network",
|
QMap<QString, QList<QStringList>> map;
|
||||||
"com.kylin.network",
|
|
||||||
QDBusConnection::sessionBus());
|
QMap<QString, bool> statusMap;
|
||||||
if (!interface->isValid()) {
|
getDeviceStatusMap(statusMap);
|
||||||
qDebug() << "/com/kylin/network is invalid";
|
|
||||||
return false;
|
for (int i = 0; i < statusMap.keys().size(); ++i) {
|
||||||
|
qDebug() << "[NetConnect]call getWiredList" << __LINE__;
|
||||||
|
QDBusReply<QVariantList> reply = m_interface->call(QStringLiteral("getWiredList"), statusMap.keys().at(i));
|
||||||
|
qDebug() << "[NetConnect]call getWiredList respond" << __LINE__;
|
||||||
|
if(!reply.isValid())
|
||||||
|
{
|
||||||
|
qWarning() << "getWiredList error:" << reply.error().message();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDBusMessage result = interface->call(QStringLiteral("getDeviceListAndEnabled"),0);
|
QList<QStringList> list;
|
||||||
if(result.type() == QDBusMessage::ErrorMessage) {
|
for (int j = 0; j < reply.value().size(); ++j) {
|
||||||
qWarning() << "getWiredDeviceList error:" << result.errorMessage();
|
list << reply.value().at(j).toStringList();
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
map.insert(statusMap.keys().at(i), list);
|
||||||
auto dbusArg = result.arguments().at(0).value<QDBusArgument>();
|
|
||||||
QMap<QString, bool> deviceListMap;
|
|
||||||
dbusArg >> deviceListMap;
|
|
||||||
|
|
||||||
|
|
||||||
if (deviceListMap.isEmpty()) {
|
|
||||||
qDebug() << "no wired device";
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
return true;
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetConnect::updatePluginShowSettings()
|
||||||
|
{
|
||||||
|
isEnable();
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@ private:
|
||||||
QMap<QString, bool> deviceStatusMap;
|
QMap<QString, bool> deviceStatusMap;
|
||||||
QMap<QString, ItemFrame *> deviceFrameMap;
|
QMap<QString, ItemFrame *> deviceFrameMap;
|
||||||
|
|
||||||
bool needLoad;
|
QMap<QString, QList<QStringList>> getWiredList();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateLanInfo(QString deviceName, QStringList lanInfo);
|
void updateLanInfo(QString deviceName, QStringList lanInfo);
|
||||||
|
@ -159,6 +159,9 @@ private slots:
|
||||||
|
|
||||||
void onDeviceStatusChanged();
|
void onDeviceStatusChanged();
|
||||||
void onDeviceNameChanged(QString, QString, int);
|
void onDeviceNameChanged(QString, QString, int);
|
||||||
|
|
||||||
|
//更新控制面板插件Gsetting show
|
||||||
|
void updatePluginShowSettings();
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(QList<QDBusObjectPath>);
|
Q_DECLARE_METATYPE(QList<QDBusObjectPath>);
|
||||||
|
|
|
@ -348,7 +348,7 @@ void Proxy::initUi(QWidget *widget)
|
||||||
mIgnoreLayout->setSpacing(10);
|
mIgnoreLayout->setSpacing(10);
|
||||||
mIgnoreLayout->setContentsMargins(16, 0, 16, 24);
|
mIgnoreLayout->setContentsMargins(16, 0, 16, 24);
|
||||||
mIgnoreLabel = new QLabel(mIgnoreFrame);
|
mIgnoreLabel = new QLabel(mIgnoreFrame);
|
||||||
mIgnoreLabel->setFixedHeight(36);
|
mIgnoreLabel->setWordWrap(true);
|
||||||
mIgnoreLineEdit = new QTextEdit(mIgnoreFrame);
|
mIgnoreLineEdit = new QTextEdit(mIgnoreFrame);
|
||||||
mIgnoreLineEdit->setFixedHeight(120);
|
mIgnoreLineEdit->setFixedHeight(120);
|
||||||
mIgnoreLineEdit->setStyleSheet("border-radius:6px;background-color: palette(button)");
|
mIgnoreLineEdit->setStyleSheet("border-radius:6px;background-color: palette(button)");
|
||||||
|
|
|
@ -143,6 +143,15 @@ WlanConnect::WlanConnect() : m_firstLoad(true) {
|
||||||
|
|
||||||
pluginName = tr("WLAN");
|
pluginName = tr("WLAN");
|
||||||
pluginType = NETWORK;
|
pluginType = NETWORK;
|
||||||
|
|
||||||
|
m_interface = new QDBusInterface("com.kylin.network", "/com/kylin/network",
|
||||||
|
"com.kylin.network",
|
||||||
|
QDBusConnection::sessionBus());
|
||||||
|
if(!m_interface->isValid()) {
|
||||||
|
qWarning() << qPrintable(QDBusConnection::sessionBus().lastError().message());
|
||||||
|
}
|
||||||
|
updatePluginShowSettings();
|
||||||
|
connect(m_interface, SIGNAL(wirelessDeviceStatusChanged()), this, SLOT(updatePluginShowSettings()), Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
WlanConnect::~WlanConnect()
|
WlanConnect::~WlanConnect()
|
||||||
|
@ -171,12 +180,14 @@ QWidget *WlanConnect::pluginUi() {
|
||||||
pluginWidget->setAttribute(Qt::WA_DeleteOnClose);
|
pluginWidget->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
ui->setupUi(pluginWidget);
|
ui->setupUi(pluginWidget);
|
||||||
qDBusRegisterMetaType<QVector<QStringList>>();
|
qDBusRegisterMetaType<QVector<QStringList>>();
|
||||||
|
qDBusRegisterMetaType<QStringList>();
|
||||||
m_interface = new QDBusInterface("com.kylin.network", "/com/kylin/network",
|
m_interface = new QDBusInterface("com.kylin.network", "/com/kylin/network",
|
||||||
"com.kylin.network",
|
"com.kylin.network",
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
if(!m_interface->isValid()) {
|
if(!m_interface->isValid()) {
|
||||||
qWarning() << qPrintable(QDBusConnection::sessionBus().lastError().message());
|
qWarning() << qPrintable(QDBusConnection::sessionBus().lastError().message());
|
||||||
}
|
}
|
||||||
|
|
||||||
initSearchText();
|
initSearchText();
|
||||||
initComponent();
|
initComponent();
|
||||||
}
|
}
|
||||||
|
@ -190,7 +201,61 @@ const QString WlanConnect::name() const {
|
||||||
|
|
||||||
bool WlanConnect::isEnable() const
|
bool WlanConnect::isEnable() const
|
||||||
{
|
{
|
||||||
return true;
|
//get isEnable
|
||||||
|
QDBusInterface dbus("com.kylin.network", "/com/kylin/network",
|
||||||
|
"com.kylin.network",
|
||||||
|
QDBusConnection::sessionBus());
|
||||||
|
if (!dbus.isValid()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
QMap<QString,bool> map;
|
||||||
|
QDBusReply<QVariantMap> reply = dbus.call(QStringLiteral("getDeviceListAndEnabled"), 1);
|
||||||
|
if(!reply.isValid())
|
||||||
|
{
|
||||||
|
qWarning() << "[NetConnect]getWiredDeviceList error:" << reply.error().message();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
QVariantMap::const_iterator item = reply.value().cbegin();
|
||||||
|
while (item != reply.value().cend()) {
|
||||||
|
map.insert(item.key(), item.value().toBool());
|
||||||
|
item ++;
|
||||||
|
}
|
||||||
|
//筛选已托管(managed)网卡
|
||||||
|
QStringList list;
|
||||||
|
QMap<QString, bool>::iterator iters;
|
||||||
|
for (iters = map.begin(); iters != map.end(); ++iters) {
|
||||||
|
if (iters.value() == true) {
|
||||||
|
list << iters.key();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isEnabled = !list.isEmpty();
|
||||||
|
|
||||||
|
const QByteArray schema("org.ukui.control-center.plugins");
|
||||||
|
if (QGSettings::isSchemaInstalled(schema)) {
|
||||||
|
return isEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
//get gsettings
|
||||||
|
QGSettings *showSettings;
|
||||||
|
QString path("/org/ukui/control-center/plugins/wlanconnect/");
|
||||||
|
showSettings = new QGSettings(schema, path.toUtf8());
|
||||||
|
|
||||||
|
QVariant enabledState = showSettings->get("show");
|
||||||
|
|
||||||
|
//set gsettings
|
||||||
|
if (!enabledState.isValid() || enabledState.isNull()) {
|
||||||
|
qWarning() << "QGSettins get plugin show status error";
|
||||||
|
} else {
|
||||||
|
if (enabledState.toBool() != isEnabled) {
|
||||||
|
showSettings->set("show", isEnabled);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delete showSettings;
|
||||||
|
showSettings = nullptr;
|
||||||
|
|
||||||
|
return isEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -214,7 +279,8 @@ void WlanConnect::initSearchText() {
|
||||||
ui->detailBtn->setText(tr("Advanced settings"));
|
ui->detailBtn->setText(tr("Advanced settings"));
|
||||||
ui->titleLabel->setText(tr("WLAN"));
|
ui->titleLabel->setText(tr("WLAN"));
|
||||||
//~ contents_path /wlanconnect/open
|
//~ contents_path /wlanconnect/open
|
||||||
ui->openLabel->setText(tr("open"));
|
tr("open");
|
||||||
|
ui->openLabel->setText(tr("WLAN"));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WlanConnect::eventFilter(QObject *w, QEvent *e) {
|
bool WlanConnect::eventFilter(QObject *w, QEvent *e) {
|
||||||
|
@ -320,28 +386,18 @@ void WlanConnect::updateList()
|
||||||
}
|
}
|
||||||
qDebug() << "update list";
|
qDebug() << "update list";
|
||||||
if(m_interface != nullptr && m_interface->isValid()) {
|
if(m_interface != nullptr && m_interface->isValid()) {
|
||||||
qDebug() << "[WlanConnect]call getWirelessList" << __LINE__;
|
QMap<QString, QList<QStringList>> variantList = getWirelessList();
|
||||||
QDBusMessage result = m_interface->call(QStringLiteral("getWirelessList"));
|
|
||||||
qDebug() << "[WlanConnect]call getWirelessList respond" << __LINE__;
|
|
||||||
if(result.type() == QDBusMessage::ErrorMessage)
|
|
||||||
{
|
|
||||||
qWarning() << "getWirelessList error:" << result.errorMessage();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
auto dbusArg = result.arguments().at(0).value<QDBusArgument>();
|
|
||||||
QMap<QString, QVector<QStringList>> variantList;
|
|
||||||
dbusArg >> variantList;
|
|
||||||
|
|
||||||
if (variantList.size() == 0) {
|
if (variantList.size() == 0) {
|
||||||
qDebug() << "[WlanConnect]updateList " << " list empty";
|
qDebug() << "[WlanConnect]updateList " << " list empty";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QMap<QString, QVector<QStringList>>::iterator iter;
|
QMap<QString, QList<QStringList>>::iterator iter;
|
||||||
|
|
||||||
for (iter = variantList.begin(); iter != variantList.end(); iter++) {
|
for (iter = variantList.begin(); iter != variantList.end(); iter++) {
|
||||||
if (deviceFrameMap.contains(iter.key())) {
|
if (deviceFrameMap.contains(iter.key())) {
|
||||||
QVector<QStringList> wifiList = iter.value();
|
QList<QStringList> wifiList = iter.value();
|
||||||
resortWifiList(deviceFrameMap[iter.key()], wifiList);
|
resortWifiList(deviceFrameMap[iter.key()], wifiList);
|
||||||
deviceFrameMap[iter.key()]->filletStyleChange();
|
deviceFrameMap[iter.key()]->filletStyleChange();
|
||||||
}
|
}
|
||||||
|
@ -349,7 +405,7 @@ void WlanConnect::updateList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WlanConnect::resortWifiList(ItemFrame *frame, QVector<QStringList> list)
|
void WlanConnect::resortWifiList(ItemFrame *frame, QList<QStringList> list)
|
||||||
{
|
{
|
||||||
if(nullptr == frame || frame->lanItemLayout->count() <= 0 || list.isEmpty()) {
|
if(nullptr == frame || frame->lanItemLayout->count() <= 0 || list.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
|
@ -705,16 +761,20 @@ void WlanConnect::getDeviceList(QStringList &list)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
qDebug() << "[WlanConnect]call getDeviceListAndEnabled" << __LINE__;
|
qDebug() << "[WlanConnect]call getDeviceListAndEnabled" << __LINE__;
|
||||||
QDBusMessage result = m_interface->call(QStringLiteral("getDeviceListAndEnabled"),1);
|
QDBusReply<QVariantMap> reply = m_interface->call(QStringLiteral("getDeviceListAndEnabled"),1);
|
||||||
qDebug() << "[WlanConnect]call getDeviceListAndEnabled respond" << __LINE__;
|
qDebug() << "[WlanConnect]call getDeviceListAndEnabled respond" << __LINE__;
|
||||||
if(result.type() == QDBusMessage::ErrorMessage)
|
if(!reply.isValid())
|
||||||
{
|
{
|
||||||
qWarning() << "[WlanConnect]getWirelessDeviceList error:" << result.errorMessage();
|
qWarning() << "[WlanConnect]getWirelessDeviceList error:" << reply.error().message();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto dbusArg = result.arguments().at(0).value<QDBusArgument>();
|
|
||||||
QMap<QString,bool> map;
|
QMap<QString,bool> map;
|
||||||
dbusArg >> map;
|
QVariantMap::const_iterator item = reply.value().cbegin();
|
||||||
|
while (item != reply.value().cend()) {
|
||||||
|
map.insert(item.key(), item.value().toBool());
|
||||||
|
item ++;
|
||||||
|
}
|
||||||
|
|
||||||
//筛选已托管(managed)网卡
|
//筛选已托管(managed)网卡
|
||||||
QMap<QString, bool>::iterator iters;
|
QMap<QString, bool>::iterator iters;
|
||||||
|
@ -772,26 +832,20 @@ void WlanConnect::initNetListFromDevice(QString deviceName)
|
||||||
if (m_interface == nullptr || !m_interface->isValid()) {
|
if (m_interface == nullptr || !m_interface->isValid()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
qDebug() << "[WlanConnect]call getWirelessList" << __LINE__;
|
|
||||||
QDBusMessage result = m_interface->call(QStringLiteral("getWirelessList"));
|
QMap<QString, QList<QStringList>> variantList = getWirelessList();
|
||||||
qDebug() << "[WlanConnect]call getWirelessList respond" << __LINE__;
|
|
||||||
if(result.type() == QDBusMessage::ErrorMessage)
|
|
||||||
{
|
|
||||||
qWarning() << "getWirelessList error:" << result.errorMessage();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
auto dbusArg = result.arguments().at(0).value<QDBusArgument>();
|
|
||||||
QMap<QString, QVector<QStringList>> variantList;
|
|
||||||
dbusArg >> variantList;
|
|
||||||
if (variantList.size() == 0) {
|
if (variantList.size() == 0) {
|
||||||
qDebug() << "[WlanConnect]initNetListFromDevice " << deviceName << " list empty";
|
qDebug() << "[WlanConnect]initNetListFromDevice " << deviceName << " list empty";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QMap<QString, QVector<QStringList>>::iterator iter;
|
|
||||||
|
|
||||||
|
QMap<QString, QList<QStringList>>::iterator iter;
|
||||||
for (iter = variantList.begin(); iter != variantList.end(); iter++) {
|
for (iter = variantList.begin(); iter != variantList.end(); iter++) {
|
||||||
if (deviceName == iter.key()) {
|
if (deviceName == iter.key()) {
|
||||||
QVector<QStringList> wlanListInfo = iter.value();
|
QList<QStringList> wlanListInfo = iter.value();
|
||||||
|
if (wlanListInfo.size() <= 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
//处理列表 已连接
|
//处理列表 已连接
|
||||||
qDebug() << "[WlanConnect]initNetListFromDevice " << deviceName << " acitved wifi " << wlanListInfo.at(0);
|
qDebug() << "[WlanConnect]initNetListFromDevice " << deviceName << " acitved wifi " << wlanListInfo.at(0);
|
||||||
addActiveItem(deviceFrameMap[deviceName], deviceName, wlanListInfo.at(0));
|
addActiveItem(deviceFrameMap[deviceName], deviceName, wlanListInfo.at(0));
|
||||||
|
@ -907,21 +961,13 @@ int WlanConnect::sortWlanNet(QString deviceName, QString name, QString signal)
|
||||||
if (m_interface == nullptr || !m_interface->isValid()) {
|
if (m_interface == nullptr || !m_interface->isValid()) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
qDebug() << "[WlanConnect]call getWirelessList" << __LINE__;
|
|
||||||
QDBusMessage result = m_interface->call(QStringLiteral("getWirelessList"));
|
QMap<QString, QList<QStringList>> variantList = getWirelessList();
|
||||||
qDebug() << "[WlanConnect]call getWirelessList respond" << __LINE__;
|
|
||||||
if(result.type() == QDBusMessage::ErrorMessage)
|
QMap<QString, QList<QStringList>>::iterator iter;
|
||||||
{
|
|
||||||
qWarning() << "getWirelessList error:" << result.errorMessage();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
auto dbusArg = result.arguments().at(0).value<QDBusArgument>();
|
|
||||||
QMap<QString, QVector<QStringList>> variantList;
|
|
||||||
dbusArg >> variantList;
|
|
||||||
QMap<QString, QVector<QStringList>>::iterator iter;
|
|
||||||
for (iter = variantList.begin(); iter != variantList.end(); iter++) {
|
for (iter = variantList.begin(); iter != variantList.end(); iter++) {
|
||||||
if (deviceName == iter.key()) {
|
if (deviceName == iter.key()) {
|
||||||
QVector<QStringList> wlanListInfo = iter.value();
|
QList<QStringList> wlanListInfo = iter.value();
|
||||||
for (int i = 0; i < wlanListInfo.size(); i++) {
|
for (int i = 0; i < wlanListInfo.size(); i++) {
|
||||||
if (name == wlanListInfo.at(i).at(0)) {
|
if (name == wlanListInfo.at(i).at(0)) {
|
||||||
return i;
|
return i;
|
||||||
|
@ -1146,3 +1192,33 @@ bool WlanConnect::LaunchApp(QString desktopFile)
|
||||||
return reply;
|
return reply;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QMap<QString, QList<QStringList>> WlanConnect::getWirelessList()
|
||||||
|
{
|
||||||
|
QMap<QString, QList<QStringList>> map;
|
||||||
|
QStringList list;
|
||||||
|
getDeviceList(list);
|
||||||
|
|
||||||
|
for (int i = 0; i < list.size(); ++i) {
|
||||||
|
qDebug() << "[NetConnect]call getWirelessList" << __LINE__;
|
||||||
|
QDBusReply<QVariantList> reply = m_interface->call(QStringLiteral("getWirelessList"), list.at(i));
|
||||||
|
qDebug() << "[NetConnect]call getWirelessList respond" << __LINE__;
|
||||||
|
if(!reply.isValid())
|
||||||
|
{
|
||||||
|
qWarning() << "getWirelessList error:" << reply.error().message();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<QStringList> llist;
|
||||||
|
for (int j = 0; j < reply.value().size(); ++j) {
|
||||||
|
llist << reply.value().at(j).toStringList();
|
||||||
|
}
|
||||||
|
map.insert(list.at(i), llist);
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
void WlanConnect::updatePluginShowSettings()
|
||||||
|
{
|
||||||
|
isEnable();
|
||||||
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ private:
|
||||||
|
|
||||||
int sortWlanNet(QString deviceName, QString name, QString signal);
|
int sortWlanNet(QString deviceName, QString name, QString signal);
|
||||||
void updateIcon(WlanItem *item, QString signalStrength, QString security, QString isApConnection, int category);
|
void updateIcon(WlanItem *item, QString signalStrength, QString security, QString isApConnection, int category);
|
||||||
void resortWifiList(ItemFrame *frame, QVector<QStringList> list);
|
void resortWifiList(ItemFrame *frame, QList<QStringList> list);
|
||||||
|
|
||||||
|
|
||||||
//单wifi图标
|
//单wifi图标
|
||||||
|
@ -174,6 +174,8 @@ private:
|
||||||
|
|
||||||
QTimer * m_scanTimer = nullptr;
|
QTimer * m_scanTimer = nullptr;
|
||||||
// QTimer * m_updateTimer = nullptr;
|
// QTimer * m_updateTimer = nullptr;
|
||||||
|
|
||||||
|
QMap<QString, QList<QStringList>> getWirelessList();
|
||||||
private:
|
private:
|
||||||
KSwitchButton *m_wifiSwitch;
|
KSwitchButton *m_wifiSwitch;
|
||||||
bool m_firstLoad;
|
bool m_firstLoad;
|
||||||
|
@ -192,6 +194,7 @@ private slots:
|
||||||
|
|
||||||
void reScan();
|
void reScan();
|
||||||
|
|
||||||
|
//更新控制面板插件Gsetting show
|
||||||
|
void updatePluginShowSettings();
|
||||||
};
|
};
|
||||||
#endif // WLANCONNECT_H
|
#endif // WLANCONNECT_H
|
||||||
|
|
|
@ -3,13 +3,17 @@ include(hotspot/hotspot.pri)
|
||||||
include(dbus-interface/dbus-interface.pri)
|
include(dbus-interface/dbus-interface.pri)
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
$$PWD/dbusadaptor.h \
|
$$PWD/dbus.h \
|
||||||
|
$$PWD/dbus_adaptor.h \
|
||||||
|
$$PWD/dbus_interface.h \
|
||||||
$$PWD/sysdbusregister.h \
|
$$PWD/sysdbusregister.h \
|
||||||
$$PWD/utils.h \
|
$$PWD/utils.h \
|
||||||
$$PWD/wifi-auth-thread.h
|
$$PWD/wifi-auth-thread.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
$$PWD/dbusadaptor.cpp \
|
$$PWD/dbus.cpp \
|
||||||
|
$$PWD/dbus_adaptor.cpp \
|
||||||
|
$$PWD/dbus_interface.cpp \
|
||||||
$$PWD/sysdbusregister.cpp \
|
$$PWD/sysdbusregister.cpp \
|
||||||
$$PWD/utils.cpp \
|
$$PWD/utils.cpp \
|
||||||
$$PWD/wifi-auth-thread.cpp
|
$$PWD/wifi-auth-thread.cpp
|
||||||
|
|
|
@ -80,6 +80,8 @@ KyConnectResourse::KyConnectResourse(QObject *parent) : QObject(parent)
|
||||||
connect(m_networkResourceInstance, &KyNetworkResourceManager::connectionRemove, this, &KyConnectResourse::connectionRemove);
|
connect(m_networkResourceInstance, &KyNetworkResourceManager::connectionRemove, this, &KyConnectResourse::connectionRemove);
|
||||||
connect(m_networkResourceInstance, &KyNetworkResourceManager::connectionUpdate, this, &KyConnectResourse::connectionUpdate);
|
connect(m_networkResourceInstance, &KyNetworkResourceManager::connectionUpdate, this, &KyConnectResourse::connectionUpdate);
|
||||||
connect(m_networkResourceInstance, &KyNetworkResourceManager::connectivityChanged, this, &KyConnectResourse::connectivityChanged);
|
connect(m_networkResourceInstance, &KyNetworkResourceManager::connectivityChanged, this, &KyConnectResourse::connectivityChanged);
|
||||||
|
|
||||||
|
connect(m_networkResourceInstance, &KyNetworkResourceManager::connectivityCheckSpareUriChanged, this, &KyConnectResourse::connectivityCheckSpareUriChanged);
|
||||||
connect(m_networkResourceInstance, &KyNetworkResourceManager::needShowDesktop, this, &KyConnectResourse::needShowDesktop);
|
connect(m_networkResourceInstance, &KyNetworkResourceManager::needShowDesktop, this, &KyConnectResourse::needShowDesktop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,7 @@ Q_SIGNALS:
|
||||||
void connectionUpdate(QString uuid);
|
void connectionUpdate(QString uuid);
|
||||||
void connectionRemove(QString path);
|
void connectionRemove(QString path);
|
||||||
void connectivityChanged(NetworkManager::Connectivity connectivity);
|
void connectivityChanged(NetworkManager::Connectivity connectivity);
|
||||||
|
void connectivityCheckSpareUriChanged();
|
||||||
|
|
||||||
void needShowDesktop(QString);
|
void needShowDesktop(QString);
|
||||||
|
|
||||||
|
|
|
@ -597,6 +597,12 @@ void KyNetworkResourceManager::onPropertiesChanged(QVariantMap qvm)
|
||||||
Q_EMIT wiredEnabledChanged(wiredEnable);
|
Q_EMIT wiredEnabledChanged(wiredEnable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for(QString keyStr : qvm.keys()) {
|
||||||
|
//内网检测地址变化
|
||||||
|
if (keyStr == "ConnectivityCheckSpareUri") {
|
||||||
|
Q_EMIT connectivityCheckSpareUriChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void KyNetworkResourceManager::onConnectionUpdated()
|
void KyNetworkResourceManager::onConnectionUpdated()
|
||||||
|
|
|
@ -129,6 +129,7 @@ Q_SIGNALS:
|
||||||
void wifiNetworkDeviceDisappear();
|
void wifiNetworkDeviceDisappear();
|
||||||
void wifiEnabledChanged(bool);
|
void wifiEnabledChanged(bool);
|
||||||
void wiredEnabledChanged(bool);
|
void wiredEnabledChanged(bool);
|
||||||
|
void connectivityCheckSpareUriChanged();
|
||||||
|
|
||||||
void activeConnectionsReset();
|
void activeConnectionsReset();
|
||||||
void activeConnectionAdd(QString uuid);
|
void activeConnectionAdd(QString uuid);
|
||||||
|
|
|
@ -218,3 +218,89 @@ out:
|
||||||
g_object_unref (props_proxy);
|
g_object_unref (props_proxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString getConnectivityCheckSpareUriByGDbus()
|
||||||
|
{
|
||||||
|
GDBusProxy *props_proxy;
|
||||||
|
GVariant *ret = NULL, *path_value = NULL;
|
||||||
|
GError *error = NULL;
|
||||||
|
QString str;
|
||||||
|
|
||||||
|
/* Create a D-Bus object proxy for the active connection object's properties */
|
||||||
|
props_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
|
||||||
|
G_DBUS_PROXY_FLAGS_NONE,
|
||||||
|
NULL,
|
||||||
|
"org.freedesktop.NetworkManager",
|
||||||
|
"/org/freedesktop/NetworkManager",
|
||||||
|
"org.freedesktop.DBus.Properties",
|
||||||
|
NULL, NULL);
|
||||||
|
g_assert (props_proxy);
|
||||||
|
|
||||||
|
/* Get the object path of the Connection details */
|
||||||
|
ret = g_dbus_proxy_call_sync (props_proxy,
|
||||||
|
"Get",
|
||||||
|
g_variant_new ("(ss)",
|
||||||
|
"org.freedesktop.NetworkManager",
|
||||||
|
"ConnectivityCheckSpareUri"),
|
||||||
|
G_DBUS_CALL_FLAGS_NONE, -1,
|
||||||
|
NULL, &error);
|
||||||
|
if (!ret) {
|
||||||
|
g_dbus_error_strip_remote_error (error);
|
||||||
|
qDebug() << "failed to getConnectivityCheckSpareUri";
|
||||||
|
g_error_free (error);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_variant_get (ret, "(v)", &path_value);
|
||||||
|
// if (!g_variant_is_of_type (path_value, G_VARIANT_TYPE_VARIANT)) {
|
||||||
|
// g_warning ("Unexpected type returned getting Connection property: %s",
|
||||||
|
// g_variant_get_type_string (path_value));
|
||||||
|
// goto out;
|
||||||
|
// }
|
||||||
|
|
||||||
|
str = QString(g_variant_get_string(path_value, NULL));
|
||||||
|
|
||||||
|
out:
|
||||||
|
if (path_value)
|
||||||
|
g_variant_unref (path_value);
|
||||||
|
if (ret)
|
||||||
|
g_variant_unref (ret);
|
||||||
|
g_object_unref (props_proxy);
|
||||||
|
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setConnectivityCheckSpareUriByGDbus(QString uri)
|
||||||
|
{
|
||||||
|
GDBusProxy *props_proxy;
|
||||||
|
GVariant *ret = NULL;
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
/* Create a D-Bus object proxy for the active connection object's properties */
|
||||||
|
props_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
|
||||||
|
G_DBUS_PROXY_FLAGS_NONE,
|
||||||
|
NULL,
|
||||||
|
"org.freedesktop.NetworkManager",
|
||||||
|
"/org/freedesktop/NetworkManager",
|
||||||
|
"org.freedesktop.DBus.Properties",
|
||||||
|
NULL, NULL);
|
||||||
|
g_assert (props_proxy);
|
||||||
|
|
||||||
|
/* Get the object path of the Connection details */
|
||||||
|
ret = g_dbus_proxy_call_sync (props_proxy,
|
||||||
|
"Set",
|
||||||
|
g_variant_new ("(ssv)",
|
||||||
|
"org.freedesktop.NetworkManager",
|
||||||
|
"ConnectivityCheckSpareUri",
|
||||||
|
g_variant_new_string(uri.toStdString().c_str())),
|
||||||
|
G_DBUS_CALL_FLAGS_NONE, -1,
|
||||||
|
NULL, &error);
|
||||||
|
if (!ret) {
|
||||||
|
g_dbus_error_strip_remote_error (error);
|
||||||
|
qDebug() << "failed to setConnectivityCheckSpareUri";
|
||||||
|
g_error_free (error);
|
||||||
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
|
if (ret)
|
||||||
|
g_variant_unref (ret);
|
||||||
|
g_object_unref (props_proxy);
|
||||||
|
}
|
||||||
|
|
|
@ -37,6 +37,8 @@ QString getConnectTypeByDbus(QString &connectPath);
|
||||||
QString getSsidFromByteArray(QByteArray &rawSsid);
|
QString getSsidFromByteArray(QByteArray &rawSsid);
|
||||||
void setWiredEnabledByGDbus(bool enabled);
|
void setWiredEnabledByGDbus(bool enabled);
|
||||||
void setDeviceManagedByGDbus(QString dbusPath, bool managed);
|
void setDeviceManagedByGDbus(QString dbusPath, bool managed);
|
||||||
|
QString getConnectivityCheckSpareUriByGDbus();
|
||||||
|
void setConnectivityCheckSpareUriByGDbus(QString str);
|
||||||
bool getWiredEnabledByGDbus();
|
bool getWiredEnabledByGDbus();
|
||||||
|
|
||||||
#endif // KYLINUTIL_H
|
#endif // KYLINUTIL_H
|
||||||
|
|
|
@ -295,6 +295,10 @@ QString KyWirelessNetResource::getDeviceIFace(NetworkManager::ActiveConnection::
|
||||||
NetworkManager::Device:: Ptr devicePtr =
|
NetworkManager::Device:: Ptr devicePtr =
|
||||||
m_networkResourceInstance->findDeviceUni(ifaceUni);
|
m_networkResourceInstance->findDeviceUni(ifaceUni);
|
||||||
|
|
||||||
|
if (devicePtr.isNull()) {
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
return devicePtr->interfaceName();
|
return devicePtr->interfaceName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,431 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.8
|
||||||
|
* Command line was: qdbusxml2cpp com.kylin.weather.xml -a dbusadaptor -c DbusAdaptor -l MainWindow
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2015 The Qt Company Ltd.
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "dbus.h"
|
||||||
|
#include <QtCore/QMetaObject>
|
||||||
|
#include <QtCore/QByteArray>
|
||||||
|
#include <QtCore/QList>
|
||||||
|
#include <QtCore/QMap>
|
||||||
|
#include <QtCore/QString>
|
||||||
|
#include <QtCore/QStringList>
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
|
||||||
|
const QByteArray GSETTINGS_SCHEMA_KYLIN_NM = "org.ukui.kylin-nm.switch";
|
||||||
|
const QString KEY_WIRELESS_SWITCH = "wirelessswitch";
|
||||||
|
const QString KEY_WIRED_SWITCH = "wiredswitch";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of adaptor class DbusAdaptor
|
||||||
|
*/
|
||||||
|
|
||||||
|
DbusAdaptor::DbusAdaptor(QString display, MainWindow *m, QObject *parent)
|
||||||
|
: QObject(parent),
|
||||||
|
m_display(display),
|
||||||
|
m_mainWindow(m)
|
||||||
|
{
|
||||||
|
// constructor
|
||||||
|
qDBusRegisterMetaType<QMap<QString, bool> >();
|
||||||
|
qDBusRegisterMetaType<QMap<QString, int> >();
|
||||||
|
qDBusRegisterMetaType<QList<QStringList> >();
|
||||||
|
qDBusRegisterMetaType<QMap<QString, QList<QStringList> >>();
|
||||||
|
|
||||||
|
bool isServiceRegistered = QDBusConnection::sessionBus().interface()->isServiceRegistered(QStringLiteral("com.kylin.network"));
|
||||||
|
if(!isServiceRegistered) {
|
||||||
|
registerService();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_watcher = new QDBusServiceWatcher(QStringLiteral("com.kylin.network"),QDBusConnection::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this);
|
||||||
|
connect(m_watcher, &QDBusServiceWatcher::serviceOwnerChanged, this, &DbusAdaptor::onServiceOwnerChanged);
|
||||||
|
|
||||||
|
connectToMainwindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DbusAdaptor::onServiceOwnerChanged(const QString &service, const QString &oldOwner, const QString &newOwner)
|
||||||
|
{
|
||||||
|
if (newOwner.isEmpty()) {
|
||||||
|
bool success = registerService();
|
||||||
|
if (success) {
|
||||||
|
m_watcher->deleteLater();
|
||||||
|
}
|
||||||
|
qDebug() << "try to register service:" << success;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint newOwnerPid = QDBusConnection::sessionBus().interface()->servicePid(newOwner);
|
||||||
|
qDebug() << "newOwnerPid:" << newOwnerPid << ", myPid:" << QCoreApplication::applicationPid() << ", display:" << m_display;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DbusAdaptor::registerService()
|
||||||
|
{
|
||||||
|
new NetworkAdaptor(this);
|
||||||
|
|
||||||
|
QDBusConnection conn = QDBusConnection::sessionBus();
|
||||||
|
auto reply = conn.interface()->registerService(QStringLiteral("com.kylin.network"),
|
||||||
|
QDBusConnectionInterface::ReplaceExistingService,
|
||||||
|
QDBusConnectionInterface::DontAllowReplacement);
|
||||||
|
if (reply.value() == QDBusConnectionInterface::ServiceNotRegistered) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool res = QDBusConnection::sessionBus().registerObject("/com/kylin/network", this);
|
||||||
|
if (!res) {
|
||||||
|
QDBusConnection::sessionBus().interface()->unregisterService(QStringLiteral("com.kylin.network"));
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//无线列表
|
||||||
|
QVariantList DbusAdaptor::getWirelessList(QString devName)
|
||||||
|
{
|
||||||
|
QList<QStringList> list;
|
||||||
|
m_mainWindow->getWirelessList(devName, list);
|
||||||
|
QVariantList vList;
|
||||||
|
for (int i = 0; i < list.size(); ++i) {
|
||||||
|
vList.append(QVariant::fromValue(list.at(i)));
|
||||||
|
}
|
||||||
|
return vList;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DbusAdaptor::getWirelessSwitchBtnState()
|
||||||
|
{
|
||||||
|
return m_mainWindow->getWirelessSwitchBtnState();
|
||||||
|
}
|
||||||
|
|
||||||
|
//有线列表
|
||||||
|
QVariantList DbusAdaptor::getWiredList(QString devName)
|
||||||
|
{
|
||||||
|
QList<QStringList> list;
|
||||||
|
m_mainWindow->getWiredList(devName, list);
|
||||||
|
QVariantList vList;
|
||||||
|
for (int i = 0; i < list.size(); ++i) {
|
||||||
|
vList.append(QVariant::fromValue(list.at(i)));
|
||||||
|
}
|
||||||
|
return vList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//有线开关
|
||||||
|
void DbusAdaptor::setWiredSwitchEnable(bool enable)
|
||||||
|
{
|
||||||
|
//todo mainwindow调用backend 对开关 打开/关闭
|
||||||
|
if (QGSettings::isSchemaInstalled(GSETTINGS_SCHEMA_KYLIN_NM)) {
|
||||||
|
QGSettings *gsetting = new QGSettings(GSETTINGS_SCHEMA_KYLIN_NM);
|
||||||
|
if (gsetting->get(KEY_WIRED_SWITCH).toBool() != enable) {
|
||||||
|
gsetting->set(KEY_WIRED_SWITCH, enable);
|
||||||
|
}
|
||||||
|
delete gsetting;
|
||||||
|
gsetting = nullptr;
|
||||||
|
} else {
|
||||||
|
qDebug()<<"isSchemaInstalled false";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//无线开关
|
||||||
|
void DbusAdaptor::setWirelessSwitchEnable(bool enable)
|
||||||
|
{
|
||||||
|
//todo mainwindow调用backend 对开关 打开/关闭
|
||||||
|
// if (QGSettings::isSchemaInstalled(GSETTINGS_SCHEMA_KYLIN_NM)) {
|
||||||
|
// QGSettings *gsetting = new QGSettings(GSETTINGS_SCHEMA_KYLIN_NM);
|
||||||
|
// if (gsetting->get(KEY_WIRELESS_SWITCH).toBool() != enable) {
|
||||||
|
// gsetting->set(KEY_WIRELESS_SWITCH, enable);
|
||||||
|
// }
|
||||||
|
// delete gsetting;
|
||||||
|
// gsetting = nullptr;
|
||||||
|
// } else {
|
||||||
|
// qDebug()<<"isSchemaInstalled false";
|
||||||
|
// }
|
||||||
|
m_mainWindow->setWirelessSwitchEnable(enable);
|
||||||
|
}
|
||||||
|
|
||||||
|
//启用/禁用网卡
|
||||||
|
void DbusAdaptor::setDeviceEnable(QString devName, bool enable)
|
||||||
|
{
|
||||||
|
m_mainWindow->setWiredDeviceEnable(devName, enable);
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置默认网卡
|
||||||
|
//void DbusAdaptor::setDefaultWiredDevice(QString deviceName)
|
||||||
|
//{
|
||||||
|
// if (!checkDeviceExist(WIRED, deviceName)) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// setDefaultDevice(WIRED, deviceName);
|
||||||
|
// parent()->setWiredDefaultDevice(deviceName);
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//QString DbusAdaptor::getDefaultWiredDevice()
|
||||||
|
//{
|
||||||
|
// QSettings * m_settings = new QSettings(CONFIG_FILE_PATH, QSettings::IniFormat);
|
||||||
|
// m_settings->beginGroup("DEFAULTCARD");
|
||||||
|
// QString key("wired");
|
||||||
|
// QString deviceName = m_settings->value(key, "").toString();
|
||||||
|
// m_settings->endGroup();
|
||||||
|
// delete m_settings;
|
||||||
|
// m_settings = nullptr;
|
||||||
|
// return deviceName;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//void DbusAdaptor::setDefaultWirelessDevice(QString deviceName)
|
||||||
|
//{
|
||||||
|
// if (!checkDeviceExist(WIRED, deviceName)) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// setDefaultDevice(WIRELESS, deviceName);
|
||||||
|
// parent()->setWirelessDefaultDevice(deviceName);
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//QString DbusAdaptor::getDefaultWirelessDevice()
|
||||||
|
//{
|
||||||
|
// QSettings * m_settings = new QSettings(CONFIG_FILE_PATH, QSettings::IniFormat);
|
||||||
|
// m_settings->beginGroup("DEFAULTCARD");
|
||||||
|
// QString key("wireless");
|
||||||
|
// QString deviceName = m_settings->value(key, "").toString();
|
||||||
|
// m_settings->endGroup();
|
||||||
|
// delete m_settings;
|
||||||
|
// m_settings = nullptr;
|
||||||
|
// return deviceName;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//删除
|
||||||
|
void DbusAdaptor::deleteConnect(int type, QString ssid)
|
||||||
|
{
|
||||||
|
if (type == WIRED) {
|
||||||
|
m_mainWindow->deleteWired(ssid);
|
||||||
|
} else if (type == WIRELESS) {
|
||||||
|
//待实现
|
||||||
|
} else {
|
||||||
|
qDebug() << "[DbusAdaptor] deleteConnect type is invalid";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//连接 根据网卡类型 参数1 0:lan 1:wlan 参数3 为ssid/uuid
|
||||||
|
void DbusAdaptor::activateConnect(int type, QString devName, QString ssid)
|
||||||
|
{
|
||||||
|
if (type == WIRED) {
|
||||||
|
m_mainWindow->activateWired(devName,ssid);
|
||||||
|
} else if (type == WIRELESS) {
|
||||||
|
m_mainWindow->activateWireless(devName,ssid);
|
||||||
|
} else {
|
||||||
|
qDebug() << "[DbusAdaptor] activateConnect type is invalid";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//断开连接 根据网卡类型 参数1 0:lan 1:wlan 参数3 为ssid/uuid
|
||||||
|
void DbusAdaptor::deActivateConnect(int type, QString devName, QString ssid)
|
||||||
|
{
|
||||||
|
if (type == WIRED) {
|
||||||
|
qDebug() << "deactivateWired";
|
||||||
|
m_mainWindow->deactivateWired(devName,ssid);
|
||||||
|
} else if (type == WIRELESS) {
|
||||||
|
m_mainWindow->deactivateWireless(devName,ssid);
|
||||||
|
} else {
|
||||||
|
qDebug() << "[DbusAdaptor] deactivateConnect type is invalid";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取设备列表和启用/禁用状态
|
||||||
|
QVariantMap DbusAdaptor::getDeviceListAndEnabled(int devType)
|
||||||
|
{
|
||||||
|
QMap<QString, bool> map;
|
||||||
|
map.clear();
|
||||||
|
getDeviceEnableState(devType, map);
|
||||||
|
QVariantMap vMap;
|
||||||
|
QMap<QString, bool>::const_iterator item = map.cbegin();
|
||||||
|
while (item != map.cend()) {
|
||||||
|
vMap.insert(item.key(), QVariant::fromValue(item.value()));
|
||||||
|
item ++;
|
||||||
|
}
|
||||||
|
return vMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取无线设备能力
|
||||||
|
QVariantMap DbusAdaptor::getWirelessDeviceCap()
|
||||||
|
{
|
||||||
|
QMap<QString, int> map;
|
||||||
|
m_mainWindow->getWirelessDeviceCap(map);
|
||||||
|
QVariantMap vMap;
|
||||||
|
QMap<QString, int>::const_iterator item = map.cbegin();
|
||||||
|
while (item != map.cend()) {
|
||||||
|
vMap.insert(item.key(), QVariant::fromValue(item.value()));
|
||||||
|
item ++;
|
||||||
|
}
|
||||||
|
return vMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
//唤起属性页 根据网卡类型 参数2 为ssid/uuid
|
||||||
|
void DbusAdaptor::showPropertyWidget(QString devName, QString ssid)
|
||||||
|
{
|
||||||
|
QString display = checkDisplay();
|
||||||
|
if (m_display == display) {
|
||||||
|
m_mainWindow->showPropertyWidget(devName,ssid);
|
||||||
|
} else {
|
||||||
|
Q_EMIT showPropertyWidgetSignal(display, devName, ssid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//唤起新建有线连接界面
|
||||||
|
void DbusAdaptor::showCreateWiredConnectWidget(QString devName)
|
||||||
|
{
|
||||||
|
QString display = checkDisplay();
|
||||||
|
if (m_display == display) {
|
||||||
|
m_mainWindow->showCreateWiredConnectWidget(devName);
|
||||||
|
} else {
|
||||||
|
Q_EMIT showCreateWiredConnectWidgetSignal(display, devName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//唤起加入其他无线网络界面
|
||||||
|
void DbusAdaptor::showAddOtherWlanWidget(QString devName)
|
||||||
|
{
|
||||||
|
QString display = checkDisplay();
|
||||||
|
if (m_display == display) {
|
||||||
|
qDebug() << "showAddOtherWlanWidget";
|
||||||
|
m_mainWindow->showAddOtherWlanWidget(devName);
|
||||||
|
} else {
|
||||||
|
qDebug() << display;
|
||||||
|
Q_EMIT showAddOtherWlanWidgetSignal(display, devName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//开启热点
|
||||||
|
void DbusAdaptor::activeWirelessAp(const QString apName, const QString apPassword, const QString band, const QString apDevice)
|
||||||
|
{
|
||||||
|
m_mainWindow->activeWirelessAp(apName, apPassword, band, apDevice);
|
||||||
|
}
|
||||||
|
|
||||||
|
//断开热点
|
||||||
|
void DbusAdaptor::deactiveWirelessAp(const QString apName, const QString uuid)
|
||||||
|
{
|
||||||
|
m_mainWindow->deactiveWirelessAp(apName, uuid);
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取热点
|
||||||
|
QStringList DbusAdaptor::getStoredApInfo()
|
||||||
|
{
|
||||||
|
QStringList list;
|
||||||
|
list.clear();
|
||||||
|
m_mainWindow->getStoredApInfo(list);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取热点path
|
||||||
|
QString DbusAdaptor::getApConnectionPath(QString uuid)
|
||||||
|
{
|
||||||
|
QString path;
|
||||||
|
path.clear();
|
||||||
|
m_mainWindow->getApConnectionPath(path, uuid);
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取热点path
|
||||||
|
QString DbusAdaptor::getActiveConnectionPath(QString uuid)
|
||||||
|
{
|
||||||
|
QString path;
|
||||||
|
path.clear();
|
||||||
|
m_mainWindow->getActiveConnectionPath(path, uuid);
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList DbusAdaptor::getApInfoBySsid(QString devName, QString ssid)
|
||||||
|
{
|
||||||
|
QStringList list;
|
||||||
|
list.clear();
|
||||||
|
m_mainWindow->getApInfoBySsid(devName, ssid, list);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DbusAdaptor::showKylinNM(int type)
|
||||||
|
{
|
||||||
|
qDebug() << "display" << checkDisplay();
|
||||||
|
QString display = checkDisplay();
|
||||||
|
if (m_display == display) {
|
||||||
|
m_mainWindow->onShowMainWindow(type);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
Q_EMIT showKylinNMSignal(display, type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//扫描
|
||||||
|
void DbusAdaptor::reScan()
|
||||||
|
{
|
||||||
|
m_mainWindow->rescan();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DbusAdaptor::keyRingInit()
|
||||||
|
{
|
||||||
|
m_mainWindow->keyRingInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DbusAdaptor::keyRingClear()
|
||||||
|
{
|
||||||
|
m_mainWindow->keyRingClear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DbusAdaptor::connectToMainwindow()
|
||||||
|
{
|
||||||
|
connect(m_mainWindow, &MainWindow::lanAdd, this, &DbusAdaptor::lanAdd);
|
||||||
|
connect(m_mainWindow, &MainWindow::lanRemove, this, &DbusAdaptor::lanRemove);
|
||||||
|
connect(m_mainWindow, &MainWindow::lanUpdate, this, &DbusAdaptor::lanUpdate);
|
||||||
|
connect(m_mainWindow, &MainWindow::wlanAdd, this, &DbusAdaptor::wlanAdd);
|
||||||
|
connect(m_mainWindow, &MainWindow::wlanRemove, this, &DbusAdaptor::wlanRemove);
|
||||||
|
connect(m_mainWindow, &MainWindow::wlanactiveConnectionStateChanged, this, &DbusAdaptor::wlanactiveConnectionStateChanged);
|
||||||
|
connect(m_mainWindow, &MainWindow::lanActiveConnectionStateChanged, this, &DbusAdaptor::lanActiveConnectionStateChanged);
|
||||||
|
connect(m_mainWindow, &MainWindow::activateFailed, this, &DbusAdaptor::activateFailed);
|
||||||
|
connect(m_mainWindow, &MainWindow::deactivateFailed, this, &DbusAdaptor::deactivateFailed);
|
||||||
|
connect(m_mainWindow, &MainWindow::deviceStatusChanged, this, &DbusAdaptor::deviceStatusChanged);
|
||||||
|
connect(m_mainWindow, &MainWindow::wirelessDeviceStatusChanged, this, &DbusAdaptor::wirelessDeviceStatusChanged);
|
||||||
|
connect(m_mainWindow, &MainWindow::deviceNameChanged, this, &DbusAdaptor::deviceNameChanged);
|
||||||
|
connect(m_mainWindow, &MainWindow::wirelessSwitchBtnChanged, this, &DbusAdaptor::wirelessSwitchBtnChanged);
|
||||||
|
connect(m_mainWindow, &MainWindow::hotspotDeactivated, this, &DbusAdaptor::hotspotDeactivated);
|
||||||
|
connect(m_mainWindow, &MainWindow::hotspotActivated, this, &DbusAdaptor::hotspotActivated);
|
||||||
|
connect(m_mainWindow, &MainWindow::signalStrengthChange, this, &DbusAdaptor::signalStrengthChange);
|
||||||
|
connect(m_mainWindow, &MainWindow::secuTypeChange, this, &DbusAdaptor::secuTypeChange);
|
||||||
|
connect(m_mainWindow, &MainWindow::timeToUpdate, this, &DbusAdaptor::timeToUpdate);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString DbusAdaptor::checkDisplay()
|
||||||
|
{
|
||||||
|
uint pid = 0;
|
||||||
|
QDBusReply<uint> pidReply = connection().interface()->servicePid(message().service());
|
||||||
|
qDebug() << "caller pid: " << pidReply.value();
|
||||||
|
if(pidReply.isValid()) {
|
||||||
|
pid = pidReply.value();
|
||||||
|
} else {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
return displayFromPid(pid);;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString DbusAdaptor::displayFromPid(uint pid)
|
||||||
|
{
|
||||||
|
QFile environFile(QStringLiteral("/proc/%1/environ").arg(QString::number(pid)));
|
||||||
|
if (environFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
|
const QByteArray DISPLAY = qApp->property("sessionType").toString() == "wayland" ? QByteArrayLiteral("WAYLAND_DISPLAY")
|
||||||
|
: QByteArrayLiteral("DISPLAY");
|
||||||
|
const auto lines = environFile.readAll().split('\0');
|
||||||
|
for (const QByteArray &line : lines) {
|
||||||
|
const int equalsIdx = line.indexOf('=');
|
||||||
|
if (equalsIdx <= 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const QByteArray key = line.left(equalsIdx);
|
||||||
|
if (key == DISPLAY) {
|
||||||
|
const QByteArray value = line.mid(equalsIdx + 1);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
#include <QtCore/QObject>
|
#include <QtCore/QObject>
|
||||||
#include <QtDBus/QtDBus>
|
#include <QtDBus/QtDBus>
|
||||||
#include <QtDBus/QDBusMetaType>
|
#include <QtDBus/QDBusMetaType>
|
||||||
|
#include "dbus_adaptor.h"
|
||||||
|
#include "dbus_interface.h"
|
||||||
|
|
||||||
#include "tabpage.h"
|
#include "tabpage.h"
|
||||||
#include "../dbus-interface/kylinnetworkdeviceresource.h"
|
#include "../dbus-interface/kylinnetworkdeviceresource.h"
|
||||||
|
@ -34,23 +36,19 @@ QT_END_NAMESPACE
|
||||||
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
class DbusAdaptor: public QDBusAbstractAdaptor
|
class DbusAdaptor: public QObject, protected QDBusContext
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_CLASSINFO("D-Bus Interface", "com.kylin.network")
|
Q_CLASSINFO("D-Bus Interface", "com.kylin.network")
|
||||||
public:
|
public:
|
||||||
DbusAdaptor(MainWindow *parent);
|
explicit DbusAdaptor(QString display, MainWindow *m, QObject *parent = nullptr);
|
||||||
virtual ~DbusAdaptor();
|
|
||||||
|
|
||||||
inline MainWindow *parent() const
|
|
||||||
{ return static_cast<MainWindow *>(QObject::parent()); }
|
|
||||||
|
|
||||||
public: // PROPERTIES
|
public: // PROPERTIES
|
||||||
public Q_SLOTS: // METHODS
|
public Q_SLOTS: // METHODS
|
||||||
//无线列表
|
//无线列表
|
||||||
QMap<QString, QVector<QStringList> > getWirelessList();
|
QVariantList getWirelessList(QString devName);
|
||||||
//有线列表
|
//有线列表
|
||||||
QMap<QString, QVector<QStringList>> getWiredList();
|
QVariantList getWiredList(QString devName);
|
||||||
//有线总开关
|
//有线总开关
|
||||||
Q_NOREPLY void setWiredSwitchEnable(bool enable);
|
Q_NOREPLY void setWiredSwitchEnable(bool enable);
|
||||||
//无线总开关
|
//无线总开关
|
||||||
|
@ -69,9 +67,9 @@ public Q_SLOTS: // METHODS
|
||||||
//断开连接 根据网卡类型 参数1 0:lan 1:wlan 参数3 为ssid/uuid
|
//断开连接 根据网卡类型 参数1 0:lan 1:wlan 参数3 为ssid/uuid
|
||||||
Q_NOREPLY void deActivateConnect(int type, QString devName, QString ssid);
|
Q_NOREPLY void deActivateConnect(int type, QString devName, QString ssid);
|
||||||
//获取设备列表和启用/禁用状态
|
//获取设备列表和启用/禁用状态
|
||||||
QMap<QString, bool> getDeviceListAndEnabled(int devType);
|
QVariantMap getDeviceListAndEnabled(int devType);
|
||||||
//获取无线设备能力
|
//获取无线设备能力
|
||||||
QMap<QString, int> getWirelessDeviceCap();
|
QVariantMap getWirelessDeviceCap();
|
||||||
//唤起属性页 根据网卡类型 参数2 为ssid/uuid
|
//唤起属性页 根据网卡类型 参数2 为ssid/uuid
|
||||||
Q_NOREPLY void showPropertyWidget(QString devName, QString ssid);
|
Q_NOREPLY void showPropertyWidget(QString devName, QString ssid);
|
||||||
//唤起新建有线连接界面
|
//唤起新建有线连接界面
|
||||||
|
@ -125,6 +123,29 @@ Q_SIGNALS: // SIGNALS
|
||||||
void secuTypeChange(QString devName, QString ssid, QString secuType);
|
void secuTypeChange(QString devName, QString ssid, QString secuType);
|
||||||
//列表排序
|
//列表排序
|
||||||
void timeToUpdate();
|
void timeToUpdate();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void showKylinNMSignal(QString display, int type);
|
||||||
|
|
||||||
|
//唤起属性页 根据网卡类型 参数2 为ssid/uuid
|
||||||
|
void showPropertyWidgetSignal(QString display, QString devName, QString ssid);
|
||||||
|
//唤起新建有线连接界面
|
||||||
|
void showCreateWiredConnectWidgetSignal(QString display, QString devName);
|
||||||
|
//唤起加入其他无线网络界面
|
||||||
|
void showAddOtherWlanWidgetSignal(QString display, QString devName);
|
||||||
|
|
||||||
|
private:
|
||||||
|
MainWindow *m_mainWindow;
|
||||||
|
QString m_display;
|
||||||
|
QDBusServiceWatcher *m_watcher = nullptr;
|
||||||
|
|
||||||
|
QString checkDisplay();
|
||||||
|
QString displayFromPid(uint pid);
|
||||||
|
void connectToMainwindow();
|
||||||
|
bool registerService();
|
||||||
|
private Q_SLOT:
|
||||||
|
void onServiceOwnerChanged(const QString &service, const QString &oldOwner, const QString &newOwner);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -0,0 +1,186 @@
|
||||||
|
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||||
|
<node>
|
||||||
|
<interface name="com.kylin.network">
|
||||||
|
<signal name="lanAdd">
|
||||||
|
<arg name="devName" type="s" direction="out"/>
|
||||||
|
<arg name="info" type="as" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="lanRemove">
|
||||||
|
<arg name="dbusPath" type="s" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="lanUpdate">
|
||||||
|
<arg name="devName" type="s" direction="out"/>
|
||||||
|
<arg name="info" type="as" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="wlanAdd">
|
||||||
|
<arg name="devName" type="s" direction="out"/>
|
||||||
|
<arg name="info" type="as" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="wlanRemove">
|
||||||
|
<arg name="devName" type="s" direction="out"/>
|
||||||
|
<arg name="ssid" type="s" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="wlanactiveConnectionStateChanged">
|
||||||
|
<arg name="devName" type="s" direction="out"/>
|
||||||
|
<arg name="ssid" type="s" direction="out"/>
|
||||||
|
<arg name="uuid" type="s" direction="out"/>
|
||||||
|
<arg name="status" type="i" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="lanActiveConnectionStateChanged">
|
||||||
|
<arg name="devName" type="s" direction="out"/>
|
||||||
|
<arg name="uuid" type="s" direction="out"/>
|
||||||
|
<arg name="status" type="i" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="activateFailed">
|
||||||
|
<arg name="errorMessage" type="s" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="deactivateFailed">
|
||||||
|
<arg name="errorMessage" type="s" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="deviceStatusChanged">
|
||||||
|
</signal>
|
||||||
|
<signal name="wirelessDeviceStatusChanged">
|
||||||
|
</signal>
|
||||||
|
<signal name="deviceNameChanged">
|
||||||
|
<arg name="oldName" type="s" direction="out"/>
|
||||||
|
<arg name="newName" type="s" direction="out"/>
|
||||||
|
<arg name="type" type="i" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="wirelessSwitchBtnChanged">
|
||||||
|
<arg name="state" type="b" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="hotspotDeactivated">
|
||||||
|
<arg name="devName" type="s" direction="out"/>
|
||||||
|
<arg name="ssid" type="s" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="hotspotActivated">
|
||||||
|
<arg name="devName" type="s" direction="out"/>
|
||||||
|
<arg name="ssid" type="s" direction="out"/>
|
||||||
|
<arg name="uuid" type="s" direction="out"/>
|
||||||
|
<arg name="activePath" type="s" direction="out"/>
|
||||||
|
<arg name="settingPath" type="s" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="signalStrengthChange">
|
||||||
|
<arg name="devName" type="s" direction="out"/>
|
||||||
|
<arg name="ssid" type="s" direction="out"/>
|
||||||
|
<arg name="strength" type="i" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="secuTypeChange">
|
||||||
|
<arg name="devName" type="s" direction="out"/>
|
||||||
|
<arg name="ssid" type="s" direction="out"/>
|
||||||
|
<arg name="secuType" type="s" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="timeToUpdate">
|
||||||
|
</signal>
|
||||||
|
<signal name="showKylinNMSignal">
|
||||||
|
<arg name="display" type="s" direction="out"/>
|
||||||
|
<arg name="type" type="i" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="showPropertyWidgetSignal">
|
||||||
|
<arg name="display" type="s" direction="out"/>
|
||||||
|
<arg name="devName" type="s" direction="out"/>
|
||||||
|
<arg name="ssid" type="s" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="showCreateWiredConnectWidgetSignal">
|
||||||
|
<arg name="display" type="s" direction="out"/>
|
||||||
|
<arg name="devName" type="s" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="showAddOtherWlanWidgetSignal">
|
||||||
|
<arg name="display" type="s" direction="out"/>
|
||||||
|
<arg name="devName" type="s" direction="out"/>
|
||||||
|
</signal>
|
||||||
|
<method name="getWirelessList">
|
||||||
|
<arg type="av" direction="out"/>
|
||||||
|
<arg name="devName" type="s" direction="in"/>
|
||||||
|
</method>
|
||||||
|
<method name="getWiredList">
|
||||||
|
<arg type="av" direction="out"/>
|
||||||
|
<arg name="devName" type="s" direction="in"/>
|
||||||
|
</method>
|
||||||
|
<method name="setWiredSwitchEnable">
|
||||||
|
<arg name="enable" type="b" direction="in"/>
|
||||||
|
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
|
||||||
|
</method>
|
||||||
|
<method name="setWirelessSwitchEnable">
|
||||||
|
<arg name="enable" type="b" direction="in"/>
|
||||||
|
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
|
||||||
|
</method>
|
||||||
|
<method name="setDeviceEnable">
|
||||||
|
<arg name="devName" type="s" direction="in"/>
|
||||||
|
<arg name="enable" type="b" direction="in"/>
|
||||||
|
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
|
||||||
|
</method>
|
||||||
|
<method name="activateConnect">
|
||||||
|
<arg name="type" type="i" direction="in"/>
|
||||||
|
<arg name="devName" type="s" direction="in"/>
|
||||||
|
<arg name="ssid" type="s" direction="in"/>
|
||||||
|
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
|
||||||
|
</method>
|
||||||
|
<method name="deActivateConnect">
|
||||||
|
<arg name="type" type="i" direction="in"/>
|
||||||
|
<arg name="devName" type="s" direction="in"/>
|
||||||
|
<arg name="ssid" type="s" direction="in"/>
|
||||||
|
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
|
||||||
|
</method>
|
||||||
|
<method name="getDeviceListAndEnabled">
|
||||||
|
<arg type="a{sv}" direction="out"/>
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
|
||||||
|
<arg name="devType" type="i" direction="in"/>
|
||||||
|
</method>
|
||||||
|
<method name="getWirelessDeviceCap">
|
||||||
|
<arg type="a{sv}" direction="out"/>
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
|
||||||
|
</method>
|
||||||
|
<method name="showPropertyWidget">
|
||||||
|
<arg name="devName" type="s" direction="in"/>
|
||||||
|
<arg name="ssid" type="s" direction="in"/>
|
||||||
|
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
|
||||||
|
</method>
|
||||||
|
<method name="showCreateWiredConnectWidget">
|
||||||
|
<arg name="devName" type="s" direction="in"/>
|
||||||
|
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
|
||||||
|
</method>
|
||||||
|
<method name="showAddOtherWlanWidget">
|
||||||
|
<arg name="devName" type="s" direction="in"/>
|
||||||
|
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
|
||||||
|
</method>
|
||||||
|
<method name="activeWirelessAp">
|
||||||
|
<arg name="apName" type="s" direction="in"/>
|
||||||
|
<arg name="apPassword" type="s" direction="in"/>
|
||||||
|
<arg name="band" type="s" direction="in"/>
|
||||||
|
<arg name="apDevice" type="s" direction="in"/>
|
||||||
|
</method>
|
||||||
|
<method name="deactiveWirelessAp">
|
||||||
|
<arg name="apName" type="s" direction="in"/>
|
||||||
|
<arg name="uuid" type="s" direction="in"/>
|
||||||
|
</method>
|
||||||
|
<method name="getStoredApInfo">
|
||||||
|
<arg type="as" direction="out"/>
|
||||||
|
</method>
|
||||||
|
<method name="getApInfoBySsid">
|
||||||
|
<arg type="as" direction="out"/>
|
||||||
|
<arg name="devName" type="s" direction="in"/>
|
||||||
|
<arg name="ssid" type="s" direction="in"/>
|
||||||
|
</method>
|
||||||
|
<method name="getApConnectionPath">
|
||||||
|
<arg type="s" direction="out"/>
|
||||||
|
<arg name="uuid" type="s" direction="in"/>
|
||||||
|
</method>
|
||||||
|
<method name="getActiveConnectionPath">
|
||||||
|
<arg type="s" direction="out"/>
|
||||||
|
<arg name="uuid" type="s" direction="in"/>
|
||||||
|
</method>
|
||||||
|
<method name="reScan">
|
||||||
|
</method>
|
||||||
|
<method name="keyRingInit">
|
||||||
|
</method>
|
||||||
|
<method name="keyRingClear">
|
||||||
|
</method>
|
||||||
|
<method name="showKylinNM">
|
||||||
|
<arg name="type" type="i" direction="in"/>
|
||||||
|
</method>
|
||||||
|
<method name="getWirelessSwitchBtnState">
|
||||||
|
<arg type="b" direction="out"/>
|
||||||
|
</method>
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,191 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.8
|
||||||
|
* Command line was: qdbusxml2cpp dbus.xml -a dbus_adaptor
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2020 The Qt Company Ltd.
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "dbus_adaptor.h"
|
||||||
|
#include <QtCore/QMetaObject>
|
||||||
|
#include <QtCore/QByteArray>
|
||||||
|
#include <QtCore/QList>
|
||||||
|
#include <QtCore/QMap>
|
||||||
|
#include <QtCore/QString>
|
||||||
|
#include <QtCore/QStringList>
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of adaptor class NetworkAdaptor
|
||||||
|
*/
|
||||||
|
|
||||||
|
NetworkAdaptor::NetworkAdaptor(QObject *parent)
|
||||||
|
: QDBusAbstractAdaptor(parent)
|
||||||
|
{
|
||||||
|
// constructor
|
||||||
|
setAutoRelaySignals(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
NetworkAdaptor::~NetworkAdaptor()
|
||||||
|
{
|
||||||
|
// destructor
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetworkAdaptor::activateConnect(int type, const QString &devName, const QString &ssid)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.activateConnect
|
||||||
|
QMetaObject::invokeMethod(parent(), "activateConnect", Q_ARG(int, type), Q_ARG(QString, devName), Q_ARG(QString, ssid));
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetworkAdaptor::activeWirelessAp(const QString &apName, const QString &apPassword, const QString &band, const QString &apDevice)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.activeWirelessAp
|
||||||
|
QMetaObject::invokeMethod(parent(), "activeWirelessAp", Q_ARG(QString, apName), Q_ARG(QString, apPassword), Q_ARG(QString, band), Q_ARG(QString, apDevice));
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetworkAdaptor::deActivateConnect(int type, const QString &devName, const QString &ssid)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.deActivateConnect
|
||||||
|
QMetaObject::invokeMethod(parent(), "deActivateConnect", Q_ARG(int, type), Q_ARG(QString, devName), Q_ARG(QString, ssid));
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetworkAdaptor::deactiveWirelessAp(const QString &apName, const QString &uuid)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.deactiveWirelessAp
|
||||||
|
QMetaObject::invokeMethod(parent(), "deactiveWirelessAp", Q_ARG(QString, apName), Q_ARG(QString, uuid));
|
||||||
|
}
|
||||||
|
|
||||||
|
QString NetworkAdaptor::getActiveConnectionPath(const QString &uuid)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.getActiveConnectionPath
|
||||||
|
QString out0;
|
||||||
|
QMetaObject::invokeMethod(parent(), "getActiveConnectionPath", Q_RETURN_ARG(QString, out0), Q_ARG(QString, uuid));
|
||||||
|
return out0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString NetworkAdaptor::getApConnectionPath(const QString &uuid)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.getApConnectionPath
|
||||||
|
QString out0;
|
||||||
|
QMetaObject::invokeMethod(parent(), "getApConnectionPath", Q_RETURN_ARG(QString, out0), Q_ARG(QString, uuid));
|
||||||
|
return out0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList NetworkAdaptor::getApInfoBySsid(const QString &devName, const QString &ssid)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.getApInfoBySsid
|
||||||
|
QStringList out0;
|
||||||
|
QMetaObject::invokeMethod(parent(), "getApInfoBySsid", Q_RETURN_ARG(QStringList, out0), Q_ARG(QString, devName), Q_ARG(QString, ssid));
|
||||||
|
return out0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QVariantMap NetworkAdaptor::getDeviceListAndEnabled(int devType)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.getDeviceListAndEnabled
|
||||||
|
QVariantMap out0;
|
||||||
|
QMetaObject::invokeMethod(parent(), "getDeviceListAndEnabled", Q_RETURN_ARG(QVariantMap, out0), Q_ARG(int, devType));
|
||||||
|
return out0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList NetworkAdaptor::getStoredApInfo()
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.getStoredApInfo
|
||||||
|
QStringList out0;
|
||||||
|
QMetaObject::invokeMethod(parent(), "getStoredApInfo", Q_RETURN_ARG(QStringList, out0));
|
||||||
|
return out0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QVariantList NetworkAdaptor::getWiredList(const QString &devName)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.getWiredList
|
||||||
|
QVariantList out0;
|
||||||
|
QMetaObject::invokeMethod(parent(), "getWiredList", Q_RETURN_ARG(QVariantList, out0), Q_ARG(QString, devName));
|
||||||
|
return out0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QVariantMap NetworkAdaptor::getWirelessDeviceCap()
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.getWirelessDeviceCap
|
||||||
|
QVariantMap out0;
|
||||||
|
QMetaObject::invokeMethod(parent(), "getWirelessDeviceCap", Q_RETURN_ARG(QVariantMap, out0));
|
||||||
|
return out0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QVariantList NetworkAdaptor::getWirelessList(const QString &devName)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.getWirelessList
|
||||||
|
QVariantList out0;
|
||||||
|
QMetaObject::invokeMethod(parent(), "getWirelessList", Q_RETURN_ARG(QVariantList, out0), Q_ARG(QString, devName));
|
||||||
|
return out0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool NetworkAdaptor::getWirelessSwitchBtnState()
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.getWirelessSwitchBtnState
|
||||||
|
bool out0;
|
||||||
|
QMetaObject::invokeMethod(parent(), "getWirelessSwitchBtnState", Q_RETURN_ARG(bool, out0));
|
||||||
|
return out0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetworkAdaptor::keyRingClear()
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.keyRingClear
|
||||||
|
QMetaObject::invokeMethod(parent(), "keyRingClear");
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetworkAdaptor::keyRingInit()
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.keyRingInit
|
||||||
|
QMetaObject::invokeMethod(parent(), "keyRingInit");
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetworkAdaptor::reScan()
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.reScan
|
||||||
|
QMetaObject::invokeMethod(parent(), "reScan");
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetworkAdaptor::setDeviceEnable(const QString &devName, bool enable)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.setDeviceEnable
|
||||||
|
QMetaObject::invokeMethod(parent(), "setDeviceEnable", Q_ARG(QString, devName), Q_ARG(bool, enable));
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetworkAdaptor::setWiredSwitchEnable(bool enable)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.setWiredSwitchEnable
|
||||||
|
QMetaObject::invokeMethod(parent(), "setWiredSwitchEnable", Q_ARG(bool, enable));
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetworkAdaptor::setWirelessSwitchEnable(bool enable)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.setWirelessSwitchEnable
|
||||||
|
QMetaObject::invokeMethod(parent(), "setWirelessSwitchEnable", Q_ARG(bool, enable));
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetworkAdaptor::showAddOtherWlanWidget(const QString &devName)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.showAddOtherWlanWidget
|
||||||
|
QMetaObject::invokeMethod(parent(), "showAddOtherWlanWidget", Q_ARG(QString, devName));
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetworkAdaptor::showCreateWiredConnectWidget(const QString &devName)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.showCreateWiredConnectWidget
|
||||||
|
QMetaObject::invokeMethod(parent(), "showCreateWiredConnectWidget", Q_ARG(QString, devName));
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetworkAdaptor::showKylinNM(int type)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.showKylinNM
|
||||||
|
QMetaObject::invokeMethod(parent(), "showKylinNM", Q_ARG(int, type));
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetworkAdaptor::showPropertyWidget(const QString &devName, const QString &ssid)
|
||||||
|
{
|
||||||
|
// handle method call com.kylin.network.showPropertyWidget
|
||||||
|
QMetaObject::invokeMethod(parent(), "showPropertyWidget", Q_ARG(QString, devName), Q_ARG(QString, ssid));
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,266 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.8
|
||||||
|
* Command line was: qdbusxml2cpp dbus.xml -a dbus_adaptor
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2020 The Qt Company Ltd.
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||||
|
* before re-generating it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef DBUS_ADAPTOR_H
|
||||||
|
#define DBUS_ADAPTOR_H
|
||||||
|
|
||||||
|
#include <QtCore/QObject>
|
||||||
|
#include <QtDBus/QtDBus>
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
class QByteArray;
|
||||||
|
template<class T> class QList;
|
||||||
|
template<class Key, class Value> class QMap;
|
||||||
|
class QString;
|
||||||
|
class QStringList;
|
||||||
|
class QVariant;
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Adaptor class for interface com.kylin.network
|
||||||
|
*/
|
||||||
|
class NetworkAdaptor: public QDBusAbstractAdaptor
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_CLASSINFO("D-Bus Interface", "com.kylin.network")
|
||||||
|
Q_CLASSINFO("D-Bus Introspection", ""
|
||||||
|
" <interface name=\"com.kylin.network\">\n"
|
||||||
|
" <signal name=\"lanAdd\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"as\" name=\"info\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"lanRemove\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"dbusPath\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"lanUpdate\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"as\" name=\"info\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"wlanAdd\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"as\" name=\"info\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"wlanRemove\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"ssid\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"wlanactiveConnectionStateChanged\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"ssid\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"uuid\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"i\" name=\"status\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"lanActiveConnectionStateChanged\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"uuid\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"i\" name=\"status\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"activateFailed\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"errorMessage\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"deactivateFailed\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"errorMessage\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"deviceStatusChanged\"/>\n"
|
||||||
|
" <signal name=\"wirelessDeviceStatusChanged\"/>\n"
|
||||||
|
" <signal name=\"deviceNameChanged\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"oldName\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"newName\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"i\" name=\"type\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"wirelessSwitchBtnChanged\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"b\" name=\"state\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"hotspotDeactivated\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"ssid\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"hotspotActivated\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"ssid\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"uuid\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"activePath\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"settingPath\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"signalStrengthChange\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"ssid\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"i\" name=\"strength\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"secuTypeChange\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"ssid\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"secuType\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"timeToUpdate\"/>\n"
|
||||||
|
" <signal name=\"showKylinNMSignal\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"display\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"i\" name=\"type\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"showPropertyWidgetSignal\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"display\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"ssid\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"showCreateWiredConnectWidgetSignal\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"display\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <signal name=\"showAddOtherWlanWidgetSignal\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"display\"/>\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" </signal>\n"
|
||||||
|
" <method name=\"getWirelessList\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"av\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"getWiredList\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"av\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"setWiredSwitchEnable\">\n"
|
||||||
|
" <arg direction=\"in\" type=\"b\" name=\"enable\"/>\n"
|
||||||
|
" <annotation value=\"true\" name=\"org.freedesktop.DBus.Method.NoReply\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"setWirelessSwitchEnable\">\n"
|
||||||
|
" <arg direction=\"in\" type=\"b\" name=\"enable\"/>\n"
|
||||||
|
" <annotation value=\"true\" name=\"org.freedesktop.DBus.Method.NoReply\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"setDeviceEnable\">\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"b\" name=\"enable\"/>\n"
|
||||||
|
" <annotation value=\"true\" name=\"org.freedesktop.DBus.Method.NoReply\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"activateConnect\">\n"
|
||||||
|
" <arg direction=\"in\" type=\"i\" name=\"type\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"ssid\"/>\n"
|
||||||
|
" <annotation value=\"true\" name=\"org.freedesktop.DBus.Method.NoReply\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"deActivateConnect\">\n"
|
||||||
|
" <arg direction=\"in\" type=\"i\" name=\"type\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"ssid\"/>\n"
|
||||||
|
" <annotation value=\"true\" name=\"org.freedesktop.DBus.Method.NoReply\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"getDeviceListAndEnabled\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"a{sv}\"/>\n"
|
||||||
|
" <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"i\" name=\"devType\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"getWirelessDeviceCap\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"a{sv}\"/>\n"
|
||||||
|
" <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"showPropertyWidget\">\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"ssid\"/>\n"
|
||||||
|
" <annotation value=\"true\" name=\"org.freedesktop.DBus.Method.NoReply\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"showCreateWiredConnectWidget\">\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <annotation value=\"true\" name=\"org.freedesktop.DBus.Method.NoReply\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"showAddOtherWlanWidget\">\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <annotation value=\"true\" name=\"org.freedesktop.DBus.Method.NoReply\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"activeWirelessAp\">\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"apName\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"apPassword\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"band\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"apDevice\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"deactiveWirelessAp\">\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"apName\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"uuid\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"getStoredApInfo\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"as\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"getApInfoBySsid\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"as\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"devName\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"ssid\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"getApConnectionPath\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"uuid\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"getActiveConnectionPath\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"s\"/>\n"
|
||||||
|
" <arg direction=\"in\" type=\"s\" name=\"uuid\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"reScan\"/>\n"
|
||||||
|
" <method name=\"keyRingInit\"/>\n"
|
||||||
|
" <method name=\"keyRingClear\"/>\n"
|
||||||
|
" <method name=\"showKylinNM\">\n"
|
||||||
|
" <arg direction=\"in\" type=\"i\" name=\"type\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" <method name=\"getWirelessSwitchBtnState\">\n"
|
||||||
|
" <arg direction=\"out\" type=\"b\"/>\n"
|
||||||
|
" </method>\n"
|
||||||
|
" </interface>\n"
|
||||||
|
"")
|
||||||
|
public:
|
||||||
|
NetworkAdaptor(QObject *parent);
|
||||||
|
virtual ~NetworkAdaptor();
|
||||||
|
|
||||||
|
public: // PROPERTIES
|
||||||
|
public Q_SLOTS: // METHODS
|
||||||
|
Q_NOREPLY void activateConnect(int type, const QString &devName, const QString &ssid);
|
||||||
|
void activeWirelessAp(const QString &apName, const QString &apPassword, const QString &band, const QString &apDevice);
|
||||||
|
Q_NOREPLY void deActivateConnect(int type, const QString &devName, const QString &ssid);
|
||||||
|
void deactiveWirelessAp(const QString &apName, const QString &uuid);
|
||||||
|
QString getActiveConnectionPath(const QString &uuid);
|
||||||
|
QString getApConnectionPath(const QString &uuid);
|
||||||
|
QStringList getApInfoBySsid(const QString &devName, const QString &ssid);
|
||||||
|
QVariantMap getDeviceListAndEnabled(int devType);
|
||||||
|
QStringList getStoredApInfo();
|
||||||
|
QVariantList getWiredList(const QString &devName);
|
||||||
|
QVariantMap getWirelessDeviceCap();
|
||||||
|
QVariantList getWirelessList(const QString &devName);
|
||||||
|
bool getWirelessSwitchBtnState();
|
||||||
|
void keyRingClear();
|
||||||
|
void keyRingInit();
|
||||||
|
void reScan();
|
||||||
|
Q_NOREPLY void setDeviceEnable(const QString &devName, bool enable);
|
||||||
|
Q_NOREPLY void setWiredSwitchEnable(bool enable);
|
||||||
|
Q_NOREPLY void setWirelessSwitchEnable(bool enable);
|
||||||
|
Q_NOREPLY void showAddOtherWlanWidget(const QString &devName);
|
||||||
|
Q_NOREPLY void showCreateWiredConnectWidget(const QString &devName);
|
||||||
|
void showKylinNM(int type);
|
||||||
|
Q_NOREPLY void showPropertyWidget(const QString &devName, const QString &ssid);
|
||||||
|
Q_SIGNALS: // SIGNALS
|
||||||
|
void activateFailed(const QString &errorMessage);
|
||||||
|
void deactivateFailed(const QString &errorMessage);
|
||||||
|
void deviceNameChanged(const QString &oldName, const QString &newName, int type);
|
||||||
|
void deviceStatusChanged();
|
||||||
|
void hotspotActivated(const QString &devName, const QString &ssid, const QString &uuid, const QString &activePath, const QString &settingPath);
|
||||||
|
void hotspotDeactivated(const QString &devName, const QString &ssid);
|
||||||
|
void lanActiveConnectionStateChanged(const QString &devName, const QString &uuid, int status);
|
||||||
|
void lanAdd(const QString &devName, const QStringList &info);
|
||||||
|
void lanRemove(const QString &dbusPath);
|
||||||
|
void lanUpdate(const QString &devName, const QStringList &info);
|
||||||
|
void secuTypeChange(const QString &devName, const QString &ssid, const QString &secuType);
|
||||||
|
void showAddOtherWlanWidgetSignal(const QString &display, const QString &devName);
|
||||||
|
void showCreateWiredConnectWidgetSignal(const QString &display, const QString &devName);
|
||||||
|
void showKylinNMSignal(const QString &display, int type);
|
||||||
|
void showPropertyWidgetSignal(const QString &display, const QString &devName, const QString &ssid);
|
||||||
|
void signalStrengthChange(const QString &devName, const QString &ssid, int strength);
|
||||||
|
void timeToUpdate();
|
||||||
|
void wirelessDeviceStatusChanged();
|
||||||
|
void wirelessSwitchBtnChanged(bool state);
|
||||||
|
void wlanAdd(const QString &devName, const QStringList &info);
|
||||||
|
void wlanRemove(const QString &devName, const QString &ssid);
|
||||||
|
void wlanactiveConnectionStateChanged(const QString &devName, const QString &ssid, const QString &uuid, int status);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,26 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.8
|
||||||
|
* Command line was: qdbusxml2cpp dbus.xml -p dbus_interface
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2020 The Qt Company Ltd.
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||||
|
* before re-generating it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "dbus_interface.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of interface class ComKylinNetworkInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
ComKylinNetworkInterface::ComKylinNetworkInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
|
||||||
|
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ComKylinNetworkInterface::~ComKylinNetworkInterface()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,224 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.8
|
||||||
|
* Command line was: qdbusxml2cpp dbus.xml -p dbus_interface
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2020 The Qt Company Ltd.
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef DBUS_INTERFACE_H
|
||||||
|
#define DBUS_INTERFACE_H
|
||||||
|
|
||||||
|
#include <QtCore/QObject>
|
||||||
|
#include <QtCore/QByteArray>
|
||||||
|
#include <QtCore/QList>
|
||||||
|
#include <QtCore/QMap>
|
||||||
|
#include <QtCore/QString>
|
||||||
|
#include <QtCore/QStringList>
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtDBus/QtDBus>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Proxy class for interface com.kylin.network
|
||||||
|
*/
|
||||||
|
class ComKylinNetworkInterface: public QDBusAbstractInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
static inline const char *staticInterfaceName()
|
||||||
|
{ return "com.kylin.network"; }
|
||||||
|
|
||||||
|
public:
|
||||||
|
ComKylinNetworkInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
|
||||||
|
|
||||||
|
~ComKylinNetworkInterface();
|
||||||
|
|
||||||
|
public Q_SLOTS: // METHODS
|
||||||
|
inline Q_NOREPLY void activateConnect(int type, const QString &devName, const QString &ssid)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(type) << QVariant::fromValue(devName) << QVariant::fromValue(ssid);
|
||||||
|
callWithArgumentList(QDBus::NoBlock, QStringLiteral("activateConnect"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> activeWirelessAp(const QString &apName, const QString &apPassword, const QString &band, const QString &apDevice)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(apName) << QVariant::fromValue(apPassword) << QVariant::fromValue(band) << QVariant::fromValue(apDevice);
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("activeWirelessAp"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline Q_NOREPLY void deActivateConnect(int type, const QString &devName, const QString &ssid)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(type) << QVariant::fromValue(devName) << QVariant::fromValue(ssid);
|
||||||
|
callWithArgumentList(QDBus::NoBlock, QStringLiteral("deActivateConnect"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> deactiveWirelessAp(const QString &apName, const QString &uuid)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(apName) << QVariant::fromValue(uuid);
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("deactiveWirelessAp"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<QString> getActiveConnectionPath(const QString &uuid)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(uuid);
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("getActiveConnectionPath"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<QString> getApConnectionPath(const QString &uuid)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(uuid);
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("getApConnectionPath"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<QStringList> getApInfoBySsid(const QString &devName, const QString &ssid)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(devName) << QVariant::fromValue(ssid);
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("getApInfoBySsid"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<QVariantMap> getDeviceListAndEnabled(int devType)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(devType);
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("getDeviceListAndEnabled"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<QStringList> getStoredApInfo()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("getStoredApInfo"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<QVariantList> getWiredList(const QString &devName)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(devName);
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("getWiredList"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<QVariantMap> getWirelessDeviceCap()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("getWirelessDeviceCap"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<QVariantList> getWirelessList(const QString &devName)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(devName);
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("getWirelessList"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<bool> getWirelessSwitchBtnState()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("getWirelessSwitchBtnState"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> keyRingClear()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("keyRingClear"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> keyRingInit()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("keyRingInit"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> reScan()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("reScan"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline Q_NOREPLY void setDeviceEnable(const QString &devName, bool enable)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(devName) << QVariant::fromValue(enable);
|
||||||
|
callWithArgumentList(QDBus::NoBlock, QStringLiteral("setDeviceEnable"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline Q_NOREPLY void setWiredSwitchEnable(bool enable)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(enable);
|
||||||
|
callWithArgumentList(QDBus::NoBlock, QStringLiteral("setWiredSwitchEnable"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline Q_NOREPLY void setWirelessSwitchEnable(bool enable)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(enable);
|
||||||
|
callWithArgumentList(QDBus::NoBlock, QStringLiteral("setWirelessSwitchEnable"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline Q_NOREPLY void showAddOtherWlanWidget(const QString &devName)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(devName);
|
||||||
|
callWithArgumentList(QDBus::NoBlock, QStringLiteral("showAddOtherWlanWidget"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline Q_NOREPLY void showCreateWiredConnectWidget(const QString &devName)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(devName);
|
||||||
|
callWithArgumentList(QDBus::NoBlock, QStringLiteral("showCreateWiredConnectWidget"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> showKylinNM(int type)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(type);
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("showKylinNM"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline Q_NOREPLY void showPropertyWidget(const QString &devName, const QString &ssid)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(devName) << QVariant::fromValue(ssid);
|
||||||
|
callWithArgumentList(QDBus::NoBlock, QStringLiteral("showPropertyWidget"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS: // SIGNALS
|
||||||
|
void activateFailed(const QString &errorMessage);
|
||||||
|
void deactivateFailed(const QString &errorMessage);
|
||||||
|
void deviceNameChanged(const QString &oldName, const QString &newName, int type);
|
||||||
|
void deviceStatusChanged();
|
||||||
|
void hotspotActivated(const QString &devName, const QString &ssid, const QString &uuid, const QString &activePath, const QString &settingPath);
|
||||||
|
void hotspotDeactivated(const QString &devName, const QString &ssid);
|
||||||
|
void lanActiveConnectionStateChanged(const QString &devName, const QString &uuid, int status);
|
||||||
|
void lanAdd(const QString &devName, const QStringList &info);
|
||||||
|
void lanRemove(const QString &dbusPath);
|
||||||
|
void lanUpdate(const QString &devName, const QStringList &info);
|
||||||
|
void secuTypeChange(const QString &devName, const QString &ssid, const QString &secuType);
|
||||||
|
void showAddOtherWlanWidgetSignal(const QString &display, const QString &devName);
|
||||||
|
void showCreateWiredConnectWidgetSignal(const QString &display, const QString &devName);
|
||||||
|
void showKylinNMSignal(const QString &display, int type);
|
||||||
|
void showPropertyWidgetSignal(const QString &display, const QString &devName, const QString &ssid);
|
||||||
|
void signalStrengthChange(const QString &devName, const QString &ssid, int strength);
|
||||||
|
void timeToUpdate();
|
||||||
|
void wirelessDeviceStatusChanged();
|
||||||
|
void wirelessSwitchBtnChanged(bool state);
|
||||||
|
void wlanAdd(const QString &devName, const QStringList &info);
|
||||||
|
void wlanRemove(const QString &devName, const QString &ssid);
|
||||||
|
void wlanactiveConnectionStateChanged(const QString &devName, const QString &ssid, const QString &uuid, int status);
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace com {
|
||||||
|
namespace kylin {
|
||||||
|
typedef ::ComKylinNetworkInterface network;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
|
@ -0,0 +1,9 @@
|
||||||
|
INCLUDEPATH += $$PWD
|
||||||
|
|
||||||
|
FORMS += \
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
$$PWD/connectivitypage.h \
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
$$PWD/connectivitypage.cpp \
|
|
@ -0,0 +1,205 @@
|
||||||
|
#include "connectivitypage.h"
|
||||||
|
#include <QLayout>
|
||||||
|
#include <QFormLayout>
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QGSettings>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QRegExpValidator>
|
||||||
|
|
||||||
|
#include "windowmanager/windowmanager.h"
|
||||||
|
#include "kwindowsystem.h"
|
||||||
|
#include "kwindowsystem_export.h"
|
||||||
|
#include "kylinutil.h"
|
||||||
|
|
||||||
|
#define THEME_SCHAME "org.ukui.style"
|
||||||
|
#define COLOR_THEME "styleName"
|
||||||
|
|
||||||
|
#define BOTTOM_LAYOUT_MARGINS 24, 16, 24, 24
|
||||||
|
#define LAYOUT_SPACING 16
|
||||||
|
|
||||||
|
ConnectivityPage::ConnectivityPage(QString uri, QWidget *parent)
|
||||||
|
:m_uri(uri), QDialog(parent)
|
||||||
|
{
|
||||||
|
this->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
|
this->setFixedSize(380, 369);
|
||||||
|
this->setWindowTitle(tr("Network connectivity detection"));
|
||||||
|
setAttribute(Qt::WA_DeleteOnClose, false);
|
||||||
|
KWindowSystem::setState(this->winId(), NET::SkipTaskbar | NET::SkipPager);
|
||||||
|
m_connectResource = new KyConnectResourse(this);
|
||||||
|
initUi();
|
||||||
|
initConnect();
|
||||||
|
NetworkManager::Connectivity connectivity;
|
||||||
|
m_connectResource->getConnectivity(connectivity);
|
||||||
|
setWarning(connectivity);
|
||||||
|
m_publicNetworkButton->setChecked(m_uri.isEmpty());
|
||||||
|
m_intranetButton->setChecked(!m_uri.isEmpty());
|
||||||
|
if (!m_uri.isEmpty()) {
|
||||||
|
checkUri();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConnectivityPage::initUi()
|
||||||
|
{
|
||||||
|
m_scrollArea = new QScrollArea(this);
|
||||||
|
m_scrollArea->setFixedWidth(380);
|
||||||
|
m_scrollArea->setFrameShape(QFrame::NoFrame);
|
||||||
|
m_scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
m_scrollArea->setContentsMargins(0,0,0,0);
|
||||||
|
|
||||||
|
m_icon = new QLabel(this);
|
||||||
|
m_statusText = new QLabel(this);
|
||||||
|
m_statusText->setWordWrap(true);
|
||||||
|
|
||||||
|
//如访问 Internet 受限,请切换网络 IP 连通性检测方式后再试。
|
||||||
|
m_text = new QLabel(this);
|
||||||
|
m_text->setText(tr("If access to the Internet is restricted, please switch the network IP connectivity detection method and try again."));
|
||||||
|
m_text->setWordWrap(true);
|
||||||
|
m_text->adjustSize();
|
||||||
|
// m_text->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
|
|
||||||
|
m_publicNetworkButton = new QRadioButton(this);
|
||||||
|
m_publicNetworkButton->setText(tr("Public network (default)"));
|
||||||
|
m_intranetButton = new QRadioButton(this);
|
||||||
|
m_intranetButton->setText(tr("Local area network (intranet)"));
|
||||||
|
|
||||||
|
m_uriEdit = new QLineEdit(this);
|
||||||
|
m_uriEdit->setText(m_uri);
|
||||||
|
m_warningLabel = new QLabel(this);
|
||||||
|
QPalette hintTextColor;
|
||||||
|
hintTextColor.setColor(QPalette::WindowText, Qt::red);
|
||||||
|
m_warningLabel->setPalette(hintTextColor);
|
||||||
|
m_warningLabel->setWordWrap(true);
|
||||||
|
|
||||||
|
m_confirmBtn = new QPushButton(this);
|
||||||
|
m_confirmBtn->setText(tr("Confirm"));
|
||||||
|
|
||||||
|
m_warningWidget = new QWidget(this);
|
||||||
|
m_warningWidget->adjustSize();
|
||||||
|
m_editWidget = new QWidget(this);
|
||||||
|
m_centerWidget = new QWidget(this);
|
||||||
|
m_centerWidget->setFixedWidth(380);
|
||||||
|
m_bottomWidget = new QWidget(this);
|
||||||
|
|
||||||
|
QHBoxLayout* warningLayout = new QHBoxLayout(m_warningWidget);
|
||||||
|
warningLayout->setContentsMargins(0, 0, 0, 24);
|
||||||
|
warningLayout->setSpacing(8);
|
||||||
|
warningLayout->addWidget(m_icon);
|
||||||
|
warningLayout->addWidget(m_statusText);
|
||||||
|
warningLayout->addStretch();
|
||||||
|
|
||||||
|
QVBoxLayout* editLayout = new QVBoxLayout(m_editWidget);
|
||||||
|
editLayout->setContentsMargins(22,0,0,0);
|
||||||
|
editLayout->setSpacing(0);
|
||||||
|
editLayout->addWidget(m_uriEdit);
|
||||||
|
editLayout->addWidget(m_warningLabel);
|
||||||
|
|
||||||
|
QVBoxLayout* mainLayout = new QVBoxLayout(this);
|
||||||
|
mainLayout->setContentsMargins(0,0,0,0);
|
||||||
|
mainLayout->setSpacing(0);
|
||||||
|
mainLayout->addWidget(m_scrollArea);
|
||||||
|
mainLayout->addWidget(m_bottomWidget);
|
||||||
|
this->setLayout(mainLayout);
|
||||||
|
|
||||||
|
//中间页面
|
||||||
|
QVBoxLayout *vLayout = new QVBoxLayout(m_centerWidget);
|
||||||
|
vLayout->setContentsMargins(25, 17, 23, 0);
|
||||||
|
vLayout->setSpacing(0);
|
||||||
|
vLayout->addWidget(m_warningWidget);
|
||||||
|
vLayout->addWidget(m_text);
|
||||||
|
vLayout->addSpacing(10);
|
||||||
|
vLayout->addWidget(m_publicNetworkButton);
|
||||||
|
vLayout->addSpacing(12);
|
||||||
|
vLayout->addWidget(m_intranetButton);
|
||||||
|
vLayout->addWidget(m_editWidget);
|
||||||
|
|
||||||
|
//底部按钮
|
||||||
|
QHBoxLayout* bottomLayout = new QHBoxLayout(m_bottomWidget);
|
||||||
|
bottomLayout->setContentsMargins(BOTTOM_LAYOUT_MARGINS);
|
||||||
|
bottomLayout->setSpacing(LAYOUT_SPACING);
|
||||||
|
bottomLayout->addStretch();
|
||||||
|
bottomLayout->addWidget(m_confirmBtn);
|
||||||
|
|
||||||
|
m_scrollArea->setWidget(m_centerWidget);
|
||||||
|
m_scrollArea->setWidgetResizable(true);
|
||||||
|
|
||||||
|
this->setWindowFlags(Qt::Dialog);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConnectivityPage::initConnect()
|
||||||
|
{
|
||||||
|
connect(m_confirmBtn, &QPushButton::released, this, [=](){
|
||||||
|
if (m_publicNetworkButton->isChecked()) {
|
||||||
|
setConnectivityCheckSpareUriByGDbus("");
|
||||||
|
} else {
|
||||||
|
setConnectivityCheckSpareUriByGDbus(m_uriEdit->text());
|
||||||
|
}
|
||||||
|
close();
|
||||||
|
});
|
||||||
|
connect(m_publicNetworkButton, &QRadioButton::toggled, [&](bool checked){
|
||||||
|
if (checked) {
|
||||||
|
m_uriEdit->clear();
|
||||||
|
m_uriEdit->setDisabled(true);
|
||||||
|
m_confirmBtn->setEnabled(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
connect(m_intranetButton, &QRadioButton::toggled, [&](bool checked){
|
||||||
|
if (checked) {
|
||||||
|
checkUri();
|
||||||
|
m_uriEdit->setDisabled(false);
|
||||||
|
m_uriEdit->setFocus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
connect(m_uriEdit, &QLineEdit::textChanged, this ,&ConnectivityPage::checkUri);
|
||||||
|
connect(m_connectResource, &KyConnectResourse::connectivityChanged, this, &ConnectivityPage::setWarning);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConnectivityPage::setWarning(NetworkManager::Connectivity connectivity)
|
||||||
|
{
|
||||||
|
if (NetworkManager::Connectivity::Full == connectivity) {
|
||||||
|
//网络已连接,可正常访问 Internet 。
|
||||||
|
m_icon->setPixmap(QIcon::fromTheme("ukui-dialog-success").pixmap(16,16));
|
||||||
|
m_statusText->setText(tr("The network is connected and can access the Internet normally."));
|
||||||
|
} else if (NetworkManager::Connectivity::Limited == connectivity
|
||||||
|
|| NetworkManager::Connectivity::Portal == connectivity) {
|
||||||
|
//网络已连接,访问 Internet 受限。
|
||||||
|
m_icon->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(16,16));
|
||||||
|
m_statusText->setText(tr("The network is connected and access to the Internet is restricted."));
|
||||||
|
} else {
|
||||||
|
qWarning() << "network status is " << connectivity << "should not show this page";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConnectivityPage::checkUri()
|
||||||
|
{
|
||||||
|
QString text = m_uriEdit->text(); //locationbar input data
|
||||||
|
if (text.isEmpty()) {
|
||||||
|
m_confirmBtn->setEnabled(false);
|
||||||
|
m_warningLabel->setText(tr("Please enter the local area network (intranet) detection address"));
|
||||||
|
m_warningLabel->show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int pos = 0;
|
||||||
|
|
||||||
|
QRegExp rx;
|
||||||
|
//url regular expression
|
||||||
|
rx.setPattern("(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]");
|
||||||
|
QRegExpValidator rv;
|
||||||
|
rv.setRegExp(rx);
|
||||||
|
//Test for a match between the url and the regular expression
|
||||||
|
QValidator::State rvState = rv.validate(text, pos);
|
||||||
|
if (rvState == QValidator::Acceptable) {
|
||||||
|
m_confirmBtn->setEnabled(true);
|
||||||
|
m_warningLabel->clear();
|
||||||
|
m_warningLabel->hide();
|
||||||
|
} else {
|
||||||
|
m_confirmBtn->setEnabled(false);
|
||||||
|
m_warningLabel->setText(tr("Format error"));
|
||||||
|
m_warningLabel->show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConnectivityPage::closeEvent(QCloseEvent *event)
|
||||||
|
{
|
||||||
|
Q_EMIT pageClose();
|
||||||
|
return QWidget::closeEvent(event);
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
#ifndef CONNECTIVITYPAGE_H
|
||||||
|
#define CONNECTIVITYPAGE_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QRadioButton>
|
||||||
|
#include <QDBusInterface>
|
||||||
|
#include <QLineEdit>
|
||||||
|
#include <QPushButton>
|
||||||
|
#include <QScrollArea>
|
||||||
|
|
||||||
|
#include "divider.h"
|
||||||
|
#include "kylinconnectresource.h"
|
||||||
|
|
||||||
|
class ConnectivityPage : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit ConnectivityPage(QString uri = "", QWidget *parent = nullptr);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void closeEvent(QCloseEvent *event);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QScrollArea *m_scrollArea;
|
||||||
|
QWidget* m_warningWidget;
|
||||||
|
QWidget* m_centerWidget;
|
||||||
|
QWidget* m_editWidget;
|
||||||
|
QWidget* m_bottomWidget;
|
||||||
|
|
||||||
|
QString m_uri;
|
||||||
|
QPushButton *m_confirmBtn;
|
||||||
|
QLabel *m_icon;
|
||||||
|
QLabel *m_statusText;
|
||||||
|
QLabel *m_text;
|
||||||
|
QRadioButton *m_publicNetworkButton;
|
||||||
|
QRadioButton *m_intranetButton;
|
||||||
|
QLineEdit *m_uriEdit;
|
||||||
|
QLabel* m_warningLabel;
|
||||||
|
|
||||||
|
KyConnectResourse* m_connectResource;
|
||||||
|
|
||||||
|
void initUi();
|
||||||
|
void initConnect();
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void setWarning(NetworkManager::Connectivity connectivity);
|
||||||
|
void checkUri();
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
void pageClose();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CONNECTIVITYPAGE_H
|
|
@ -5,6 +5,7 @@ include(tab-pages/tab-pages.pri)
|
||||||
include(list-items/list-items.pri)
|
include(list-items/list-items.pri)
|
||||||
include(netdetails/netdetails.pri)
|
include(netdetails/netdetails.pri)
|
||||||
include(enterprise-wlan/enterprise-wlan.pri)
|
include(enterprise-wlan/enterprise-wlan.pri)
|
||||||
|
include(connectivity/connectivity.pri)
|
||||||
include(networkmode/networkmode.pri)
|
include(networkmode/networkmode.pri)
|
||||||
|
|
||||||
FORMS +=
|
FORMS +=
|
||||||
|
|
|
@ -253,6 +253,18 @@ void WlanListItem::keyPressEvent(QKeyEvent *event)
|
||||||
return QFrame::keyPressEvent(event);
|
return QFrame::keyPressEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WlanListItem::paintEvent(QPaintEvent *event)
|
||||||
|
{
|
||||||
|
QPalette pal = this->palette();
|
||||||
|
if (m_pwdLineEdit != nullptr) {
|
||||||
|
pal.setColor(QPalette::Base, pal.color(QPalette::Base));
|
||||||
|
pal.setColor(QPalette::Text, pal.color(QPalette::Text));
|
||||||
|
m_pwdLineEdit->setPalette(pal);
|
||||||
|
}
|
||||||
|
|
||||||
|
return QWidget::paintEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
void WlanListItem::initWlanUI()
|
void WlanListItem::initWlanUI()
|
||||||
{
|
{
|
||||||
m_hasPwd = (m_wirelessNetItem.m_secuType.isEmpty() || m_wirelessNetItem.m_secuType == "") ? false : true;
|
m_hasPwd = (m_wirelessNetItem.m_secuType.isEmpty() || m_wirelessNetItem.m_secuType == "") ? false : true;
|
||||||
|
|
|
@ -91,6 +91,7 @@ protected:
|
||||||
void leaveEvent(QEvent *event);
|
void leaveEvent(QEvent *event);
|
||||||
bool eventFilter(QObject *watched, QEvent *event);
|
bool eventFilter(QObject *watched, QEvent *event);
|
||||||
void keyPressEvent(QKeyEvent *event);
|
void keyPressEvent(QKeyEvent *event);
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void itemHeightChanged(const bool isExpanded, const QString &ssid);
|
void itemHeightChanged(const bool isExpanded, const QString &ssid);
|
||||||
|
|
|
@ -33,11 +33,13 @@
|
||||||
#include "ukuistylehelper/ukuistylehelper.h"
|
#include "ukuistylehelper/ukuistylehelper.h"
|
||||||
#include "windowmanager/windowmanager.h"
|
#include "windowmanager/windowmanager.h"
|
||||||
#include "kysdk/kysdk-system/libkysysinfo.h"
|
#include "kysdk/kysdk-system/libkysysinfo.h"
|
||||||
|
#include "kylinutil.h"
|
||||||
|
|
||||||
#define MAINWINDOW_WIDTH 420
|
#define MAINWINDOW_WIDTH 420
|
||||||
#define MAINWINDOW_HEIGHT 476
|
#define MAINWINDOW_HEIGHT 476
|
||||||
#define LAYOUT_MARGINS 0,0,0,0
|
#define LAYOUT_MARGINS 0,0,0,0
|
||||||
#define LOADING_TRAYICON_TIMER_MS 60
|
#define LOADING_TRAYICON_TIMER_MS 60
|
||||||
|
#define TABBAR_HEIGHT 30
|
||||||
#define THEME_SCHAME "org.ukui.style"
|
#define THEME_SCHAME "org.ukui.style"
|
||||||
#define COLOR_THEME "styleName"
|
#define COLOR_THEME "styleName"
|
||||||
|
|
||||||
|
@ -68,10 +70,16 @@ const QString intel = "V10SP1-edu";
|
||||||
#define LOW_SIGNAL_LIMIT_ICON "ukui-network-wireless-signal-weak-error-symbolic"
|
#define LOW_SIGNAL_LIMIT_ICON "ukui-network-wireless-signal-weak-error-symbolic"
|
||||||
#define NONE_SIGNAL_LIMIT_ICON "ukui-network-wireless-signal-none-error-symbolic"
|
#define NONE_SIGNAL_LIMIT_ICON "ukui-network-wireless-signal-none-error-symbolic"
|
||||||
|
|
||||||
|
#define EXCELLENT_SIGNAL_INTRANET_ICON "ukui-network-wireless-signal-excellent-intranet-symbolic"
|
||||||
|
#define GOOD_SIGNAL_INTRANET_ICON "ukui-network-wireless-signal-good-intranet-symbolic"
|
||||||
|
#define OK_SIGNAL_INTRANET_ICON "ukui-network-wireless-signal-ok-intranet-symbolic"
|
||||||
|
#define LOW_SIGNAL_INTRANET_ICON "ukui-network-wireless-signal-weak-intranet-symbolic"
|
||||||
|
#define NONE_SIGNAL_INTRANET_ICON "ukui-network-wireless-signal-none-intranet-symbolic"
|
||||||
|
|
||||||
#include <kwindowsystem.h>
|
#include <kwindowsystem.h>
|
||||||
#include <kwindowsystem_export.h>
|
#include <kwindowsystem_export.h>
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
|
MainWindow::MainWindow(QString display, QWidget *parent) : QMainWindow(parent), m_display(display)
|
||||||
{
|
{
|
||||||
firstlyStart();
|
firstlyStart();
|
||||||
}
|
}
|
||||||
|
@ -176,6 +184,11 @@ void MainWindow::firstlyStart()
|
||||||
|
|
||||||
//加载key ring
|
//加载key ring
|
||||||
agent_init();
|
agent_init();
|
||||||
|
|
||||||
|
//单网卡显示
|
||||||
|
setCentralWidgetPages();
|
||||||
|
connect(m_lanWidget, &LanPage::deviceStatusChanged, this, &MainWindow::setCentralWidgetPages);
|
||||||
|
connect(m_wlanWidget, &LanPage::wirelessDeviceStatusChanged, this, &MainWindow::setCentralWidgetPages);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -367,10 +380,12 @@ void MainWindow::initTrayIcon()
|
||||||
connect(iconTimer, &QTimer::timeout, this, &MainWindow::onSetTrayIconLoading);
|
connect(iconTimer, &QTimer::timeout, this, &MainWindow::onSetTrayIconLoading);
|
||||||
|
|
||||||
m_trayIconMenu = new QMenu();
|
m_trayIconMenu = new QMenu();
|
||||||
m_showMainwindowAction = new QAction(tr("Show MainWindow"),this);
|
// m_showMainwindowAction = new QAction(tr("Show MainWindow"),this);
|
||||||
m_showSettingsAction = new QAction(tr("Settings"),this);
|
m_showSettingsAction = new QAction(tr("Settings"),this);
|
||||||
|
m_showConnectivityPageAction = new QAction(tr("Network Connectivity Detection"), this);
|
||||||
|
|
||||||
m_showSettingsAction->setIcon(QIcon::fromTheme("document-page-setup-symbolic", QIcon(":/res/x/setup.png")) );
|
m_showSettingsAction->setIcon(QIcon::fromTheme("document-page-setup-symbolic", QIcon(":/res/x/setup.png")) );
|
||||||
|
m_showConnectivityPageAction->setIcon(QIcon::fromTheme("gnome-netstatus-txrx"));
|
||||||
// m_trayIconMenu->addAction(m_showMainwindowAction);
|
// m_trayIconMenu->addAction(m_showMainwindowAction);
|
||||||
m_trayIconMenu->addAction(m_showSettingsAction);
|
m_trayIconMenu->addAction(m_showSettingsAction);
|
||||||
m_trayIcon->setContextMenu(m_trayIconMenu);
|
m_trayIcon->setContextMenu(m_trayIconMenu);
|
||||||
|
@ -380,6 +395,20 @@ void MainWindow::initTrayIcon()
|
||||||
connect(m_trayIcon, &QSystemTrayIcon::activated, this, &MainWindow::onTrayIconActivated);
|
connect(m_trayIcon, &QSystemTrayIcon::activated, this, &MainWindow::onTrayIconActivated);
|
||||||
// connect(m_showMainwindowAction, &QAction::triggered, this, &MainWindow::onShowMainwindowActionTriggled);
|
// connect(m_showMainwindowAction, &QAction::triggered, this, &MainWindow::onShowMainwindowActionTriggled);
|
||||||
connect(m_showSettingsAction, &QAction::triggered, this, &MainWindow::onShowSettingsActionTriggled);
|
connect(m_showSettingsAction, &QAction::triggered, this, &MainWindow::onShowSettingsActionTriggled);
|
||||||
|
connect(m_showConnectivityPageAction, &QAction::triggered, [=]() {
|
||||||
|
if (m_connectivityPage != nullptr) {
|
||||||
|
KWindowSystem::activateWindow(m_connectivityPage->winId());
|
||||||
|
KWindowSystem::raiseWindow(m_connectivityPage->winId());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QString uri = getConnectivityCheckSpareUriByGDbus();
|
||||||
|
m_connectivityPage = new ConnectivityPage(uri, this);
|
||||||
|
connect(m_connectivityPage, &ConnectivityPage::pageClose, [&](){
|
||||||
|
m_connectivityPage = nullptr;
|
||||||
|
});
|
||||||
|
m_connectivityPage->show();
|
||||||
|
});
|
||||||
|
|
||||||
m_trayIcon->show();
|
m_trayIcon->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -417,6 +446,7 @@ void MainWindow::initDbusConnnect()
|
||||||
connect(m_wlanWidget, &WlanPage::timeToUpdate , this, &MainWindow::onTimeUpdateTrayIcon);
|
connect(m_wlanWidget, &WlanPage::timeToUpdate , this, &MainWindow::onTimeUpdateTrayIcon);
|
||||||
connect(m_wlanWidget, &WlanPage::showMainWindow, this, &MainWindow::onShowMainWindow);
|
connect(m_wlanWidget, &WlanPage::showMainWindow, this, &MainWindow::onShowMainWindow);
|
||||||
connect(m_wlanWidget, &WlanPage::connectivityChanged, this, &MainWindow::onConnectivityChanged);
|
connect(m_wlanWidget, &WlanPage::connectivityChanged, this, &MainWindow::onConnectivityChanged);
|
||||||
|
connect(m_wlanWidget, &WlanPage::connectivityCheckSpareUriChanged, this, &MainWindow::onConnectivityCheckSpareUriChanged);
|
||||||
|
|
||||||
connect(m_lanWidget, &LanPage::lanConnectChanged, this, &MainWindow::onRefreshTrayIconTooltip);
|
connect(m_lanWidget, &LanPage::lanConnectChanged, this, &MainWindow::onRefreshTrayIconTooltip);
|
||||||
connect(m_lanWidget, &LanPage::deviceStatusChanged, this, &MainWindow::onRefreshTrayIconTooltip);
|
connect(m_lanWidget, &LanPage::deviceStatusChanged, this, &MainWindow::onRefreshTrayIconTooltip);
|
||||||
|
@ -435,6 +465,27 @@ void MainWindow::initDbusConnnect()
|
||||||
hideMainwindow();
|
hideMainwindow();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QDBusConnection::sessionBus().connect(QString("com.kylin.network"),
|
||||||
|
QString("/com/kylin/network"),
|
||||||
|
QString("com.kylin.network"),
|
||||||
|
QString("showKylinNMSignal"), this, SLOT(onShowKylinNMSlot(QString,int)));
|
||||||
|
|
||||||
|
QDBusConnection::sessionBus().connect(QString("com.kylin.network"),
|
||||||
|
QString("/com/kylin/network"),
|
||||||
|
QString("com.kylin.network"),
|
||||||
|
QString("showPropertyWidgetSignal"), this, SLOT(onShowPropertyWidgetSlot(QString,QString,QString)));
|
||||||
|
|
||||||
|
QDBusConnection::sessionBus().connect(QString("com.kylin.network"),
|
||||||
|
QString("/com/kylin/network"),
|
||||||
|
QString("com.kylin.network"),
|
||||||
|
QString("showCreateWiredConnectWidgetSignal"), this, SLOT(onShowCreateWiredConnectWidgetSlot(QString,QString)));
|
||||||
|
|
||||||
|
QDBusConnection::sessionBus().connect(QString("com.kylin.network"),
|
||||||
|
QString("/com/kylin/network"),
|
||||||
|
QString("com.kylin.network"),
|
||||||
|
QString("showAddOtherWlanWidgetSignal"), this, SLOT(onShowAddOtherWlanWidgetSlot(QString,QString)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -751,10 +802,34 @@ void MainWindow::onRefreshTrayIcon()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!getConnectivityCheckSpareUriByGDbus().isEmpty()) {
|
||||||
|
if (iconStatus == IconActiveType::LAN_CONNECTED) {
|
||||||
|
m_trayIcon->setIcon(QIcon::fromTheme("network-intranet-symbolic"));
|
||||||
|
} else if (iconStatus == IconActiveType::WLAN_CONNECTED) {
|
||||||
|
if (signalStrength > MW_EXCELLENT_SIGNAL){
|
||||||
|
m_trayIcon->setIcon(QIcon::fromTheme(EXCELLENT_SIGNAL_INTRANET_ICON));
|
||||||
|
} else if (signalStrength > MW_GOOD_SIGNAL) {
|
||||||
|
m_trayIcon->setIcon(QIcon::fromTheme(GOOD_SIGNAL_INTRANET_ICON));
|
||||||
|
} else if (signalStrength > MW_OK_SIGNAL) {
|
||||||
|
m_trayIcon->setIcon(QIcon::fromTheme(OK_SIGNAL_INTRANET_ICON));
|
||||||
|
} else if (signalStrength > MW_LOW_SIGNAL) {
|
||||||
|
m_trayIcon->setIcon(QIcon::fromTheme(LOW_SIGNAL_INTRANET_ICON));
|
||||||
|
} else {
|
||||||
|
m_trayIcon->setIcon(QIcon::fromTheme(NONE_SIGNAL_INTRANET_ICON));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (signalStrength == -1) {
|
if (signalStrength == -1) {
|
||||||
m_trayIcon->setIcon(QIcon::fromTheme("network-wired-disconnected-symbolic"));
|
m_trayIcon->setIcon(QIcon::fromTheme("network-wired-disconnected-symbolic"));
|
||||||
}
|
}
|
||||||
onRefreshTrayIconTooltip();
|
onRefreshTrayIconTooltip();
|
||||||
|
|
||||||
|
// if (iconStatus > IconActiveType::NOT_CONNECTED) {
|
||||||
|
// m_trayIconMenu->addAction(m_showConnectivityPageAction);
|
||||||
|
// } else {
|
||||||
|
// m_trayIconMenu->removeAction(m_showConnectivityPageAction);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onSetTrayIconLoading()
|
void MainWindow::onSetTrayIconLoading()
|
||||||
|
@ -844,8 +919,56 @@ void MainWindow::onRefreshTrayIconTooltip()
|
||||||
m_trayIcon->setToolTip(trayIconToolTip);
|
m_trayIcon->setToolTip(trayIconToolTip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::setCentralWidgetPages()
|
||||||
|
{
|
||||||
|
bool isChanged = false;
|
||||||
|
if (m_isWiredUsable != m_lanWidget->isWiredDeviceUsable()) {
|
||||||
|
if (m_lanWidget->isWiredDeviceUsable()) {
|
||||||
|
m_centralWidget->insertTab(LANPAGE, m_lanWidget, "");
|
||||||
|
m_isWiredUsable = true;
|
||||||
|
} else {
|
||||||
|
m_centralWidget->removeTab(LANPAGE);
|
||||||
|
m_isWiredUsable = false;
|
||||||
|
}
|
||||||
|
isChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_isWirelessUsable != m_wlanWidget->isWirelessDeviceUsable()) {
|
||||||
|
if (m_wlanWidget->isWirelessDeviceUsable()) {
|
||||||
|
m_centralWidget->insertTab(WLANPAGE, m_wlanWidget, "");
|
||||||
|
m_isWirelessUsable = true;
|
||||||
|
} else {
|
||||||
|
m_centralWidget->removeTab(WLANPAGE);
|
||||||
|
m_isWirelessUsable = false;
|
||||||
|
}
|
||||||
|
isChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isChanged) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_isWiredUsable && m_isWirelessUsable) {
|
||||||
|
m_centralWidget->tabBar()->show();
|
||||||
|
this->setFixedHeight(MAINWINDOW_HEIGHT);
|
||||||
|
resetWindowPosition();
|
||||||
|
} else {
|
||||||
|
m_centralWidget->tabBar()->hide();
|
||||||
|
this->setFixedHeight(MAINWINDOW_HEIGHT - TABBAR_HEIGHT);
|
||||||
|
resetWindowPosition();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_trayIcon) {
|
||||||
|
m_trayIcon->setVisible(m_isWiredUsable || m_isWirelessUsable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::onShowMainWindow(int type)
|
void MainWindow::onShowMainWindow(int type)
|
||||||
{
|
{
|
||||||
|
if (!m_trayIcon->isVisible()) {
|
||||||
|
qWarning() << "no valid network card, do not show kylin-nm mainwindow";
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (type == LANPAGE || type == WLANPAGE) {
|
if (type == LANPAGE || type == WLANPAGE) {
|
||||||
m_centralWidget->setCurrentIndex(type);
|
m_centralWidget->setCurrentIndex(type);
|
||||||
|
|
||||||
|
@ -872,6 +995,19 @@ void MainWindow::onConnectivityChanged(NetworkManager::Connectivity connectivity
|
||||||
onRefreshTrayIcon();
|
onRefreshTrayIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::onConnectivityCheckSpareUriChanged()
|
||||||
|
{
|
||||||
|
if (!m_trayIcon) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (iconStatus == ACTIVATING) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
onRefreshTrayIcon();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::onTimeUpdateTrayIcon()
|
void MainWindow::onTimeUpdateTrayIcon()
|
||||||
{
|
{
|
||||||
if (!m_trayIcon) {
|
if (!m_trayIcon) {
|
||||||
|
@ -899,13 +1035,14 @@ void MainWindow::keyPressEvent(QKeyEvent *event)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MainWindow::getWirelessList 获取wifi列表,供dbus调用
|
* @brief MainWindow::getWirelessList 获取wifi列表,供dbus调用
|
||||||
* @param map
|
* @param devName
|
||||||
|
* @param list
|
||||||
*/
|
*/
|
||||||
void MainWindow::getWirelessList(QMap<QString, QVector<QStringList> > &map)
|
void MainWindow::getWirelessList(QString devName, QList<QStringList> &list)
|
||||||
{
|
{
|
||||||
map.clear();
|
list.clear();
|
||||||
if (nullptr != m_wlanWidget) {
|
if (nullptr != m_wlanWidget) {
|
||||||
m_wlanWidget->getWirelessList(map);
|
m_wlanWidget->getWirelessList(devName, list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -920,11 +1057,11 @@ bool MainWindow::getWirelessSwitchBtnState()
|
||||||
* @brief MainWindow::getWiredList 获取lan列表,供dbus调用
|
* @brief MainWindow::getWiredList 获取lan列表,供dbus调用
|
||||||
* @param map
|
* @param map
|
||||||
*/
|
*/
|
||||||
void MainWindow::getWiredList(QMap<QString, QVector<QStringList>> &map)
|
void MainWindow::getWiredList(QString devName, QList<QStringList> &list)
|
||||||
{
|
{
|
||||||
map.clear();
|
list.clear();
|
||||||
if (nullptr != m_lanWidget) {
|
if (nullptr != m_lanWidget) {
|
||||||
m_lanWidget->getWiredList(map);
|
m_lanWidget->getWiredList(devName, list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1088,3 +1225,32 @@ void MainWindow::keyRingClear()
|
||||||
{
|
{
|
||||||
agent_clear();
|
agent_clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::onShowKylinNMSlot(QString display, int type)
|
||||||
|
{
|
||||||
|
if (display == m_display) {
|
||||||
|
onShowMainWindow(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//唤起属性页 根据网卡类型 参数2 为ssid/uuid
|
||||||
|
void MainWindow::onShowPropertyWidgetSlot(QString display, QString devName, QString ssid)
|
||||||
|
{
|
||||||
|
if (display == m_display) {
|
||||||
|
showPropertyWidget(devName, ssid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//唤起新建有线连接界面
|
||||||
|
void MainWindow::onShowCreateWiredConnectWidgetSlot(QString display, QString devName)
|
||||||
|
{
|
||||||
|
if (display == m_display) {
|
||||||
|
showCreateWiredConnectWidget(devName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//唤起加入其他无线网络界面
|
||||||
|
void MainWindow::onShowAddOtherWlanWidgetSlot(QString display, QString devName)
|
||||||
|
{
|
||||||
|
if (display == m_display) {
|
||||||
|
showAddOtherWlanWidget(devName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "wlanpage.h"
|
#include "wlanpage.h"
|
||||||
#include "netdetails/netdetail.h"
|
#include "netdetails/netdetail.h"
|
||||||
#include "netdetails/joinhiddenwifipage.h"
|
#include "netdetails/joinhiddenwifipage.h"
|
||||||
|
#include "connectivity/connectivitypage.h"
|
||||||
//安全中心-网络防火墙模式配置
|
//安全中心-网络防火墙模式配置
|
||||||
#include "networkmodeconfig.h"
|
#include "networkmodeconfig.h"
|
||||||
//删除此头文件,别在添加
|
//删除此头文件,别在添加
|
||||||
|
@ -47,7 +48,9 @@
|
||||||
enum IconActiveType {
|
enum IconActiveType {
|
||||||
NOT_CONNECTED = 0,
|
NOT_CONNECTED = 0,
|
||||||
LAN_CONNECTED,
|
LAN_CONNECTED,
|
||||||
|
LAN_CONNECTED_INTRANET,
|
||||||
WLAN_CONNECTED,
|
WLAN_CONNECTED,
|
||||||
|
WLAN_CONNECTED_INTRANET,
|
||||||
LAN_CONNECTED_LIMITED,
|
LAN_CONNECTED_LIMITED,
|
||||||
WLAN_CONNECTED_LIMITED,
|
WLAN_CONNECTED_LIMITED,
|
||||||
ACTIVATING,
|
ACTIVATING,
|
||||||
|
@ -61,7 +64,7 @@ class MainWindow : public QMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit MainWindow(QWidget *parent = nullptr);
|
explicit MainWindow(QString display, QWidget *parent = nullptr);
|
||||||
void showMainwindow();
|
void showMainwindow();
|
||||||
void hideMainwindow();
|
void hideMainwindow();
|
||||||
|
|
||||||
|
@ -69,8 +72,8 @@ public:
|
||||||
void setWirelessDefaultDevice(QString deviceName);
|
void setWirelessDefaultDevice(QString deviceName);
|
||||||
|
|
||||||
//for dbus
|
//for dbus
|
||||||
void getWirelessList(QMap<QString, QVector<QStringList> > &map);
|
void getWirelessList(QString devName, QList<QStringList> &list);
|
||||||
void getWiredList(QMap<QString, QVector<QStringList>> &map);
|
void getWiredList(QString devName, QList<QStringList> &list);
|
||||||
//开启热点
|
//开启热点
|
||||||
void activeWirelessAp(const QString apName, const QString apPassword, const QString wirelessBand, const QString apDevice);
|
void activeWirelessAp(const QString apName, const QString apPassword, const QString wirelessBand, const QString apDevice);
|
||||||
//断开热点
|
//断开热点
|
||||||
|
@ -186,6 +189,8 @@ private:
|
||||||
LanPage * m_lanWidget = nullptr;
|
LanPage * m_lanWidget = nullptr;
|
||||||
WlanPage * m_wlanWidget = nullptr;
|
WlanPage * m_wlanWidget = nullptr;
|
||||||
|
|
||||||
|
ConnectivityPage* m_connectivityPage = nullptr;
|
||||||
|
|
||||||
//监听主题的Gsettings
|
//监听主题的Gsettings
|
||||||
QGSettings * m_styleGsettings = nullptr;
|
QGSettings * m_styleGsettings = nullptr;
|
||||||
|
|
||||||
|
@ -198,6 +203,7 @@ private:
|
||||||
QMenu * m_trayIconMenu = nullptr;
|
QMenu * m_trayIconMenu = nullptr;
|
||||||
QAction * m_showMainwindowAction = nullptr;
|
QAction * m_showMainwindowAction = nullptr;
|
||||||
QAction * m_showSettingsAction = nullptr;
|
QAction * m_showSettingsAction = nullptr;
|
||||||
|
QAction * m_showConnectivityPageAction = nullptr;
|
||||||
|
|
||||||
bool m_lanIsLoading = false;
|
bool m_lanIsLoading = false;
|
||||||
bool m_wlanIsLoading = false;
|
bool m_wlanIsLoading = false;
|
||||||
|
@ -213,6 +219,11 @@ private:
|
||||||
uint m_intervalTime = 100;
|
uint m_intervalTime = 100;
|
||||||
uint m_registerCount = 0;
|
uint m_registerCount = 0;
|
||||||
|
|
||||||
|
QString m_display;
|
||||||
|
|
||||||
|
bool m_isWiredUsable = true;
|
||||||
|
bool m_isWirelessUsable = true;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void onShowMainWindow(int type);
|
void onShowMainWindow(int type);
|
||||||
|
|
||||||
|
@ -227,9 +238,20 @@ private Q_SLOTS:
|
||||||
void onLanConnectStatusToChangeTrayIcon(int state);
|
void onLanConnectStatusToChangeTrayIcon(int state);
|
||||||
void onWlanConnectStatusToChangeTrayIcon(int state);
|
void onWlanConnectStatusToChangeTrayIcon(int state);
|
||||||
void onConnectivityChanged(NetworkManager::Connectivity connectivity);
|
void onConnectivityChanged(NetworkManager::Connectivity connectivity);
|
||||||
|
void onConnectivityCheckSpareUriChanged();
|
||||||
void onTimeUpdateTrayIcon();
|
void onTimeUpdateTrayIcon();
|
||||||
void onTabletModeChanged(bool mode);
|
void onTabletModeChanged(bool mode);
|
||||||
void onRefreshTrayIconTooltip();
|
void onRefreshTrayIconTooltip();
|
||||||
|
|
||||||
|
void onShowKylinNMSlot(QString display, int type);
|
||||||
|
//唤起属性页 根据网卡类型 参数2 为ssid/uuid
|
||||||
|
void onShowPropertyWidgetSlot(QString display, QString devName, QString ssid);
|
||||||
|
//唤起新建有线连接界面
|
||||||
|
void onShowCreateWiredConnectWidgetSlot(QString display, QString devName);
|
||||||
|
//唤起加入其他无线网络界面
|
||||||
|
void onShowAddOtherWlanWidgetSlot(QString display, QString devName);
|
||||||
|
//设置界面显示 单网卡/多网卡
|
||||||
|
void setCentralWidgetPages();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
#endif // MAINWINDOW_H
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#include "firewalldialog.h"
|
#include "firewalldialog.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include "windowmanager/windowmanager.h"
|
||||||
|
#include "kwindowsystem.h"
|
||||||
|
#include "kwindowsystem_export.h"
|
||||||
|
|
||||||
#define THEME_SCHAME "org.ukui.style"
|
#define THEME_SCHAME "org.ukui.style"
|
||||||
#define COLOR_THEME "styleName"
|
#define COLOR_THEME "styleName"
|
||||||
|
@ -30,6 +33,7 @@ FirewallDialog::FirewallDialog(QWidget *parent): KDialog(parent)
|
||||||
initUI();
|
initUI();
|
||||||
this->setWindowIcon(QIcon::fromTheme("kylin-network"));
|
this->setWindowIcon(QIcon::fromTheme("kylin-network"));
|
||||||
this->setFixedSize(480, 204);
|
this->setFixedSize(480, 204);
|
||||||
|
KWindowSystem::setState(this->winId(), NET::SkipTaskbar | NET::SkipPager);
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
// centerToScreen();
|
// centerToScreen();
|
||||||
connect(qApp, &QApplication::paletteChanged, this, &FirewallDialog::onPaletteChanged);
|
connect(qApp, &QApplication::paletteChanged, this, &FirewallDialog::onPaletteChanged);
|
||||||
|
|
|
@ -996,34 +996,29 @@ void LanPage::onConnectionStateChange(QString uuid,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LanPage::getWiredList(QMap<QString, QVector<QStringList> > &map)
|
void LanPage::getWiredList(QString devName, QList<QStringList> &list)
|
||||||
{
|
{
|
||||||
QStringList devlist;
|
QStringList devlist;
|
||||||
m_deviceResource->getNetworkDeviceList(NetworkManager::Device::Type::Ethernet, devlist);
|
m_deviceResource->getNetworkDeviceList(NetworkManager::Device::Type::Ethernet, devlist);
|
||||||
if (devlist.isEmpty()) {
|
if (!devlist.contains(devName)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_FOREACH (auto deviceName, devlist) {
|
|
||||||
QList<KyConnectItem *> activedList;
|
QList<KyConnectItem *> activedList;
|
||||||
QList<KyConnectItem *> deactivedList;
|
QList<KyConnectItem *> deactivedList;
|
||||||
QVector<QStringList> vector;
|
m_activeResourse->getActiveConnectionList(devName,NetworkManager::ConnectionSettings::Wired,activedList);
|
||||||
m_activeResourse->getActiveConnectionList(deviceName,NetworkManager::ConnectionSettings::Wired,activedList);
|
|
||||||
if (!activedList.isEmpty()) {
|
if (!activedList.isEmpty()) {
|
||||||
vector.append(QStringList() << activedList.at(0)->m_connectName << activedList.at(0)->m_connectUuid << activedList.at(0)->m_connectPath);
|
list.append(QStringList() << activedList.at(0)->m_connectName << activedList.at(0)->m_connectUuid << activedList.at(0)->m_connectPath);
|
||||||
} else {
|
} else {
|
||||||
vector.append(QStringList()<<("--"));
|
list.append(QStringList()<<("--"));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_connectResourse->getConnectionList(deviceName, NetworkManager::ConnectionSettings::Wired, deactivedList); //未激活列表的显示
|
m_connectResourse->getConnectionList(devName, NetworkManager::ConnectionSettings::Wired, deactivedList); //未激活列表的显示
|
||||||
if (!deactivedList.isEmpty()) {
|
if (!deactivedList.isEmpty()) {
|
||||||
for (int i = 0; i < deactivedList.size(); i++) {
|
for (int i = 0; i < deactivedList.size(); i++) {
|
||||||
vector.append(QStringList()<<deactivedList.at(i)->m_connectName<<deactivedList.at(i)->m_connectUuid << deactivedList.at(i)->m_connectPath);
|
list.append(QStringList()<<deactivedList.at(i)->m_connectName<<deactivedList.at(i)->m_connectUuid << deactivedList.at(i)->m_connectPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.insert(deviceName, vector);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LanPage::sendLanUpdateSignal(KyConnectItem *p_connectItem)
|
void LanPage::sendLanUpdateSignal(KyConnectItem *p_connectItem)
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
~LanPage();
|
~LanPage();
|
||||||
|
|
||||||
//for dbus
|
//for dbus
|
||||||
void getWiredList(QMap<QString, QVector<QStringList> > &map);
|
void getWiredList(QString devName, QList<QStringList> &list);
|
||||||
void activateWired(const QString& devName, const QString& connUuid);
|
void activateWired(const QString& devName, const QString& connUuid);
|
||||||
void deactivateWired(const QString& devName, const QString& connUuid);
|
void deactivateWired(const QString& devName, const QString& connUuid);
|
||||||
void showDetailPage(QString devName, QString uuid);
|
void showDetailPage(QString devName, QString uuid);
|
||||||
|
@ -53,6 +53,10 @@ public:
|
||||||
bool lanIsConnected();
|
bool lanIsConnected();
|
||||||
void getWiredDeviceConnectState(QMap<QString, QString> &map);
|
void getWiredDeviceConnectState(QMap<QString, QString> &map);
|
||||||
|
|
||||||
|
bool isWiredDeviceUsable() {
|
||||||
|
return !m_devList.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool eventFilter(QObject *watched, QEvent *event);
|
bool eventFilter(QObject *watched, QEvent *event);
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,7 @@ WlanPage::WlanPage(QWidget *parent) : TabPage(parent)
|
||||||
connect(m_wirelessConnectOpreation, &KyWirelessConnectOperation::wifiEnabledChanged, this, &WlanPage::onWifiEnabledChanged);
|
connect(m_wirelessConnectOpreation, &KyWirelessConnectOperation::wifiEnabledChanged, this, &WlanPage::onWifiEnabledChanged);
|
||||||
|
|
||||||
connect(m_connectResource, &KyConnectResourse::connectivityChanged, this, &WlanPage::connectivityChanged);
|
connect(m_connectResource, &KyConnectResourse::connectivityChanged, this, &WlanPage::connectivityChanged);
|
||||||
|
connect(m_connectResource, &KyConnectResourse::connectivityCheckSpareUriChanged, this, &WlanPage::connectivityCheckSpareUriChanged);
|
||||||
connect(m_netSwitch, &KSwitchButton::clicked, this, [=](bool checked) {
|
connect(m_netSwitch, &KSwitchButton::clicked, this, [=](bool checked) {
|
||||||
//解决 switchBtn不支持点击的情况下,点击按钮,有无线网卡后不自动开启的问题
|
//解决 switchBtn不支持点击的情况下,点击按钮,有无线网卡后不自动开启的问题
|
||||||
if (getSwitchBtnEnable()) {
|
if (getSwitchBtnEnable()) {
|
||||||
|
@ -295,9 +296,8 @@ void WlanPage::initDeviceCombox()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
m_deviceFrame->hide();
|
m_deviceFrame->hide();
|
||||||
//解决因m_currentDevice被置空,安全中心网络显示BUG
|
m_currentDevice = "";
|
||||||
// m_currentDevice = "";
|
setDefaultDevice(WIRELESS, m_currentDevice);
|
||||||
// setDefaultDevice(WIRELESS, m_currentDevice);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(m_deviceComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_deviceComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||||
|
@ -781,7 +781,6 @@ void WlanPage::deleteDeviceFromCombox(QString deviceName)
|
||||||
disconnect(m_deviceComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
disconnect(m_deviceComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||||
this, &WlanPage::onDeviceComboxIndexChanged);
|
this, &WlanPage::onDeviceComboxIndexChanged);
|
||||||
|
|
||||||
if (getSwitchBtnState()) {
|
|
||||||
if (0 == m_devList.count()) {
|
if (0 == m_devList.count()) {
|
||||||
m_deviceFrame->hide();
|
m_deviceFrame->hide();
|
||||||
//m_tipsLabel->show();
|
//m_tipsLabel->show();
|
||||||
|
@ -801,7 +800,6 @@ void WlanPage::deleteDeviceFromCombox(QString deviceName)
|
||||||
setDefaultDevice(WIRELESS, m_currentDevice);
|
setDefaultDevice(WIRELESS, m_currentDevice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
connect(m_deviceComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_deviceComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||||
this, &WlanPage::onDeviceComboxIndexChanged);
|
this, &WlanPage::onDeviceComboxIndexChanged);
|
||||||
|
@ -1359,38 +1357,33 @@ void WlanPage::onRefreshIconTimer()
|
||||||
}
|
}
|
||||||
|
|
||||||
//for dbus
|
//for dbus
|
||||||
void WlanPage::getWirelessList(QMap<QString, QVector<QStringList> > &map)
|
void WlanPage::getWirelessList(QString devName, QList<QStringList> &list)
|
||||||
{
|
{
|
||||||
QMap<QString,QStringList> actMap;
|
KyWirelessNetItem data;
|
||||||
m_wirelessNetResource->getWirelessActiveConnection(NetworkManager::ActiveConnection::State::Activated, actMap);
|
|
||||||
|
|
||||||
QMap<QString, QList<KyWirelessNetItem> > wlanMap;
|
QList<KyWirelessNetItem> wlanList;
|
||||||
if (!m_wirelessNetResource->getAllDeviceWifiNetwork(wlanMap)) {
|
if (!m_wirelessNetResource->getDeviceWifiNetwork(devName, wlanList)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QMap<QString, QList<KyWirelessNetItem> >::iterator iter = wlanMap.begin();
|
|
||||||
while (iter != wlanMap.end()) {
|
|
||||||
QVector<QStringList> vector;
|
|
||||||
QString activeSsid ;
|
QString activeSsid ;
|
||||||
//先是已连接
|
//先是已连接
|
||||||
if (actMap.contains(iter.key())) {
|
if (m_wirelessNetResource->getActiveWirelessNetItem(devName, data)) {
|
||||||
qDebug() << "find " <<iter.key();
|
qDebug() << "find " << devName;
|
||||||
KyWirelessNetItem data;
|
|
||||||
QString ssid ="";
|
QString ssid ="";
|
||||||
m_wirelessNetResource->getSsidByUuid(actMap[iter.key()].at(0), ssid);
|
m_wirelessNetResource->getSsidByUuid(data.m_connectUuid, ssid);
|
||||||
if (m_wirelessNetResource->getWifiNetwork(iter.key(), ssid, data)) {
|
if (m_wirelessNetResource->getWifiNetwork(devName, ssid, data)) {
|
||||||
int category = 0;
|
int category = 0;
|
||||||
int signalStrength;
|
int signalStrength;
|
||||||
QString uni,secuType;
|
QString uni,secuType;
|
||||||
|
|
||||||
if (m_netDeviceResource->getActiveConnectionInfo(iter.key(), signalStrength, uni, secuType)) {
|
if (m_netDeviceResource->getActiveConnectionInfo(devName, signalStrength, uni, secuType)) {
|
||||||
category = data.getCategory(uni);
|
category = data.getCategory(uni);
|
||||||
}
|
}
|
||||||
if (!m_showWifi6Plus && category == 2) {
|
if (!m_showWifi6Plus && category == 2) {
|
||||||
category = 1;
|
category = 1;
|
||||||
}
|
}
|
||||||
vector.append(QStringList() << data.m_NetSsid
|
list.append(QStringList() << data.m_NetSsid
|
||||||
<< QString::number(signalStrength)
|
<< QString::number(signalStrength)
|
||||||
<< secuType
|
<< secuType
|
||||||
<< data.m_connectUuid
|
<< data.m_connectUuid
|
||||||
|
@ -1398,13 +1391,13 @@ void WlanPage::getWirelessList(QMap<QString, QVector<QStringList> > &map)
|
||||||
<< QString::number(category));
|
<< QString::number(category));
|
||||||
activeSsid = data.m_NetSsid;
|
activeSsid = data.m_NetSsid;
|
||||||
} else {
|
} else {
|
||||||
vector.append(QStringList("--"));
|
list.append(QStringList("--"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
vector.append(QStringList("--"));
|
list.append(QStringList("--"));
|
||||||
}
|
}
|
||||||
//未连接
|
//未连接
|
||||||
Q_FOREACH (auto itemData, iter.value()) {
|
Q_FOREACH (auto itemData, wlanList) {
|
||||||
if (itemData.m_NetSsid == activeSsid) {
|
if (itemData.m_NetSsid == activeSsid) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1413,18 +1406,12 @@ void WlanPage::getWirelessList(QMap<QString, QVector<QStringList> > &map)
|
||||||
if (!m_showWifi6Plus && category == 2) {
|
if (!m_showWifi6Plus && category == 2) {
|
||||||
category = 1;
|
category = 1;
|
||||||
}
|
}
|
||||||
vector.append(QStringList()<<itemData.m_NetSsid
|
list.append(QStringList()<<itemData.m_NetSsid
|
||||||
<< QString::number(itemData.m_signalStrength)
|
<< QString::number(itemData.m_signalStrength)
|
||||||
<< itemData.m_secuType
|
<< itemData.m_secuType
|
||||||
<< (m_connectResource->isApConnection(itemData.m_connectUuid) ? IsApConnection : NotApConnection)
|
<< (m_connectResource->isApConnection(itemData.m_connectUuid) ? IsApConnection : NotApConnection)
|
||||||
<< QString::number(category));
|
<< QString::number(category));
|
||||||
}
|
}
|
||||||
|
|
||||||
map.insert(iter.key(), vector);
|
|
||||||
iter++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//for dbus
|
//for dbus
|
||||||
|
@ -1526,7 +1513,7 @@ void WlanPage::activateWirelessConnection(const QString& devName, const QString&
|
||||||
m_inactivatedNetListWidget->scrollToItem(p_listWidgetItem, QAbstractItemView::EnsureVisible);
|
m_inactivatedNetListWidget->scrollToItem(p_listWidgetItem, QAbstractItemView::EnsureVisible);
|
||||||
|
|
||||||
|
|
||||||
QMouseEvent *event = new QMouseEvent(QEvent::MouseButtonPress, QPoint(0,0), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
|
QMouseEvent *event = new QMouseEvent(QEvent::MouseButtonRelease, QPoint(0,0), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
|
||||||
QApplication::postEvent(p_wlanItem, event);
|
QApplication::postEvent(p_wlanItem, event);
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "[WlanPage]activateWirelessConnection no such " << ssid << "in" << devName;
|
qDebug() << "[WlanPage]activateWirelessConnection no such " << ssid << "in" << devName;
|
||||||
|
|
|
@ -52,7 +52,7 @@ public:
|
||||||
~WlanPage() = default;
|
~WlanPage() = default;
|
||||||
|
|
||||||
//for dbus
|
//for dbus
|
||||||
void getWirelessList(QMap<QString, QVector<QStringList> > &map);
|
void getWirelessList(QString devName, QList<QStringList> &list);
|
||||||
//开启热点
|
//开启热点
|
||||||
void activeWirelessAp(const QString apName, const QString apPassword, const QString wirelessBand, const QString apDevice);
|
void activeWirelessAp(const QString apName, const QString apPassword, const QString wirelessBand, const QString apDevice);
|
||||||
//断开热点
|
//断开热点
|
||||||
|
@ -88,6 +88,10 @@ public:
|
||||||
return m_currentDevice;
|
return m_currentDevice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isWirelessDeviceUsable() {
|
||||||
|
return !m_devList.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void oneItemExpanded(const QString &ssid);
|
void oneItemExpanded(const QString &ssid);
|
||||||
void wlanAdd(QString devName, QStringList info);
|
void wlanAdd(QString devName, QStringList info);
|
||||||
|
@ -104,6 +108,7 @@ Q_SIGNALS:
|
||||||
void showMainWindow(int type);
|
void showMainWindow(int type);
|
||||||
|
|
||||||
void connectivityChanged(NetworkManager::Connectivity connectivity);
|
void connectivityChanged(NetworkManager::Connectivity connectivity);
|
||||||
|
void connectivityCheckSpareUriChanged();
|
||||||
|
|
||||||
void wirelessSwitchBtnChanged(bool state);
|
void wirelessSwitchBtnChanged(bool state);
|
||||||
|
|
||||||
|
|
39
src/main.cpp
39
src/main.cpp
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
//#include "mainwindow.h"
|
//#include "mainwindow.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "dbusadaptor.h"
|
#include "dbus.h"
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
#include "qt-single-application.h"
|
#include "qt-single-application.h"
|
||||||
|
@ -130,23 +130,30 @@ int main(int argc, char *argv[])
|
||||||
parser.addOptions({swOption,snOption});
|
parser.addOptions({swOption,snOption});
|
||||||
parser.process(a);
|
parser.process(a);
|
||||||
|
|
||||||
|
QString display;
|
||||||
|
QString sessionType;
|
||||||
|
if(QString(getenv("XDG_SESSION_TYPE")) == "wayland") {
|
||||||
|
sessionType = "wayland";
|
||||||
|
display = getenv("WAYLAND_DISPLAY");
|
||||||
|
} else {
|
||||||
|
sessionType = "x11";
|
||||||
|
display = getenv("DISPLAY");
|
||||||
|
}
|
||||||
|
qDebug() << sessionType << display;
|
||||||
|
qApp->setProperty("sessionType", sessionType);
|
||||||
|
|
||||||
QDBusInterface interface("com.kylin.network",
|
QDBusInterface interface("com.kylin.network",
|
||||||
"/com/kylin/network",
|
"/com/kylin/network",
|
||||||
"com.kylin.network",
|
"com.kylin.network",
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
|
|
||||||
|
if (a.isRunning()) {
|
||||||
if(interface.isValid()) {
|
if(interface.isValid()) {
|
||||||
if (parser.isSet(swOption))
|
if (parser.isSet(swOption)) {
|
||||||
{
|
|
||||||
interface.call(QStringLiteral("showKylinNM"), 1);
|
interface.call(QStringLiteral("showKylinNM"), 1);
|
||||||
} else if (parser.isSet(snOption)){
|
} else if (parser.isSet(snOption)) {
|
||||||
interface.call(QStringLiteral("showKylinNM"), 0);
|
interface.call(QStringLiteral("showKylinNM"), 0);
|
||||||
} else {
|
} else {
|
||||||
const QString serviceName = "com.kylin.network";
|
|
||||||
QDBusConnectionInterface *interface1 = QDBusConnection::sessionBus().interface();
|
|
||||||
QDBusReply<uint> pid = interface1->servicePid(serviceName);
|
|
||||||
qDebug() << "current display " << getenv("DISPLAY") << QApplication::applicationPid()
|
|
||||||
<< "exist kylin-nm display" << displayFromPid(pid.value());
|
|
||||||
if (getenv("DISPLAY") == displayFromPid(pid.value())) {
|
|
||||||
interface.call(QStringLiteral("showKylinNM"), 2);
|
interface.call(QStringLiteral("showKylinNM"), 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -195,7 +202,7 @@ int main(int argc, char *argv[])
|
||||||
::usleep(1000);
|
::usleep(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow w;
|
MainWindow w(display, nullptr);
|
||||||
a.setActivationWindow(&w);
|
a.setActivationWindow(&w);
|
||||||
w.setProperty("useStyleWindowManager", false); //禁用拖动
|
w.setProperty("useStyleWindowManager", false); //禁用拖动
|
||||||
a.setWindowIcon(QIcon::fromTheme("kylin-network"));
|
a.setWindowIcon(QIcon::fromTheme("kylin-network"));
|
||||||
|
@ -207,13 +214,11 @@ int main(int argc, char *argv[])
|
||||||
// window_hints.decorations = MWM_DECOR_BORDER;
|
// window_hints.decorations = MWM_DECOR_BORDER;
|
||||||
// XAtomHelper::getInstance()->setWindowMotifHint(w.winId(), window_hints);
|
// XAtomHelper::getInstance()->setWindowMotifHint(w.winId(), window_hints);
|
||||||
|
|
||||||
DbusAdaptor adaptor(&w);
|
// w.setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint /*| Qt::X11BypassWindowManagerHint*/);
|
||||||
Q_UNUSED(adaptor);
|
|
||||||
|
|
||||||
auto connection = QDBusConnection::sessionBus();
|
|
||||||
if (!connection.registerService("com.kylin.network") || !connection.registerObject("/com/kylin/network", &w)) {
|
DbusAdaptor adaptor(display, &w);
|
||||||
qCritical() << "QDbus register service failed reason:" << connection.lastError();
|
Q_UNUSED(adaptor);
|
||||||
}
|
|
||||||
|
|
||||||
return a.exec();
|
return a.exec();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,54 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ConnectivityPage</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="25"/>
|
||||||
|
<source>Network connectivity detection</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="55"/>
|
||||||
|
<source>If access to the Internet is restricted, please switch the network IP connectivity detection method and try again.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="61"/>
|
||||||
|
<source>Public network (default)</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="63"/>
|
||||||
|
<source>Local area network (intranet)</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="74"/>
|
||||||
|
<source>Confirm</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="161"/>
|
||||||
|
<source>The network is connected and can access the Internet normally.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="166"/>
|
||||||
|
<source>The network is connected and access to the Internet is restricted.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="177"/>
|
||||||
|
<source>Please enter the local area network (intranet) detection address</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="196"/>
|
||||||
|
<source>Format error</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>CreatNetPage</name>
|
<name>CreatNetPage</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -260,22 +308,22 @@
|
||||||
<context>
|
<context>
|
||||||
<name>FirewallDialog</name>
|
<name>FirewallDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="85"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="89"/>
|
||||||
<source>Allow other devices on this network to discover this computer?</source>
|
<source>Allow other devices on this network to discover this computer?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="87"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="91"/>
|
||||||
<source>It is not recommended to enable this feature on public networks</source>
|
<source>It is not recommended to enable this feature on public networks</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="89"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="93"/>
|
||||||
<source>Not allowed (recommended)</source>
|
<source>Not allowed (recommended)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="90"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="94"/>
|
||||||
<source>Allowed</source>
|
<source>Allowed</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -313,23 +361,23 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="265"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="264"/>
|
||||||
<source>Invalid address</source>
|
<source>Invalid address</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="274"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="273"/>
|
||||||
<source>Invalid subnet mask</source>
|
<source>Invalid subnet mask</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="298"/>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="299"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="299"/>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="300"/>
|
|
||||||
<source>Required</source>
|
<source>Required</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="368"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="367"/>
|
||||||
<source>Address conflict</source>
|
<source>Address conflict</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -488,23 +536,23 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1240"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1244"/>
|
||||||
<source>Wired Device not carried</source>
|
<source>Wired Device not carried</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1336"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1340"/>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1344"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1348"/>
|
||||||
<source>Connected: </source>
|
<source>Connected: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1336"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1340"/>
|
||||||
<source>(Limited)</source>
|
<source>(Limited)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1338"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1342"/>
|
||||||
<source>Not Connected</source>
|
<source>Not Connected</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -525,47 +573,47 @@
|
||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="216"/>
|
<location filename="../frontend/mainwindow.cpp" line="229"/>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="247"/>
|
<location filename="../frontend/mainwindow.cpp" line="260"/>
|
||||||
<source>kylin-nm</source>
|
<source>kylin-nm</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="340"/>
|
<location filename="../frontend/mainwindow.cpp" line="353"/>
|
||||||
<source>LAN</source>
|
<source>LAN</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="342"/>
|
<location filename="../frontend/mainwindow.cpp" line="355"/>
|
||||||
<source>WLAN</source>
|
<source>WLAN</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="371"/>
|
<location filename="../frontend/mainwindow.cpp" line="384"/>
|
||||||
<source>Settings</source>
|
<source>Settings</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="612"/>
|
<location filename="../frontend/mainwindow.cpp" line="385"/>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="841"/>
|
<source>Network Connectivity Detection</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/mainwindow.cpp" line="662"/>
|
||||||
|
<location filename="../frontend/mainwindow.cpp" line="915"/>
|
||||||
<source>Network tool</source>
|
<source>Network tool</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="626"/>
|
<location filename="../frontend/mainwindow.cpp" line="676"/>
|
||||||
<source>Network Card</source>
|
<source>Network Card</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="824"/>
|
<location filename="../frontend/mainwindow.cpp" line="898"/>
|
||||||
<source>Not connected to the network</source>
|
<source>Not connected to the network</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="../frontend/mainwindow.cpp" line="370"/>
|
|
||||||
<source>Show MainWindow</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MultipleDnsWidget</name>
|
<name>MultipleDnsWidget</name>
|
||||||
|
@ -967,35 +1015,35 @@
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="176"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="176"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="202"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="202"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="636"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="648"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="655"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="667"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="665"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="677"/>
|
||||||
<source>Disconnect</source>
|
<source>Disconnect</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="178"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="178"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="206"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="206"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="303"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="315"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="646"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="658"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="663"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="675"/>
|
||||||
<source>Connect</source>
|
<source>Connect</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="185"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="185"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="675"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="687"/>
|
||||||
<source>Property</source>
|
<source>Property</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="186"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="186"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="670"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="682"/>
|
||||||
<source>Forget</source>
|
<source>Forget</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="324"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="336"/>
|
||||||
<source>Auto Connect</source>
|
<source>Auto Connect</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1011,42 +1059,42 @@
|
||||||
<context>
|
<context>
|
||||||
<name>WlanPage</name>
|
<name>WlanPage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="131"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="132"/>
|
||||||
<source>WLAN</source>
|
<source>WLAN</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="133"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="134"/>
|
||||||
<source>Activated WLAN</source>
|
<source>Activated WLAN</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="144"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="145"/>
|
||||||
<source>Other WLAN</source>
|
<source>Other WLAN</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1754"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1741"/>
|
||||||
<source>Connected: </source>
|
<source>Connected: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1756"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1743"/>
|
||||||
<source>Not Connected</source>
|
<source>Not Connected</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="107"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="108"/>
|
||||||
<source>No wireless network card detected</source>
|
<source>No wireless network card detected</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="974"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="972"/>
|
||||||
<source>WLAN Connected Successfully</source>
|
<source>WLAN Connected Successfully</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="970"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="968"/>
|
||||||
<source>WLAN Disconnected Successfully</source>
|
<source>WLAN Disconnected Successfully</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -55,6 +55,54 @@
|
||||||
<translation>མེ་འགོག་གྱང་རྩིག་དང་བདེ་འཇགས་བཀོད་སྒྲིག་བྱ་དགོས།</translation>
|
<translation>མེ་འགོག་གྱང་རྩིག་དང་བདེ་འཇགས་བཀོད་སྒྲིག་བྱ་དགོས།</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ConnectivityPage</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="25"/>
|
||||||
|
<source>Network connectivity detection</source>
|
||||||
|
<translation>དྲ་རྒྱའི་སྦྲེལ་མཐུད་རང་བཞིན་གྱི་ཞིབ་དཔྱད་ཚད་ལེན།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="55"/>
|
||||||
|
<source>If access to the Internet is restricted, please switch the network IP connectivity detection method and try again.</source>
|
||||||
|
<translation>གལ་ཏེ་དྲ་སྦྲེལ་ལ་འཚམས་འདྲི་བྱེད་པར་ཚོད་འཛིན་ཐེབས་པ་དང་། དྲ་རྒྱའི་IPལ་ཞིབ་དཔྱད་ཚད་ལེན་བྱེད་ཐབས་བརྗེས་ནས་ཚོད་ལྟ་བྱེད་དགོས།.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="61"/>
|
||||||
|
<source>Public network (default)</source>
|
||||||
|
<translation>སྤྱི་པའི་དྲ་རྒྱ། (ཁས་མ་བླངས་པ། )</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="63"/>
|
||||||
|
<source>Local area network (intranet)</source>
|
||||||
|
<translation>ཅུས་ཁོངས་དྲ་བ། (ནང་དྲ། )</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="74"/>
|
||||||
|
<source>Confirm</source>
|
||||||
|
<translation>གཏན་འཁེལ་བྱ།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="161"/>
|
||||||
|
<source>The network is connected and can access the Internet normally.</source>
|
||||||
|
<translation>དྲ་རྒྱ་སྦྲེལ་མཐུད་བྱས་ཟིན་པས་རྒྱུན་ལྡན་གྱི་དྲ་སྦྲེལ་ལ་འཚམས་འདྲི་བྱས་ཆོག.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="166"/>
|
||||||
|
<source>The network is connected and access to the Internet is restricted.</source>
|
||||||
|
<translation>དྲ་རྒྱ་སྦྲེལ་མཐུད་བྱས་ཟིན་པས་དྲ་སྦྲེལ་ལ་འཚམས་འདྲི་བྱས་པ་རེད།.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="177"/>
|
||||||
|
<source>Please enter the local area network (intranet) detection address</source>
|
||||||
|
<translation>ཅུས་ཁོངས་ཀྱི་དྲ་རྒྱའི་(ནང་དྲ་)ཞིབ་དཔྱད་ཚད་ལེན་ས་གནས་ནང་འཇུག་བྱེད་རོགས།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="196"/>
|
||||||
|
<source>Format error</source>
|
||||||
|
<translation>རྣམ་གཞག་གི་ནོར་འཁྲུལ།</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>CopyButton</name>
|
<name>CopyButton</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -500,7 +548,7 @@
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/dnssettingwidget.cpp" line="70"/>
|
<location filename="../frontend/netdetails/dnssettingwidget.cpp" line="70"/>
|
||||||
<source>Close</source>
|
<source>Close</source>
|
||||||
<translation type="unfinished">སྒོ་རྒྱག་པ།</translation>
|
<translation>སྒོ་རྒྱག་པ།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/dnssettingwidget.cpp" line="73"/>
|
<location filename="../frontend/netdetails/dnssettingwidget.cpp" line="73"/>
|
||||||
|
@ -568,22 +616,22 @@
|
||||||
<translation type="vanished">དེ་ལྟར་མ་བྱས་</translation>
|
<translation type="vanished">དེ་ལྟར་མ་བྱས་</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="85"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="89"/>
|
||||||
<source>Allow other devices on this network to discover this computer?</source>
|
<source>Allow other devices on this network to discover this computer?</source>
|
||||||
<translation>དྲ་རྒྱའི་སྟེང་གི་སྒྲིག་ཆས་གཞན་པས་གློག་ཀླད་འདི་རྙེད་དུ་འཇུག་གམ།?</translation>
|
<translation>དྲ་རྒྱའི་སྟེང་གི་སྒྲིག་ཆས་གཞན་པས་གློག་ཀླད་འདི་རྙེད་དུ་འཇུག་གམ།?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="87"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="91"/>
|
||||||
<source>It is not recommended to enable this feature on public networks</source>
|
<source>It is not recommended to enable this feature on public networks</source>
|
||||||
<translation>བསམ་འཆར་མེད་།སྤྱི་པའི་དྲ་རྒྱའི་སྟེང་ནས་ནུས་པ་འདི་མགོ་བརྩམས་།</translation>
|
<translation>བསམ་འཆར་མེད་།སྤྱི་པའི་དྲ་རྒྱའི་སྟེང་ནས་ནུས་པ་འདི་མགོ་བརྩམས་།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="89"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="93"/>
|
||||||
<source>Not allowed (recommended)</source>
|
<source>Not allowed (recommended)</source>
|
||||||
<translation>མི་ཆོག་པ་(འོས་སྦྱོར།)</translation>
|
<translation>མི་ཆོག་པ་(འོས་སྦྱོར།)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="90"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="94"/>
|
||||||
<source>Allowed</source>
|
<source>Allowed</source>
|
||||||
<translation>ཆོག་པ་</translation>
|
<translation>ཆོག་པ་</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -629,23 +677,23 @@
|
||||||
<translation>ལག་དེབ།</translation>
|
<translation>ལག་དེབ།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="265"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="264"/>
|
||||||
<source>Invalid address</source>
|
<source>Invalid address</source>
|
||||||
<translation>རྩིས་འགྲོ་མེད་པའི་ས་གནས།</translation>
|
<translation>རྩིས་འགྲོ་མེད་པའི་ས་གནས།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="274"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="273"/>
|
||||||
<source>Invalid subnet mask</source>
|
<source>Invalid subnet mask</source>
|
||||||
<translation>རྩིས་འགྲོ་མེད་པའི་དྲ་བ་འགེབས་སྲུང་བྱེད་པ།</translation>
|
<translation>རྩིས་འགྲོ་མེད་པའི་དྲ་བ་འགེབས་སྲུང་བྱེད་པ།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="298"/>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="299"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="299"/>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="300"/>
|
|
||||||
<source>Required</source>
|
<source>Required</source>
|
||||||
<translation>ངེས་པར་དུ་སྐོང་དགོས།</translation>
|
<translation>ངེས་པར་དུ་སྐོང་དགོས།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="368"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="367"/>
|
||||||
<source>Address conflict</source>
|
<source>Address conflict</source>
|
||||||
<translation>ཤག་གནས་གདོང་གཏུག་</translation>
|
<translation>ཤག་གནས་གདོང་གཏུག་</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -824,7 +872,7 @@
|
||||||
<translation type="vanished">སྐུད་ཡོད་དྲ་བ་ཆད་སོང་།</translation>
|
<translation type="vanished">སྐུད་ཡོད་དྲ་བ་ཆད་སོང་།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1240"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1244"/>
|
||||||
<source>Wired Device not carried</source>
|
<source>Wired Device not carried</source>
|
||||||
<translation>སྐུད་ཡོད་སྒྲིག་ཆས་འཁྱེར་མེད་པ།</translation>
|
<translation>སྐུད་ཡོད་སྒྲིག་ཆས་འཁྱེར་མེད་པ།</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -833,18 +881,18 @@
|
||||||
<translation type="vanished">སྐུད་ཡོད་དྲ་བ་སྦྲེལ་ཡོད།</translation>
|
<translation type="vanished">སྐུད་ཡོད་དྲ་བ་སྦྲེལ་ཡོད།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1336"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1340"/>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1344"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1348"/>
|
||||||
<source>Connected: </source>
|
<source>Connected: </source>
|
||||||
<translation>འབྲེལ་མཐུད་བྱུང་ཡོད།: </translation>
|
<translation>འབྲེལ་མཐུད་བྱུང་ཡོད།: </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1338"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1342"/>
|
||||||
<source>Not Connected</source>
|
<source>Not Connected</source>
|
||||||
<translation>འབྲེལ་མཐུད་མ་བྱས་པ།</translation>
|
<translation>འབྲེལ་མཐུད་མ་བྱས་པ།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1336"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1340"/>
|
||||||
<source>(Limited)</source>
|
<source>(Limited)</source>
|
||||||
<translation>(དྲ་བར་ཚོད་འཛིན་ཐེབས་པ་རེད།)</translation>
|
<translation>(དྲ་བར་ཚོད་འཛིན་ཐེབས་པ་རེད།)</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -865,47 +913,51 @@
|
||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="216"/>
|
<location filename="../frontend/mainwindow.cpp" line="229"/>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="247"/>
|
<location filename="../frontend/mainwindow.cpp" line="260"/>
|
||||||
<source>kylin-nm</source>
|
<source>kylin-nm</source>
|
||||||
<translation>དྲ་རྒྱའི་ཡོ་བྱད།</translation>
|
<translation>དྲ་རྒྱའི་ཡོ་བྱད།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="340"/>
|
<location filename="../frontend/mainwindow.cpp" line="353"/>
|
||||||
<source>LAN</source>
|
<source>LAN</source>
|
||||||
<translatorcomment>有线网络</translatorcomment>
|
<translatorcomment>有线网络</translatorcomment>
|
||||||
<translation>སྐུད་ཡོད་དྲ་བ།</translation>
|
<translation>སྐུད་ཡོད་དྲ་བ།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="342"/>
|
<location filename="../frontend/mainwindow.cpp" line="355"/>
|
||||||
<source>WLAN</source>
|
<source>WLAN</source>
|
||||||
<translatorcomment>无线局域网</translatorcomment>
|
<translatorcomment>无线局域网</translatorcomment>
|
||||||
<translation>སྐུད་མེད་ཅུས་ཁོངས་ཀྱི་དྲ་བ།</translation>
|
<translation>སྐུད་མེད་ཅུས་ཁོངས་ཀྱི་དྲ་བ།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="370"/>
|
|
||||||
<source>Show MainWindow</source>
|
<source>Show MainWindow</source>
|
||||||
<translation>རླུང་གཙོ་བོ་མངོན་པར་བྱས་ཡོད།</translation>
|
<translation type="vanished">རླུང་གཙོ་བོ་མངོན་པར་བྱས་ཡོད།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="371"/>
|
<location filename="../frontend/mainwindow.cpp" line="384"/>
|
||||||
<source>Settings</source>
|
<source>Settings</source>
|
||||||
<translatorcomment>设置网络项</translatorcomment>
|
<translatorcomment>设置网络项</translatorcomment>
|
||||||
<translation>སྒྲིག་བཀོད།</translation>
|
<translation>སྒྲིག་བཀོད།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="612"/>
|
<location filename="../frontend/mainwindow.cpp" line="385"/>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="841"/>
|
<source>Network Connectivity Detection</source>
|
||||||
|
<translation>དྲ་རྒྱའི་སྦྲེལ་མཐུད་རང་བཞིན་གྱི་ཞིབ་དཔྱད་ཚད་ལེན།</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/mainwindow.cpp" line="662"/>
|
||||||
|
<location filename="../frontend/mainwindow.cpp" line="915"/>
|
||||||
<source>Network tool</source>
|
<source>Network tool</source>
|
||||||
<translation>དྲ་རྒྱའི་ལག་ཆ་</translation>
|
<translation>དྲ་རྒྱའི་ལག་ཆ་</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="626"/>
|
<location filename="../frontend/mainwindow.cpp" line="676"/>
|
||||||
<source>Network Card</source>
|
<source>Network Card</source>
|
||||||
<translation>དྲ་བྱང་།</translation>
|
<translation>དྲ་བྱང་།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="824"/>
|
<location filename="../frontend/mainwindow.cpp" line="898"/>
|
||||||
<source>Not connected to the network</source>
|
<source>Not connected to the network</source>
|
||||||
<translation>དྲ་རྒྱ་དང་སྦྲེལ་མཐུད་མ་བྱས་པ།</translation>
|
<translation>དྲ་རྒྱ་དང་སྦྲེལ་མཐུད་མ་བྱས་པ།</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1459,35 +1511,35 @@
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="176"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="176"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="202"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="202"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="636"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="648"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="655"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="667"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="665"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="677"/>
|
||||||
<source>Disconnect</source>
|
<source>Disconnect</source>
|
||||||
<translation>འབྲེལ་ཐག་ཆད་པ།</translation>
|
<translation>འབྲེལ་ཐག་ཆད་པ།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="178"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="178"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="206"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="206"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="303"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="315"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="646"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="658"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="663"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="675"/>
|
||||||
<source>Connect</source>
|
<source>Connect</source>
|
||||||
<translation>སྦྲེལ་མཐུད་བྱེད་པ</translation>
|
<translation>སྦྲེལ་མཐུད་བྱེད་པ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="186"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="186"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="670"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="682"/>
|
||||||
<source>Forget</source>
|
<source>Forget</source>
|
||||||
<translation>བརྗེད་པ།</translation>
|
<translation>བརྗེད་པ།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="185"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="185"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="675"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="687"/>
|
||||||
<source>Property</source>
|
<source>Property</source>
|
||||||
<translation>ངོ་བོ།</translation>
|
<translation>ངོ་བོ།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="324"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="336"/>
|
||||||
<source>Auto Connect</source>
|
<source>Auto Connect</source>
|
||||||
<translation>རང་འགུལ་གྱིས་སྦྲེལ་མཐུད་</translation>
|
<translation>རང་འགུལ་གྱིས་སྦྲེལ་མཐུད་</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1507,22 +1559,22 @@
|
||||||
<context>
|
<context>
|
||||||
<name>WlanPage</name>
|
<name>WlanPage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="131"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="132"/>
|
||||||
<source>WLAN</source>
|
<source>WLAN</source>
|
||||||
<translation>སྐུད་མེད་ཅུས་ཁོངས་ཀྱི་དྲ་བ།</translation>
|
<translation>སྐུད་མེད་ཅུས་ཁོངས་ཀྱི་དྲ་བ།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="107"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="108"/>
|
||||||
<source>No wireless network card detected</source>
|
<source>No wireless network card detected</source>
|
||||||
<translation>སྐུད་མེད་དྲ་རྒྱའི་བྱང་བུ་མ་རྙེད་པ།</translation>
|
<translation>སྐུད་མེད་དྲ་རྒྱའི་བྱང་བུ་མ་རྙེད་པ།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="133"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="134"/>
|
||||||
<source>Activated WLAN</source>
|
<source>Activated WLAN</source>
|
||||||
<translation>ངའི་དྲ་རྒྱ།</translation>
|
<translation>ངའི་དྲ་རྒྱ།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="144"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="145"/>
|
||||||
<source>Other WLAN</source>
|
<source>Other WLAN</source>
|
||||||
<translation>དྲ་བ་གཞན་དག</translation>
|
<translation>དྲ་བ་གཞན་དག</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1531,22 +1583,22 @@
|
||||||
<translation type="vanished">更多...</translation>
|
<translation type="vanished">更多...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="974"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="972"/>
|
||||||
<source>WLAN Connected Successfully</source>
|
<source>WLAN Connected Successfully</source>
|
||||||
<translation>སྐུད་མེད་དྲ་བ་སྦྲེལ་ཡོད།</translation>
|
<translation>སྐུད་མེད་དྲ་བ་སྦྲེལ་ཡོད།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="970"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="968"/>
|
||||||
<source>WLAN Disconnected Successfully</source>
|
<source>WLAN Disconnected Successfully</source>
|
||||||
<translation>སྐུད་མེད་དྲ་རྒྱ་ཆད་སོང་།</translation>
|
<translation>སྐུད་མེད་དྲ་རྒྱ་ཆད་སོང་།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1754"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1741"/>
|
||||||
<source>Connected: </source>
|
<source>Connected: </source>
|
||||||
<translation>འབྲེལ་མཐུད་བྱུང་ཡོད།: </translation>
|
<translation>འབྲེལ་མཐུད་བྱུང་ཡོད།: </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1756"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1743"/>
|
||||||
<source>Not Connected</source>
|
<source>Not Connected</source>
|
||||||
<translation>འབྲེལ་མཐུད་མ་བྱས་པ།</translation>
|
<translation>འབྲེལ་མཐུད་མ་བྱས་པ།</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -55,6 +55,54 @@
|
||||||
<translation>ᠭᠠᠯ ᠰᠡᠷᠬᠡᠢᠯᠡᠬᠦ ᠬᠡᠷᠡᠮ ᠪᠤᠯᠤᠨ ᠠᠮᠤᠷ ᠳᠦᠪᠰᠢᠨ ᠤ᠋ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠭᠠ</translation>
|
<translation>ᠭᠠᠯ ᠰᠡᠷᠬᠡᠢᠯᠡᠬᠦ ᠬᠡᠷᠡᠮ ᠪᠤᠯᠤᠨ ᠠᠮᠤᠷ ᠳᠦᠪᠰᠢᠨ ᠤ᠋ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠭᠠ</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ConnectivityPage</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="25"/>
|
||||||
|
<source>Network connectivity detection</source>
|
||||||
|
<translation>ᠰᠦᠯᠵᠢᠶᠡ ᠶᠢ ᠵᠠᠯᠭᠠᠵᠤ ᠪᠠᠶᠢᠴᠠᠭᠠᠨ ᠬᠡᠮᠵᠢᠨᠡ</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="55"/>
|
||||||
|
<source>If access to the Internet is restricted, please switch the network IP connectivity detection method and try again.</source>
|
||||||
|
<translation>ᠬᠡᠷᠪᠡ ᠢᠨᠲ᠋ᠸᠷ ᠰᠦᠯᠵᠢᠶᠠ ᠳᠤ ᠰᠤᠷᠪᠤᠯᠵᠢᠯᠠᠬᠤ ᠳᠤ ᠬᠦᠷᠪᠡᠯ ᠂ ᠰᠦᠯᠵᠢᠶᠠ ᠶᠢᠨ IP ᠶᠢ ᠬᠤᠯᠪᠤᠵᠤ ᠪᠠᠶᠢᠴᠠᠭᠠᠨ ᠬᠡᠮᠵᠢᠭᠦ ᠠᠷᠭᠠ ᠶᠢ ᠰᠤᠯᠢᠵᠤ ᠂ ᠲᠠᠷᠠᠭᠠ ᠨᠢ ᠲᠠᠭᠢᠨ ᠰᠢᠯᠭᠠᠯᠲᠠ ᠬᠢᠨᠡ.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="61"/>
|
||||||
|
<source>Public network (default)</source>
|
||||||
|
<translation>ᠨᠡᠶᠢᠲᠡ ᠶᠢᠨ ᠬᠡᠷᠡᠭᠯᠡᠭᠡᠨ ᠦ ᠰᠦᠯᠵᠢᠶᠡ ( ᠳᠤᠪ ᠳᠤᠭᠤᠢ ᠲᠠᠨᠢᠯᠴᠠᠨᠠ )</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="63"/>
|
||||||
|
<source>Local area network (intranet)</source>
|
||||||
|
<translation>ᠬᠡᠰᠡᠭ ᠬᠡᠪᠴᠢᠶᠡᠨ ᠦ ᠲᠣᠤᠷ ( ᠳᠣᠲᠣᠭᠠᠳᠤ ᠰᠦᠯᠵᠢᠶᠡ )</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="74"/>
|
||||||
|
<source>Confirm</source>
|
||||||
|
<translation>ᠪᠠᠳᠤᠯᠠᠬᠤ</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="161"/>
|
||||||
|
<source>The network is connected and can access the Internet normally.</source>
|
||||||
|
<translation>ᠰᠦᠯᠵᠢᠶᠡ ᠨᠢᠭᠡᠨᠲᠡ ᠬᠣᠯᠪᠣᠭᠳᠠᠵᠤ ᠂ ᠢᠨᠲ᠋ᠧᠷ ᠰᠦᠯᠵᠢᠶᠡ ᠶᠢ ᠬᠡᠪ ᠦᠨ ᠶᠣᠰᠣᠭᠠᠷ ᠰᠤᠷᠪᠤᠯᠵᠢᠯᠠᠵᠤ ᠪᠣᠯᠣᠨᠠ.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="166"/>
|
||||||
|
<source>The network is connected and access to the Internet is restricted.</source>
|
||||||
|
<translation>ᠰᠦᠯᠵᠢᠶᠡ ᠨᠢᠭᠡᠨᠲᠡ ᠬᠣᠯᠪᠣᠭᠳᠠᠵᠤ ᠂ ᠢᠨᠲ᠋ᠧᠷ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠦ ᠠᠶᠢᠯᠴᠢᠯᠠᠯᠲᠠ ᠳᠤ ᠬᠢᠵᠠᠭᠠᠷᠯᠠᠭᠳᠠᠵᠠᠶ.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="177"/>
|
||||||
|
<source>Please enter the local area network (intranet) detection address</source>
|
||||||
|
<translation>ᠬᠡᠰᠡᠭ ᠬᠡᠪᠴᠢᠶᠡᠨ ᠦ ᠲᠣᠤᠷ (ᠳᠣᠲᠣᠭᠠᠳᠤ ᠲᠣᠤᠷ) ᠢ ᠪᠠᠶᠢᠴᠠᠭᠠᠨ ᠬᠡᠮᠵᠢᠬᠦ ᠬᠠᠶᠢᠭ ᠢ ᠣᠷᠣᠭᠤᠯᠵᠤ ᠢᠷᠡᠭᠡᠷᠡᠢ</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="196"/>
|
||||||
|
<source>Format error</source>
|
||||||
|
<translation>ᠬᠡᠯᠪᠡᠷᠢ ᠨᠢ ᠪᠤᠷᠤᠭᠤ</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>CopyButton</name>
|
<name>CopyButton</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -552,22 +600,22 @@
|
||||||
<context>
|
<context>
|
||||||
<name>FirewallDialog</name>
|
<name>FirewallDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="85"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="89"/>
|
||||||
<source>Allow other devices on this network to discover this computer?</source>
|
<source>Allow other devices on this network to discover this computer?</source>
|
||||||
<translation>ᠲᠤᠰ ᠳᠦᠯᠵᠢᠶᠡᠨ ᠳᠡᠭᠡᠷᠡᠬᠢ ᠪᠤᠰᠤᠳ ᠳᠦᠬᠦᠬᠡᠷᠦᠮᠵᠢ ᠡᠨᠡ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷ ᠢ᠋ ᠣᠯᠵᠤ ᠮᠡᠳᠡᠬᠦ ᠵᠢ ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠬᠦ ᠤᠤ?</translation>
|
<translation>ᠲᠤᠰ ᠳᠦᠯᠵᠢᠶᠡᠨ ᠳᠡᠭᠡᠷᠡᠬᠢ ᠪᠤᠰᠤᠳ ᠳᠦᠬᠦᠬᠡᠷᠦᠮᠵᠢ ᠡᠨᠡ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷ ᠢ᠋ ᠣᠯᠵᠤ ᠮᠡᠳᠡᠬᠦ ᠵᠢ ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠬᠦ ᠤᠤ?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="87"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="91"/>
|
||||||
<source>It is not recommended to enable this feature on public networks</source>
|
<source>It is not recommended to enable this feature on public networks</source>
|
||||||
<translation>ᠨᠡᠢᠳᠡ ᠵᠢᠨ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠳᠡᠭᠡᠷᠡ ᠲᠤᠰ ᠴᠢᠳᠠᠪᠬᠢ ᠵᠢ ᠨᠡᠬᠡᠬᠡᠬᠦ ᠥᠬᠡᠢ ᠪᠠᠢᠬᠤ ᠵᠢ ᠰᠠᠨᠠᠭᠤᠯᠵᠤ ᠪᠠᠢᠨᠠ</translation>
|
<translation>ᠨᠡᠢᠳᠡ ᠵᠢᠨ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠳᠡᠭᠡᠷᠡ ᠲᠤᠰ ᠴᠢᠳᠠᠪᠬᠢ ᠵᠢ ᠨᠡᠬᠡᠬᠡᠬᠦ ᠥᠬᠡᠢ ᠪᠠᠢᠬᠤ ᠵᠢ ᠰᠠᠨᠠᠭᠤᠯᠵᠤ ᠪᠠᠢᠨᠠ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="89"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="93"/>
|
||||||
<source>Not allowed (recommended)</source>
|
<source>Not allowed (recommended)</source>
|
||||||
<translation>ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠬᠦ ᠥᠬᠡᠢ ( ᠳᠠᠨᠢᠯᠴᠠᠭᠤᠯᠬᠤ)</translation>
|
<translation>ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠬᠦ ᠥᠬᠡᠢ ( ᠳᠠᠨᠢᠯᠴᠠᠭᠤᠯᠬᠤ)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="90"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="94"/>
|
||||||
<source>Allowed</source>
|
<source>Allowed</source>
|
||||||
<translation>ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠬᠦ</translation>
|
<translation>ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠬᠦ</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -613,23 +661,23 @@
|
||||||
<translation>ᠭᠠᠷᠢᠶᠠᠷ ᠬᠦᠳᠡᠯᠭᠡᠬᠦ᠌</translation>
|
<translation>ᠭᠠᠷᠢᠶᠠᠷ ᠬᠦᠳᠡᠯᠭᠡᠬᠦ᠌</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="265"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="264"/>
|
||||||
<source>Invalid address</source>
|
<source>Invalid address</source>
|
||||||
<translation>ᠬᠦᠴᠦᠨ ᠦᠬᠡᠢ ᠬᠠᠶᠢᠭ</translation>
|
<translation>ᠬᠦᠴᠦᠨ ᠦᠬᠡᠢ ᠬᠠᠶᠢᠭ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="274"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="273"/>
|
||||||
<source>Invalid subnet mask</source>
|
<source>Invalid subnet mask</source>
|
||||||
<translation>ᠬᠦᠴᠦᠨ ᠦᠬᠡᠢ ᠬᠤᠪᠢᠶᠠᠷᠢ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤ᠋ ᠬᠠᠯᠬᠠᠪᠴᠢ</translation>
|
<translation>ᠬᠦᠴᠦᠨ ᠦᠬᠡᠢ ᠬᠤᠪᠢᠶᠠᠷᠢ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤ᠋ ᠬᠠᠯᠬᠠᠪᠴᠢ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="298"/>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="299"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="299"/>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="300"/>
|
|
||||||
<source>Required</source>
|
<source>Required</source>
|
||||||
<translation>ᠡᠷᠬᠡᠪᠰᠢ ᠳᠠᠭᠯᠠᠬᠤ</translation>
|
<translation>ᠡᠷᠬᠡᠪᠰᠢ ᠳᠠᠭᠯᠠᠬᠤ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="368"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="367"/>
|
||||||
<source>Address conflict</source>
|
<source>Address conflict</source>
|
||||||
<translation>ᠬᠠᠶᠢᠭ ᠤ᠋ᠨ ᠮᠦᠷᠬᠦᠯᠳᠦᠬᠡᠨ</translation>
|
<translation>ᠬᠠᠶᠢᠭ ᠤ᠋ᠨ ᠮᠦᠷᠬᠦᠯᠳᠦᠬᠡᠨ</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -804,7 +852,7 @@
|
||||||
<translation type="vanished">ᠤᠳᠠᠰᠤᠳᠤ ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡ ᠵᠢ ᠨᠢᠭᠡᠨᠳᠡ ᠳᠠᠰᠤᠯᠪᠠ</translation>
|
<translation type="vanished">ᠤᠳᠠᠰᠤᠳᠤ ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡ ᠵᠢ ᠨᠢᠭᠡᠨᠳᠡ ᠳᠠᠰᠤᠯᠪᠠ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1240"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1244"/>
|
||||||
<source>Wired Device not carried</source>
|
<source>Wired Device not carried</source>
|
||||||
<translation>ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤ᠋ ᠤᠳᠠᠰᠤ ᠵᠠᠯᠭᠠᠭᠠ ᠦᠬᠡᠢ</translation>
|
<translation>ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤ᠋ ᠤᠳᠠᠰᠤ ᠵᠠᠯᠭᠠᠭᠠ ᠦᠬᠡᠢ</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -813,18 +861,18 @@
|
||||||
<translation type="vanished">ᠤᠳᠠᠰᠤᠳᠤ ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡ ᠵᠢ ᠨᠢᠭᠡᠨᠳᠡ ᠴᠦᠷᠬᠡᠯᠡᠪᠡ</translation>
|
<translation type="vanished">ᠤᠳᠠᠰᠤᠳᠤ ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡ ᠵᠢ ᠨᠢᠭᠡᠨᠳᠡ ᠴᠦᠷᠬᠡᠯᠡᠪᠡ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1336"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1340"/>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1344"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1348"/>
|
||||||
<source>Connected: </source>
|
<source>Connected: </source>
|
||||||
<translation>ᠴᠥᠷᠬᠡᠯᠡᠪᠡ: </translation>
|
<translation>ᠴᠥᠷᠬᠡᠯᠡᠪᠡ: </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1338"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1342"/>
|
||||||
<source>Not Connected</source>
|
<source>Not Connected</source>
|
||||||
<translation>ᠴᠥᠷᠬᠡᠯᠡᠭᠡ ᠥᠬᠡᠢ</translation>
|
<translation>ᠴᠥᠷᠬᠡᠯᠡᠭᠡ ᠥᠬᠡᠢ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1336"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1340"/>
|
||||||
<source>(Limited)</source>
|
<source>(Limited)</source>
|
||||||
<translation>( ᠰᠦᠯᠵᠢᠶᠡ ᠬᠢᠵᠠᠭᠠᠷᠯᠠᠭᠳᠠᠪᠠ)</translation>
|
<translation>( ᠰᠦᠯᠵᠢᠶᠡ ᠬᠢᠵᠠᠭᠠᠷᠯᠠᠭᠳᠠᠪᠠ)</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -845,47 +893,51 @@
|
||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="216"/>
|
<location filename="../frontend/mainwindow.cpp" line="229"/>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="247"/>
|
<location filename="../frontend/mainwindow.cpp" line="260"/>
|
||||||
<source>kylin-nm</source>
|
<source>kylin-nm</source>
|
||||||
<translation>ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤ᠋ ᠪᠠᠭᠠᠵᠢ</translation>
|
<translation>ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤ᠋ ᠪᠠᠭᠠᠵᠢ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="340"/>
|
<location filename="../frontend/mainwindow.cpp" line="353"/>
|
||||||
<source>LAN</source>
|
<source>LAN</source>
|
||||||
<translatorcomment>有线网络</translatorcomment>
|
<translatorcomment>有线网络</translatorcomment>
|
||||||
<translation>ᠤᠳᠠᠰᠤᠳᠤ ᠰᠦᠯᠵᠢᠶᠡ</translation>
|
<translation>ᠤᠳᠠᠰᠤᠳᠤ ᠰᠦᠯᠵᠢᠶᠡ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="342"/>
|
<location filename="../frontend/mainwindow.cpp" line="355"/>
|
||||||
<source>WLAN</source>
|
<source>WLAN</source>
|
||||||
<translatorcomment>无线局域网</translatorcomment>
|
<translatorcomment>无线局域网</translatorcomment>
|
||||||
<translation>ᠤᠳᠠᠰᠤ ᠦᠬᠡᠢ ᠬᠡᠰᠡᠭ ᠰᠦᠯᠵᠢᠶᠡ</translation>
|
<translation>ᠤᠳᠠᠰᠤ ᠦᠬᠡᠢ ᠬᠡᠰᠡᠭ ᠰᠦᠯᠵᠢᠶᠡ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="370"/>
|
|
||||||
<source>Show MainWindow</source>
|
<source>Show MainWindow</source>
|
||||||
<translation>ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤ᠋ ᠪᠠᠭᠠᠵᠢ ᠵᠢ ᠨᠡᠬᠡᠬᠡᠬᠦ</translation>
|
<translation type="vanished">ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤ᠋ ᠪᠠᠭᠠᠵᠢ ᠵᠢ ᠨᠡᠬᠡᠬᠡᠬᠦ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="371"/>
|
<location filename="../frontend/mainwindow.cpp" line="384"/>
|
||||||
<source>Settings</source>
|
<source>Settings</source>
|
||||||
<translatorcomment>ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤ᠋ ᠲᠦᠷᠦᠯ ᠢ᠋ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠬᠤ</translatorcomment>
|
<translatorcomment>ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤ᠋ ᠲᠦᠷᠦᠯ ᠢ᠋ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠬᠤ</translatorcomment>
|
||||||
<translation>ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤ᠋ ᠲᠦᠷᠦᠯ ᠢ᠋ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠬᠤ</translation>
|
<translation>ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤ᠋ ᠲᠦᠷᠦᠯ ᠢ᠋ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠬᠤ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="612"/>
|
<location filename="../frontend/mainwindow.cpp" line="385"/>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="841"/>
|
<source>Network Connectivity Detection</source>
|
||||||
|
<translation>ᠰᠦᠯᠵᠢᠶᠡ ᠶᠢ ᠵᠠᠯᠭᠠᠵᠤ ᠪᠠᠶᠢᠴᠠᠭᠠᠨ ᠬᠡᠮᠵᠢᠨᠡ</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/mainwindow.cpp" line="662"/>
|
||||||
|
<location filename="../frontend/mainwindow.cpp" line="915"/>
|
||||||
<source>Network tool</source>
|
<source>Network tool</source>
|
||||||
<translation>ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤ᠋ ᠪᠠᠭᠠᠵᠢ</translation>
|
<translation>ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤ᠋ ᠪᠠᠭᠠᠵᠢ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="626"/>
|
<location filename="../frontend/mainwindow.cpp" line="676"/>
|
||||||
<source>Network Card</source>
|
<source>Network Card</source>
|
||||||
<translation>ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤ᠋ ᠺᠠᠷᠲ</translation>
|
<translation>ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤ᠋ ᠺᠠᠷᠲ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="824"/>
|
<location filename="../frontend/mainwindow.cpp" line="898"/>
|
||||||
<source>Not connected to the network</source>
|
<source>Not connected to the network</source>
|
||||||
<translation>ᠰᠦᠯᠵᠢᠶᠡᠨ ᠳ᠋ᠤ᠌ ᠴᠥᠷᠬᠡᠯᠡᠭᠡ ᠥᠬᠡᠢ</translation>
|
<translation>ᠰᠦᠯᠵᠢᠶᠡᠨ ᠳ᠋ᠤ᠌ ᠴᠥᠷᠬᠡᠯᠡᠭᠡ ᠥᠬᠡᠢ</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1420,35 +1472,35 @@
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="176"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="176"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="202"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="202"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="636"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="648"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="655"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="667"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="665"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="677"/>
|
||||||
<source>Disconnect</source>
|
<source>Disconnect</source>
|
||||||
<translation>ᠳᠠᠰᠤᠯᠬᠤ</translation>
|
<translation>ᠳᠠᠰᠤᠯᠬᠤ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="178"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="178"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="206"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="206"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="303"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="315"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="646"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="658"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="663"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="675"/>
|
||||||
<source>Connect</source>
|
<source>Connect</source>
|
||||||
<translation>ᠴᠦᠷᠬᠡᠯᠡᠬᠡ</translation>
|
<translation>ᠴᠦᠷᠬᠡᠯᠡᠬᠡ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="186"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="186"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="670"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="682"/>
|
||||||
<source>Forget</source>
|
<source>Forget</source>
|
||||||
<translation>ᠲᠤᠰ ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡ ᠵᠢ ᠮᠠᠷᠳᠠᠬᠤ</translation>
|
<translation>ᠲᠤᠰ ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡ ᠵᠢ ᠮᠠᠷᠳᠠᠬᠤ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="185"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="185"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="675"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="687"/>
|
||||||
<source>Property</source>
|
<source>Property</source>
|
||||||
<translation>ᠬᠠᠷᠢᠶᠠᠯᠠᠯ</translation>
|
<translation>ᠬᠠᠷᠢᠶᠠᠯᠠᠯ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="324"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="336"/>
|
||||||
<source>Auto Connect</source>
|
<source>Auto Connect</source>
|
||||||
<translation>ᠲᠤᠰ ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠳ᠋ᠤ᠌ ᠠᠦ᠋ᠲ᠋ᠤ᠋ ᠪᠡᠷ ᠵᠠᠯᠭᠠᠬᠤ</translation>
|
<translation>ᠲᠤᠰ ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠳ᠋ᠤ᠌ ᠠᠦ᠋ᠲ᠋ᠤ᠋ ᠪᠡᠷ ᠵᠠᠯᠭᠠᠬᠤ</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1468,22 +1520,22 @@
|
||||||
<context>
|
<context>
|
||||||
<name>WlanPage</name>
|
<name>WlanPage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="131"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="132"/>
|
||||||
<source>WLAN</source>
|
<source>WLAN</source>
|
||||||
<translation>ᠤᠳᠠᠰᠤ ᠦᠬᠡᠢ ᠬᠡᠰᠡᠭ ᠰᠦᠯᠵᠢᠶᠡ</translation>
|
<translation>ᠤᠳᠠᠰᠤ ᠦᠬᠡᠢ ᠬᠡᠰᠡᠭ ᠰᠦᠯᠵᠢᠶᠡ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="107"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="108"/>
|
||||||
<source>No wireless network card detected</source>
|
<source>No wireless network card detected</source>
|
||||||
<translation>ᠤᠳᠠᠰᠤ ᠦᠬᠡᠢ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠺᠠᠷᠲᠢ ᠬᠢᠨᠠᠨ ᠬᠡᠮᠵᠢᠵᠤ ᠤᠯᠤᠭᠰᠠᠨ ᠦᠬᠡᠢ</translation>
|
<translation>ᠤᠳᠠᠰᠤ ᠦᠬᠡᠢ ᠰᠦᠯᠵᠢᠶᠡᠨ ᠺᠠᠷᠲᠢ ᠬᠢᠨᠠᠨ ᠬᠡᠮᠵᠢᠵᠤ ᠤᠯᠤᠭᠰᠠᠨ ᠦᠬᠡᠢ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="133"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="134"/>
|
||||||
<source>Activated WLAN</source>
|
<source>Activated WLAN</source>
|
||||||
<translation>ᠮᠢᠨᠤ ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡ</translation>
|
<translation>ᠮᠢᠨᠤ ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="144"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="145"/>
|
||||||
<source>Other WLAN</source>
|
<source>Other WLAN</source>
|
||||||
<translation>ᠪᠤᠰᠤᠳ ᠰᠦᠯᠵᠢᠶᠡ</translation>
|
<translation>ᠪᠤᠰᠤᠳ ᠰᠦᠯᠵᠢᠶᠡ</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1492,22 +1544,22 @@
|
||||||
<translation type="vanished">更多...</translation>
|
<translation type="vanished">更多...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="974"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="972"/>
|
||||||
<source>WLAN Connected Successfully</source>
|
<source>WLAN Connected Successfully</source>
|
||||||
<translation>ᠤᠳᠠᠰᠤ ᠦᠬᠡᠢ ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡ ᠵᠢ ᠴᠦᠷᠬᠡᠯᠡᠪᠡ</translation>
|
<translation>ᠤᠳᠠᠰᠤ ᠦᠬᠡᠢ ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡ ᠵᠢ ᠴᠦᠷᠬᠡᠯᠡᠪᠡ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="970"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="968"/>
|
||||||
<source>WLAN Disconnected Successfully</source>
|
<source>WLAN Disconnected Successfully</source>
|
||||||
<translation>ᠤᠳᠠᠰᠤ ᠦᠬᠡᠢ ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡ ᠵᠢ ᠳᠠᠰᠤᠯᠪᠠ</translation>
|
<translation>ᠤᠳᠠᠰᠤ ᠦᠬᠡᠢ ᠲᠤᠤᠷ ᠰᠦᠯᠵᠢᠶᠡ ᠵᠢ ᠳᠠᠰᠤᠯᠪᠠ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1754"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1741"/>
|
||||||
<source>Connected: </source>
|
<source>Connected: </source>
|
||||||
<translation>ᠴᠥᠷᠬᠡᠯᠡᠪᠡ: </translation>
|
<translation>ᠴᠥᠷᠬᠡᠯᠡᠪᠡ: </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1756"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1743"/>
|
||||||
<source>Not Connected</source>
|
<source>Not Connected</source>
|
||||||
<translation>ᠴᠥᠷᠬᠡᠯᠡᠭᠡ ᠥᠬᠡᠢ</translation>
|
<translation>ᠴᠥᠷᠬᠡᠯᠡᠭᠡ ᠥᠬᠡᠢ</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -122,6 +122,54 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ConnectivityPage</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="25"/>
|
||||||
|
<source>Network connectivity detection</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="55"/>
|
||||||
|
<source>If access to the Internet is restricted, please switch the network IP connectivity detection method and try again.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="61"/>
|
||||||
|
<source>Public network (default)</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="63"/>
|
||||||
|
<source>Local area network (intranet)</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="74"/>
|
||||||
|
<source>Confirm</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="161"/>
|
||||||
|
<source>The network is connected and can access the Internet normally.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="166"/>
|
||||||
|
<source>The network is connected and access to the Internet is restricted.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="177"/>
|
||||||
|
<source>Please enter the local area network (intranet) detection address</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="196"/>
|
||||||
|
<source>Format error</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>CreatNetPage</name>
|
<name>CreatNetPage</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1279,22 +1327,22 @@
|
||||||
<context>
|
<context>
|
||||||
<name>FirewallDialog</name>
|
<name>FirewallDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="85"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="89"/>
|
||||||
<source>Allow other devices on this network to discover this computer?</source>
|
<source>Allow other devices on this network to discover this computer?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="87"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="91"/>
|
||||||
<source>It is not recommended to enable this feature on public networks</source>
|
<source>It is not recommended to enable this feature on public networks</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="89"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="93"/>
|
||||||
<source>Not allowed (recommended)</source>
|
<source>Not allowed (recommended)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="90"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="94"/>
|
||||||
<source>Allowed</source>
|
<source>Allowed</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1332,23 +1380,23 @@
|
||||||
<translation type="unfinished">Elle</translation>
|
<translation type="unfinished">Elle</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="265"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="264"/>
|
||||||
<source>Invalid address</source>
|
<source>Invalid address</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="274"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="273"/>
|
||||||
<source>Invalid subnet mask</source>
|
<source>Invalid subnet mask</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="298"/>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="299"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="299"/>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="300"/>
|
|
||||||
<source>Required</source>
|
<source>Required</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="368"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="367"/>
|
||||||
<source>Address conflict</source>
|
<source>Address conflict</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1514,23 +1562,23 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1240"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1244"/>
|
||||||
<source>Wired Device not carried</source>
|
<source>Wired Device not carried</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1336"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1340"/>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1344"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1348"/>
|
||||||
<source>Connected: </source>
|
<source>Connected: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1336"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1340"/>
|
||||||
<source>(Limited)</source>
|
<source>(Limited)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1338"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1342"/>
|
||||||
<source>Not Connected</source>
|
<source>Not Connected</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1551,8 +1599,8 @@
|
||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="216"/>
|
<location filename="../frontend/mainwindow.cpp" line="229"/>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="247"/>
|
<location filename="../frontend/mainwindow.cpp" line="260"/>
|
||||||
<source>kylin-nm</source>
|
<source>kylin-nm</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1573,33 +1621,38 @@
|
||||||
<translation type="vanished">Gizli Ağı Bağlan</translation>
|
<translation type="vanished">Gizli Ağı Bağlan</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="340"/>
|
<location filename="../frontend/mainwindow.cpp" line="353"/>
|
||||||
<source>LAN</source>
|
<source>LAN</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="342"/>
|
<location filename="../frontend/mainwindow.cpp" line="355"/>
|
||||||
<source>WLAN</source>
|
<source>WLAN</source>
|
||||||
<translation>WLAN</translation>
|
<translation>WLAN</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="371"/>
|
<location filename="../frontend/mainwindow.cpp" line="384"/>
|
||||||
<source>Settings</source>
|
<source>Settings</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="612"/>
|
<location filename="../frontend/mainwindow.cpp" line="385"/>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="841"/>
|
<source>Network Connectivity Detection</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/mainwindow.cpp" line="662"/>
|
||||||
|
<location filename="../frontend/mainwindow.cpp" line="915"/>
|
||||||
<source>Network tool</source>
|
<source>Network tool</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="626"/>
|
<location filename="../frontend/mainwindow.cpp" line="676"/>
|
||||||
<source>Network Card</source>
|
<source>Network Card</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="824"/>
|
<location filename="../frontend/mainwindow.cpp" line="898"/>
|
||||||
<source>Not connected to the network</source>
|
<source>Not connected to the network</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1616,9 +1669,8 @@
|
||||||
<translation type="vanished">HotSpot</translation>
|
<translation type="vanished">HotSpot</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="370"/>
|
|
||||||
<source>Show MainWindow</source>
|
<source>Show MainWindow</source>
|
||||||
<translation>Ana Pencereyi Göster</translation>
|
<translation type="vanished">Ana Pencereyi Göster</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Not connected</source>
|
<source>Not connected</source>
|
||||||
|
@ -2321,35 +2373,35 @@
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="176"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="176"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="202"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="202"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="636"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="648"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="655"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="667"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="665"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="677"/>
|
||||||
<source>Disconnect</source>
|
<source>Disconnect</source>
|
||||||
<translation type="unfinished">Bağlantıyı Kes</translation>
|
<translation type="unfinished">Bağlantıyı Kes</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="178"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="178"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="206"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="206"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="303"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="315"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="646"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="658"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="663"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="675"/>
|
||||||
<source>Connect</source>
|
<source>Connect</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="185"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="185"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="675"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="687"/>
|
||||||
<source>Property</source>
|
<source>Property</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="186"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="186"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="670"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="682"/>
|
||||||
<source>Forget</source>
|
<source>Forget</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="324"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="336"/>
|
||||||
<source>Auto Connect</source>
|
<source>Auto Connect</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -2365,42 +2417,42 @@
|
||||||
<context>
|
<context>
|
||||||
<name>WlanPage</name>
|
<name>WlanPage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="131"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="132"/>
|
||||||
<source>WLAN</source>
|
<source>WLAN</source>
|
||||||
<translation type="unfinished">WLAN</translation>
|
<translation type="unfinished">WLAN</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="133"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="134"/>
|
||||||
<source>Activated WLAN</source>
|
<source>Activated WLAN</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="144"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="145"/>
|
||||||
<source>Other WLAN</source>
|
<source>Other WLAN</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1754"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1741"/>
|
||||||
<source>Connected: </source>
|
<source>Connected: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1756"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1743"/>
|
||||||
<source>Not Connected</source>
|
<source>Not Connected</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="107"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="108"/>
|
||||||
<source>No wireless network card detected</source>
|
<source>No wireless network card detected</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="974"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="972"/>
|
||||||
<source>WLAN Connected Successfully</source>
|
<source>WLAN Connected Successfully</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="970"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="968"/>
|
||||||
<source>WLAN Disconnected Successfully</source>
|
<source>WLAN Disconnected Successfully</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -55,6 +55,54 @@
|
||||||
<translation>配置防火墙和安全设置</translation>
|
<translation>配置防火墙和安全设置</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ConnectivityPage</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="25"/>
|
||||||
|
<source>Network connectivity detection</source>
|
||||||
|
<translation>网络连通性检测</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="55"/>
|
||||||
|
<source>If access to the Internet is restricted, please switch the network IP connectivity detection method and try again.</source>
|
||||||
|
<translation>如访问 Internet 受限,请切换网络 IP 连通性检测方式后再试。</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="61"/>
|
||||||
|
<source>Public network (default)</source>
|
||||||
|
<translation>公网(默认)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="63"/>
|
||||||
|
<source>Local area network (intranet)</source>
|
||||||
|
<translation>局域网(内网)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="74"/>
|
||||||
|
<source>Confirm</source>
|
||||||
|
<translation>确定</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="161"/>
|
||||||
|
<source>The network is connected and can access the Internet normally.</source>
|
||||||
|
<translation>网络已连接,可正常访问 Internet 。</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="166"/>
|
||||||
|
<source>The network is connected and access to the Internet is restricted.</source>
|
||||||
|
<translation>网络已连接,访问 Internet 受限。</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="177"/>
|
||||||
|
<source>Please enter the local area network (intranet) detection address</source>
|
||||||
|
<translation>请输入局域网(内网)检测地址</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/connectivity/connectivitypage.cpp" line="196"/>
|
||||||
|
<source>Format error</source>
|
||||||
|
<translation>格式错误</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>CopyButton</name>
|
<name>CopyButton</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -568,22 +616,22 @@
|
||||||
<translation type="vanished">否</translation>
|
<translation type="vanished">否</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="85"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="89"/>
|
||||||
<source>Allow other devices on this network to discover this computer?</source>
|
<source>Allow other devices on this network to discover this computer?</source>
|
||||||
<translation>是否允许此网络上的其他设备发现这台电脑?</translation>
|
<translation>是否允许此网络上的其他设备发现这台电脑?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="87"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="91"/>
|
||||||
<source>It is not recommended to enable this feature on public networks</source>
|
<source>It is not recommended to enable this feature on public networks</source>
|
||||||
<translation>不建议在公共网络上开启此功能</translation>
|
<translation>不建议在公共网络上开启此功能</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="89"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="93"/>
|
||||||
<source>Not allowed (recommended)</source>
|
<source>Not allowed (recommended)</source>
|
||||||
<translation>不允许(推荐)</translation>
|
<translation>不允许(推荐)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/networkmode/firewalldialog.cpp" line="90"/>
|
<location filename="../frontend/networkmode/firewalldialog.cpp" line="94"/>
|
||||||
<source>Allowed</source>
|
<source>Allowed</source>
|
||||||
<translation>允许</translation>
|
<translation>允许</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -629,23 +677,23 @@
|
||||||
<translation>手动</translation>
|
<translation>手动</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="265"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="264"/>
|
||||||
<source>Invalid address</source>
|
<source>Invalid address</source>
|
||||||
<translation>无效的IP地址</translation>
|
<translation>无效的IP地址</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="274"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="273"/>
|
||||||
<source>Invalid subnet mask</source>
|
<source>Invalid subnet mask</source>
|
||||||
<translation>无效的子网掩码</translation>
|
<translation>无效的子网掩码</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="298"/>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="299"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="299"/>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="300"/>
|
|
||||||
<source>Required</source>
|
<source>Required</source>
|
||||||
<translation>必填</translation>
|
<translation>必填</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/netdetails/ipv4page.cpp" line="368"/>
|
<location filename="../frontend/netdetails/ipv4page.cpp" line="367"/>
|
||||||
<source>Address conflict</source>
|
<source>Address conflict</source>
|
||||||
<translation>地址冲突</translation>
|
<translation>地址冲突</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -824,7 +872,7 @@
|
||||||
<translation type="vanished">有线网络已断开</translation>
|
<translation type="vanished">有线网络已断开</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1240"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1244"/>
|
||||||
<source>Wired Device not carried</source>
|
<source>Wired Device not carried</source>
|
||||||
<translation>未插入网线</translation>
|
<translation>未插入网线</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -833,18 +881,18 @@
|
||||||
<translation type="vanished">有线网络已连接</translation>
|
<translation type="vanished">有线网络已连接</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1336"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1340"/>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1344"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1348"/>
|
||||||
<source>Connected: </source>
|
<source>Connected: </source>
|
||||||
<translation>已连接: </translation>
|
<translation>已连接: </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1338"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1342"/>
|
||||||
<source>Not Connected</source>
|
<source>Not Connected</source>
|
||||||
<translation>未连接</translation>
|
<translation>未连接</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/lanpage.cpp" line="1336"/>
|
<location filename="../frontend/tab-pages/lanpage.cpp" line="1340"/>
|
||||||
<source>(Limited)</source>
|
<source>(Limited)</source>
|
||||||
<translation>(网络受限)</translation>
|
<translation>(网络受限)</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -865,47 +913,51 @@
|
||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="216"/>
|
<location filename="../frontend/mainwindow.cpp" line="229"/>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="247"/>
|
<location filename="../frontend/mainwindow.cpp" line="260"/>
|
||||||
<source>kylin-nm</source>
|
<source>kylin-nm</source>
|
||||||
<translation>网络工具</translation>
|
<translation>网络工具</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="340"/>
|
<location filename="../frontend/mainwindow.cpp" line="353"/>
|
||||||
<source>LAN</source>
|
<source>LAN</source>
|
||||||
<translatorcomment>有线网络</translatorcomment>
|
<translatorcomment>有线网络</translatorcomment>
|
||||||
<translation>有线网络</translation>
|
<translation>有线网络</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="342"/>
|
<location filename="../frontend/mainwindow.cpp" line="355"/>
|
||||||
<source>WLAN</source>
|
<source>WLAN</source>
|
||||||
<translatorcomment>无线局域网</translatorcomment>
|
<translatorcomment>无线局域网</translatorcomment>
|
||||||
<translation>无线局域网</translation>
|
<translation>无线局域网</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="370"/>
|
|
||||||
<source>Show MainWindow</source>
|
<source>Show MainWindow</source>
|
||||||
<translation>打开网络工具</translation>
|
<translation type="vanished">打开网络工具</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="371"/>
|
<location filename="../frontend/mainwindow.cpp" line="384"/>
|
||||||
<source>Settings</source>
|
<source>Settings</source>
|
||||||
<translatorcomment>设置网络项</translatorcomment>
|
<translatorcomment>设置网络项</translatorcomment>
|
||||||
<translation>设置网络项</translation>
|
<translation>设置网络项</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="612"/>
|
<location filename="../frontend/mainwindow.cpp" line="385"/>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="841"/>
|
<source>Network Connectivity Detection</source>
|
||||||
|
<translation>网络连通性检测</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../frontend/mainwindow.cpp" line="662"/>
|
||||||
|
<location filename="../frontend/mainwindow.cpp" line="915"/>
|
||||||
<source>Network tool</source>
|
<source>Network tool</source>
|
||||||
<translation>网络工具</translation>
|
<translation>网络工具</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="626"/>
|
<location filename="../frontend/mainwindow.cpp" line="676"/>
|
||||||
<source>Network Card</source>
|
<source>Network Card</source>
|
||||||
<translation>网卡</translation>
|
<translation>网卡</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/mainwindow.cpp" line="824"/>
|
<location filename="../frontend/mainwindow.cpp" line="898"/>
|
||||||
<source>Not connected to the network</source>
|
<source>Not connected to the network</source>
|
||||||
<translation>未连接网络</translation>
|
<translation>未连接网络</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1416,35 +1468,35 @@
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="176"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="176"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="202"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="202"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="636"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="648"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="655"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="667"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="665"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="677"/>
|
||||||
<source>Disconnect</source>
|
<source>Disconnect</source>
|
||||||
<translation>断开</translation>
|
<translation>断开</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="178"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="178"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="206"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="206"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="303"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="315"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="646"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="658"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="663"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="675"/>
|
||||||
<source>Connect</source>
|
<source>Connect</source>
|
||||||
<translation>连接</translation>
|
<translation>连接</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="186"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="186"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="670"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="682"/>
|
||||||
<source>Forget</source>
|
<source>Forget</source>
|
||||||
<translation>忘记此网络</translation>
|
<translation>忘记此网络</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="185"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="185"/>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="675"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="687"/>
|
||||||
<source>Property</source>
|
<source>Property</source>
|
||||||
<translation>属性</translation>
|
<translation>属性</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/list-items/wlanlistitem.cpp" line="324"/>
|
<location filename="../frontend/list-items/wlanlistitem.cpp" line="336"/>
|
||||||
<source>Auto Connect</source>
|
<source>Auto Connect</source>
|
||||||
<translation>自动加入该网络</translation>
|
<translation>自动加入该网络</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1464,22 +1516,22 @@
|
||||||
<context>
|
<context>
|
||||||
<name>WlanPage</name>
|
<name>WlanPage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="131"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="132"/>
|
||||||
<source>WLAN</source>
|
<source>WLAN</source>
|
||||||
<translation>无线局域网</translation>
|
<translation>无线局域网</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="107"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="108"/>
|
||||||
<source>No wireless network card detected</source>
|
<source>No wireless network card detected</source>
|
||||||
<translation>未检测到无线网卡</translation>
|
<translation>未检测到无线网卡</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="133"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="134"/>
|
||||||
<source>Activated WLAN</source>
|
<source>Activated WLAN</source>
|
||||||
<translation>我的网络</translation>
|
<translation>我的网络</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="144"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="145"/>
|
||||||
<source>Other WLAN</source>
|
<source>Other WLAN</source>
|
||||||
<translation>其他网络</translation>
|
<translation>其他网络</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1488,22 +1540,22 @@
|
||||||
<translation type="vanished">更多...</translation>
|
<translation type="vanished">更多...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="974"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="972"/>
|
||||||
<source>WLAN Connected Successfully</source>
|
<source>WLAN Connected Successfully</source>
|
||||||
<translation>无线网络已连接</translation>
|
<translation>无线网络已连接</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="970"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="968"/>
|
||||||
<source>WLAN Disconnected Successfully</source>
|
<source>WLAN Disconnected Successfully</source>
|
||||||
<translation>无线网络已断开</translation>
|
<translation>无线网络已断开</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1754"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1741"/>
|
||||||
<source>Connected: </source>
|
<source>Connected: </source>
|
||||||
<translation>已连接: </translation>
|
<translation>已连接: </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1756"/>
|
<location filename="../frontend/tab-pages/wlanpage.cpp" line="1743"/>
|
||||||
<source>Not Connected</source>
|
<source>Not Connected</source>
|
||||||
<translation>未连接</translation>
|
<translation>未连接</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
Loading…
Reference in New Issue