Merge branch 'dbus-interface' into 'find-joinWiFi'
# Conflicts: # src/frontend/mainwindow.h
This commit is contained in:
commit
ec60d278b2
|
@ -24,7 +24,7 @@ Build-Depends: debhelper (>=9),
|
|||
libukcc-dev (>= 3.1.1+1217),
|
||||
libukui-log4qt-dev,
|
||||
libkysdk-qtwidgets-dev(>= 1.2.0),
|
||||
libukui-common-dev,
|
||||
libkysdk-sysinfo-dev,
|
||||
libkysdk-waylandhelper-dev(>= 1.2.0kylin2),
|
||||
libkysec-dev,
|
||||
Standards-Version: 4.5.0
|
||||
|
@ -39,6 +39,7 @@ Depends: network-manager (>=1.2.6),
|
|||
ukui-control-center (>= 3.1.1+1217),
|
||||
libkysdk-qtwidgets(>= 1.2.0),
|
||||
libkysdk-waylandhelper(>= 1.2.0kylin2),
|
||||
libkysdk-sysinfo,
|
||||
${shlibs:Depends},
|
||||
${misc:Depends}
|
||||
Description: Gui Applet tool for display and edit network simply
|
||||
|
|
|
@ -34,6 +34,11 @@ AddNetBtn::AddNetBtn(bool isWlan, QWidget *parent) : QPushButton(parent)
|
|||
this->setMaximumSize(QSize(16777215, 60));
|
||||
this->setProperty("useButtonPalette", true);
|
||||
this->setFlat(true);
|
||||
QPalette pal = this->palette();
|
||||
QColor color = pal.color(QPalette::Button);
|
||||
color.setAlphaF(0.5);
|
||||
pal.setColor(QPalette::Button, color);
|
||||
this->setPalette(pal);
|
||||
QHBoxLayout *addLyt = new QHBoxLayout;
|
||||
|
||||
QLabel *iconLabel = new QLabel();
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* Copyright (C) 2022 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
#include "grayinfobutton.h"
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
#define BUTTON_SIZE 36,36
|
||||
#define ICON_SIZE 16,16
|
||||
|
||||
GrayInfoButton::GrayInfoButton(QWidget *parent): QPushButton(parent)
|
||||
{
|
||||
this->setFixedSize(BUTTON_SIZE);
|
||||
this->setIcon(QIcon::fromTheme("preferences-system-details-symbolic"));
|
||||
this->setProperty("useButtonPalette", true);
|
||||
this->setFlat(true);
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* Copyright (C) 2022 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
#ifndef GRAYINFOBUTTON_H
|
||||
#define GRAYINFOBUTTON_H
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QIcon>
|
||||
|
||||
class GrayInfoButton : public QPushButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GrayInfoButton(QWidget * parent = nullptr);
|
||||
~GrayInfoButton() = default;
|
||||
};
|
||||
|
||||
#endif // GRAYINFOBUTTON_H
|
|
@ -2,8 +2,10 @@
|
|||
|
||||
SOURCES += \
|
||||
$$PWD/AddBtn/addnetbtn.cpp \
|
||||
$$PWD/AddBtn/grayinfobutton.cpp
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/AddBtn/addnetbtn.h \
|
||||
$$PWD/AddBtn/grayinfobutton.h
|
||||
|
||||
|
||||
|
|
|
@ -65,17 +65,18 @@ QFrame* ConnectdevPage::myLine()
|
|||
void ConnectdevPage::getConnectStaDevice(QMap<QString, QString> &staMap)
|
||||
{
|
||||
staMap.clear();
|
||||
if (m_avtivePathInterface == nullptr || !m_avtivePathInterface->isValid()) {
|
||||
qDebug() << "dbus interface m_avtivePathInterface is invaild";
|
||||
if (m_activePathInterface == nullptr || !m_activePathInterface->isValid()) {
|
||||
qDebug() << "dbus interface m_activePathInterface is invaild";
|
||||
return;
|
||||
}
|
||||
|
||||
QDBusMessage reply = m_avtivePathInterface->call("Getstainfo");
|
||||
QDBusMessage reply = m_activePathInterface->call("Getstainfo");
|
||||
if(reply.type() == QDBusMessage::ErrorMessage)
|
||||
{
|
||||
qWarning() << "[mobilehotspot]Getstainfo error:" << reply.errorMessage();
|
||||
return;
|
||||
}
|
||||
|
||||
if (reply.arguments().isEmpty()
|
||||
|| reply.arguments().at(0).toString() == ""
|
||||
|| reply.arguments().at(0).toString() == "[Invalid UTF-8]"
|
||||
|
@ -91,6 +92,7 @@ void ConnectdevPage::getConnectStaDevice(QMap<QString, QString> &staMap)
|
|||
staMap[macList.at(index)] = hostNameList.at(index);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ConnectdevPage::initStaDev()
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
void refreshStalist();
|
||||
|
||||
inline void setInterface(QDBusInterface *activeInterface) {
|
||||
m_avtivePathInterface = activeInterface;
|
||||
m_activePathInterface = activeInterface;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -54,7 +54,7 @@ private:
|
|||
QVBoxLayout *m_staListLayout = nullptr;
|
||||
QMap<QString, QString> m_staMap;
|
||||
|
||||
QDBusInterface *m_avtivePathInterface = nullptr;
|
||||
QDBusInterface *m_activePathInterface = nullptr;
|
||||
|
||||
void getConnectStaDevice(QMap<QString, QString> &blacklistMap);
|
||||
bool removeStaFromBlacklist(QString staMac);
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
#define LINE_MAX_SIZE 16777215, 1
|
||||
#define LINE_MIN_SIZE 0, 1
|
||||
#define ICON_SIZE 24,24
|
||||
#define PASSWORD_FRAME_MIN_HIGHT 60
|
||||
#define PASSWORD_FRAME_FIX_HIGHT 80
|
||||
#define PASSWORD_FRAME_MIN_SIZE 550, 60
|
||||
#define PASSWORD_FRAME_MAX_SIZE 16777215, 86
|
||||
#define PASSWORD_ITEM_MARGINS 16, 12, 16, 14
|
||||
|
@ -65,6 +67,8 @@ void MobileHotspotWidget::showDesktopNotify(const QString &message)
|
|||
iface.callWithArgumentList(QDBus::AutoDetect,"Notify",args);
|
||||
}
|
||||
|
||||
#define HOTSPOT_CONTROL
|
||||
|
||||
MobileHotspotWidget::MobileHotspotWidget(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
m_Vlayout = new QVBoxLayout(this);
|
||||
|
@ -77,8 +81,11 @@ MobileHotspotWidget::MobileHotspotWidget(QWidget *parent) : QWidget(parent)
|
|||
qDBusRegisterMetaType<QMap<QString, QVector<QStringList> >>();
|
||||
|
||||
initUI();
|
||||
|
||||
#ifdef HOTSPOT_CONTROL
|
||||
initConnectDevPage();
|
||||
initBlackListPage();
|
||||
#endif
|
||||
|
||||
m_switchBtn->installEventFilter(this);
|
||||
m_interface = new QDBusInterface("com.kylin.network", "/com/kylin/network",
|
||||
|
@ -97,7 +104,9 @@ MobileHotspotWidget::MobileHotspotWidget(QWidget *parent) : QWidget(parent)
|
|||
initInterfaceInfo();
|
||||
getApInfo();
|
||||
|
||||
#ifdef HOTSPOT_CONTROL
|
||||
initNmDbus();
|
||||
#endif
|
||||
|
||||
this->setLayout(m_Vlayout);
|
||||
m_Vlayout->addStretch();
|
||||
|
@ -108,8 +117,10 @@ MobileHotspotWidget::MobileHotspotWidget(QWidget *parent) : QWidget(parent)
|
|||
updateBandCombox();
|
||||
});
|
||||
|
||||
#ifdef HOTSPOT_CONTROL
|
||||
m_connectDevPage->refreshStalist();
|
||||
m_blacklistPage->refreshBlacklist();
|
||||
#endif
|
||||
this->update();
|
||||
}
|
||||
|
||||
|
@ -143,6 +154,13 @@ bool MobileHotspotWidget::eventFilter(QObject *watched, QEvent *event)
|
|||
qDebug() << "[MobileHotspotWidget] call deactiveWirelessAp failed ";
|
||||
return true;
|
||||
}
|
||||
#ifdef HOTSPOT_CONTROL
|
||||
deleteActivePathInterface();
|
||||
m_connectDevPage->setInterface(nullptr);
|
||||
m_connectDevPage->refreshStalist();
|
||||
m_blacklistPage->refreshBlacklist();
|
||||
#endif
|
||||
this->update();
|
||||
} else {
|
||||
if (m_apNameLine->text().isEmpty() || m_interfaceName.isEmpty())
|
||||
{
|
||||
|
@ -176,16 +194,28 @@ void MobileHotspotWidget::paintEvent(QPaintEvent *event)
|
|||
QWidget::paintEvent(event);
|
||||
}
|
||||
|
||||
void MobileHotspotWidget::resetFrameSize()
|
||||
{
|
||||
int height = 0;
|
||||
for (int i = 0; i < m_hotspotFrame->layout()->count(); i ++) {
|
||||
QWidget *w = m_hotspotFrame->layout()->itemAt(i)->widget();
|
||||
if (w != nullptr) {
|
||||
height += w->height();
|
||||
}
|
||||
}
|
||||
m_hotspotFrame->setFixedHeight(height);
|
||||
}
|
||||
|
||||
void MobileHotspotWidget::initUI()
|
||||
{
|
||||
QFrame *hotspotFrame = new QFrame(this);
|
||||
hotspotFrame->setMinimumSize(FRAME_MIN_SIZE);
|
||||
hotspotFrame->setMaximumSize(FRAME_MAX_SIZE);
|
||||
hotspotFrame->setFrameShape(QFrame::Box);
|
||||
m_hotspotFrame = new QFrame(this);
|
||||
m_hotspotFrame->setMinimumSize(FRAME_MIN_SIZE);
|
||||
m_hotspotFrame->setMaximumSize(FRAME_MAX_SIZE);
|
||||
m_hotspotFrame->setFrameShape(QFrame::Box);
|
||||
|
||||
QVBoxLayout *hotspotLyt = new QVBoxLayout(this);
|
||||
hotspotLyt->setContentsMargins(0, 0, 0, 0);
|
||||
hotspotFrame->setLayout(hotspotLyt);
|
||||
m_hotspotFrame->setLayout(hotspotLyt);
|
||||
|
||||
m_hotspotTitleLabel = new TitleLabel(this);
|
||||
m_hotspotTitleLabel->setText(tr("Hotspot"));
|
||||
|
@ -212,18 +242,11 @@ void MobileHotspotWidget::initUI()
|
|||
hotspotLyt->addWidget(m_interfaceFrame);
|
||||
hotspotLyt->setSpacing(0);
|
||||
|
||||
int height = 0;
|
||||
for (int i = 0; i < hotspotLyt->count(); i ++) {
|
||||
QWidget *w = hotspotLyt->itemAt(i)->widget();
|
||||
if (w != nullptr) {
|
||||
height += w->height();
|
||||
}
|
||||
}
|
||||
hotspotFrame->setFixedHeight(height);
|
||||
resetFrameSize();
|
||||
|
||||
m_Vlayout->addWidget(m_hotspotTitleLabel);
|
||||
m_Vlayout->addSpacing(8);
|
||||
m_Vlayout->addWidget(hotspotFrame);
|
||||
m_Vlayout->addWidget(m_hotspotFrame);
|
||||
|
||||
}
|
||||
|
||||
|
@ -248,9 +271,9 @@ void MobileHotspotWidget::initDbusConnect()
|
|||
}
|
||||
|
||||
connect(m_apNameLine, &QLineEdit::textEdited, this, &MobileHotspotWidget::onApLineEditTextEdit);
|
||||
|
||||
#ifdef HOTSPOT_CONTROL
|
||||
connect(m_connectDevPage, SIGNAL(setStaIntoBlacklist(QString)), m_blacklistPage, SLOT(onsetStaIntoBlacklist(QString)));
|
||||
|
||||
#endif
|
||||
connect(m_pwdNameLine, SIGNAL(textChanged(QString)), this, SLOT(onPwdTextChanged()));
|
||||
}
|
||||
|
||||
|
@ -272,13 +295,14 @@ void MobileHotspotWidget::onApLineEditTextEdit(QString text)
|
|||
void MobileHotspotWidget::onPwdTextChanged()
|
||||
{
|
||||
if (m_pwdNameLine->text().length() < 8) {
|
||||
m_passwordFrame->setFixedHeight(PASSWORD_FRAME_FIX_HIGHT);
|
||||
m_pwdHintLabel->show();
|
||||
m_pwdHintLabel->setText(tr("Contains at least 8 characters")); //至少包含8个字符
|
||||
} else {
|
||||
m_pwdHintLabel->clear();
|
||||
m_passwordFrame->setFixedHeight(PASSWORD_FRAME_MIN_HIGHT);
|
||||
m_pwdHintLabel->hide();
|
||||
}
|
||||
|
||||
resetFrameSize();
|
||||
this->update();
|
||||
}
|
||||
|
||||
void MobileHotspotWidget::onActiveConnectionChanged(QString deviceName, QString ssid, QString uuid, int status)
|
||||
|
@ -407,6 +431,7 @@ void MobileHotspotWidget::getApInfo()
|
|||
} else {
|
||||
m_switchBtn->setChecked(false);
|
||||
setUiEnabled(false);
|
||||
m_uuid = apInfo.at(4);
|
||||
}
|
||||
} else {
|
||||
qDebug() << "no such interface " << apInfo.at(2);
|
||||
|
@ -466,8 +491,6 @@ void MobileHotspotWidget::setPasswordFrame()
|
|||
m_passwordFrame->setMinimumSize(PASSWORD_FRAME_MIN_SIZE);
|
||||
m_passwordFrame->setMaximumSize(PASSWORD_FRAME_MAX_SIZE);
|
||||
|
||||
QHBoxLayout *passwordHLayout = new QHBoxLayout(m_passwordFrame);
|
||||
|
||||
m_pwdLabel = new QLabel(tr("Password"), this);
|
||||
m_pwdLabel->setMinimumWidth(LABLE_MIN_WIDTH);
|
||||
m_pwdNameLine = new KPasswordEdit(this);
|
||||
|
@ -480,8 +503,9 @@ void MobileHotspotWidget::setPasswordFrame()
|
|||
QPalette hintTextColor;
|
||||
hintTextColor.setColor(QPalette::WindowText, Qt::red);
|
||||
m_pwdHintLabel->setPalette(hintTextColor);
|
||||
m_pwdHintLabel->setText(tr("Contains at least 8 characters")); //至少包含8个字符
|
||||
|
||||
QWidget *pwdInputWidget = new QWidget(this);
|
||||
QWidget *pwdInputWidget = new QWidget(m_passwordFrame);
|
||||
QVBoxLayout *pwdInputVLayout = new QVBoxLayout(pwdInputWidget);
|
||||
pwdInputVLayout->setContentsMargins(CONTENTS_MARGINS);
|
||||
pwdInputVLayout->setSpacing(0);
|
||||
|
@ -493,6 +517,8 @@ void MobileHotspotWidget::setPasswordFrame()
|
|||
pwdLayout->setSpacing(0);
|
||||
pwdLayout->addRow(m_pwdLabel, pwdInputWidget);
|
||||
|
||||
m_passwordFrame->setLayout(pwdLayout);
|
||||
|
||||
m_pwdNameLine->installEventFilter(this);
|
||||
}
|
||||
|
||||
|
@ -585,12 +611,6 @@ void MobileHotspotWidget::onDeviceNameChanged(QString oldName, QString newName,
|
|||
//热点断开
|
||||
void MobileHotspotWidget::onHotspotDeactivated(QString devName, QString ssid)
|
||||
{
|
||||
deleteActivePathInterface();
|
||||
m_connectDevPage->setInterface(nullptr);
|
||||
m_connectDevPage->refreshStalist();
|
||||
m_blacklistPage->refreshBlacklist();
|
||||
this->update();
|
||||
|
||||
if (!m_switchBtn->isChecked()) {
|
||||
return;
|
||||
}
|
||||
|
@ -609,7 +629,7 @@ void MobileHotspotWidget::onHotspotActivated(QString devName, QString ssid, QStr
|
|||
if (m_switchBtn->isChecked()) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef HOTSPOT_CONTROL
|
||||
if (activePath != nullptr) {
|
||||
deleteActivePathInterface();
|
||||
initActivePathInterface(activePath);
|
||||
|
@ -621,6 +641,7 @@ void MobileHotspotWidget::onHotspotActivated(QString devName, QString ssid, QStr
|
|||
|
||||
m_connectDevPage->refreshStalist();
|
||||
m_blacklistPage->refreshBlacklist();
|
||||
#endif
|
||||
this->update();
|
||||
|
||||
if (devName == m_interfaceComboBox->currentText() && ssid == m_apNameLine->text()) {
|
||||
|
@ -771,6 +792,7 @@ QString MobileHotspotWidget::getSettingPathByUuid()
|
|||
if (!reply.isValid()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return reply.value();
|
||||
}
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ public:
|
|||
~MobileHotspotWidget();
|
||||
|
||||
private:
|
||||
QFrame *m_hotspotFrame = nullptr;
|
||||
QFrame *m_switchFrame = nullptr; //开关
|
||||
QFrame *m_ApNameFrame = nullptr; //wifi名称
|
||||
QFrame *m_passwordFrame = nullptr; //密码
|
||||
|
@ -95,6 +96,7 @@ private:
|
|||
QString m_uuid = "";
|
||||
QString m_hostName = "";
|
||||
|
||||
void resetFrameSize();
|
||||
void initUI();
|
||||
void initDbusConnect();
|
||||
void initInterfaceInfo();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<context>
|
||||
<name>BlacklistItem</name>
|
||||
<message>
|
||||
<location filename="../blacklistitem.cpp" line="32"/>
|
||||
<location filename="../blacklistitem.cpp" line="49"/>
|
||||
<source>Remove</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<context>
|
||||
<name>BlacklistPage</name>
|
||||
<message>
|
||||
<location filename="../blacklistpage.cpp" line="26"/>
|
||||
<location filename="../blacklistpage.cpp" line="45"/>
|
||||
<source>Blacklist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<context>
|
||||
<name>ConnectDevListItem</name>
|
||||
<message>
|
||||
<location filename="../connectdevlistitem.cpp" line="31"/>
|
||||
<location filename="../connectdevlistitem.cpp" line="49"/>
|
||||
<source>drag into blacklist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<context>
|
||||
<name>ConnectdevPage</name>
|
||||
<message>
|
||||
<location filename="../connectdevpage.cpp" line="27"/>
|
||||
<location filename="../connectdevpage.cpp" line="46"/>
|
||||
<source>Connect device</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -56,79 +56,79 @@
|
|||
<context>
|
||||
<name>MobileHotspotWidget</name>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="38"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="59"/>
|
||||
<source>ukui control center</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="41"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="62"/>
|
||||
<source>ukui control center desktop message</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="117"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="138"/>
|
||||
<source>wirless switch is close or no wireless device</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="121"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="142"/>
|
||||
<source>start to close hotspot</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="130"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="151"/>
|
||||
<source>hotpots name or device is invalid</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="137"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="158"/>
|
||||
<source>start to open hotspot </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="257"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="489"/>
|
||||
<source>Contains at least 8 characters</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="172"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="205"/>
|
||||
<source>Hotspot</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="268"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="582"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="295"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="610"/>
|
||||
<source>hotspot already close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="408"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="435"/>
|
||||
<source>Open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="429"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="456"/>
|
||||
<source>Wi-Fi Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="452"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="477"/>
|
||||
<source>Password</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="490"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="518"/>
|
||||
<source>Frequency band</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="516"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="544"/>
|
||||
<source>Net card</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="611"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="619"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="639"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="647"/>
|
||||
<source>hotspot already open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<context>
|
||||
<name>BlacklistItem</name>
|
||||
<message>
|
||||
<location filename="../blacklistitem.cpp" line="30"/>
|
||||
<location filename="../blacklistitem.cpp" line="49"/>
|
||||
<source>Remove</source>
|
||||
<translation>སྤོ་སྐྱོད་བྱས་པ།</translation>
|
||||
</message>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<context>
|
||||
<name>BlacklistPage</name>
|
||||
<message>
|
||||
<location filename="../blacklistpage.cpp" line="26"/>
|
||||
<location filename="../blacklistpage.cpp" line="45"/>
|
||||
<source>Blacklist</source>
|
||||
<translation>སྒྲིག་ཆས་ཀྱི་མིང་ཐོ་ནག་པོ།</translation>
|
||||
</message>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<context>
|
||||
<name>ConnectDevListItem</name>
|
||||
<message>
|
||||
<location filename="../connectdevlistitem.cpp" line="30"/>
|
||||
<location filename="../connectdevlistitem.cpp" line="49"/>
|
||||
<source>drag into blacklist</source>
|
||||
<translation>མིང་ཐོ་ནག་པོའི་ཁ་སྣོན་རྒྱག་པ།</translation>
|
||||
</message>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<context>
|
||||
<name>ConnectdevPage</name>
|
||||
<message>
|
||||
<location filename="../connectdevpage.cpp" line="27"/>
|
||||
<location filename="../connectdevpage.cpp" line="46"/>
|
||||
<source>Connect device</source>
|
||||
<translation>འབྲེལ་མཐུད་སྒྲིག་ཆས།</translation>
|
||||
</message>
|
||||
|
@ -56,27 +56,27 @@
|
|||
<context>
|
||||
<name>MobileHotspotWidget</name>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="38"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="59"/>
|
||||
<source>ukui control center</source>
|
||||
<translation>ཝུའུ་ཁི་ལན་གྱི་ཚོད་འཛིན་ལྟེ་གནས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="41"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="62"/>
|
||||
<source>ukui control center desktop message</source>
|
||||
<translation>ukui ཚོད་འཛིན་ལྟེ་གནས་ཀྱི་ཅོག་ངོས་ཆ་འཕྲིན།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="117"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="138"/>
|
||||
<source>wirless switch is close or no wireless device</source>
|
||||
<translation>སྐུད་མེད་གློག་སྒོ་རྒྱག་པའམ་ཡང་ན་སྐུད་མེད་སྒྲིག་ཆས་མེད་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="121"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="142"/>
|
||||
<source>start to close hotspot</source>
|
||||
<translation>སྒོ་རྒྱག་འགོ་བརྩམས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="130"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="151"/>
|
||||
<source>hotpots name or device is invalid</source>
|
||||
<translation>ཚ་བ་ཆེ་བའི་མིང་ངམ་སྒྲིག་ཆས་ལ་ནུས་པ་མེད།</translation>
|
||||
</message>
|
||||
|
@ -85,54 +85,54 @@
|
|||
<translation type="vanished">གསང་གྲངས་ཀྱི་རིང་ཚད་ནི་གླེང་མང་བའི་གནད་དོན་བརྒྱད་ལས་ཆུང་བ་བྱེད་མི་རུང་།!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="137"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="158"/>
|
||||
<source>start to open hotspot </source>
|
||||
<translation>ཀུན་གྱིས་དོ་སྣང་བྱེད་ཡུལ་གསར་སྐྲུན་བྱེད་འགོ་ </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="257"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="489"/>
|
||||
<source>Contains at least 8 characters</source>
|
||||
<translation>མ་མཐར་ཡང་ཡིག་རྟགས་བརྒྱད་འདུས་ཡོད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="172"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="205"/>
|
||||
<source>Hotspot</source>
|
||||
<translation>ཚ་བ་ཆེ་བ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="268"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="582"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="295"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="610"/>
|
||||
<source>hotspot already close</source>
|
||||
<translation>ཚ་བ་ཆེ་བའི་གནད་དོན་ཐག་ཉེ་རུ་སོང་ཡོད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="408"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="435"/>
|
||||
<source>Open</source>
|
||||
<translation>སྒོ་ཕྱེ་བ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="429"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="456"/>
|
||||
<source>Wi-Fi Name</source>
|
||||
<translation>Wi-Fiཡི་མིང་།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="452"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="477"/>
|
||||
<source>Password</source>
|
||||
<translation>གསང་གྲངས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="490"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="518"/>
|
||||
<source>Frequency band</source>
|
||||
<translation>ཐེངས་གྲངས་ཀྱི་རོལ་ཆའི་རུ་ཁག</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="516"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="544"/>
|
||||
<source>Net card</source>
|
||||
<translation>དྲ་རྒྱའི་བྱང་བུ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="611"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="619"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="639"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="647"/>
|
||||
<source>hotspot already open</source>
|
||||
<translation>ཚ་བ་ཆེ་བའི་གནད་དོན་དེ་སྒོ་ཕྱེ་ཟིན།</translation>
|
||||
</message>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<context>
|
||||
<name>BlacklistItem</name>
|
||||
<message>
|
||||
<location filename="../blacklistitem.cpp" line="32"/>
|
||||
<location filename="../blacklistitem.cpp" line="49"/>
|
||||
<source>Remove</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<context>
|
||||
<name>BlacklistPage</name>
|
||||
<message>
|
||||
<location filename="../blacklistpage.cpp" line="26"/>
|
||||
<location filename="../blacklistpage.cpp" line="45"/>
|
||||
<source>Blacklist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<context>
|
||||
<name>ConnectDevListItem</name>
|
||||
<message>
|
||||
<location filename="../connectdevlistitem.cpp" line="31"/>
|
||||
<location filename="../connectdevlistitem.cpp" line="49"/>
|
||||
<source>drag into blacklist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<context>
|
||||
<name>ConnectdevPage</name>
|
||||
<message>
|
||||
<location filename="../connectdevpage.cpp" line="27"/>
|
||||
<location filename="../connectdevpage.cpp" line="46"/>
|
||||
<source>Connect device</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -56,79 +56,79 @@
|
|||
<context>
|
||||
<name>MobileHotspotWidget</name>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="38"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="59"/>
|
||||
<source>ukui control center</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="41"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="62"/>
|
||||
<source>ukui control center desktop message</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="117"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="138"/>
|
||||
<source>wirless switch is close or no wireless device</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="121"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="142"/>
|
||||
<source>start to close hotspot</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="130"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="151"/>
|
||||
<source>hotpots name or device is invalid</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="137"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="158"/>
|
||||
<source>start to open hotspot </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="257"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="489"/>
|
||||
<source>Contains at least 8 characters</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="172"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="205"/>
|
||||
<source>Hotspot</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="268"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="582"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="295"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="610"/>
|
||||
<source>hotspot already close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="408"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="435"/>
|
||||
<source>Open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="429"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="456"/>
|
||||
<source>Wi-Fi Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="452"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="477"/>
|
||||
<source>Password</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="490"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="518"/>
|
||||
<source>Frequency band</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="516"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="544"/>
|
||||
<source>Net card</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="611"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="619"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="639"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="647"/>
|
||||
<source>hotspot already open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<context>
|
||||
<name>BlacklistItem</name>
|
||||
<message>
|
||||
<location filename="../blacklistitem.cpp" line="32"/>
|
||||
<location filename="../blacklistitem.cpp" line="49"/>
|
||||
<source>Remove</source>
|
||||
<translation>移出</translation>
|
||||
</message>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<context>
|
||||
<name>BlacklistPage</name>
|
||||
<message>
|
||||
<location filename="../blacklistpage.cpp" line="26"/>
|
||||
<location filename="../blacklistpage.cpp" line="45"/>
|
||||
<source>Blacklist</source>
|
||||
<translation>设备黑名单</translation>
|
||||
</message>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<context>
|
||||
<name>ConnectDevListItem</name>
|
||||
<message>
|
||||
<location filename="../connectdevlistitem.cpp" line="31"/>
|
||||
<location filename="../connectdevlistitem.cpp" line="49"/>
|
||||
<source>drag into blacklist</source>
|
||||
<translation>添加进黑名单</translation>
|
||||
</message>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<context>
|
||||
<name>ConnectdevPage</name>
|
||||
<message>
|
||||
<location filename="../connectdevpage.cpp" line="27"/>
|
||||
<location filename="../connectdevpage.cpp" line="46"/>
|
||||
<source>Connect device</source>
|
||||
<translation>连接设备</translation>
|
||||
</message>
|
||||
|
@ -56,27 +56,27 @@
|
|||
<context>
|
||||
<name>MobileHotspotWidget</name>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="38"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="59"/>
|
||||
<source>ukui control center</source>
|
||||
<translation>控制面板</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="41"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="62"/>
|
||||
<source>ukui control center desktop message</source>
|
||||
<translation>控制面板桌面通知</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="117"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="138"/>
|
||||
<source>wirless switch is close or no wireless device</source>
|
||||
<translation>无线开关已关闭或不存在有热点功能的无线网卡</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="121"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="142"/>
|
||||
<source>start to close hotspot</source>
|
||||
<translation>开始关闭热点</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="130"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="151"/>
|
||||
<source>hotpots name or device is invalid</source>
|
||||
<translation>热点名称或设备错误</translation>
|
||||
</message>
|
||||
|
@ -85,54 +85,54 @@
|
|||
<translation type="vanished">不能创建密码长度小于八位的热点!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="137"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="158"/>
|
||||
<source>start to open hotspot </source>
|
||||
<translation>开始创建热点</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="257"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="489"/>
|
||||
<source>Contains at least 8 characters</source>
|
||||
<translation>至少包含8个字符</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="172"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="205"/>
|
||||
<source>Hotspot</source>
|
||||
<translation>移动热点</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="268"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="582"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="295"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="610"/>
|
||||
<source>hotspot already close</source>
|
||||
<translation>热点已关闭</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="408"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="435"/>
|
||||
<source>Open</source>
|
||||
<translation>开启</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="429"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="456"/>
|
||||
<source>Wi-Fi Name</source>
|
||||
<translation>Wi-Fi名称</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="452"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="477"/>
|
||||
<source>Password</source>
|
||||
<translation>网络密码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="490"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="518"/>
|
||||
<source>Frequency band</source>
|
||||
<translation>网络频带</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="516"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="544"/>
|
||||
<source>Net card</source>
|
||||
<translation>共享网卡端口</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="611"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="619"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="639"/>
|
||||
<location filename="../mobilehotspotwidget.cpp" line="647"/>
|
||||
<source>hotspot already open</source>
|
||||
<translation>热点已开启</translation>
|
||||
</message>
|
||||
|
|
|
@ -31,6 +31,11 @@ LanItem::LanItem(bool isAcitve, QWidget *parent)
|
|||
this->setMinimumSize(550, 58);
|
||||
this->setProperty("useButtonPalette", true);
|
||||
this->setFlat(true);
|
||||
QPalette pal = this->palette();
|
||||
QColor color = pal.color(QPalette::Button);
|
||||
color.setAlphaF(0.5);
|
||||
pal.setColor(QPalette::Button, color);
|
||||
this->setPalette(pal);
|
||||
// setStyleSheet("QPushButton:!checked{background-color: palette(base)}");
|
||||
QHBoxLayout *mLanLyt = new QHBoxLayout(this);
|
||||
mLanLyt->setContentsMargins(16,0,16,0);
|
||||
|
@ -41,7 +46,7 @@ LanItem::LanItem(bool isAcitve, QWidget *parent)
|
|||
statusLabel = new QLabel(this);
|
||||
statusLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
|
||||
// statusLabel->setMinimumSize(36,36);
|
||||
infoLabel = new InfoButton(this);
|
||||
infoLabel = new GrayInfoButton(this);
|
||||
mLanLyt->addWidget(iconLabel);
|
||||
mLanLyt->addWidget(titileLabel,Qt::AlignLeft);
|
||||
mLanLyt->addStretch();
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
#include <QImage>
|
||||
#include <QPainter>
|
||||
#include "fixlabel.h"
|
||||
#include "infobutton.h"
|
||||
//#include "infobutton.h"
|
||||
#include "../component/AddBtn/grayinfobutton.h"
|
||||
|
||||
class LanItem : public QPushButton
|
||||
{
|
||||
|
@ -39,7 +40,7 @@ public:
|
|||
~LanItem();
|
||||
public:
|
||||
QLabel * iconLabel = nullptr;
|
||||
InfoButton * infoLabel = nullptr;
|
||||
GrayInfoButton * infoLabel = nullptr;
|
||||
FixLabel * titileLabel = nullptr;
|
||||
QLabel * statusLabel = nullptr;
|
||||
|
||||
|
|
|
@ -438,7 +438,7 @@ void NetConnect::addLanItem(ItemFrame *frame, QString devName, QStringList infoL
|
|||
lanItem->uuid = infoList.at(1);
|
||||
lanItem->dbusPath = infoList.at(2);
|
||||
|
||||
connect(lanItem->infoLabel, &InfoButton::clicked, this, [=]{
|
||||
connect(lanItem->infoLabel, &GrayInfoButton::clicked, this, [=]{
|
||||
// open landetail page
|
||||
if (!m_interface->isValid()) {
|
||||
return;
|
||||
|
@ -707,7 +707,7 @@ void NetConnect::addOneLanFrame(ItemFrame *frame, QString deviceName, QStringLis
|
|||
lanItem->uuid = connUuid;
|
||||
lanItem->dbusPath = connDbusPath;
|
||||
|
||||
connect(lanItem->infoLabel, &InfoButton::clicked, this, [=]{
|
||||
connect(lanItem->infoLabel, &GrayInfoButton::clicked, this, [=]{
|
||||
// open landetail page
|
||||
if (!m_interface->isValid()) {
|
||||
return;
|
||||
|
|
|
@ -1026,7 +1026,7 @@ void WlanConnect::addOneWlanFrame(ItemFrame *frame, QString deviceName, QString
|
|||
wlanItem->statusLabel->setText("");
|
||||
}
|
||||
|
||||
connect(wlanItem->infoLabel, &InfoButton::clicked, this, [=]{
|
||||
connect(wlanItem->infoLabel, &GrayInfoButton::clicked, this, [=]{
|
||||
// open detail page
|
||||
if (!m_interface->isValid()) {
|
||||
return;
|
||||
|
|
|
@ -33,6 +33,11 @@ WlanItem::WlanItem(bool bAcitve, bool isLock, QWidget *parent)
|
|||
this->setMinimumSize(550, 58);
|
||||
this->setProperty("useButtonPalette", true);
|
||||
this->setFlat(true);
|
||||
QPalette pal = this->palette();
|
||||
QColor color = pal.color(QPalette::Button);
|
||||
color.setAlphaF(0.5);
|
||||
pal.setColor(QPalette::Button, color);
|
||||
this->setPalette(pal);
|
||||
QHBoxLayout *mLanLyt = new QHBoxLayout(this);
|
||||
mLanLyt->setContentsMargins(16,0,16,0);
|
||||
mLanLyt->setSpacing(16);
|
||||
|
@ -41,7 +46,7 @@ WlanItem::WlanItem(bool bAcitve, bool isLock, QWidget *parent)
|
|||
statusLabel = new QLabel(this);
|
||||
statusLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
|
||||
// statusLabel->setMinimumSize(36,36);
|
||||
infoLabel = new InfoButton(this);
|
||||
infoLabel = new GrayInfoButton(this);
|
||||
mLanLyt->addWidget(iconLabel);
|
||||
mLanLyt->addWidget(titileLabel,Qt::AlignLeft);
|
||||
mLanLyt->addStretch();
|
||||
|
|
|
@ -29,7 +29,8 @@
|
|||
#include <QGSettings>
|
||||
#include <QImage>
|
||||
#include "fixlabel.h"
|
||||
#include "infobutton.h"
|
||||
//#include "infobutton.h"
|
||||
#include "../component/AddBtn/grayinfobutton.h"
|
||||
|
||||
class WlanItem : public QPushButton
|
||||
{
|
||||
|
@ -38,7 +39,7 @@ public:
|
|||
~WlanItem();
|
||||
public:
|
||||
QLabel * iconLabel = nullptr;
|
||||
InfoButton * infoLabel = nullptr;
|
||||
GrayInfoButton * infoLabel = nullptr;
|
||||
FixLabel * titileLabel = nullptr;
|
||||
QLabel * statusLabel = nullptr;
|
||||
QString uuid = "";
|
||||
|
|
|
@ -107,6 +107,7 @@ KyConnectItem *KyActiveConnectResourse::getActiveConnectionByUuid(QString connec
|
|||
continue;
|
||||
} else {
|
||||
isFind = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include "ukuistylehelper/ukuistylehelper.h"
|
||||
#include "windowmanager/windowmanager.h"
|
||||
|
||||
#include "kysdk/kysdk-system/libkysysinfo.h"
|
||||
|
||||
#define MAINWINDOW_WIDTH 420
|
||||
#define MAINWINDOW_HEIGHT 476
|
||||
|
@ -165,16 +165,19 @@ void MainWindow::secondaryStart()
|
|||
*/
|
||||
void MainWindow::initPlatform()
|
||||
{
|
||||
if(v10Sp1.compare(KDKGetPrjCodeName().c_str(),Qt::CaseInsensitive) == 0) {
|
||||
QString feature = KDKGetOSRelease(KEY_PRODUCT_FEATURES).c_str();
|
||||
if (feature.toInt() == 3) {
|
||||
char* projectName = kdk_system_get_projectName();
|
||||
QString strProjectName(projectName);
|
||||
free(projectName);
|
||||
projectName = NULL;
|
||||
if(v10Sp1.compare(strProjectName,Qt::CaseInsensitive) == 0) {
|
||||
unsigned int feature = kdk_system_get_productFeatures();
|
||||
if (feature == 3) {
|
||||
m_isShowInCenter = true;
|
||||
}
|
||||
} else if (intel.compare(KDKGetPrjCodeName().c_str(),Qt::CaseInsensitive) == 0) {
|
||||
} else if (intel.compare(strProjectName,Qt::CaseInsensitive) == 0) {
|
||||
m_isShowInCenter = true;
|
||||
}
|
||||
|
||||
qDebug() << KDKGetPrjCodeName().c_str() << KDKGetOSRelease(KEY_PRODUCT_FEATURES).c_str() << "m_isShowInCenter" << m_isShowInCenter;
|
||||
qDebug() << "projectName" << projectName << m_isShowInCenter;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -91,7 +91,7 @@ void DetailPage::setIpv4Dns(const QString &ipv4Dns) {
|
|||
|
||||
void DetailPage::setIpv6(const QString &ipv6) {
|
||||
m_formerIPV6 = ipv6;
|
||||
this->m_IPV6->setText(ipv6);
|
||||
this->m_IPV6->setLabelText(ipv6);
|
||||
}
|
||||
|
||||
void DetailPage::setMac(const QString &mac) {
|
||||
|
|
|
@ -841,7 +841,7 @@ void LanPage::updateActivatedConnectionArea(KyConnectItem *p_newItem)
|
|||
deleteConnectionMapItem(m_activeConnectionMap, m_activatedLanListWidget, EMPTY_CONNECT_UUID);
|
||||
QListWidgetItem *p_listWidgetItem = addNewItem(p_newItem, m_activatedLanListWidget);
|
||||
m_activeConnectionMap.insert(p_newItem->m_connectUuid, p_listWidgetItem);
|
||||
this->showDesktopNotify(tr("LAN Connected Successfully"), "networkconnected");
|
||||
// this->showDesktopNotify(tr("LAN Connected Successfully"), "networkconnected");
|
||||
}
|
||||
if (m_inactivatedLanListWidget->count() < MAX_ITEMS) {
|
||||
m_inactivatedLanListWidget->setFixedWidth(MIN_WIDTH);
|
||||
|
@ -865,7 +865,7 @@ void LanPage::updateConnectionArea(KyConnectItem *p_newItem)
|
|||
qDebug()<<"[LanPage] update connection item"<<p_newItem->m_connectName;
|
||||
QListWidgetItem *p_listWidgetItem = insertNewItem(p_newItem, m_inactivatedLanListWidget);
|
||||
m_inactiveConnectionMap.insert(p_newItem->m_connectUuid, p_listWidgetItem);
|
||||
this->showDesktopNotify(tr("LAN Disconnected Successfully"), "networkdisconnected");
|
||||
// this->showDesktopNotify(tr("LAN Disconnected Successfully"), "networkdisconnected");
|
||||
}
|
||||
if (m_inactivatedLanListWidget->count() < MAX_ITEMS) {
|
||||
m_inactivatedLanListWidget->setFixedWidth(MIN_WIDTH);
|
||||
|
|
|
@ -560,7 +560,7 @@ void WlanPage::onWlanRemoved(QString interface, QString ssid)
|
|||
} else {
|
||||
deleteWirelessItemFormMap(m_activateConnectionItemMap,
|
||||
m_activatedNetListWidget, ssid);
|
||||
showDesktopNotify(tr("WLAN Disconnected Successfully"), "networkdisconnected");
|
||||
// showDesktopNotify(tr("WLAN Disconnected Successfully"), "networkdisconnected");
|
||||
|
||||
QListWidgetItem *p_listWidgetItem = addEmptyItem(m_activatedNetListWidget);
|
||||
m_activateConnectionItemMap.insert(EMPTY_SSID, p_listWidgetItem);
|
||||
|
@ -812,6 +812,7 @@ void WlanPage::sendApStateChangeSignal(QString uuid,
|
|||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
void WlanPage::wlanShowNotify(QString ssid, NetworkManager::ActiveConnection::State state,
|
||||
NetworkManager::ActiveConnection::Reason reason)
|
||||
{
|
||||
|
@ -825,6 +826,7 @@ void WlanPage::wlanShowNotify(QString ssid, NetworkManager::ActiveConnection::St
|
|||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
void WlanPage::updateActivatedArea(QString uuid, QString ssid, QString devName)
|
||||
{
|
||||
|
@ -922,7 +924,7 @@ void WlanPage::onConnectionStateChanged(QString uuid,
|
|||
!m_activateConnectionItemMap.contains(ssid)) {
|
||||
qDebug() << "wlan remove before deactivated";
|
||||
} else {
|
||||
wlanShowNotify(ssid, state, reason);
|
||||
// wlanShowNotify(ssid, state, reason);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1450,7 +1452,6 @@ void WlanPage::setWirelessSwitchEnable(bool enable)
|
|||
m_wirelessConnectOpreation->setWirelessEnabled(enable);
|
||||
if (!enable) {
|
||||
m_netSwitch->setChecked(false);
|
||||
m_netSwitch->setCheckable(false);
|
||||
m_activatedNetFrame->hide();
|
||||
m_activatedNetDivider->hide();
|
||||
m_inactivatedNetFrame->hide();
|
||||
|
|
|
@ -171,8 +171,8 @@ private:
|
|||
|
||||
void sendApStateChangeSignal(QString uuid, QString ssid, QString deviceName,
|
||||
NetworkManager::ActiveConnection::State state);
|
||||
void wlanShowNotify(QString ssid, NetworkManager::ActiveConnection::State state,
|
||||
NetworkManager::ActiveConnection::Reason reason);
|
||||
// void wlanShowNotify(QString ssid, NetworkManager::ActiveConnection::State state,
|
||||
// NetworkManager::ActiveConnection::Reason reason);
|
||||
|
||||
private:
|
||||
QMap<QString, QListWidgetItem*> m_wirelessNetItemMap;
|
||||
|
|
|
@ -26,8 +26,10 @@
|
|||
#define ICON_SIZE 16,16
|
||||
#define BACKGROUND_COLOR QColor(0,0,0,0)
|
||||
#define FOREGROUND_COLOR_NORMAL qApp->palette().text().color()
|
||||
#define FOREGROUND_COLOR_HOVER QColor(55,144,250,255)
|
||||
#define FOREGROUND_COLOR_PRESS QColor(36,109,212,255)
|
||||
//#define FOREGROUND_COLOR_HOVER QColor(55,144,250,255)
|
||||
//#define FOREGROUND_COLOR_PRESS QColor(36,109,212,255)
|
||||
#define FOREGROUND_COLOR_BRIGHTTEXT qApp->palette().brightText().color()
|
||||
#define FOREGROUND_COLOR_HIGHLIGHT qApp->palette().highlight().color()
|
||||
#define OUTER_PATH 8,8,16,16
|
||||
#define INNER_PATH 9,9,14,14
|
||||
#define TEXT_POS 14,5,16,16,0
|
||||
|
@ -54,6 +56,26 @@ void InfoButton::onPaletteChanged()
|
|||
this->repaint();
|
||||
}
|
||||
|
||||
QColor InfoButton::mixColor(const QColor &c1, const QColor &c2, qreal bias)
|
||||
{
|
||||
if (bias <= 0.0) {
|
||||
return c1;
|
||||
}
|
||||
if (bias >= 1.0) {
|
||||
return c2;
|
||||
}
|
||||
if (qIsNaN(bias)) {
|
||||
return c1;
|
||||
}
|
||||
|
||||
qreal r = mixQreal(c1.redF(), c2.redF(), bias);
|
||||
qreal g = mixQreal(c1.greenF(), c2.greenF(), bias);
|
||||
qreal b = mixQreal(c1.blueF(), c2.blueF(), bias);
|
||||
qreal a = mixQreal(c1.alphaF(), c2.alphaF(), bias);
|
||||
|
||||
return QColor::fromRgbF(r, g, b, a);
|
||||
}
|
||||
|
||||
void InfoButton::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QPalette pal = this->palette();
|
||||
|
@ -87,7 +109,8 @@ void InfoButton::paintEvent(QPaintEvent *event)
|
|||
|
||||
void InfoButton::enterEvent(QEvent *event)
|
||||
{
|
||||
m_foregroundColor = FOREGROUND_COLOR_HOVER;
|
||||
// m_foregroundColor = FOREGROUND_COLOR_HOVER;
|
||||
m_foregroundColor = FOREGROUND_COLOR_HIGHLIGHT;
|
||||
this->update();
|
||||
}
|
||||
|
||||
|
@ -99,14 +122,16 @@ void InfoButton::leaveEvent(QEvent *event)
|
|||
|
||||
void InfoButton::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
m_foregroundColor = FOREGROUND_COLOR_PRESS;
|
||||
// m_foregroundColor = FOREGROUND_COLOR_PRESS;
|
||||
m_foregroundColor = mixColor(FOREGROUND_COLOR_HIGHLIGHT, FOREGROUND_COLOR_BRIGHTTEXT, 0.2);
|
||||
this->update();
|
||||
return QPushButton::mousePressEvent(event);
|
||||
}
|
||||
|
||||
void InfoButton::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
m_foregroundColor = FOREGROUND_COLOR_HOVER;
|
||||
// m_foregroundColor = FOREGROUND_COLOR_HOVER;
|
||||
m_foregroundColor = mixColor(FOREGROUND_COLOR_HIGHLIGHT, FOREGROUND_COLOR_BRIGHTTEXT, 0.2);
|
||||
this->update();
|
||||
return QPushButton::mouseReleaseEvent(event);
|
||||
}
|
||||
|
|
|
@ -39,6 +39,12 @@ protected:
|
|||
private:
|
||||
void initUI();
|
||||
|
||||
static inline qreal mixQreal(qreal a, qreal b, qreal bias)
|
||||
{
|
||||
return a + (b - a) * bias;
|
||||
}
|
||||
QColor mixColor(const QColor &c1, const QColor &c2, qreal bias);
|
||||
|
||||
private:
|
||||
QColor m_backgroundColor;
|
||||
QColor m_foregroundColor;
|
||||
|
|
|
@ -15,11 +15,12 @@ CONFIG += c++14 qt warn_on link_pkgconfig
|
|||
#CONFIG += release
|
||||
|
||||
PKGCONFIG +=gio-2.0 glib-2.0 gio-unix-2.0 libnm libnma libsecret-1 gtk+-3.0 gsettings-qt libcap kysdk-qtwidgets kysdk-waylandhelper
|
||||
PKGCONFIG +=kysdk-sysinfo
|
||||
|
||||
INCLUDEPATH += /usr/include/KF5/NetworkManagerQt
|
||||
|
||||
LIBS += -L/usr/lib/ -lgsettings-qt -lX11 -lKF5NetworkManagerQt -lukui-log4qt -lukui-com4c -lukui-com4cxx -lkysec
|
||||
#LIBS += -lkysec
|
||||
LIBS += -L/usr/lib/ -lgsettings-qt -lX11 -lKF5NetworkManagerQt -lukui-log4qt -lkysec
|
||||
|
||||
target.path = /usr/bin
|
||||
target.source += $$TARGET
|
||||
desktop.path = /etc/xdg/autostart/
|
||||
|
|
Loading…
Reference in New Issue