Merge branch '1021-tablet' into 'yhkylin/v101-tablet'
1021 tablet See merge request kylinos-src/kylin-nm!11
This commit is contained in:
commit
9b62befa55
|
@ -1,6 +1,16 @@
|
|||
kylin-nm (3.20.1.6-ok4) v101; urgency=medium
|
||||
|
||||
* BUG号:
|
||||
-#143364 【网络设置】任务栏点击网络图标,网络设置窗口显示在屏幕中央
|
||||
* 需求号:
|
||||
* 其他改动:无
|
||||
* 影响域:显示位置
|
||||
|
||||
-- zhaoshixu <zhaoshixu@kylinos.cn> Fri, 21 Oct 2022 11:12:38 +0800
|
||||
|
||||
kylin-nm (3.20.1.6-ok3) v101; urgency=medium
|
||||
|
||||
* iBUG号:
|
||||
* BUG号:
|
||||
* 需求号:
|
||||
-#16989 创建的VPN等虚拟网络可直接查看、操作连接
|
||||
* 其他改动:无
|
||||
|
|
|
@ -508,7 +508,7 @@ void MainWindow::showByWaylandHelper()
|
|||
//去除窗管标题栏,传入参数为QWidget*
|
||||
kdk::UkuiStyleHelper::self()->removeHeader(this);
|
||||
this->show();
|
||||
initPlatform();
|
||||
getTabletMode();
|
||||
resetWindowPosition();
|
||||
//设置窗体位置,传入参数为QWindow*,QRect
|
||||
|
||||
|
@ -529,6 +529,29 @@ void MainWindow::setCentralWidgetType(IconActiveType iconStatus)
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::getTabletMode()
|
||||
{
|
||||
QDBusConnection::sessionBus().connect(QString("com.kylin.statusmanager.interfacer"),
|
||||
QString("/"),
|
||||
QString("qt5-ukui-platformtheme"),
|
||||
QString("mode_change_signal"), this, SLOT(onTabletModeChanged(bool)));
|
||||
|
||||
QDBusInterface interface(QString("com.kylin.statusmanager.interfacer"),
|
||||
QString("/"),
|
||||
QString("qt5-ukui-platformtheme"),
|
||||
QDBusConnection::sessionBus);
|
||||
if(!interface.isValid()) {
|
||||
m_isShowInCenter = true;
|
||||
return;
|
||||
}
|
||||
QDBusReply<bool> reply = interface->call("get_current_tabletmode");
|
||||
if (!reply.isValid()) {
|
||||
m_isShowInCenter = true;
|
||||
return;
|
||||
}
|
||||
m_isShowInCenter = reply.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief MainWindow::onTrayIconActivated 点击托盘图标的槽函数
|
||||
*/
|
||||
|
|
|
@ -161,6 +161,7 @@ private:
|
|||
void showControlCenter();
|
||||
void showByWaylandHelper();
|
||||
void setCentralWidgetType(IconActiveType iconStatus);
|
||||
void getTabletMode();
|
||||
double m_transparency=1.0; //透明度
|
||||
QGSettings * m_transGsettings; //透明度配置文件
|
||||
int currentIconIndex=0;
|
||||
|
|
|
@ -120,7 +120,6 @@ void vpnMainWindow::firstlyStart()
|
|||
initDbusConnnect();
|
||||
initWindowTheme();
|
||||
initTrayIcon();
|
||||
initPlatform();
|
||||
installEventFilter(this);
|
||||
m_secondaryStartTimer = new QTimer(this);
|
||||
connect(m_secondaryStartTimer, &QTimer::timeout, this, [ = ]() {
|
||||
|
@ -428,6 +427,7 @@ void vpnMainWindow::showByWaylandHelper()
|
|||
//去除窗管标题栏,传入参数为QWidget*
|
||||
kdk::UkuiStyleHelper::self()->removeHeader(this);
|
||||
this->show();
|
||||
getTabletMode();
|
||||
resetWindowPosition();
|
||||
//设置窗体位置,传入参数为QWindow*,QRect
|
||||
|
||||
|
@ -448,6 +448,29 @@ void vpnMainWindow::setCentralWidgetType(IconActiveType iconStatus)
|
|||
}
|
||||
}
|
||||
|
||||
void vpnMainWindow::getTabletMode()
|
||||
{
|
||||
QDBusConnection::sessionBus().connect(QString("com.kylin.statusmanager.interfacer"),
|
||||
QString("/"),
|
||||
QString("qt5-ukui-platformtheme"),
|
||||
QString("mode_change_signal"), this, SLOT(onTabletModeChanged(bool)));
|
||||
|
||||
QDBusInterface interface(QString("com.kylin.statusmanager.interfacer"),
|
||||
QString("/"),
|
||||
QString("qt5-ukui-platformtheme"),
|
||||
QDBusConnection::sessionBus);
|
||||
if(!interface.isValid()) {
|
||||
m_isShowInCenter = true;
|
||||
return;
|
||||
}
|
||||
QDBusReply<bool> reply = interface->call("get_current_tabletmode");
|
||||
if (!reply.isValid()) {
|
||||
m_isShowInCenter = true;
|
||||
return;
|
||||
}
|
||||
m_isShowInCenter = reply.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief vpnMainWindow::onTrayIconActivated 点击托盘图标的槽函数
|
||||
*/
|
||||
|
|
|
@ -111,6 +111,7 @@ private:
|
|||
// void showControlCenter();
|
||||
void showByWaylandHelper();
|
||||
void setCentralWidgetType(IconActiveType iconStatus);
|
||||
void getTabletMode();
|
||||
double m_transparency=1.0; //透明度
|
||||
QGSettings * m_transGsettings; //透明度配置文件
|
||||
int m_currentIconIndex = 0;
|
||||
|
|
Loading…
Reference in New Issue