使用控制面板的switchbutton

This commit is contained in:
jzxc95 2021-12-16 15:39:31 +08:00
parent 2c9ac22657
commit 26af2a46b6
11 changed files with 8 additions and 12 deletions

View File

@ -33,7 +33,7 @@
#include <QDBusMetaType>
#include "interface.h"
#include "../component/SwitchButton/switchbutton.h"
#include "switchbutton.h"
#include "hoverbtn.h"
#include "mobilehotspotwidget.h"

View File

@ -2,8 +2,6 @@ QT += widgets network dbus gui core
TEMPLATE = lib
CONFIG += plugin
include(../component/switchbutton.pri)
TARGET = $$qtLibraryTarget(mobilehotspot)
DESTDIR = ../..
target.path = $$[QT_INSTALL_LIBS]/ukui-control-center

View File

@ -363,7 +363,7 @@ void MobileHotspotWidget::setSwitchFrame()
m_switchLabel = new QLabel(tr("Open"), this);
m_switchLabel->setMinimumWidth(LABLE_MIN_WIDTH);
m_switchBtn = new SwitchButton(this, false);
m_switchBtn = new SwitchButton(this);
switchLayout->addSpacing(LAYOUT_LEFT_MARGINS);
switchLayout->addWidget(m_switchLabel);
switchLayout->addStretch();

View File

@ -19,7 +19,7 @@
#include <QDBusReply>
#include <QDBusMetaType>
#include "../component/SwitchButton/switchbutton.h"
#include "switchbutton.h"
#include "titlelabel.h"
class MobileHotspotWidget : public QWidget

View File

@ -7,7 +7,7 @@
#include <QLabel>
#include <QTimer>
#include <QDebug>
#include "../component/SwitchButton/switchbutton.h"
#include "switchbutton.h"
#include "../component/DrownLabel/drownlabel.h"
class DeviceFrame : public QFrame

View File

@ -166,7 +166,7 @@ bool NetConnect::eventFilter(QObject *w, QEvent *e) {
}
void NetConnect::initComponent() {
wiredSwitch = new SwitchButton(pluginWidget, false);
wiredSwitch = new SwitchButton(pluginWidget);
ui->openWIifLayout->addWidget(wiredSwitch);
ui->detailLayOut->setContentsMargins(MAIN_LAYOUT_MARGINS);
ui->verticalLayout_3->setContentsMargins(NO_MARGINS);

View File

@ -48,7 +48,7 @@
#include "interface.h"
#include "addbtn.h"
#include "fixlabel.h"
#include "../component/SwitchButton/switchbutton.h"
#include "switchbutton.h"
#include "hoverbtn.h"
#include "lanitem.h"
#include "deviceframe.h"

View File

@ -2,7 +2,6 @@ QT += widgets network dbus gui core
TEMPLATE = lib
CONFIG += plugin
include(../component/switchbutton.pri)
include(../component/infobutton.pri)
include(../component/drownlabel.pri)

View File

@ -182,7 +182,7 @@ bool WlanConnect::eventFilter(QObject *w, QEvent *e) {
}
void WlanConnect::initComponent() {
m_wifiSwitch = new SwitchButton(pluginWidget, false);
m_wifiSwitch = new SwitchButton(pluginWidget);
ui->openWIifLayout->addWidget(m_wifiSwitch);
ui->detailLayOut_3->setContentsMargins(MAIN_LAYOUT_MARGINS);
ui->verticalLayout_3->setContentsMargins(NO_MARGINS);

View File

@ -42,7 +42,7 @@
#include <QDBusReply>
#include <interface.h>
#include "../component/SwitchButton/switchbutton.h"
#include "switchbutton.h"
#include "hoverbtn.h"
#include "itemframe.h"
#include "wlanitem.h"

View File

@ -2,7 +2,6 @@ QT += widgets network dbus gui core
TEMPLATE = lib
CONFIG += plugin
include(../component/switchbutton.pri)
include(../component/infobutton.pri)
include(../component/drownlabel.pri)