✨ feat(UI模块): 根据设计稿修改USB连接界面样式
Before Width: | Height: | Size: 707 KiB After Width: | Height: | Size: 661 KiB |
Before Width: | Height: | Size: 355 KiB After Width: | Height: | Size: 302 KiB |
Before Width: | Height: | Size: 662 KiB After Width: | Height: | Size: 625 KiB |
Before Width: | Height: | Size: 323 KiB After Width: | Height: | Size: 268 KiB |
Before Width: | Height: | Size: 708 KiB After Width: | Height: | Size: 658 KiB |
Before Width: | Height: | Size: 356 KiB After Width: | Height: | Size: 301 KiB |
Before Width: | Height: | Size: 659 KiB After Width: | Height: | Size: 622 KiB |
Before Width: | Height: | Size: 322 KiB After Width: | Height: | Size: 267 KiB |
Before Width: | Height: | Size: 487 KiB After Width: | Height: | Size: 410 KiB |
Before Width: | Height: | Size: 566 KiB After Width: | Height: | Size: 510 KiB |
Before Width: | Height: | Size: 443 KiB After Width: | Height: | Size: 374 KiB |
Before Width: | Height: | Size: 574 KiB After Width: | Height: | Size: 495 KiB |
Before Width: | Height: | Size: 488 KiB After Width: | Height: | Size: 408 KiB |
Before Width: | Height: | Size: 567 KiB After Width: | Height: | Size: 508 KiB |
Before Width: | Height: | Size: 442 KiB After Width: | Height: | Size: 373 KiB |
Before Width: | Height: | Size: 574 KiB After Width: | Height: | Size: 494 KiB |
Before Width: | Height: | Size: 469 KiB After Width: | Height: | Size: 429 KiB |
Before Width: | Height: | Size: 414 KiB After Width: | Height: | Size: 344 KiB |
Before Width: | Height: | Size: 431 KiB After Width: | Height: | Size: 349 KiB |
Before Width: | Height: | Size: 370 KiB After Width: | Height: | Size: 308 KiB |
Before Width: | Height: | Size: 469 KiB After Width: | Height: | Size: 427 KiB |
Before Width: | Height: | Size: 414 KiB After Width: | Height: | Size: 343 KiB |
Before Width: | Height: | Size: 429 KiB After Width: | Height: | Size: 348 KiB |
Before Width: | Height: | Size: 370 KiB After Width: | Height: | Size: 307 KiB |
Before Width: | Height: | Size: 555 KiB After Width: | Height: | Size: 449 KiB |
Before Width: | Height: | Size: 568 KiB After Width: | Height: | Size: 526 KiB |
Before Width: | Height: | Size: 570 KiB After Width: | Height: | Size: 429 KiB |
Before Width: | Height: | Size: 569 KiB After Width: | Height: | Size: 484 KiB |
Before Width: | Height: | Size: 555 KiB After Width: | Height: | Size: 448 KiB |
Before Width: | Height: | Size: 568 KiB After Width: | Height: | Size: 525 KiB |
Before Width: | Height: | Size: 486 KiB After Width: | Height: | Size: 427 KiB |
Before Width: | Height: | Size: 566 KiB After Width: | Height: | Size: 483 KiB |
|
@ -25,22 +25,22 @@
|
|||
<context>
|
||||
<name>ConnectInterface</name>
|
||||
<message>
|
||||
<location filename="../ui/connectinterface/connectinterface.cpp" line="20"/>
|
||||
<location filename="../ui/connectinterface/connectinterface.cpp" line="21"/>
|
||||
<source>Back</source>
|
||||
<translation>Back</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/connectinterface/connectinterface.cpp" line="33"/>
|
||||
<location filename="../ui/connectinterface/connectinterface.cpp" line="35"/>
|
||||
<source>Nearby device</source>
|
||||
<translation>Nearby device</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/connectinterface/connectinterface.cpp" line="34"/>
|
||||
<location filename="../ui/connectinterface/connectinterface.cpp" line="36"/>
|
||||
<source>Connect Phone</source>
|
||||
<translation>Connect Phone</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/connectinterface/connectinterface.cpp" line="35"/>
|
||||
<location filename="../ui/connectinterface/connectinterface.cpp" line="37"/>
|
||||
<source>Device Code</source>
|
||||
<translation>Device Code</translation>
|
||||
</message>
|
||||
|
@ -1072,7 +1072,12 @@
|
|||
<context>
|
||||
<name>UsbConnectWin</name>
|
||||
<message>
|
||||
<location filename="../ui/connectinterface/usbconnectwin.cpp" line="95"/>
|
||||
<location filename="../ui/connectinterface/usbconnectwin.cpp" line="74"/>
|
||||
<source>Connect now</source>
|
||||
<translation>Connect now</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/connectinterface/usbconnectwin.cpp" line="119"/>
|
||||
<source>No tutorial</source>
|
||||
<translation>No tutorial</translation>
|
||||
</message>
|
||||
|
|
|
@ -25,22 +25,22 @@
|
|||
<context>
|
||||
<name>ConnectInterface</name>
|
||||
<message>
|
||||
<location filename="../ui/connectinterface/connectinterface.cpp" line="20"/>
|
||||
<location filename="../ui/connectinterface/connectinterface.cpp" line="21"/>
|
||||
<source>Back</source>
|
||||
<translation>返回</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/connectinterface/connectinterface.cpp" line="33"/>
|
||||
<location filename="../ui/connectinterface/connectinterface.cpp" line="35"/>
|
||||
<source>Nearby device</source>
|
||||
<translation>附近设备</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/connectinterface/connectinterface.cpp" line="34"/>
|
||||
<location filename="../ui/connectinterface/connectinterface.cpp" line="36"/>
|
||||
<source>Connect Phone</source>
|
||||
<translation>连接手机</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/connectinterface/connectinterface.cpp" line="35"/>
|
||||
<location filename="../ui/connectinterface/connectinterface.cpp" line="37"/>
|
||||
<source>Device Code</source>
|
||||
<translation>设备码连接</translation>
|
||||
</message>
|
||||
|
@ -1027,7 +1027,12 @@
|
|||
<context>
|
||||
<name>UsbConnectWin</name>
|
||||
<message>
|
||||
<location filename="../ui/connectinterface/usbconnectwin.cpp" line="95"/>
|
||||
<location filename="../ui/connectinterface/usbconnectwin.cpp" line="74"/>
|
||||
<source>Connect now</source>
|
||||
<translation>设置完成,立即连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/connectinterface/usbconnectwin.cpp" line="119"/>
|
||||
<source>No tutorial</source>
|
||||
<translation>暂无教程</translation>
|
||||
</message>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
const int BUTTON_W = 80;
|
||||
const int BUTTON_H = 30;
|
||||
const int TABBAR_W = 314;
|
||||
const int TABBAR_H = 48;
|
||||
const int STACKENWIN_W = 992;
|
||||
const int STACKENWIN_H = 556;
|
||||
|
||||
|
@ -30,6 +31,7 @@ void ConnectInterface::initUI()
|
|||
m_tabBar = new KTabBar(KTabBarStyle::SegmentDark, this);
|
||||
connect(m_tabBar, &KTabBar::tabBarClicked, this, &ConnectInterface::slotTabBarClicked);
|
||||
m_tabBar->setMinimumWidth(TABBAR_W);
|
||||
m_tabBar->setFixedHeight(TABBAR_H);
|
||||
m_tabBar->addTab(tr("Nearby device"));
|
||||
m_tabBar->addTab(tr("Connect Phone"));
|
||||
m_tabBar->addTab(tr("Device Code"));
|
||||
|
|
|
@ -26,6 +26,7 @@ MobileConnectWin::MobileConnectWin(QWidget *parent) : QWidget(parent)
|
|||
|
||||
m_mobileQRcode = new MobileQRcode();
|
||||
m_usbConnWin = new UsbConnectWin();
|
||||
connect(m_usbConnWin, &UsbConnectWin::sigUSBconnectBtnClicked, this, &MobileConnectWin::sigUSBconnectBtnClicked);
|
||||
m_stackedWin = new QStackedWidget(this);
|
||||
// 设置堆栈窗口
|
||||
m_stackedWin->addWidget(m_mobileQRcode); // 索引:0
|
||||
|
@ -47,9 +48,9 @@ MobileConnectWin::MobileConnectWin(QWidget *parent) : QWidget(parent)
|
|||
connect(modelBox, &QComboBox::currentTextChanged, this, &MobileConnectWin::valueChanged);
|
||||
|
||||
m_comboBoxWin = new QWidget(this);
|
||||
m_comboBoxWin->setMinimumWidth(300);
|
||||
m_comboBoxWin->setFixedWidth(300);
|
||||
m_spaceLab = new QLabel(this);
|
||||
m_spaceLab->setMinimumWidth(300);
|
||||
m_spaceLab->setFixedWidth(300);
|
||||
|
||||
QHBoxLayout *comboBoLayout = new QHBoxLayout;
|
||||
comboBoLayout->setMargin(0);
|
||||
|
@ -145,7 +146,6 @@ void MobileConnectWin::slotTabBarClicked(int index)
|
|||
GenerateTools::buriedPoint(kabase::BuriedPoint::PT::KylinMobileAssistantUsbConn);
|
||||
m_comboBoxWin->show();
|
||||
m_spaceLab->show();
|
||||
Q_EMIT sigUSBconnectBtnClicked();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
#include <QScrollBar>
|
||||
#include <QDebug>
|
||||
|
||||
int UsbConnectWin::ROLLING_WIN_W = 845;
|
||||
int UsbConnectWin::ROLLING_WIN_H = 493;
|
||||
int UsbConnectWin::ROLLING_WIN_W = 772;
|
||||
int UsbConnectWin::ROLLING_WIN_H = 400;
|
||||
const int CONNECT_BTN_W = 160;
|
||||
const int CONNECT_BTN_H = 48;
|
||||
|
||||
UsbConnectWin::UsbConnectWin(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
|
@ -55,17 +57,39 @@ UsbConnectWin::UsbConnectWin(QWidget *parent) : QWidget(parent)
|
|||
vLayout2->setMargin(0);
|
||||
m_nextImageLab->setLayout(vLayout2);
|
||||
|
||||
QHBoxLayout *hLayout = new QHBoxLayout;
|
||||
hLayout->addStretch();
|
||||
hLayout->addWidget(m_backImageLab);
|
||||
hLayout->addSpacing(30);
|
||||
hLayout->addWidget(m_imagePlayWidget);
|
||||
hLayout->addSpacing(30);
|
||||
hLayout->addWidget(m_nextImageLab);
|
||||
hLayout->addStretch();
|
||||
hLayout->setSpacing(0);
|
||||
hLayout->setMargin(0);
|
||||
setLayout(hLayout);
|
||||
QHBoxLayout *hLayout1 = new QHBoxLayout;
|
||||
hLayout1->addStretch();
|
||||
hLayout1->addWidget(m_backImageLab);
|
||||
hLayout1->addSpacing(30);
|
||||
hLayout1->addWidget(m_imagePlayWidget);
|
||||
hLayout1->addSpacing(30);
|
||||
hLayout1->addWidget(m_nextImageLab);
|
||||
hLayout1->addStretch();
|
||||
hLayout1->setSpacing(0);
|
||||
hLayout1->setMargin(0);
|
||||
|
||||
m_connectBtn = new QPushButton(this);
|
||||
connect(m_connectBtn, &QPushButton::clicked, this, &UsbConnectWin::sigUSBconnectBtnClicked);
|
||||
m_connectBtn->setFixedSize(CONNECT_BTN_W, CONNECT_BTN_H);
|
||||
m_connectBtn->setText(tr("Connect now"));
|
||||
m_connectBtn->setProperty("isImportant", true);
|
||||
|
||||
QHBoxLayout *hLayout2 = new QHBoxLayout;
|
||||
hLayout2->addStretch();
|
||||
hLayout2->addWidget(m_connectBtn);
|
||||
hLayout2->addStretch();
|
||||
hLayout2->setSpacing(0);
|
||||
hLayout2->setMargin(0);
|
||||
|
||||
QVBoxLayout *vLayout3 = new QVBoxLayout;
|
||||
vLayout3->addSpacing(23);
|
||||
vLayout3->addLayout(hLayout1);
|
||||
vLayout3->addSpacing(24);
|
||||
vLayout3->addLayout(hLayout2);
|
||||
vLayout3->addSpacing(13);
|
||||
vLayout3->setSpacing(0);
|
||||
vLayout3->setMargin(0);
|
||||
setLayout(vLayout3);
|
||||
|
||||
// 动画切换类;
|
||||
m_opacityAnimation = new QPropertyAnimation(m_imagePlayWidget, "barPos");
|
||||
|
|
|
@ -27,10 +27,12 @@ public:
|
|||
// 清空图片列表
|
||||
void clearImageList();
|
||||
|
||||
Q_SIGNALS:
|
||||
void sigUSBconnectBtnClicked();
|
||||
|
||||
public Q_SLOTS:
|
||||
// imageIndex属性变化槽函数
|
||||
void slotImageIndexChange(const QVariant &value);
|
||||
|
||||
// 图片切换按钮点击;
|
||||
void onClicked();
|
||||
|
||||
|
@ -47,6 +49,7 @@ private:
|
|||
QPushButton *m_nextImageBtn = nullptr;
|
||||
QLabel *m_backImageLab = nullptr;
|
||||
QLabel *m_nextImageLab = nullptr;
|
||||
QPushButton *m_connectBtn = nullptr;
|
||||
|
||||
// 图片切换动画类;
|
||||
QPropertyAnimation *m_opacityAnimation = nullptr;
|
||||
|
|