fix:bug#130710,close-cd#127771
This commit is contained in:
parent
cde78ec9aa
commit
04731e3186
|
@ -1,3 +1,15 @@
|
|||
ukui-control-center (3.20.0.2022.0601-ok3~0810) v101; urgency=medium
|
||||
|
||||
* 提交commit: 0466e45b
|
||||
* close-cd#bug#130710设计】【控制面板】关于界面调用sdk
|
||||
* close-cd#127771单例应用最小化后,从搜索无法将原页面呼出
|
||||
* 需求号 :无
|
||||
* 任务号:
|
||||
* 其他改动说明 :无
|
||||
* 其他改动影响域 : 无
|
||||
|
||||
-- zhoubin <zhoubin@kylinos.cn> Wed, 10 Aug 2022 13:55:10 +0800
|
||||
|
||||
ukui-control-center (3.20.0.2022.0601-ok3~0721.1) v101; urgency=medium
|
||||
|
||||
* 提交commit: 8861db58
|
||||
|
|
|
@ -158,7 +158,6 @@ void Proxy::initUi(QWidget *widget)
|
|||
mverticalLayout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
mProxyBtnGroup = new QButtonGroup(this);
|
||||
mProxyBtnGroup->setExclusive (false); // 防止互斥
|
||||
|
||||
mTitleLabel = new TitleLabel(widget);
|
||||
|
||||
|
|
|
@ -77,6 +77,7 @@ extern "C" {
|
|||
const int dbWitdth = 50;
|
||||
extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed);
|
||||
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::MainWindow),
|
||||
|
@ -85,6 +86,19 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
mate_mixer_init();
|
||||
qApp->installEventFilter(this);
|
||||
is_ExitPower = isExitsPower();
|
||||
connect(WindowManager::self(),&WindowManager::windowAdded,this,[=](const WindowId& windowId){
|
||||
/*注意:
|
||||
* 最新创建的窗体被设置为操作窗体,此demo中每个按钮对应一个接口函数调用,所有接口函数操作的窗口都是该最新创建的窗体
|
||||
*/
|
||||
if (getpid() == WindowManager::getPid(windowId)) {
|
||||
m_listWinIds.append(windowId);
|
||||
}
|
||||
});
|
||||
connect(WindowManager::self(),&WindowManager::windowRemoved,this,[=](const WindowId& windowId){
|
||||
if (m_listWinIds.contains(windowId)) {
|
||||
m_listWinIds.removeOne(windowId);
|
||||
}
|
||||
});
|
||||
initUI();
|
||||
hideComponent();
|
||||
}
|
||||
|
@ -563,9 +577,12 @@ void MainWindow::initUkccAbout() {
|
|||
|
||||
connect(ukccExit, SIGNAL(triggered()), this, SLOT(close()));
|
||||
|
||||
connect(ukccAbout, &QAction::triggered, this, [=] {
|
||||
UkccAbout *ukcc = new UkccAbout(this);
|
||||
ukcc->exec();
|
||||
connect(ukccAbout, &QAction::triggered, this, [=] {
|
||||
KAboutDialog *ukcc = new KAboutDialog(this);
|
||||
ukcc->setAppIcon(QIcon::fromTheme("ukui-control-center"));
|
||||
ukcc->setAppName(tr("Settings"));
|
||||
ukcc->setAppVersion(Utils::getUkccVersion());
|
||||
ukcc->setAppSupport("");
|
||||
});
|
||||
|
||||
connect(ukccHelp, &QAction::triggered, this, &MainWindow::onF1ButtonClicked);
|
||||
|
@ -1137,7 +1154,14 @@ void MainWindow::functionBtnClicked(QObject *plugin) {
|
|||
}
|
||||
|
||||
void MainWindow::sltMessageReceived(const QString &msg) {
|
||||
KWindowSystem::forceActiveWindow(this->winId());
|
||||
QString platform = QGuiApplication::platformName();
|
||||
if(platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) {
|
||||
if (!m_listWinIds.isEmpty()) {
|
||||
WindowManager::activateWindow(m_listWinIds.back());
|
||||
}
|
||||
} else {
|
||||
KWindowSystem::forceActiveWindow(this->winId());
|
||||
}
|
||||
this->show();
|
||||
bootOptionsFilter(msg);
|
||||
}
|
||||
|
|
|
@ -39,12 +39,16 @@
|
|||
#include "homepagewidget.h"
|
||||
#include "modulepagewidget.h"
|
||||
#include "searchwidget.h"
|
||||
#include "kaboutdialog.h"
|
||||
#include "windowmanager/windowmanager.h"
|
||||
|
||||
|
||||
class QLabel;
|
||||
class QPushButton;
|
||||
class QButtonGroup;
|
||||
class KeyValueConverter;
|
||||
|
||||
using namespace kdk;
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
}
|
||||
|
@ -111,6 +115,7 @@ private:
|
|||
|
||||
QDBusInterface *m_statusSessionDbus;
|
||||
QDBusReply<bool> is_tabletmode;
|
||||
QList<WindowId> m_listWinIds;
|
||||
|
||||
private:
|
||||
void initUI();
|
||||
|
|
|
@ -35,7 +35,8 @@ PKGCONFIG += gio-2.0 \
|
|||
gio-unix-2.0 \
|
||||
gsettings-qt \
|
||||
kysdk-waylandhelper \
|
||||
libmatemixer
|
||||
libmatemixer \
|
||||
kysdk-qtwidgets
|
||||
|
||||
desktop.files += ukui-control-center.desktop
|
||||
desktop.path = /usr/share/applications
|
||||
|
|
|
@ -264,3 +264,35 @@ bool Utils::isZJY()
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
QString Utils::getUkccVersion()
|
||||
{
|
||||
FILE *pp = NULL;
|
||||
char *line = NULL;
|
||||
size_t len = 0;
|
||||
ssize_t read;
|
||||
char *q = NULL;
|
||||
QString version = "none";
|
||||
|
||||
pp = popen("dpkg -l ukui-control-center | grep ukui-control-center", "r");
|
||||
if(NULL == pp)
|
||||
return version;
|
||||
|
||||
while((read = getline(&line, &len, pp)) != -1){
|
||||
q = strrchr(line, '\n');
|
||||
*q = '\0';
|
||||
|
||||
QString content = line;
|
||||
QStringList list = content.split(" ");
|
||||
|
||||
list.removeAll("");
|
||||
|
||||
if (list.size() >= 3)
|
||||
version = list.at(2);
|
||||
}
|
||||
|
||||
free(line);
|
||||
line = NULL;
|
||||
pclose(pp);
|
||||
return version;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <QtDBus/QDBusConnection>
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
{
|
||||
void centerToScreen(QWidget *widget);
|
||||
QRect sizeOnCursor();
|
||||
QVariantMap getModuleHideStatus();
|
||||
|
@ -49,5 +49,6 @@ namespace Utils
|
|||
bool isTablet();
|
||||
bool isZJY();
|
||||
QString getHostName();
|
||||
QString getUkccVersion();
|
||||
}
|
||||
#endif // UTILS_H
|
||||
|
|
Loading…
Reference in New Issue