Binary files /tmp/tmpub6o9k4a/Q4WfAr64PW/ukui-control-center-5.0.0.0/data/en_US/image/30.png and /tmp/tmpub6o9k4a/B23W6C5lyI/ukui-control-center-5.0.0.0/data/en_US/image/30.png differ Binary files /tmp/tmpub6o9k4a/Q4WfAr64PW/ukui-control-center-5.0.0.0/data/en_US/image/31.png and /tmp/tmpub6o9k4a/B23W6C5lyI/ukui-control-center-5.0.0.0/data/en_US/image/31.png differ Binary files /tmp/tmpub6o9k4a/Q4WfAr64PW/ukui-control-center-5.0.0.0/data/en_US/image/32.png and /tmp/tmpub6o9k4a/B23W6C5lyI/ukui-control-center-5.0.0.0/data/en_US/image/32.png differ Binary files /tmp/tmpub6o9k4a/Q4WfAr64PW/ukui-control-center-5.0.0.0/data/en_US/image/35.png and /tmp/tmpub6o9k4a/B23W6C5lyI/ukui-control-center-5.0.0.0/data/en_US/image/35.png differ Binary files /tmp/tmpub6o9k4a/Q4WfAr64PW/ukui-control-center-5.0.0.0/data/en_US/image/6.png and /tmp/tmpub6o9k4a/B23W6C5lyI/ukui-control-center-5.0.0.0/data/en_US/image/6.png differ Binary files /tmp/tmpub6o9k4a/Q4WfAr64PW/ukui-control-center-5.0.0.0/data/en_US/image/related-settings.png and /tmp/tmpub6o9k4a/B23W6C5lyI/ukui-control-center-5.0.0.0/data/en_US/image/related-settings.png differ Binary files /tmp/tmpub6o9k4a/Q4WfAr64PW/ukui-control-center-5.0.0.0/data/en_US/image/theme-cursor.png and /tmp/tmpub6o9k4a/B23W6C5lyI/ukui-control-center-5.0.0.0/data/en_US/image/theme-cursor.png differ Binary files /tmp/tmpub6o9k4a/Q4WfAr64PW/ukui-control-center-5.0.0.0/data/en_US/image/theme-effect.png and /tmp/tmpub6o9k4a/B23W6C5lyI/ukui-control-center-5.0.0.0/data/en_US/image/theme-effect.png differ Binary files /tmp/tmpub6o9k4a/Q4WfAr64PW/ukui-control-center-5.0.0.0/data/en_US/image/theme.png and /tmp/tmpub6o9k4a/B23W6C5lyI/ukui-control-center-5.0.0.0/data/en_US/image/theme.png differ diff -Nru ukui-control-center-5.0.0.0/data/en_US/index.md ukui-control-center-5.0.0.0/data/en_US/index.md --- ukui-control-center-5.0.0.0/data/en_US/index.md 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/data/en_US/index.md 2025-02-07 16:27:50.000000000 +0800 @@ -55,7 +55,8 @@  ### Vino -As shown in Fig 6 +Control whether your desktop can be accessed remotely by turning the local VNC service on and off +  - "Connect to your desktop remotely" is turned off by default @@ -65,6 +66,10 @@ - "You must confirm every visit for this machine"is on by default, and each access request needs to be answered - "Require user to enter this password when using VNC" is disabled by default, and the password is not displayed in plaintext by default +The UI under Wayland + + + ### About The About module provides system version, device specifications, user information, authorization activation information and privacy agreement related information of the local system. @@ -348,17 +353,27 @@ ### Theme +The Theme include theme mode, window appearance, icon theme, cursor theme, window effects, and related settings. + - Theme Mode: - +  + +- Window Mode: + + - Icon theme and cursor theme: - + + +- Effect settings (some machines do not support this function) -- Effect settings (some machines do not support this function): +  +- Other: +  ### Screenlock @@ -537,7 +552,7 @@ <br> ## Application -### Auto Boot +### Auto Start The Auto Start module display the startup software that currently exists in the system. diff -Nru ukui-control-center-5.0.0.0/data/org.ukui.control-center.gschema.xml ukui-control-center-5.0.0.0/data/org.ukui.control-center.gschema.xml --- ukui-control-center-5.0.0.0/data/org.ukui.control-center.gschema.xml 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/data/org.ukui.control-center.gschema.xml 2025-02-07 16:27:50.000000000 +0800 @@ -1,7 +1,7 @@ <schemalist gettext-domain="ukui-control-center"> <schema id="org.ukui.control-center" path="/org/ukui/control-center/"> <key name="fonts-list" type="as"> - <default>['CESI仿宋-GB13000','CESI_FS_GB13000', 'CESI仿宋-GB18030','CESI_FS_GB18030', 'CESI仿宋-GB2312','CESI_FS_GB2312', 'CESI宋体-GB13000','CESI_SS_GB13000', 'CESI宋体-GB18030','CESI_SS_GB18030', 'CESI宋体-GB2312','CESI_SS_GB2312', 'CESI小标宋-GB13000','CESI_XBS_GB13000', 'CESI小标宋-GB18030','CESI_XBS_GB18030', 'CESI小标宋-GB2312','CESI_XBS_GB2312', 'CESI楷体-GB13000','CESI_KT_GB13000', 'CESI楷体-GB18030','CESI_KT_GB18030', 'CESI楷体-GB2312','CESI_KT_GB2312', 'CESI黑体-GB13000','CESI_HT_GB13000', 'CESI黑体-GB18030','CESI_HT_GB18030', 'CESI黑体-GB2312','CESI_HT_GB2312', '仿宋', '黑体', '楷体', '宋体', '华文彩云','STCaiyun', '华文仿宋','STFangsong', '华文琥珀','STHupo', '华文楷体','STKaiti', '华文隶书','STLiti', '华文宋体','STSong', '华文细黑','STXihei', '华文行楷','STXingkai', '华文新魏','STXinwei', 'Noto Sans CJK SC', 'Noto Sans CJK SC Black', 'Noto Sans Mono CJK SC', 'Noto Sans CJK SC DemiLight', 'Noto Sans CJK SC Light', 'Noto Sans CJK SC Medium', 'Noto Sans CJK SC', 'Noto Sans CJK SC Thin','Dotted Songti Square','WenQuanYi Bitmap Song','国标仿宋', '国标宋体-超大字符集', '国标仿宋-GB/T 2312', '国标黑体', '国标黑体-GB/T 2312', '国标楷体', '国标楷体-GB/T 2312', '国标宋体', '国标宋体-GB/T 2312', '国标小标宋', '国标小标宋-GB/T 2312']</default> + <default>['CESI仿宋-GB13000','CESI_FS_GB13000', 'CESI仿宋-GB18030','CESI_FS_GB18030', 'CESI仿宋-GB2312','CESI_FS_GB2312', 'CESI宋体-GB13000','CESI_SS_GB13000', 'CESI宋体-GB18030','CESI_SS_GB18030', 'CESI宋体-GB2312','CESI_SS_GB2312', 'CESI小标宋-GB13000','CESI_XBS_GB13000', 'CESI小标宋-GB18030','CESI_XBS_GB18030', 'CESI小标宋-GB2312','CESI_XBS_GB2312', 'CESI楷体-GB13000','CESI_KT_GB13000', 'CESI楷体-GB18030','CESI_KT_GB18030', 'CESI楷体-GB2312','CESI_KT_GB2312', 'CESI黑体-GB13000','CESI_HT_GB13000', 'CESI黑体-GB18030','CESI_HT_GB18030', 'CESI黑体-GB2312','CESI_HT_GB2312', '仿宋', '黑体', '楷体', '宋体', '华文仿宋','STFangsong', '华文楷体','STKaiti', '华文隶书','STLiti', '华文宋体','STSong', '华文细黑','STXihei', '华文行楷','STXingkai', '华文新魏','STXinwei', 'Noto Sans CJK SC', 'Noto Sans CJK SC Black', 'Noto Sans Mono CJK SC', 'Noto Sans CJK SC DemiLight', 'Noto Sans CJK SC Light', 'Noto Sans CJK SC Medium', 'Noto Sans CJK SC', 'Noto Sans CJK SC Thin','Dotted Songti Square','WenQuanYi Bitmap Song','国标仿宋','GB_FS_GB18030', '国标宋体-超大字符集','GB_SS_GB18030_ExtendedK', '国标仿宋-GB/T 2312','GB_FS_GBT2312', '国标黑体','GB_HT_GB18030', '国标黑体-GB/T 2312','GB_HT_GBT2312', '国标楷体', 'GB_KT_GB18030','国标楷体-GB/T 2312', 'GB_KT_GBT2312','国标宋体', 'GB_SS_GB18030','国标宋体-GB/T 2312','GB_SS_GBT2312', '国标小标宋','GB_XBS_GB18030','国标小标宋-GB/T 2312','GB_XBS_GBT2312']</default> <summary>Control panel default font list</summary> <description>Control panel default font list</description> </key> Binary files /tmp/tmpub6o9k4a/Q4WfAr64PW/ukui-control-center-5.0.0.0/data/zh_CN/image/area.png and /tmp/tmpub6o9k4a/B23W6C5lyI/ukui-control-center-5.0.0.0/data/zh_CN/image/area.png differ Binary files /tmp/tmpub6o9k4a/Q4WfAr64PW/ukui-control-center-5.0.0.0/data/zh_CN/image/vino.png and /tmp/tmpub6o9k4a/B23W6C5lyI/ukui-control-center-5.0.0.0/data/zh_CN/image/vino.png differ diff -Nru ukui-control-center-5.0.0.0/data/zh_CN/index.md ukui-control-center-5.0.0.0/data/zh_CN/index.md --- ukui-control-center-5.0.0.0/data/zh_CN/index.md 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/data/zh_CN/index.md 2025-02-07 16:27:50.000000000 +0800 @@ -198,10 +198,16 @@  -- "允许其他人远程连接您的桌面"默认状态由系统是否自启vnc服务决定 -- “允许其他人远程连接您的桌面并控制您的屏幕”默认状态为关闭,只可被访问,不可被操控 -- “您必须为本机机器确认每次访问”默认状态为开启,需应答每次访问请求 -- “要求用户输入此密码”默认状态为关闭 +- “远程连接这台电脑”默认关闭 +- “允许其他用户使用RDP远程连接这台电脑”默认状态为关闭,需要安装xrdp才能通过xrdp进行连接(未安装时不显示) +- “允许其他用户使用VNC远程连接这台电脑”默认状态为关闭,只可被访问,不可被操控 +- “允许其他用户控制这台电脑的屏幕”默认状态为开启,可被操控 +- “每次访问这台电脑时需要确认”默认状态为开启,需应答每次访问请求 +- “使用VNC远程连接时需要输入密码”默认状态为关闭,开启后密码默认非明文显示 + +Wayland 下 UI 显示 + + ### 关 于 diff -Nru ukui-control-center-5.0.0.0/debian/changelog ukui-control-center-5.0.0.0/debian/changelog --- ukui-control-center-5.0.0.0/debian/changelog 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/debian/changelog 2025-02-07 16:27:50.000000000 +0800 @@ -1,3 +1,12 @@ +ukui-control-center (5.0.0.0-ok4.2) huanghe; urgency=medium + + * BUG:#290697 【设置】【字体】字体选择可选字体与要求不一致 + * 需求号:无 + * 其他改动说明:无 + * 其他改动影响域:无 + + -- susidiain <susidian@kylinos.cn> Fri, 07 Feb 2025 16:27:50 +0800 + ukui-control-center (5.0.0.0-ok4.1) huanghe; urgency=medium * BUG:#311177 【版本组自测】【UKUI5】任务栏单击网络未弹出弹窗,右击“网络-设置网络项”,未跳转至控制面板设置界面 @@ -1312,7 +1321,7 @@ * 任务号:无 * 其他改动:无 - -- zhoubin <zhoubin@kylin> Thu, 20 Oct 2022 09:40:39 +0800 + -- zhoubin <zhoubin@kylinos.cn> Thu, 20 Oct 2022 09:40:39 +0800 ukui-control-center (3.22.1.7) v101; urgency=medium diff -Nru ukui-control-center-5.0.0.0/debian/control ukui-control-center-5.0.0.0/debian/control --- ukui-control-center-5.0.0.0/debian/control 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/debian/control 2025-02-07 16:27:50.000000000 +0800 @@ -46,6 +46,7 @@ libfontconfig-dev, libfreetype-dev, libkysdk-ukenv-dev, + libgtest-dev, Standards-Version: 4.5.0 Rules-Requires-Root: no Homepage: https://github.com/ukui/ukui-control-center diff -Nru ukui-control-center-5.0.0.0/debian/libukcc3.postinst ukui-control-center-5.0.0.0/debian/libukcc3.postinst --- ukui-control-center-5.0.0.0/debian/libukcc3.postinst 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/debian/libukcc3.postinst 2025-02-07 16:27:50.000000000 +0800 @@ -1,5 +1,14 @@ +#!/bin/bash + is_hwe=$(cat /etc/kylin-build | grep "V10-SP1-hwe") file_path="/usr/lib/x86_64-linux-gnu/libukcc.so.1.0.0.old" if [ -f /usr/sbin/kysec_get ] && [ -n "${is_hwe}" ] && [ -f $file_path ];then kysec_set -n exectl -v verified $file_path fi + +path="/usr/lib/`/usr/bin/dpkg-architecture -qDEB_TARGET_MULTIARCH`/libukcc.so.1.0.0" +path1="/usr/lib/`/usr/bin/dpkg-architecture -qDEB_TARGET_MULTIARCH`/libukcc.so.1" +path2="/usr/lib/`/usr/bin/dpkg-architecture -qDEB_TARGET_MULTIARCH`/libukcc.so.1.0" +dpkg-divert --package libukcc3 --rename --remove "$path"".old" +dpkg-divert --package libukcc3 --rename --remove "$path1"".old" +dpkg-divert --package libukcc3 --rename --remove "$path2"".old" diff -Nru ukui-control-center-5.0.0.0/libukcc/interface/ukcccommon.cpp ukui-control-center-5.0.0.0/libukcc/interface/ukcccommon.cpp --- ukui-control-center-5.0.0.0/libukcc/interface/ukcccommon.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/libukcc/interface/ukcccommon.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -412,23 +412,19 @@ { FILE *fp; fp=fopen("/etc/passwd","r"); - if(fp == NULL) - { - return true; + if(fp == NULL) { + return true; } char buf[1024], name[128]; - while(!feof(fp)) - { - if(fgets(buf,sizeof (buf),fp) == NULL) - { - break; - } - sscanf(buf,"%[^:]",name); - if(strcmp(name,username) == 0) - { - fclose(fp); - return false; - } + while(!feof(fp)) { + if (fgets(buf,sizeof (buf),fp) == NULL) { + break; + } + sscanf(buf,"%[^:]",name); + if(strcmp(name,username) == 0) { + fclose(fp); + return false; + } } fclose(fp); return true; diff -Nru ukui-control-center-5.0.0.0/libukcc/widgets/SettingWidget/comboxwidget.cpp ukui-control-center-5.0.0.0/libukcc/widgets/SettingWidget/comboxwidget.cpp --- ukui-control-center-5.0.0.0/libukcc/widgets/SettingWidget/comboxwidget.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/libukcc/widgets/SettingWidget/comboxwidget.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -19,7 +19,7 @@ mainLayout = new QHBoxLayout(); mainLayout->setContentsMargins(16, 0, 16, 0); m_settingName->setFixedWidth(214); - mainLayout->addWidget(m_settingName); + mainLayout->addWidget(m_settingName, Qt::AlignLeft); mainLayout->setSpacing(16); mainLayout->addWidget(m_combox); this->setLayout(mainLayout); @@ -71,6 +71,11 @@ m_settingName->setFixedWidth(w); } +void ComboxWidget::setTitleMaximumWidth(int w) +{ + m_settingName->setMaximumWidth(w); +} + QComboBox *ComboxWidget::comboBox() const { return m_combox; diff -Nru ukui-control-center-5.0.0.0/libukcc/widgets/SettingWidget/comboxwidget.h ukui-control-center-5.0.0.0/libukcc/widgets/SettingWidget/comboxwidget.h --- ukui-control-center-5.0.0.0/libukcc/widgets/SettingWidget/comboxwidget.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/libukcc/widgets/SettingWidget/comboxwidget.h 2025-02-07 16:27:50.000000000 +0800 @@ -65,6 +65,13 @@ void setTitleFixedWidth(int w); /** + * @brief 设置 m_settingName label 宽度 + * + * @param w + */ + void setTitleMaximumWidth(int w); + + /** * @brief 设置 QComboBox 当前 text * * @param text diff -Nru ukui-control-center-5.0.0.0/libukcc/widgets/SettingWidget/pushbuttonwidget.cpp ukui-control-center-5.0.0.0/libukcc/widgets/SettingWidget/pushbuttonwidget.cpp --- ukui-control-center-5.0.0.0/libukcc/widgets/SettingWidget/pushbuttonwidget.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/libukcc/widgets/SettingWidget/pushbuttonwidget.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -21,7 +21,8 @@ m_iconLabel->setVisible(false); mainLayout = new QHBoxLayout(this); mainLayout->setContentsMargins(16, 0, 16, 0); - m_pushButton->setFixedWidth(100); + m_pushButton->setMinimumWidth(100); + m_pushButton->setMaximumWidth(200); mainLayout->addWidget(m_iconLabel); mainLayout->addWidget(m_settingName); mainLayout->addStretch(); diff -Nru ukui-control-center-5.0.0.0/plugins/account/userinfo/changeusernickname.cpp ukui-control-center-5.0.0.0/plugins/account/userinfo/changeusernickname.cpp --- ukui-control-center-5.0.0.0/plugins/account/userinfo/changeusernickname.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/account/userinfo/changeusernickname.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -111,9 +111,11 @@ cancelBtn = new QPushButton(); cancelBtn->setMinimumWidth(96); cancelBtn->setText(tr("Cancel")); + cancelBtn->setProperty("useButtonPalette", true); confirmBtn = new QPushButton(); confirmBtn->setMinimumWidth(96); confirmBtn->setText(tr("Confirm")); + confirmBtn->setProperty("isImportant", true); bottomBtnsHorLayout = new QHBoxLayout; bottomBtnsHorLayout->setSpacing(16); diff -Nru ukui-control-center-5.0.0.0/plugins/account/userinfo/changeuserpwd.cpp ukui-control-center-5.0.0.0/plugins/account/userinfo/changeuserpwd.cpp --- ukui-control-center-5.0.0.0/plugins/account/userinfo/changeuserpwd.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/account/userinfo/changeuserpwd.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -258,10 +258,12 @@ cancelBtn->setMinimumWidth(96); cancelBtn->setText(tr("Cancel")); cancelBtn->setFocusPolicy(Qt::FocusPolicy::NoFocus); + cancelBtn->setProperty("useButtonPalette", true); confirmBtn = new QPushButton(); confirmBtn->setMinimumWidth(96); confirmBtn->setText(tr("Confirm")); confirmBtn->setFocusPolicy(Qt::FocusPolicy::NoFocus); + confirmBtn->setProperty("isImportant", true); bottomBtnsHorLayout = new QHBoxLayout; bottomBtnsHorLayout->setSpacing(16); diff -Nru ukui-control-center-5.0.0.0/plugins/account/userinfo/creategroupdialog.cpp ukui-control-center-5.0.0.0/plugins/account/userinfo/creategroupdialog.cpp --- ukui-control-center-5.0.0.0/plugins/account/userinfo/creategroupdialog.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/account/userinfo/creategroupdialog.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -20,7 +20,6 @@ #include "creategroupdialog.h" #include "userinfo.h" -#include "closebutton.h" #include "changeusergroup.h" #define GROUPNAME_LENGTH 32 @@ -51,7 +50,8 @@ this->setFixedSize(480, 214); setAttribute(Qt::WA_DeleteOnClose); - mGroupNameLabel = new FixLabel(tr("Name"), this); + mGroupNameLabel = new KLabel(this); + mGroupNameLabel->setText(tr("Name")); mGroupNameLabel->setFixedSize(62, 36); mGroupNameEdit = new QLineEdit(this); mGroupNameEdit->installEventFilter(this); @@ -63,7 +63,7 @@ mGroupNameHLayout->addWidget(mGroupNameLabel); mGroupNameHLayout->addWidget(mGroupNameEdit); - mGroupNameTipLabel = new FixLabel(); + mGroupNameTipLabel = new KLabel(this); mGroupNameTipLabel->setFixedWidth(370); QFont ft; ft.setPixelSize(14); @@ -75,7 +75,8 @@ mGroupNameTipHLayout->addStretch(); mGroupNameTipHLayout->addWidget(mGroupNameTipLabel); - mGroupIdLabel = new FixLabel(tr("Id"), this); + mGroupIdLabel = new KLabel(this); + mGroupIdLabel->setText(tr("Id")); mGroupIdLabel->setFixedSize(62, 36); mGroupIdEdit = new QLineEdit(this); mGroupIdEdit->setFixedSize(370, 36); @@ -89,8 +90,10 @@ mCancelBtn = new QPushButton(tr("Cancel"), this); mCancelBtn->setFixedSize(96, 36); mCancelBtn->setFocusPolicy(Qt::FocusPolicy::NoFocus); + mCancelBtn->setProperty("useButtonPalette", true); mConfirmBtn = new QPushButton(tr("Confirm"), this); mConfirmBtn->setMinimumSize(96, 36); + mConfirmBtn->setProperty("isImportant", true); mConfirmHLaout = new QHBoxLayout(this); mConfirmHLaout->setContentsMargins(0,0,0,0); diff -Nru ukui-control-center-5.0.0.0/plugins/account/userinfo/creategroupdialog.h ukui-control-center-5.0.0.0/plugins/account/userinfo/creategroupdialog.h --- ukui-control-center-5.0.0.0/plugins/account/userinfo/creategroupdialog.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/account/userinfo/creategroupdialog.h 2025-02-07 16:27:50.000000000 +0800 @@ -34,7 +34,8 @@ #include <QLabel> #include <QPushButton> -#include "widgets/Label/fixlabel.h" +#include <kysdk/applications/klabel.h> +using namespace kdk; class changeUserGroup; namespace Ui { @@ -64,8 +65,8 @@ QFrame *mGroupIdFrame; QFrame *mConfirmFrame; - QLabel *mGroupNameLabel; - QLabel *mGroupIdLabel; + KLabel *mGroupNameLabel; + KLabel *mGroupIdLabel; QLineEdit *mGroupNameEdit; QLineEdit *mGroupIdEdit; @@ -82,7 +83,7 @@ bool _idHasModified; QString oldGroupName; - FixLabel *mGroupNameTipLabel; + KLabel *mGroupNameTipLabel; QString mGroupNameTip; void initUI(); diff -Nru ukui-control-center-5.0.0.0/plugins/account/userinfo/createusernew.cpp ukui-control-center-5.0.0.0/plugins/account/userinfo/createusernew.cpp --- ukui-control-center-5.0.0.0/plugins/account/userinfo/createusernew.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/account/userinfo/createusernew.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -277,9 +277,11 @@ cancelBtn = new QPushButton; cancelBtn->setFocusPolicy(Qt::FocusPolicy::NoFocus); cancelBtn->setText(tr("Cancel")); + cancelBtn->setProperty("useButtonPalette", true); confirmBtn = new QPushButton; confirmBtn->setFocusPolicy(Qt::FocusPolicy::NoFocus); confirmBtn->setText(tr("Confirm")); + confirmBtn->setProperty("isImportant", true); bottomHorLayout = new QHBoxLayout; bottomHorLayout->setContentsMargins(0, 0, 24, 24); diff -Nru ukui-control-center-5.0.0.0/plugins/account/userinfo/deleteuserexists.cpp ukui-control-center-5.0.0.0/plugins/account/userinfo/deleteuserexists.cpp --- ukui-control-center-5.0.0.0/plugins/account/userinfo/deleteuserexists.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/account/userinfo/deleteuserexists.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -62,8 +62,10 @@ removeBtnGroup->addButton(removeWholeRadioBtn, 1); removeWholeRadioBtn->setChecked(true); - removeButKeepFilesLabel = new FixLabel(tr("Keep desktop, files, favorites, music of the user")); - removeWholeLabel = new FixLabel(tr("Delete whole data belong user")); + removeButKeepFilesLabel = new KLabel(this); + removeButKeepFilesLabel->setText(tr("Keep desktop, files, favorites, music of the user")); + removeWholeLabel = new KLabel(this); + removeWholeLabel->setText(tr("Delete whole data belong user")); removeButKeepFilesHorLayout = new QHBoxLayout; removeButKeepFilesHorLayout->setSpacing(9); diff -Nru ukui-control-center-5.0.0.0/plugins/account/userinfo/deleteuserexists.h ukui-control-center-5.0.0.0/plugins/account/userinfo/deleteuserexists.h --- ukui-control-center-5.0.0.0/plugins/account/userinfo/deleteuserexists.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/account/userinfo/deleteuserexists.h 2025-02-07 16:27:50.000000000 +0800 @@ -2,7 +2,8 @@ #define DELETEUSEREXISTS_H #include <QDialog> -#include "fixlabel.h" +#include <kysdk/applications/klabel.h> +using namespace kdk; class QHBoxLayout; class QVBoxLayout; @@ -40,8 +41,8 @@ QRadioButton * removeWholeRadioBtn; QLabel *noteLabel; - FixLabel *removeButKeepFilesLabel; - FixLabel *removeWholeLabel; + KLabel *removeButKeepFilesLabel; + KLabel *removeWholeLabel; QPushButton * cancelBtn; QPushButton * confirmBtn; diff -Nru ukui-control-center-5.0.0.0/plugins/account/userinfo/userinfo.cpp ukui-control-center-5.0.0.0/plugins/account/userinfo/userinfo.cpp --- ukui-control-center-5.0.0.0/plugins/account/userinfo/userinfo.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/account/userinfo/userinfo.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -49,7 +49,6 @@ #include "ukcccommon.h" using namespace ukcc; -#include "imageutil.h" /* qt会将glib里的signals成员识别为宏,所以取消该宏 * 后面如果用到signals时,使用Q_SIGNALS代替即可 @@ -70,6 +69,10 @@ #define DEFAULTFACE (UkccCommon::isCommunity() || UkccCommon::isOpenkylin())?DEFAULTFACECOMMUNITY:DEFAULTFACECOMMERCIAL #define ITEMHEIGH 60 +const static QString login1Service = QStringLiteral("org.freedesktop.login1"); +const static QString login1Path = QStringLiteral("/org/freedesktop/login1"); +const static QString login1ManagerInterface = QStringLiteral("org.freedesktop.login1.Manager"); + UserInfo::UserInfo() : mFirstLoad(true) { pluginName = QObject::tr("User Info"); @@ -125,6 +128,12 @@ // 将以后所有DBus调用的超时设置为 milliseconds m_pUniauthBackendDbus->setTimeout(2147483647); // -1 为默认的25s超时 + m_pLoginMgrInterface = new QDBusInterface(login1Service, + login1Path, + login1ManagerInterface, + QDBusConnection::systemBus(), + this); + // 获取系统全部用户信息,用户Uid大于等于1000的 _acquireAllUsersInfo(); @@ -312,12 +321,12 @@ if (!getuid()){ currentNickNameChangeLabel->setEnabled(false); currentNickNameLabel->setEnabled(false); - changeCurrentPwdBtn->setEnabled(false); changeCurrentTypeBtn->setEnabled(false); currentUserlogoBtn->setEnabled(false); autoLoginFrame->hide(); nopwdLoginFrame->hide(); } + changeCurrentTypeBtn->setEnabled(false); hideComponent(); } @@ -357,7 +366,6 @@ void UserInfo::buildAndSetupUsers() { - QMap<QString, UserInfomation>::iterator it = allUserInfoMap.begin(); for (; it != allUserInfoMap.end(); it++){ UserInfomation user = it.value(); @@ -378,21 +386,10 @@ //用户类型 QString cType = _accountTypeIntToString(user.accounttype); - if (setTextDynamic(currentUserTypeLabel, cType)){ + if (setTextDynamic(currentUserTypeLabel, cType)) { currentUserTypeLabel->setToolTip(cType); } fontSizeChange(user, nullptr); - if (user.accounttype && getuid()){ - changeCurrentTypeBtn->setEnabled(!isLastAdmin(user.username)); - } - - connect(this, &UserInfo::userTypeChanged, [=](QString n){ - if (user.accounttype){ - changeCurrentTypeBtn->setEnabled(!isLastAdmin(user.username)); - } else { - changeCurrentTypeBtn->setEnabled(true); - } - }); QProcess *process = new QProcess; process->start("dpkg -l | grep kim-client"); @@ -444,7 +441,10 @@ void UserInfo::buildItemForUsersAndSetConnect(UserInfomation user) { - UtilsForUserinfo * utils = new UtilsForUserinfo; + + UtilsForUserinfo * utils = new UtilsForUserinfo(this); + utilsUsers << utils; + utils->m_username = user.username; utils->refreshUserLogo(user.iconfile); utils->refreshUserNickname(user.realname); utils->refreshUserType(user.accounttype); @@ -453,8 +453,8 @@ if (user.accounttype){ utils->refreshDelStatus(!isLastAdmin(user.username)); - utils->refreshTypeStatus(!isLastAdmin(user.username)); } + utils->refreshTypeStatus(!isLastAdmin(user.username) && !user.logined); // 域用户按钮不可设置 UserInfomation curruser = allUserInfoMap.value(g_get_user_name()); @@ -490,8 +490,10 @@ //用户类型发生变化,重置状态 connect(this, &UserInfo::userTypeChanged, utils, [=](QString n){ + QStringList loginedUsers = getLoginedUsers(); + qDebug() << "update userType"<< user.username << loginedUsers.contains(user.username); utils->refreshDelStatus(!isLastAdmin(user.username)); - utils->refreshTypeStatus(!isLastAdmin(user.username)); + utils->refreshTypeStatus(!isLastAdmin(user.username) && !loginedUsers.contains(user.username)); #ifdef WITHKYSEC if (!kysec_is_disabled() && kysec_get_3adm_status()){ if (user.username == "secadm" || user.username == "auditadm"){ @@ -524,8 +526,6 @@ QMap<QString, UserInfomation>::iterator it = allUserInfoMap.begin(); for (; it != allUserInfoMap.end(); it++){ UserInfomation user = it.value(); - - usersStringList.append(user.username); usersStringList.append(user.realname); } @@ -814,8 +814,8 @@ return line; } -bool UserInfo::setTextDynamic(QLabel *label, QString string){ - +bool UserInfo::setTextDynamic(QLabel *label, QString string) +{ bool isOverLength = false; QFontMetrics fontMetrics(label->font()); int labelValueSize = 150; @@ -914,24 +914,9 @@ showCreateUserNewDialog(); }); -} - -bool UserInfo::polkitEdit() -{ - PolkitQt1::Authority::Result result; - //PolkitQt1::SystemBusNameSubject subject(message().service()); - result = PolkitQt1::Authority::instance()->checkAuthorizationSync( - "org.ukui.groupmanager.action.edit", - PolkitQt1::UnixProcessSubject(QCoreApplication::applicationPid()), - PolkitQt1::Authority::AllowUserInteraction); - if (result == PolkitQt1::Authority::Yes) { //认证通过 - qDebug() << QString("operation authorized"); - return true; - } else { - qDebug() << QString("not authorized"); - return false; - } + connect(m_pLoginMgrInterface, SIGNAL(UserNew(quint32,QDBusObjectPath)), this, SLOT(onUserNew(quint32,QDBusObjectPath))); + connect(m_pLoginMgrInterface, SIGNAL(UserRemoved(quint32,QDBusObjectPath)), this, SLOT(onUserRemove(quint32,QDBusObjectPath))); } void UserInfo::setUserDBusPropertyConnect(const QString pObjPath){ @@ -974,11 +959,11 @@ } } - if (propertyMap.keys().contains("RealName") && getuid()){ + if (propertyMap.keys().contains("RealName") && getuid()) { QString current = propertyMap.value("RealName").toString(); - if (QString::compare(current, currentNickNameLabel->text()) != 0){ + if (QString::compare(current, currentNickNameLabel->text()) != 0) { //更新用户昵称 - if (setTextDynamic(currentNickNameLabel, current)){ + if (setTextDynamic(currentNickNameLabel, current)) { currentNickNameLabel->setToolTip(current); } else { currentNickNameLabel->setToolTip(""); @@ -1148,7 +1133,8 @@ return atype; } -void UserInfo::_acquireAllUsersInfo(){ +void UserInfo::_acquireAllUsersInfo() +{ mUserName = qgetenv("USER"); if (mUserName.isEmpty()) { @@ -1189,7 +1175,26 @@ } } -UserInfomation UserInfo::_acquireUserInfo(QString objpath){ +void UserInfo::onUserNew(quint32 uid, QDBusObjectPath opUser) +{ + qDebug() << "logind userNew " << uid << opUser.path(); + QStringList loginedusers = getLoginedUsers(); + foreach (UtilsForUserinfo *utils, utilsUsers) { + utils->refreshTypeStatus(!isLastAdmin(utils->m_username) && !loginedusers.contains(utils->m_username)); + } +} + +void UserInfo::onUserRemove(quint32 uid, QDBusObjectPath opUser) +{ + qDebug() << "logind userRemove " << uid << opUser.path(); + QStringList loginedusers = getLoginedUsers(); + foreach (UtilsForUserinfo *utils, utilsUsers) { + utils->refreshTypeStatus(!isLastAdmin(utils->m_username) && !loginedusers.contains(utils->m_username)); + } +} + +UserInfomation UserInfo::_acquireUserInfo(QString objpath) +{ UserInfomation user; //默认值 @@ -1198,6 +1203,8 @@ user.autologin = false; user.objpath = objpath; + QStringList loginedusers = getLoginedUsers(); + QDBusInterface * iproperty = new QDBusInterface("org.freedesktop.Accounts", objpath, "org.freedesktop.DBus.Properties", @@ -1218,6 +1225,9 @@ user.logined = true; user.noPwdLogin = getNoPwdStatus(); } + + user.logined = loginedusers.contains(user.username); + user.accounttype = propertyMap.find("AccountType").value().toInt(); user.iconfile = propertyMap.find("IconFile").value().toString(); user.passwdtype = propertyMap.find("PasswordMode").value().toInt(); @@ -1362,7 +1372,8 @@ #endif } -QStringList UserInfo::getLoginedUsers() { +QStringList UserInfo::getLoginedUsers() +{ m_loginedUser.clear(); qRegisterMetaType<LoginedUsers>("LoginedUsers"); qDBusRegisterMetaType<LoginedUsers>(); diff -Nru ukui-control-center-5.0.0.0/plugins/account/userinfo/userinfo.h ukui-control-center-5.0.0.0/plugins/account/userinfo/userinfo.h --- ukui-control-center-5.0.0.0/plugins/account/userinfo/userinfo.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/account/userinfo/userinfo.h 2025-02-07 16:27:50.000000000 +0800 @@ -173,7 +173,6 @@ void buildAndSetupUsers(); void setUserConnect(); void setUserDBusPropertyConnect(const QString pObjPath); - bool polkitEdit(); QString getAutomaticLogin(); void showChangeUserTypeDialog(QString u); @@ -208,6 +207,9 @@ void setPasswordTips(int uid, const QString &text); + void onUserNew(quint32, QDBusObjectPath); + void onUserRemove(quint32, QDBusObjectPath); + Q_SIGNALS: void userTypeChanged(QString n); @@ -223,7 +225,6 @@ void showChangeGroupDialog(); void readCurrentPwdConf(); - protected: bool eventFilter(QObject *watched, QEvent *event); @@ -241,6 +242,7 @@ QSettings * autoSettings = nullptr; QMap<QString, UserInfomation> allUserInfoMap; + QList<UtilsForUserinfo*> utilsUsers; QString mUserName; @@ -260,6 +262,8 @@ QString pwdMsg; KSecurityQuestionDialog *m_pVerifyQuestionDialog; + QDBusInterface *m_pLoginMgrInterface = nullptr; + private: bool getNoPwdStatus(); void fontSizeChange(UserInfomation user, UtilsForUserinfo * utils); diff -Nru ukui-control-center-5.0.0.0/plugins/account/userinfo/userinfo.pro ukui-control-center-5.0.0.0/plugins/account/userinfo/userinfo.pro --- ukui-control-center-5.0.0.0/plugins/account/userinfo/userinfo.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/account/userinfo/userinfo.pro 2025-02-07 16:27:50.000000000 +0800 @@ -5,10 +5,8 @@ #------------------------------------------------- include(../../../env.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/FlowLayout/flowlayout.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/ImageUtil/imageutil.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Label/label.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/AddBtn/addbtn.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/CloseButton/closebutton.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/SettingWidget/settingwidget.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Button/button.pri) include($$PROJECT_ROOTDIR/libukcc/interface.pri) diff -Nru ukui-control-center-5.0.0.0/plugins/account/userinfo/utilsforuserinfo.cpp ukui-control-center-5.0.0.0/plugins/account/userinfo/utilsforuserinfo.cpp --- ukui-control-center-5.0.0.0/plugins/account/userinfo/utilsforuserinfo.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/account/userinfo/utilsforuserinfo.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -13,7 +13,7 @@ UtilsForUserinfo::UtilsForUserinfo(QObject *parent) : QObject(parent) { - mainItemFrame = new UkccFrame(nullptr, UkccFrame::Top, true); + m_pMainItemFrame = new UkccFrame(nullptr, UkccFrame::Top, true); logoBtn = new QPushButton(); logoBtn->setFixedSize(QSize(50, 50)); @@ -80,9 +80,9 @@ mUserInfoHorLayout->addLayout(subUserInfoVerLayout); mUserInfoHorLayout->addStretch(); mUserInfoHorLayout->addWidget(changePwdBtn); - mUserInfoHorLayout->addWidget(createVLine(mainItemFrame, 10)); + mUserInfoHorLayout->addWidget(createVLine(m_pMainItemFrame, 10)); mUserInfoHorLayout->addWidget(changeTypeBtn); - mUserInfoHorLayout->addWidget(createVLine(mainItemFrame, 10)); + mUserInfoHorLayout->addWidget(createVLine(m_pMainItemFrame, 10)); mUserInfoHorLayout->addWidget(delUserBtn); mainUserVerLayout = new QVBoxLayout(); @@ -90,46 +90,53 @@ mainUserVerLayout->setContentsMargins(0, 0, 0, 0); mainUserVerLayout->addLayout(mUserInfoHorLayout); - mainItemFrame->setRadiusType(UkccFrame::Top); - mainItemFrame->setLayout(mainUserVerLayout); + m_pMainItemFrame->setRadiusType(UkccFrame::Top); + m_pMainItemFrame->setLayout(mainUserVerLayout); - return mainItemFrame; + return m_pMainItemFrame; } -void UtilsForUserinfo::refreshUserLogo(QString logo){ +void UtilsForUserinfo::refreshUserLogo(QString logo) +{ QPixmap iconfile = makeRoundLogo(logo, logoBtn->width(), logoBtn->height(), logoBtn->width()/2); logoBtn->setIcon(iconfile); } -void UtilsForUserinfo::refreshUserNickname(QString name){ - if (setUtilsTextDynamic(nickNameLabel, name)){ +void UtilsForUserinfo::refreshUserNickname(QString name) +{ + if (setUtilsTextDynamic(nickNameLabel, name)) { nickNameLabel->setToolTip(name); } } -void UtilsForUserinfo::refreshUserType(int type){ - +void UtilsForUserinfo::refreshUserType(int type) +{ QString t = _accountTypeIntToString(type); typeLabel->setText(t); } -void UtilsForUserinfo::refreshDelStatus(bool enabled){ +void UtilsForUserinfo::refreshDelStatus(bool enabled) +{ delUserBtn->setEnabled(enabled); } -void UtilsForUserinfo::refreshPwdStatus(bool enabled){ +void UtilsForUserinfo::refreshPwdStatus(bool enabled) +{ changePwdBtn->setEnabled(enabled); } -void UtilsForUserinfo::refreshTypeStatus(bool enabled){ +void UtilsForUserinfo::refreshTypeStatus(bool enabled) +{ changeTypeBtn->setEnabled(enabled); } -void UtilsForUserinfo::setObjectPathData(QString op){ - mainItemFrame->setObjectName(op); +void UtilsForUserinfo::setObjectPathData(QString op) +{ + m_pMainItemFrame->setObjectName(op); } -bool UtilsForUserinfo::setUtilsTextDynamic(QLabel *label, QString string){ +bool UtilsForUserinfo::setUtilsTextDynamic(QLabel *label, QString string) +{ bool isOverLength = false; QFontMetrics fontMetrics(label->font()); int fontSize = fontMetrics.width(string); @@ -146,7 +153,8 @@ return isOverLength; } -QFrame * UtilsForUserinfo::createHLine(QFrame *f, int len){ +QFrame * UtilsForUserinfo::createHLine(QFrame *f, int len) +{ QFrame *line = new QFrame(f); if (len == 0){ line->setMinimumSize(QSize(0, 1)); @@ -162,7 +170,8 @@ return line; } -QFrame * UtilsForUserinfo::createVLine(QFrame *f, int len){ +QFrame * UtilsForUserinfo::createVLine(QFrame *f, int len) +{ QFrame *line = new QFrame(f); if (len == 0){ line->setMinimumSize(QSize(1, 0)); @@ -178,7 +187,8 @@ return line; } -void UtilsForUserinfo::userPropertyChangedSlot(QString property, QMap<QString, QVariant> propertyMap, QStringList propertyList){ +void UtilsForUserinfo::userPropertyChangedSlot(QString property, QMap<QString, QVariant> propertyMap, QStringList propertyList) +{ Q_UNUSED(property); Q_UNUSED(propertyList); @@ -196,7 +206,8 @@ } -QString UtilsForUserinfo::_accountTypeIntToString(int type){ +QString UtilsForUserinfo::_accountTypeIntToString(int type) +{ QString atype; if (type == 0) atype = tr("Standard"); diff -Nru ukui-control-center-5.0.0.0/plugins/account/userinfo/utilsforuserinfo.h ukui-control-center-5.0.0.0/plugins/account/userinfo/utilsforuserinfo.h --- ukui-control-center-5.0.0.0/plugins/account/userinfo/utilsforuserinfo.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/account/userinfo/utilsforuserinfo.h 2025-02-07 16:27:50.000000000 +0800 @@ -34,8 +34,8 @@ void setObjectPathData(QString op); public: - UkccFrame * mainItemFrame; - + UkccFrame * m_pMainItemFrame; + QString m_username; QPushButton * logoBtn; QPushButton * changeTypeBtn; QPushButton * changePwdBtn; diff -Nru ukui-control-center-5.0.0.0/plugins/application/autoboot/addautoboot.cpp ukui-control-center-5.0.0.0/plugins/application/autoboot/addautoboot.cpp --- ukui-control-center-5.0.0.0/plugins/application/autoboot/addautoboot.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/application/autoboot/addautoboot.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,344 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * Copyright (C) 2019 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 "addautoboot.h" -#include "closebutton.h" - -#include <QDebug> -#include <QFileInfo> -#include <QSettings> -#include <QPushButton> -#include <QApplication> - -// #define DESKTOPPATH "/etc/xdg/autostart/" -#define DESKTOPPATH "/usr/share/applications/" - -extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed); - -AddAutoBoot::AddAutoBoot(QWidget *parent) : - QDialog(parent) -{ - setWindowFlags(Qt::FramelessWindowHint | Qt::Tool); - setAttribute(Qt::WA_TranslucentBackground); - - initUi(this); - initStyle(); - initConnection(); -} - -void AddAutoBoot::resetBeforeClose() -{ - userEditNameFlag = false; - userEditCommentFlag = false; - mCertainBtn->setEnabled(false); - mHintLabel->clear(); - mAppNameEdit->setToolTip(""); - mAppBewriteEdit->setToolTip(""); - mAppPathEdit->setToolTip(""); - mAppNameEdit->setText(QString()); - mAppBewriteEdit->setText(QString()); - mAppPathEdit->setText(QString()); - close(); -} - -void AddAutoBoot::paintEvent(QPaintEvent *event) -{ - Q_UNUSED(event); - QPainter p(this); - p.setRenderHint(QPainter::Antialiasing); - QPainterPath rectPath; - rectPath.addRoundedRect(this->rect().adjusted(10, 10, -10, -10), 10, 10); - - // 画一个黑底 - QPixmap pixmap(this->rect().size()); - pixmap.fill(Qt::transparent); - QPainter pixmapPainter(&pixmap); - pixmapPainter.setRenderHint(QPainter::Antialiasing); - pixmapPainter.setPen(Qt::transparent); - pixmapPainter.setBrush(Qt::black); - pixmapPainter.setOpacity(0.65); - pixmapPainter.drawPath(rectPath); - pixmapPainter.end(); - - // 模糊这个黑底 - QImage img = pixmap.toImage(); - qt_blurImage(img, 10, false, false); - - // 挖掉中心 - pixmap = QPixmap::fromImage(img); - QPainter pixmapPainter2(&pixmap); - pixmapPainter2.setRenderHint(QPainter::Antialiasing); - pixmapPainter2.setCompositionMode(QPainter::CompositionMode_Clear); - pixmapPainter2.setPen(Qt::transparent); - pixmapPainter2.setBrush(Qt::transparent); - pixmapPainter2.drawPath(rectPath); - - // 绘制阴影 - p.drawPixmap(this->rect(), pixmap, pixmap.rect()); - - // 绘制一个背景 - p.save(); - p.fillPath(rectPath, palette().color(QPalette::Base)); - p.restore(); -} -void AddAutoBoot::initUi(QDialog *AddAutoBoot) -{ - AddAutoBoot->resize(420, 308); - QVBoxLayout *mverticalLayout = new QVBoxLayout(AddAutoBoot); - mverticalLayout->setSpacing(16); - mverticalLayout->setContentsMargins(32, 32, 32, 24); - - mTitleLabel = new QLabel(AddAutoBoot); - - mAppFrame = new QFrame(AddAutoBoot); - mAppFrame->setFixedSize(356,160); - mAppFrame->setFrameShape(QFrame::NoFrame); - mAppFrame->setFrameShadow(QFrame::Raised); - - QGridLayout *mAppLayout = new QGridLayout(mAppFrame); - mAppLayout->setHorizontalSpacing(8); - mAppLayout->setVerticalSpacing(4); - mAppNameLabel = new FixLabel(mAppFrame); - mAppPathLabel = new FixLabel(mAppFrame); - mAppBewriteLabel = new FixLabel(mAppFrame); - mAppNameEdit = new QLineEdit(mAppFrame); - mAppPathEdit = new QLineEdit(mAppFrame); - mAppBewriteEdit = new QLineEdit(mAppFrame); - mOpenBtn = new QPushButton(mAppFrame); - mHintLabel = new QLabel(mAppFrame); - - mOpenBtn->setContentsMargins(8, 0, 8, 0); - mAppLayout->addWidget(mAppNameLabel,0,0,1,2); - mAppLayout->addWidget(mAppNameEdit,0,2,1,3); - mAppLayout->addWidget(mAppPathLabel,1,0,1,2); - mAppLayout->addWidget(mAppPathEdit,1,2,1,2); - mAppLayout->addWidget(mOpenBtn,1,4,1,1); - mAppLayout->addWidget(mAppBewriteLabel,2,0,1,2); - mAppLayout->addWidget(mAppBewriteEdit,2,2,1,3); - mAppLayout->addWidget(mHintLabel,3,2,1,3); - - mBtnFrame = new QFrame(AddAutoBoot); - mBtnFrame->setFixedSize(356,36); - mBtnFrame->setFrameShape(QFrame::NoFrame); - - QHBoxLayout *mBtnLayout = new QHBoxLayout(mBtnFrame); - mBtnLayout->setContentsMargins(0,0,0,0); - mBtnLayout->setSpacing(16); - mCancelBtn = new QPushButton(mBtnFrame); - mCancelBtn->setFixedSize(100,36); - mCertainBtn = new QPushButton(mBtnFrame); - mCertainBtn->setFixedSize(100,36); - - mBtnLayout->addStretch(); - mBtnLayout->addWidget(mCancelBtn); - mBtnLayout->addWidget(mCertainBtn); - - mverticalLayout->addWidget(mTitleLabel); - mverticalLayout->addWidget(mAppFrame); - mverticalLayout->addSpacing(8); - mverticalLayout->addWidget(mBtnFrame); - - retranslateUi(); -} - -void AddAutoBoot::initStyle() -{ - mTitleLabel->setStyleSheet("QLabel{color: palette(windowText);}"); - - selectFile = ""; - - mAppNameEdit->setPlaceholderText(tr("Name")); - mAppPathEdit->setPlaceholderText(tr("Exec")); - mAppBewriteEdit->setPlaceholderText(tr("Comment")); - - mHintLabel->setAlignment(Qt::AlignLeft); - mHintLabel->setStyleSheet("color:red;"); - mCertainBtn->setEnabled(false); - -} - -void AddAutoBoot::initConnection() -{ - connect(mOpenBtn, SIGNAL(clicked(bool)), this, SLOT(open_desktop_dir_slots())); - connect(mCancelBtn, SIGNAL(clicked(bool)), this, SLOT(close())); - connect(mAppPathEdit, SIGNAL(textEdited(QString)), this, SLOT(execLinEditSlot(QString))); - - connect(mCancelBtn, &QPushButton::clicked, [=] { - resetBeforeClose(); - }); - connect(mCertainBtn, &QPushButton::clicked, this, [=] { - emit autoboot_adding_signals(selectFile, mAppNameEdit->text(), mDesktopExec, - mAppBewriteEdit->text(), mDesktopIcon); - resetBeforeClose(); - }); - - connect(mAppNameEdit, &QLineEdit::editingFinished, this, [=](){ - if (mAppNameEdit->text().isEmpty()) { - userEditNameFlag = false; - } else { // 用户输入了程序名 - userEditNameFlag = true; - } - }); - connect(mAppBewriteEdit, &QLineEdit::editingFinished, this, [=](){ - if (mAppBewriteEdit->text().isEmpty()) { - userEditCommentFlag = false; - } else { // 用户输入了描述 - userEditCommentFlag = true; - } - }); - - connect(mAppNameEdit, &QLineEdit::textChanged, this, [=](){ - mAppNameEdit->setToolTip(mAppNameEdit->text()); - }); - connect(mAppBewriteEdit, &QLineEdit::textChanged, this, [=](){ - mAppBewriteEdit->setToolTip(mAppBewriteEdit->text()); - }); - connect(mAppPathEdit, &QLineEdit::textChanged, this, [=](){ - mAppPathEdit->setToolTip(mAppPathEdit->text()); - }); -} - -void AddAutoBoot::retranslateUi() -{ - mHintLabel->setText(QString()); - mTitleLabel->setText(QApplication::translate("AddAutoBoot", "Add autoboot program", nullptr)); - mAppNameLabel->setText(QApplication::translate("AddAutoBoot", "Name", nullptr)); - mAppPathLabel->setText(QApplication::translate("AddAutoBoot", "Exec", nullptr)); - mAppBewriteLabel->setText(QApplication::translate("AddAutoBoot", "Comment", nullptr)); - mOpenBtn->setText(QApplication::translate("AddAutoBoot", "Open", nullptr)); - mCancelBtn->setText(QApplication::translate("AddAutoBoot", "Cancel", nullptr)); - mCertainBtn->setText(QApplication::translate("AddAutoBoot", "Certain", nullptr)); -} - -AddAutoBoot::~AddAutoBoot() -{ - -} - -void AddAutoBoot::open_desktop_dir_slots() -{ - QString filters = tr("Desktop files(*.desktop)"); - QFileDialog fd(this); - fd.setDirectory(DESKTOPPATH); - fd.setAcceptMode(QFileDialog::AcceptOpen); - fd.setViewMode(QFileDialog::List); - fd.setNameFilter(filters); - fd.setFileMode(QFileDialog::ExistingFile); - fd.setWindowTitle(tr("select autoboot desktop")); - fd.setLabelText(QFileDialog::Accept, tr("Select")); - fd.setLabelText(QFileDialog::Reject, tr("Cancel")); - if (fd.exec() != QDialog::Accepted) - return; - - QString selectedfile; - selectedfile = fd.selectedFiles().first(); - selectFile = selectedfile; - - QByteArray ba; - ba = selectedfile.toUtf8(); - - // 解析desktop文件 - GKeyFile *keyfile; - char *name, *comment,*mname; - bool no_display; - - keyfile = g_key_file_new(); - if (!g_key_file_load_from_file(keyfile, ba.data(), G_KEY_FILE_NONE, NULL)) { - g_key_file_free(keyfile); - return; - } - no_display = g_key_file_get_boolean(keyfile, G_KEY_FILE_DESKTOP_GROUP, - G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY, FALSE); - name = g_key_file_get_string(keyfile, G_KEY_FILE_DESKTOP_GROUP, - G_KEY_FILE_DESKTOP_KEY_NAME, NULL); - mname = g_key_file_get_locale_string(keyfile, G_KEY_FILE_DESKTOP_GROUP, - G_KEY_FILE_DESKTOP_KEY_NAME, NULL, NULL); - comment = g_key_file_get_locale_string(keyfile, G_KEY_FILE_DESKTOP_GROUP, - G_KEY_FILE_DESKTOP_KEY_COMMENT, NULL, NULL); - mDesktopExec = g_key_file_get_string(keyfile, G_KEY_FILE_DESKTOP_GROUP, - G_KEY_FILE_DESKTOP_KEY_EXEC, NULL); - mDesktopIcon = g_key_file_get_string(keyfile, G_KEY_FILE_DESKTOP_GROUP, - G_KEY_FILE_DESKTOP_KEY_ICON, NULL); - - if (userEditNameFlag == false) { // 用户输入了程序名,以用户输入为准,否则以自带的为准 - mAppNameEdit->setText(QString(mname)); - } - - mAppPathEdit->setText(QString(selectedfile)); - if (userEditCommentFlag == false) { // 用户输入了程序描述,以用户输入为准,否则以自带的为准 - mAppBewriteEdit->setText(QString(comment)); - } - - emit mAppPathEdit->textEdited(QString(selectedfile)); - - if (no_display) { - mHintLabel->setText(tr("desktop file not allowed add")); - mHintLabel->setStyleSheet("color:red;"); - mCertainBtn->setEnabled(false); - } - - g_key_file_free(keyfile); -} - -void AddAutoBoot::execLinEditSlot(const QString &fileName) -{ - selectFile = fileName; - QFileInfo fileInfo(fileName); - if (fileInfo.isFile() && fileName.endsWith("desktop")) { - mHintLabel->clear(); - mCertainBtn->setEnabled(true); - - QByteArray ba; - ba = fileName.toUtf8(); - - // 解析desktop文件 - GKeyFile *keyfile; - char *name, *comment; - - keyfile = g_key_file_new(); - if (!g_key_file_load_from_file(keyfile, ba.data(), G_KEY_FILE_NONE, NULL)) { - g_key_file_free(keyfile); - return; - } - - name = g_key_file_get_locale_string(keyfile, G_KEY_FILE_DESKTOP_GROUP, - G_KEY_FILE_DESKTOP_KEY_NAME, NULL, NULL); - mDesktopExec = g_key_file_get_string(keyfile, G_KEY_FILE_DESKTOP_GROUP, - G_KEY_FILE_DESKTOP_KEY_EXEC, NULL); - mDesktopIcon = g_key_file_get_string(keyfile, G_KEY_FILE_DESKTOP_GROUP, - G_KEY_FILE_DESKTOP_KEY_ICON, NULL); - comment = g_key_file_get_locale_string(keyfile, G_KEY_FILE_DESKTOP_GROUP, - G_KEY_FILE_DESKTOP_KEY_COMMENT, NULL, NULL); - - if (userEditNameFlag == false) { // 用户输入了程序名,以用户输入为准,否则以自带的为准 - mAppNameEdit->setText(QString(name)); - } - - mAppPathEdit->setText(fileName); - if (userEditCommentFlag == false) { // 用户输入了程序描述,以用户输入为准,否则以自带的为准 - mAppBewriteEdit->setText(QString(comment)); - } - - g_key_file_free(keyfile); - } else { - mHintLabel->setText(tr("desktop file not exist")); - mHintLabel->setStyleSheet("color:red;"); - mCertainBtn->setEnabled(false); - } -} diff -Nru ukui-control-center-5.0.0.0/plugins/application/autoboot/addautoboot.h ukui-control-center-5.0.0.0/plugins/application/autoboot/addautoboot.h --- ukui-control-center-5.0.0.0/plugins/application/autoboot/addautoboot.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/application/autoboot/addautoboot.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,98 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * Copyright (C) 2019 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 ADDAUTOBOOT_H -#define ADDAUTOBOOT_H - -#include <QDialog> -#include <QFileDialog> -#include <QPainter> -#include <QPainterPath> -#include <QLineEdit> -#include <QLabel> -#include <QVBoxLayout> -#include "fixlabel.h" -/* qt会将glib里的signals成员识别为宏,所以取消该宏 - * 后面如果用到signals时,使用Q_SIGNALS代替即可 - **/ -#ifdef signals -#undef signals -#endif - -#include <glib.h> -#include <glib/gstdio.h> -#include <gio/gio.h> -#include <gio/gdesktopappinfo.h> - -namespace Ui { -class AddAutoBoot; -} - -class AddAutoBoot : public QDialog -{ - Q_OBJECT - -public: - explicit AddAutoBoot(QWidget *parent = 0); - ~AddAutoBoot(); - - void resetBeforeClose(); - -protected: - void paintEvent(QPaintEvent *); - -private: - QString selectFile; - QString mDesktopExec; - QString mDesktopIcon; - bool userEditNameFlag = false; - bool userEditCommentFlag = false; - - QFrame *mAppFrame; - QFrame *mBtnFrame; - - QLabel *mTitleLabel; - FixLabel *mAppNameLabel; - FixLabel *mAppPathLabel; - FixLabel *mAppBewriteLabel; - QLabel *mHintLabel; - - QLineEdit *mAppNameEdit; - QLineEdit *mAppPathEdit; - QLineEdit *mAppBewriteEdit; - - QPushButton *mOpenBtn; - QPushButton *mCancelBtn; - QPushButton *mCertainBtn; - -private: - void initUi(QDialog *AddAutoBoot); - void initStyle(); - void initConnection(); - void retranslateUi(); - -private slots: - void open_desktop_dir_slots(); - void execLinEditSlot(const QString &fileName); - -Q_SIGNALS: - void autoboot_adding_signals(QString path, QString name, QString exec, QString comment, QString icon); -}; - -#endif // ADDAUTOBOOT_H diff -Nru ukui-control-center-5.0.0.0/plugins/application/autoboot/autoboot.cpp ukui-control-center-5.0.0.0/plugins/application/autoboot/autoboot.cpp --- ukui-control-center-5.0.0.0/plugins/application/autoboot/autoboot.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/application/autoboot/autoboot.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -31,7 +31,6 @@ #include <QFileDialog> #include <QMessageBox> #include "rmenu.h" -#include "imageutil.h" #include "mthread.h" /* qt会将glib里的signals成员识别为宏,所以取消该宏 diff -Nru ukui-control-center-5.0.0.0/plugins/application/autoboot/autoboot.h ukui-control-center-5.0.0.0/plugins/application/autoboot/autoboot.h --- ukui-control-center-5.0.0.0/plugins/application/autoboot/autoboot.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/application/autoboot/autoboot.h 2025-02-07 16:27:50.000000000 +0800 @@ -26,7 +26,6 @@ #include "shell/interface.h" #include "ukcccommon.h" using namespace ukcc; -#include "titlelabel.h" #include "hoverwidget.h" #include "switchwidget.h" #include "settinggroup.h" diff -Nru ukui-control-center-5.0.0.0/plugins/application/autoboot/autoboot.pro ukui-control-center-5.0.0.0/plugins/application/autoboot/autoboot.pro --- ukui-control-center-5.0.0.0/plugins/application/autoboot/autoboot.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/application/autoboot/autoboot.pro 2025-02-07 16:27:50.000000000 +0800 @@ -4,9 +4,7 @@ # #------------------------------------------------- include(../../../env.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/CloseButton/closebutton.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Label/label.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/ImageUtil/imageutil.pri) include($$PROJECT_ROOTDIR/libukcc/interface.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/AddBtn/addbtn.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/SettingWidget/settingwidget.pri) diff -Nru ukui-control-center-5.0.0.0/plugins/application/autoboot/autobootui.cpp ukui-control-center-5.0.0.0/plugins/application/autoboot/autobootui.cpp --- ukui-control-center-5.0.0.0/plugins/application/autoboot/autobootui.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/application/autoboot/autobootui.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -12,7 +12,8 @@ vLyt->setSpacing(8); vLyt->setContentsMargins(0, 0, 0, 0); - TitleLabel *mTitleLabel = new TitleLabel(this); + KLabel *mTitleLabel = new KLabel(this); + mTitleLabel->setContentsMargins(16, 0, 0, 0); //~ contents_path /Autostart/Autostart Settings mTitleLabel->setText(tr("Autostart Settings")); diff -Nru ukui-control-center-5.0.0.0/plugins/application/autoboot/autobootui.h ukui-control-center-5.0.0.0/plugins/application/autoboot/autobootui.h --- ukui-control-center-5.0.0.0/plugins/application/autoboot/autobootui.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/application/autoboot/autobootui.h 2025-02-07 16:27:50.000000000 +0800 @@ -4,12 +4,14 @@ #include <QObject> #include <QWidget> -#include "titlelabel.h" #include "hoverwidget.h" #include "addbutton.h" #include "switchwidget.h" #include "settinggroup.h" #include "ukccframe.h" +#include <klabel.h> + +using namespace kdk; class AutoBootUi : public QWidget { diff -Nru ukui-control-center-5.0.0.0/plugins/application/defaultapp/defaultapp.cpp ukui-control-center-5.0.0.0/plugins/application/defaultapp/defaultapp.cpp --- ukui-control-center-5.0.0.0/plugins/application/defaultapp/defaultapp.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/application/defaultapp/defaultapp.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -289,6 +289,7 @@ return; } list = reply.value(); + appInfoService->clear(); for (QVariant app : list) { const QDBusArgument &dbusArgs = app.value<QDBusArgument>(); Service* service = new Service(); diff -Nru ukui-control-center-5.0.0.0/plugins/application/defaultapp/defaultapp.h ukui-control-center-5.0.0.0/plugins/application/defaultapp/defaultapp.h --- ukui-control-center-5.0.0.0/plugins/application/defaultapp/defaultapp.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/application/defaultapp/defaultapp.h 2025-02-07 16:27:50.000000000 +0800 @@ -36,8 +36,6 @@ #include "shell/interface.h" -#include "fixlabel.h" -#include "titlelabel.h" #include "mthread.h" #include "comboxwidget.h" #include "settinggroup.h" diff -Nru ukui-control-center-5.0.0.0/plugins/application/defaultapp/defaultappui.cpp ukui-control-center-5.0.0.0/plugins/application/defaultapp/defaultappui.cpp --- ukui-control-center-5.0.0.0/plugins/application/defaultapp/defaultappui.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/application/defaultapp/defaultappui.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -12,7 +12,8 @@ vLyt->setSpacing(8); vLyt->setContentsMargins(0, 0, 0, 0); - TitleLabel *mTitleLabel = new TitleLabel(this); + KLabel *mTitleLabel = new KLabel(this); + mTitleLabel->setContentsMargins(16, 0, 0, 0); //~ contents_path /Defaultapp/Select Default Application mTitleLabel->setText(tr("DefaultAppWindow", "Select Default Application")); SettingGroup *mDefaultFrame = new SettingGroup(this); @@ -31,6 +32,7 @@ mTextFrame = new ComboxWidget(tr("Text Editor")); // 恢复默认 + //~ contents_path /Defaultapp/Reset default apps to system recommended apps mResetFrame = new PushButtonWidget(tr("Reset default apps to system recommended apps")); mResetFrame->setButtonText(tr("Reset")); diff -Nru ukui-control-center-5.0.0.0/plugins/application/defaultapp/defaultappui.h ukui-control-center-5.0.0.0/plugins/application/defaultapp/defaultappui.h --- ukui-control-center-5.0.0.0/plugins/application/defaultapp/defaultappui.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/application/defaultapp/defaultappui.h 2025-02-07 16:27:50.000000000 +0800 @@ -5,12 +5,13 @@ #include <QWidget> #include "shell/interface.h" -#include "fixlabel.h" -#include "titlelabel.h" #include "mthread.h" #include "comboxwidget.h" #include "settinggroup.h" #include "pushbuttonwidget.h" +#include <klabel.h> + +using namespace kdk; class DefaultAppUi : public QWidget { diff -Nru ukui-control-center-5.0.0.0/plugins/commoninfo/boot/grubverifydialog.cpp ukui-control-center-5.0.0.0/plugins/commoninfo/boot/grubverifydialog.cpp --- ukui-control-center-5.0.0.0/plugins/commoninfo/boot/grubverifydialog.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/commoninfo/boot/grubverifydialog.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -38,7 +38,7 @@ //新密码 newPwdLabel = new QLabel(); - newPwdLabel->setFixedSize(100,24); + newPwdLabel->setFixedWidth(100); setTextDynamicInPwd(newPwdLabel, tr("Pwd")); newTipLabel = new QLabel(); QFont ft; @@ -81,7 +81,7 @@ //确认密码 surePwdLabel = new QLabel(); - surePwdLabel->setFixedSize(100,24); + surePwdLabel->setFixedWidth(100); setTextDynamicInPwd(surePwdLabel, tr("Sure Pwd")); surePwdLineEdit = new QLineEdit(); diff -Nru ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboard.pro ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboard.pro --- ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboard.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboard.pro 2025-02-07 16:27:50.000000000 +0800 @@ -6,7 +6,6 @@ include(../../../env.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Label/label.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/CloseButton/closebutton.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/SettingWidget/settingwidget.pri) include($$PROJECT_ROOTDIR/libukcc/interface.pri) diff -Nru ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboardmain.cpp ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboardmain.cpp --- ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboardmain.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboardmain.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -132,6 +132,8 @@ initShowIconOnDesktop(); + initInputMethodSet(); + initShowIconOnTray(); initKeyboardSize(); @@ -181,6 +183,14 @@ keyBoardWidget->keyTipsFrame()->blockSignals(false); } +void KeyboardMain::initInputMethodSet() +{ + qDebug() << "input method seting cmd = " << getInputMethodSetCmd(); + if (getInputMethodSetCmd().isEmpty()) { + keyBoardWidget->setInputMethodVisible(false); + } +} + void KeyboardMain::initShowIconOnTray() { // 在托盘显示虚拟键盘图标 @@ -249,6 +259,21 @@ keyBoardWidget->inputTestFrame()->setVisible(checked); } +QString KeyboardMain::getInputMethodSetCmd() +{ + QFile inputSetCmd("/usr/bin/fcitx5-config-qt"); + if (inputSetCmd.exists()) { + return "/usr/bin/fcitx5-config-qt"; + } + + QFile inputSetCmd1("/usr/bin/fcitx-config-gtk3"); + if (inputSetCmd1.exists()) { + return "/usr/bin/fcitx-config-gtk3"; + } + + return ""; +} + void KeyboardMain::dataChanged(QString key) { if (key == QString("repeat")) { @@ -306,7 +331,8 @@ UkccCommon::buriedSettings(name(), keyBoardWidget->inputMethodFrame()->objectName(), QString("settings")); #endif QProcess process; - process.startDetached("fcitx5-config-qt"); + QString cmd = getInputMethodSetCmd(); + process.startDetached(cmd); } void KeyboardMain::showIconOnTraySlot(bool checked) diff -Nru ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboardmain.h ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboardmain.h --- ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboardmain.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboardmain.h 2025-02-07 16:27:50.000000000 +0800 @@ -49,6 +49,7 @@ void initDelay(); void initSpeed(); void initKeyTips(); + void initInputMethodSet(); void initShowIconOnTray(); void initShowIconOnDesktop(); void initKeyboardSize(); @@ -58,6 +59,8 @@ void setKeyboardVisible(bool checked); + QString getInputMethodSetCmd(); + protected: bool eventFilter(QObject *watched, QEvent *event); diff -Nru ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboardui.cpp ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboardui.cpp --- ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboardui.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboardui.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -16,6 +16,12 @@ } +void KeyboardUi::setInputMethodVisible(bool isVisible) +{ + mInputTitleLabel->setVisible(isVisible); + mInputMethodSetFrame->setVisible(isVisible); +} + void KeyboardUi::initUI() { mKeyboardFrame = new SettingGroup(this); diff -Nru ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboardui.h ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboardui.h --- ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboardui.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/keyboard/keyboardui.h 2025-02-07 16:27:50.000000000 +0800 @@ -90,6 +90,8 @@ return mSoundEfectsFrame; } + void setInputMethodVisible(bool isVisible); + private: QVBoxLayout *mVlayout = nullptr; @@ -128,7 +130,6 @@ void setTextSizeFrame(); void setAnimationFrame(); void setSoundEfectsFrame(); - }; #endif // KEYBOARDUI_H diff -Nru ukui-control-center-5.0.0.0/plugins/devices/mouse/mouse.cpp ukui-control-center-5.0.0.0/plugins/devices/mouse/mouse.cpp --- ukui-control-center-5.0.0.0/plugins/devices/mouse/mouse.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/mouse/mouse.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -324,10 +324,10 @@ mouseDbus->call("setCursorBlink", checked); if (!checked) { - mouseDbus->call("setCursorSpeed", 0); + mouseDbus->call("setStyleCursorSpeed", 0); } else { int mValue = mouseWidget->cursorSpeedWidget()->slider()->maximum() - mouseWidget->cursorSpeedWidget()->slider()->value() + mouseWidget->cursorSpeedWidget()->slider()->minimum(); - mouseDbus->call("setCursorSpeed", mValue); + mouseDbus->call("setStyleCursorSpeed", mValue); } UkccCommon::buriedSettings(name(), mouseWidget->cursorSpeedWidget()->objectName(), QString("settings"), checked ? "true":"false"); diff -Nru ukui-control-center-5.0.0.0/plugins/devices/printer/printer.cpp ukui-control-center-5.0.0.0/plugins/devices/printer/printer.cpp --- ukui-control-center-5.0.0.0/plugins/devices/printer/printer.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/printer/printer.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -117,7 +117,8 @@ QVBoxLayout *verticaLyt = new QVBoxLayout(widget); verticaLyt->setSpacing(8); verticaLyt->setContentsMargins(0, 0, 0, 0); - mPrinterLabel = new TitleLabel; + mPrinterLabel = new KLabel; + mPrinterLabel->setContentsMargins(16, 0, 0, 0); mPrinterLabel->setText(tr("Printers")); mPrinterWidget = new SettingGroup(widget); diff -Nru ukui-control-center-5.0.0.0/plugins/devices/printer/printer.h ukui-control-center-5.0.0.0/plugins/devices/printer/printer.h --- ukui-control-center-5.0.0.0/plugins/devices/printer/printer.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/printer/printer.h 2025-02-07 16:27:50.000000000 +0800 @@ -28,15 +28,13 @@ #include "shell/interface.h" #include "hoverwidget.h" -#include "imageutil.h" -#include "hoverbtn.h" -#include "titlelabel.h" -#include "fixlabel.h" #include "settinggroup.h" #include "ukccframe.h" #include "printerbtn.h" #include "addbutton.h" +#include <klabel.h> +using namespace kdk; namespace Ui { class Printer; @@ -74,7 +72,7 @@ QWidget *pluginWidget; SettingGroup *mPrinterWidget; UkccFrame *mAddWidget; - TitleLabel *mPrinterLabel; + KLabel *mPrinterLabel; QStringList mPrinterList; QVector <PrinterInfo> mPrinters; diff -Nru ukui-control-center-5.0.0.0/plugins/devices/printer/printer.pro ukui-control-center-5.0.0.0/plugins/devices/printer/printer.pro --- ukui-control-center-5.0.0.0/plugins/devices/printer/printer.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/printer/printer.pro 2025-02-07 16:27:50.000000000 +0800 @@ -6,11 +6,9 @@ include(../../../env.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/ImageUtil/imageutil.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Label/label.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/AddBtn/addbtn.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/HoverWidget/hoverwidget.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/HoverBtn/hoverbtn.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/SettingWidget/settingwidget.pri) include($$PROJECT_ROOTDIR/libukcc/interface.pri) diff -Nru ukui-control-center-5.0.0.0/plugins/devices/printer/printerbtn.cpp ukui-control-center-5.0.0.0/plugins/devices/printer/printerbtn.cpp --- ukui-control-center-5.0.0.0/plugins/devices/printer/printerbtn.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/printer/printerbtn.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -5,7 +5,6 @@ #include <QGSettings> #include <QProcess> -#include "widgets/Label/fixlabel.h" #define THEME_QT_SCHEMA "org.ukui.style" #define ICON_QT_KEY "icon-theme-name" @@ -47,7 +46,7 @@ } }); - FixLabel *textLabel = new FixLabel(this); + KLabel *textLabel = new KLabel(this); textLabel->setText(printerinfo.name); mPrinterLyt->addWidget(iconLabel); diff -Nru ukui-control-center-5.0.0.0/plugins/devices/printer/printerbtn.h ukui-control-center-5.0.0.0/plugins/devices/printer/printerbtn.h --- ukui-control-center-5.0.0.0/plugins/devices/printer/printerbtn.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/printer/printerbtn.h 2025-02-07 16:27:50.000000000 +0800 @@ -3,6 +3,10 @@ #include <QObject> #include <QPushButton> +#include <klabel.h> + +using namespace kdk; + struct PrinterInfo { QString name; diff -Nru ukui-control-center-5.0.0.0/plugins/devices/shortcut/addshortcutdialog.cpp ukui-control-center-5.0.0.0/plugins/devices/shortcut/addshortcutdialog.cpp --- ukui-control-center-5.0.0.0/plugins/devices/shortcut/addshortcutdialog.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/shortcut/addshortcutdialog.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -20,7 +20,6 @@ #include "addshortcutdialog.h" #include "ui_addshortcutdialog.h" -#include "closebutton.h" #include "realizeshortcutwheel.h" #include <QApplication> #include <glib.h> diff -Nru ukui-control-center-5.0.0.0/plugins/devices/shortcut/addshortcutdialog.h ukui-control-center-5.0.0.0/plugins/devices/shortcut/addshortcutdialog.h --- ukui-control-center-5.0.0.0/plugins/devices/shortcut/addshortcutdialog.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/shortcut/addshortcutdialog.h 2025-02-07 16:27:50.000000000 +0800 @@ -29,6 +29,8 @@ #include <QDebug> #include "shortcutline.h" #include <QLabel> +#include <klabel.h> +using namespace kdk; namespace Ui { class AddShortcutDialog; diff -Nru ukui-control-center-5.0.0.0/plugins/devices/shortcut/addshortcutdialog.ui ukui-control-center-5.0.0.0/plugins/devices/shortcut/addshortcutdialog.ui --- ukui-control-center-5.0.0.0/plugins/devices/shortcut/addshortcutdialog.ui 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/shortcut/addshortcutdialog.ui 2025-02-07 16:27:50.000000000 +0800 @@ -71,7 +71,7 @@ <number>8</number> </property> <item> - <widget class="FixLabel" name="label_3"> + <widget class="KLabel" name="label_3"> <property name="sizePolicy"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -157,7 +157,7 @@ <number>8</number> </property> <item> - <widget class="FixLabel" name="label_2"> + <widget class="KLabel" name="label_2"> <property name="sizePolicy"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -237,7 +237,7 @@ <number>8</number> </property> <item> - <widget class="FixLabel" name="label"> + <widget class="KLabel" name="label"> <property name="minimumSize"> <size> <width>48</width> @@ -377,15 +377,15 @@ </widget> <customwidgets> <customwidget> - <class>FixLabel</class> - <extends>QLabel</extends> - <header location="global">fixlabel.h</header> - </customwidget> - <customwidget> <class>kdk::KPushButton</class> <extends>QPushButton</extends> <header>kysdk/applications/kpushbutton.h</header> </customwidget> + <customwidget> + <class>KLabel</class> + <extends>QLabel</extends> + <header>klabel.h</header> + </customwidget> </customwidgets> <resources/> <connections/> diff -Nru ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcut.cpp ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcut.cpp --- ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcut.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcut.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -258,7 +258,7 @@ }); connect(shortcutUi, &ShortcutUi::addButtonClicked, this, [=]{ - AddShortcutDialog *addDialog = new AddShortcutDialog(systemEntryList, m_windowEntryList, customEntryList); + AddShortcutDialog *addDialog = new AddShortcutDialog(systemEntryList, m_windowEntryList, customEntryList, shortcutUi); addDialog->setTitleText(QObject::tr("Customize Shortcut")); connect(addDialog, &AddShortcutDialog::shortcutInfoSignal, diff -Nru ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcut.pro ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcut.pro --- ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcut.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcut.pro 2025-02-07 16:27:50.000000000 +0800 @@ -1,10 +1,8 @@ include(../../../env.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/HoverWidget/hoverwidget.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/ImageUtil/imageutil.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Label/label.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/AddBtn/addbtn.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Frame/frame.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/CloseButton/closebutton.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/SettingWidget/settingwidget.pri) include($$PROJECT_ROOTDIR/libukcc/interface.pri) diff -Nru ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcut.ui ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcut.ui --- ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcut.ui 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcut.ui 1970-01-01 08:00:00.000000000 +0800 @@ -1,160 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>Shortcut</class> - <widget class="QWidget" name="Shortcut"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>683</width> - <height>459</height> - </rect> - </property> - <property name="minimumSize"> - <size> - <width>550</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="windowTitle"> - <string notr="true">Shortcut</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="TitleLabel" name="systemLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>System Shortcut</string> - </property> - </widget> - </item> - <item> - <layout class="QVBoxLayout" name="systemLayout"/> - </item> - <item> - <spacer name="verticalSpacer_2"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>24</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="TitleLabel" name="customLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Custom Shortcut</string> - </property> - </widget> - </item> - <item> - <widget class="QFrame" name="verticalFrame"> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="lineWidth"> - <number>0</number> - </property> - <layout class="QVBoxLayout" name="verticalLayout_5"> - <property name="spacing"> - <number>1</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QVBoxLayout" name="customLayout"> - <property name="spacing"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="addLyt"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>0</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - <customwidgets> - <customwidget> - <class>TitleLabel</class> - <extends>QLabel</extends> - <header location="global">titlelabel.h</header> - </customwidget> - </customwidgets> - <resources/> - <connections/> -</ui> diff -Nru ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcutui.cpp ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcutui.cpp --- ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcutui.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcutui.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -38,7 +38,8 @@ void ShortcutUi::initSystem() { - systemTitle = new TitleLabel(this); + systemTitle = new KLabel(this); + systemTitle->setContentsMargins(16, 0, 0, 0); systemShortcutGroup = new SettingGroup(this); //~ contents_path /Shortcut/System Shortcut systemTitle->setText(tr("System Shortcut")); @@ -49,7 +50,8 @@ void ShortcutUi::initWindow() { - m_windowTitle = new TitleLabel(this); + m_windowTitle = new KLabel(this); + m_windowTitle->setContentsMargins(16, 0, 0, 0); m_windowShortcutGroup = new SettingGroup(this); //~ contents_path /Shortcut/Window Shortcut m_windowTitle->setText(tr("Window Shortcut")); @@ -60,12 +62,13 @@ void ShortcutUi::initCustom() { - customTitle = new TitleLabel(this); + customTitle = new KLabel(this); customShortcutGroup = new SettingGroup(this); addButton = new AddButton(this); QHBoxLayout *layout = new QHBoxLayout(this); //~ contents_path /Shortcut/Customize Shortcut customTitle->setText(tr("Customize Shortcut")); + customTitle->setContentsMargins(16, 0, 0, 0); customLayout->setSpacing(0); customLayout->addWidget(customTitle); customLayout->addSpacing(8); @@ -455,7 +458,7 @@ UkccFrame *shortCutFrame = new UkccFrame(this); - FixLabel *nameLabel = new FixLabel(shortCutFrame); + KLabel *nameLabel = new KLabel(shortCutFrame); ClickFixLabel *bingdingLabel = new ClickFixLabel(shortCutFrame); ClickFixLabel *bingdingLabelTwice = nullptr; @@ -467,7 +470,7 @@ QHBoxLayout *lineEditLayoutTwice = new QHBoxLayout; #ifndef Nile - FixLabel *bindingLabel = new FixLabel(shortCutFrame); + KLabel *bindingLabel = new KLabel(shortCutFrame); bindingLabel->setText(getShowShortcutString(shortcut)); bindingLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); #endif @@ -626,7 +629,7 @@ UkccFrame *shortCutFrame = new UkccFrame(this); - FixLabel *nameLabel = new FixLabel(shortCutFrame); + KLabel *nameLabel = new KLabel(shortCutFrame); ClickFixLabel *bingdingLabel = new ClickFixLabel(shortCutFrame); ClickFixLabel *bingdingLabelTwice = nullptr; @@ -899,15 +902,15 @@ addDialog->setWindowTitle(QObject::tr("Edit Shortcut")); addDialog->setExecText(mKeyEntry->actionStr); - addDialog->setNameText(nameLineEdit->text()); + addDialog->setNameText(mKeyEntry->nameStr); QString newBindingStr = mKeyEntry->bindingStr; - for (int i = 0; i < mCustomEntryList.size(); i++) { - if (mKeyEntry->actionStr == mCustomEntryList[i].actionStr) { - newBindingStr = mCustomEntryList[i].bindingStr; + for (int i = 0; i < customEntryList->size(); i++) { + if (mKeyEntry->actionStr == customEntryList->at(i).actionStr) { + newBindingStr = customEntryList->at(i).bindingStr; if (newBindingStr == "Null") { newBindingStr = tr("Null"); } - qDebug() << Q_FUNC_INFO << "get new customEntries bindingStr" << mCustomEntryList[i].actionStr << "from" << mKeyEntry->bindingStr << "to" << mCustomEntryList[i].bindingStr; + qDebug() << Q_FUNC_INFO << "get new customEntries bindingStr" << customEntryList->at(i).actionStr << "from" << mKeyEntry->bindingStr << "to" << customEntryList->at(i).bindingStr; break; } } diff -Nru ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcutui.h ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcutui.h --- ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcutui.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/devices/shortcut/shortcutui.h 2025-02-07 16:27:50.000000000 +0800 @@ -3,8 +3,6 @@ #include "settinggroup.h" #include "addbutton.h" -#include "fixlabel.h" -#include "titlelabel.h" #include "doubleclicklineedit.h" #include "clickfixlabel.h" #include "addshortcutdialog.h" @@ -14,6 +12,9 @@ #include <QMenu> #include <QMessageBox> #include <QGSettings> +#include <klabel.h> + +using namespace kdk; class ShortcutUi : public QWidget { @@ -85,15 +86,15 @@ QHBoxLayout *m_defaultLayout = nullptr; private: - TitleLabel *systemTitle = nullptr; + KLabel *systemTitle = nullptr; SettingGroup *systemShortcutGroup = nullptr; - TitleLabel *m_windowTitle = nullptr; + KLabel *m_windowTitle = nullptr; SettingGroup *m_windowShortcutGroup = nullptr; QPushButton* m_defaultButton = nullptr; private: - TitleLabel *customTitle = nullptr; + KLabel *customTitle = nullptr; SettingGroup *customShortcutGroup = nullptr; AddButton *addButton = nullptr; diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/fonts/fonts.cpp ukui-control-center-5.0.0.0/plugins/personalized/fonts/fonts.cpp --- ukui-control-center-5.0.0.0/plugins/personalized/fonts/fonts.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/fonts/fonts.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -94,6 +94,7 @@ pluginWidget = new QWidget; pluginWidget->setAttribute(Qt::WA_DeleteOnClose); ui->setupUi(pluginWidget); + ui->titleLabel->setContentsMargins(16, 0, 0, 0); setupComponent(); initSearchText(); setupConnect(); diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/fonts/fonts.h ukui-control-center-5.0.0.0/plugins/personalized/fonts/fonts.h --- ukui-control-center-5.0.0.0/plugins/personalized/fonts/fonts.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/fonts/fonts.h 2025-02-07 16:27:50.000000000 +0800 @@ -47,6 +47,7 @@ #include "kprogressdialog.h" #include "libfun.h" #include "fontunit.h" +#include <klabel.h> using namespace ukcc; using namespace kdk; diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/fonts/fonts.ui ukui-control-center-5.0.0.0/plugins/personalized/fonts/fonts.ui --- ukui-control-center-5.0.0.0/plugins/personalized/fonts/fonts.ui 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/fonts/fonts.ui 2025-02-07 16:27:50.000000000 +0800 @@ -39,7 +39,7 @@ <number>0</number> </property> <item> - <widget class="TitleLabel" name="titleLabel"> + <widget class="KLabel" name="titleLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -123,7 +123,7 @@ <number>0</number> </property> <item> - <widget class="FixLabel" name="fontSizeLabel"> + <widget class="KLabel" name="fontSizeLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -209,14 +209,9 @@ <layoutdefault spacing="6" margin="11"/> <customwidgets> <customwidget> - <class>TitleLabel</class> + <class>KLabel</class> <extends>QLabel</extends> - <header location="global">titlelabel.h</header> - </customwidget> - <customwidget> - <class>FixLabel</class> - <extends>QLabel</extends> - <header>fixlabel.h</header> + <header>klabel.h</header> </customwidget> </customwidgets> <resources/> diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/fonts/fontunit.cpp ukui-control-center-5.0.0.0/plugins/personalized/fonts/fontunit.cpp --- ukui-control-center-5.0.0.0/plugins/personalized/fonts/fontunit.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/fonts/fontunit.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -110,7 +110,8 @@ m_fontPreviewLabel->setAlignment(Qt::AlignTop|Qt::AlignLeft); m_fontPreviewLabel->setFixedSize(176, 64); - m_fontNameLabel = new FixLabel(m_viewData->name, this); + m_fontNameLabel = new KLabel(this); + m_fontNameLabel->setText(m_viewData->name); m_fontNameLabel->setWordWrap(true); m_fontNameLabel->setAlignment(Qt::AlignTop|Qt::AlignLeft); m_fontNameLabel->setFixedHeight(21); diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/fonts/fontunit.h ukui-control-center-5.0.0.0/plugins/personalized/fonts/fontunit.h --- ukui-control-center-5.0.0.0/plugins/personalized/fonts/fontunit.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/fonts/fontunit.h 2025-02-07 16:27:50.000000000 +0800 @@ -29,10 +29,12 @@ #include <QHBoxLayout> #include <QGSettings> #include <QDBusInterface> -#include "fixlabel.h" #include "lightlabel.h" #include "libfun.h" #include "popupfontinfo.h" +#include <klabel.h> + +using namespace kdk; class FontUnit : public QWidget { @@ -68,7 +70,7 @@ private: QLabel* m_fontPreviewLabel = nullptr; - FixLabel* m_fontNameLabel = nullptr; + KLabel* m_fontNameLabel = nullptr; LightLabel* m_fontStyleLabel = nullptr; QToolButton* m_fontToolButton = nullptr; QMenu *m_fontMenu = nullptr; diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/screenlock/screenlock.ui ukui-control-center-5.0.0.0/plugins/personalized/screenlock/screenlock.ui --- ukui-control-center-5.0.0.0/plugins/personalized/screenlock/screenlock.ui 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/screenlock/screenlock.ui 1970-01-01 08:00:00.000000000 +0800 @@ -1,275 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>Screenlock</class> - <widget class="QWidget" name="Screenlock"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>550</width> - <height>700</height> - </rect> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="windowTitle"> - <string>Screenlock</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QFrame" name="frame_1"> - <property name="minimumSize"> - <size> - <width>550</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <layout class="QVBoxLayout" name="verticalLayout"> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="TitleLabel" name="titleLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Screenlock Interface</string> - </property> - </widget> - </item> - <item> - <widget class="QFrame" name="previewFrame"> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout"> - <property name="leftMargin"> - <number>16</number> - </property> - <property name="topMargin"> - <number>16</number> - </property> - <property name="rightMargin"> - <number>16</number> - </property> - <property name="bottomMargin"> - <number>16</number> - </property> - <item> - <widget class="QLabel" name="previewLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>300</width> - <height>180</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>300</width> - <height>180</height> - </size> - </property> - <property name="text"> - <string/> - </property> - <property name="scaledContents"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_4"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - </item> - <item> - <layout class="QVBoxLayout" name="centerLayout"/> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <property name="spacing"> - <number>32</number> - </property> - <property name="leftMargin"> - <number>4</number> - </property> - <property name="topMargin"> - <number>8</number> - </property> - <property name="rightMargin"> - <number>4</number> - </property> - <item> - <widget class="QPushButton" name="browserLocalwpBtn"> - <property name="minimumSize"> - <size> - <width>110</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>110</width> - <height>16777215</height> - </size> - </property> - <property name="text"> - <string>Browse</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="onlineBtn"> - <property name="text"> - <string>Online Picture</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="resetBtn"> - <property name="minimumSize"> - <size> - <width>120</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="text"> - <string>Reset To Default</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <property name="topMargin"> - <number>24</number> - </property> - <property name="bottomMargin"> - <number>8</number> - </property> - <item> - <widget class="TitleLabel" name="setLabel"> - <property name="text"> - <string>Related Settings</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QVBoxLayout" name="relatedLayout"> - <property name="spacing"> - <number>0</number> - </property> - </layout> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>0</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - <layoutdefault spacing="6" margin="11"/> - <customwidgets> - <customwidget> - <class>TitleLabel</class> - <extends>QLabel</extends> - <header location="global">titlelabel.h</header> - </customwidget> - </customwidgets> - <resources/> - <connections/> -</ui> diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/screenlock/screenlockui.cpp ukui-control-center-5.0.0.0/plugins/personalized/screenlock/screenlockui.cpp --- ukui-control-center-5.0.0.0/plugins/personalized/screenlock/screenlockui.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/screenlock/screenlockui.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -47,7 +47,8 @@ void ScreenlockUi::initScreenLock() { // 1 锁屏 - m_wallpaperTitleLabel = new TitleLabel(this); + m_wallpaperTitleLabel = new KLabel(this); + m_wallpaperTitleLabel->setContentsMargins(16, 0, 0, 0); //~ contents_path /Screenlock/Screenlock m_wallpaperTitleLabel->setText(tr("Screenlock")); @@ -92,7 +93,8 @@ // 蓝牙设备 m_bluetoothWidget = new QWidget(); - FixLabel* bluetoothLabel = new FixLabel(tr("Specified device"), m_bluetoothWidget); + KLabel* bluetoothLabel = new KLabel(m_bluetoothWidget); + bluetoothLabel->setText(tr("Specified device")); m_bluetoothComboBox = new QComboBox(m_bluetoothWidget); QHBoxLayout* bluetoothLayout = new QHBoxLayout(m_bluetoothWidget); bluetoothLayout->setContentsMargins(16, 0, 0, 0); @@ -108,7 +110,8 @@ QHBoxLayout* setBtLayout = new QHBoxLayout(m_setBtWidget); setBtLayout->setContentsMargins(16, 0, 0, 0); setBtLayout->setSpacing(0); - FixLabel* setBtLabel = new FixLabel(tr("No paired phone. Please turn to 'Bluetooth' to pair."), m_setBtWidget); + KLabel* setBtLabel = new KLabel(m_setBtWidget); + setBtLabel->setText(tr("No paired phone. Please turn to 'Bluetooth' to pair.")); QLabel* setBticonLabel = new QLabel(m_setBtWidget); QIcon icon = QIcon::fromTheme("kylin-dialog-warning"); if (icon.isNull()) { @@ -191,7 +194,8 @@ QHBoxLayout* relateTitleLayout = new QHBoxLayout(titleFrame); relateTitleLayout->setContentsMargins(0, 0, 0, 0); - relateTitleLabel = new TitleLabel(m_relateFrame); + relateTitleLabel = new KLabel(m_relateFrame); + relateTitleLabel->setContentsMargins(16, 0, 0, 0); relateTitleLayout->addWidget(relateTitleLabel); relateTitleLabel->setText(tr("Related Settings")); diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/screenlock/screenlockui.h ukui-control-center-5.0.0.0/plugins/personalized/screenlock/screenlockui.h --- ukui-control-center-5.0.0.0/plugins/personalized/screenlock/screenlockui.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/screenlock/screenlockui.h 2025-02-07 16:27:50.000000000 +0800 @@ -20,7 +20,6 @@ #ifndef SCREENLOCKUI_H #define SCREENLOCKUI_H -#include "titlelabel.h" #include "settinggroup.h" #include "flowlayout.h" #include "switchwidget.h" @@ -31,6 +30,7 @@ #include <QWidget> #include "pictureunit.h" #include "kbackgroundgroup.h" +#include <klabel.h> using namespace kdk; @@ -74,7 +74,7 @@ QVBoxLayout *m_relateLayout = nullptr; private: - TitleLabel *m_wallpaperTitleLabel = nullptr; + KLabel *m_wallpaperTitleLabel = nullptr; UkccFrame *m_previewFrame = nullptr; QHBoxLayout *m_previewLayout = nullptr; QLabel *m_previewLabel = nullptr; @@ -98,7 +98,7 @@ QComboBox* m_bluetoothComboBox = nullptr; KBackgroundGroup* m_contentBackgroundGroup = nullptr; private: - TitleLabel *relateTitleLabel = nullptr; + KLabel *relateTitleLabel = nullptr; SettingGroup *relatedGroup = nullptr; PushButtonWidget *monitorWidget = nullptr; PushButtonWidget *screensaverWidget = nullptr; diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/screensaver/screensaver.pro ukui-control-center-5.0.0.0/plugins/personalized/screensaver/screensaver.pro --- ukui-control-center-5.0.0.0/plugins/personalized/screensaver/screensaver.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/screensaver/screensaver.pro 2025-02-07 16:27:50.000000000 +0800 @@ -8,7 +8,6 @@ include($$PROJECT_ROOTDIR/libukcc/widgets/ComboBox/combobox.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Label/label.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Frame/frame.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/Uslider/uslider.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/SettingWidget/settingwidget.pri) include($$PROJECT_ROOTDIR/libukcc/interface.pri) diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/screensaver/screensaver.ui ukui-control-center-5.0.0.0/plugins/personalized/screensaver/screensaver.ui --- ukui-control-center-5.0.0.0/plugins/personalized/screensaver/screensaver.ui 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/screensaver/screensaver.ui 1970-01-01 08:00:00.000000000 +0800 @@ -1,254 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>Screensaver</class> - <widget class="QWidget" name="Screensaver"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>684</width> - <height>560</height> - </rect> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="sizeIncrement"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="windowTitle"> - <string notr="true">Screensaver</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="spacing"> - <number>8</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="TitleLabel" name="titleLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Screensaver</string> - </property> - </widget> - </item> - <item> - <widget class="QFrame" name="viewFrame"> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>16</number> - </property> - <property name="topMargin"> - <number>16</number> - </property> - <property name="rightMargin"> - <number>16</number> - </property> - <property name="bottomMargin"> - <number>16</number> - </property> - <item> - <widget class="PreviewWidget" name="previewWidget" native="true"> - <property name="minimumSize"> - <size> - <width>300</width> - <height>180</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>300</width> - <height>180</height> - </size> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - </item> - <item> - <layout class="QVBoxLayout" name="screensaverLayout"/> - </item> - <item> - <widget class="QFrame" name="enableFrame"> - <property name="minimumSize"> - <size> - <width>550</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>960</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="lineWidth"> - <number>0</number> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout" name="enableHorLayout"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>16</number> - </property> - <property name="rightMargin"> - <number>16</number> - </property> - <item> - <widget class="FixLabel" name="enableLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>196</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>220</width> - <height>16777215</height> - </size> - </property> - <property name="text"> - <string>Lock screen when activating screensaver</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="comboBox"> - <property name="minimumSize"> - <size> - <width>300</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>30</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>0</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - <layoutdefault spacing="6" margin="11"/> - <customwidgets> - <customwidget> - <class>TitleLabel</class> - <extends>QLabel</extends> - <header location="global">titlelabel.h</header> - </customwidget> - <customwidget> - <class>FixLabel</class> - <extends>QLabel</extends> - <header>fixlabel.h</header> - </customwidget> - <customwidget> - <class>PreviewWidget</class> - <extends>QWidget</extends> - <header>previewwidget.h</header> - <container>1</container> - </customwidget> - </customwidgets> - <resources/> - <connections/> -</ui> diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/screensaver/screensaverui.cpp ukui-control-center-5.0.0.0/plugins/personalized/screensaver/screensaverui.cpp --- ukui-control-center-5.0.0.0/plugins/personalized/screensaver/screensaverui.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/screensaver/screensaverui.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -26,7 +26,8 @@ void ScreensaverUi::initPreview() { - screensaverTitle = new TitleLabel(this); + screensaverTitle = new KLabel(this); + screensaverTitle->setContentsMargins(16, 0, 0, 0); previewFrame = new UkccFrame(this); previewLayout = new QHBoxLayout(previewFrame); previewWidget = new PreviewWidget(this); @@ -36,7 +37,7 @@ previewLayout->addWidget(previewWidget); - //~ contents_path /Screenlock/Screensaver + //~ contents_path /Screensaver/Screensaver screensaverTitle->setText(tr("Screensaver")); previewFrame->setFixedHeight(212); previewWidget->setFixedSize(300, 180); @@ -74,7 +75,7 @@ { UkccFrame *screensaverSourceFrame = new UkccFrame(customizeGroup, UkccFrame::BorderRadiusStyle::Around, true); QHBoxLayout *sourceLayout = new QHBoxLayout(screensaverSourceFrame); - FixLabel *sourceLabel = new FixLabel(); + KLabel *sourceLabel = new KLabel(); sourcePathLine = new QLineEdit(); sourceButton = new QPushButton(); @@ -83,6 +84,7 @@ sourceLayout->addWidget(sourceLabel); sourceLayout->addWidget(sourcePathLine); sourceLayout->addWidget(sourceButton); + //~ contents_path /Screensaver/Screensaver source sourceLabel->setText(tr("Screensaver source")); sourceLabel->setFixedWidth(220); sourcePathLine->setMinimumWidth(252); @@ -98,7 +100,7 @@ { UkccFrame *pictureSwitchFrame = new UkccFrame(customizeGroup, UkccFrame::BorderRadiusStyle::Around, true); QHBoxLayout *randomLayout = new QHBoxLayout(pictureSwitchFrame); - FixLabel *randomLabel = new FixLabel(); + KLabel *randomLabel = new KLabel(); QRadioButton *radioOrder = new QRadioButton(); QRadioButton *radioRand = new QRadioButton(); @@ -116,6 +118,7 @@ randomLayout->addWidget(randomLabel); randomLayout->addWidget(radioOrder); randomLayout->addWidget(radioRand); + //~ contents_path /Screensaver/Random switching randomLabel->setText(tr("Random switching")); randomLabel->setFixedWidth(220); randomLayout->addStretch(); @@ -127,7 +130,7 @@ { UkccFrame *timeSetFrame = new UkccFrame(customizeGroup, UkccFrame::BorderRadiusStyle::Around, true); QHBoxLayout *timeSetLayout = new QHBoxLayout(); - FixLabel *timeSetLabel = new FixLabel(); + KLabel *timeSetLabel = new KLabel(); switchTimeComboBox = new QComboBox(); @@ -135,6 +138,7 @@ timeSetLayout->setContentsMargins(16, 0, 16, 0); timeSetLayout->addWidget(timeSetLabel); timeSetLayout->addWidget(switchTimeComboBox); + //~ contents_path /Screensaver/Switching time timeSetLabel->setText(tr("Switching time")); timeSetLabel->setFixedWidth(220); switchTimeComboBox->setMinimumWidth(340); @@ -146,14 +150,14 @@ { UkccFrame *showTextFrame = new UkccFrame(customizeGroup, UkccFrame::BorderRadiusStyle::Around, true); QHBoxLayout *showTextLayout = new QHBoxLayout(); - FixLabel *showLabel = new FixLabel(); + KLabel *showLabel = new KLabel(); textLineEdit = new QLineEdit(); //用户输入文字 showTextFrame->setLayout(showTextLayout); showTextLayout->setContentsMargins(16, 6, 15, 8); showTextLayout->addWidget(showLabel); showTextLayout->addWidget(textLineEdit); - + //~ contents_path /Screensaver/Text(up to 30 characters): showLabel->setText(tr("Text(up to 30 characters):")); showLabel->setFixedWidth(220); textLineEdit->setMaxLength(30); @@ -165,7 +169,7 @@ { UkccFrame *showTextSetFrame = new UkccFrame(customizeGroup, UkccFrame::BorderRadiusStyle::Around, true); QHBoxLayout *textSetLayout = new QHBoxLayout(showTextSetFrame); - FixLabel *textSetLabel = new FixLabel(); + KLabel *textSetLabel = new KLabel(); QRadioButton *radioRandom = new QRadioButton(this); QRadioButton *radioCenter = new QRadioButton(this); @@ -176,6 +180,7 @@ showTextSetFrame->setFixedHeight(60); textSetLayout->addWidget(textSetLabel); textSetLayout->setContentsMargins(16,0,16,0); + //~ contents_path /Screensaver/Text position textSetLabel->setText(tr("Text position")); textSetLabel->setFixedWidth(220); radioRandom->setFixedWidth(220); @@ -194,7 +199,7 @@ { UkccFrame *showTimeFrame = new UkccFrame(screensaverGroup, UkccFrame::BorderRadiusStyle::Around, true); QHBoxLayout *showTimeLayout = new QHBoxLayout(showTimeFrame); - FixLabel *showTimeLabel = new FixLabel(); + KLabel *showTimeLabel = new KLabel(); showTimeLayout->setContentsMargins(16,0,16,0); showTimeLayout->addWidget(showTimeLabel); @@ -206,6 +211,7 @@ showTimeLayout->addWidget(showUkuiTimeBtn); showTimeLabel->setFixedWidth(220); + //~ contents_path /Screensaver/Show rest time showTimeLabel->setText(tr("Show rest time")); screensaverGroup->addWidget(showTimeFrame); } @@ -214,7 +220,9 @@ { UkccFrame *lockFrame = new UkccFrame(screensaverGroup, UkccFrame::BorderRadiusStyle::Around, true);; QHBoxLayout *lockLayout = new QHBoxLayout(lockFrame); - FixLabel *lockLabel = new FixLabel(); + + //~ contents_path /Screensaver/Lock screen when screensaver boot + KLabel *lockLabel = new KLabel(); lockLabel->setText(tr("Lock screen when screensaver boot")); lockLabel->setFixedWidth(400); diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/screensaver/screensaverui.h ukui-control-center-5.0.0.0/plugins/personalized/screensaver/screensaverui.h --- ukui-control-center-5.0.0.0/plugins/personalized/screensaver/screensaverui.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/screensaver/screensaverui.h 2025-02-07 16:27:50.000000000 +0800 @@ -1,7 +1,6 @@ #ifndef SCREENSAVERUI_H #define SCREENSAVERUI_H -#include "titlelabel.h" #include "settinggroup.h" #include "switchwidget.h" #include "pushbuttonwidget.h" @@ -15,6 +14,9 @@ #include <QFileDialog> #include <QButtonGroup> #include <QFileSystemWatcher> +#include <klabel.h> + +using namespace kdk; class ScreensaverUi : public QWidget { @@ -56,7 +58,7 @@ QVBoxLayout *uiLayout = nullptr; private: - TitleLabel *screensaverTitle = nullptr; + KLabel *screensaverTitle = nullptr; UkccFrame *previewFrame = nullptr; QHBoxLayout *previewLayout = nullptr; PreviewWidget *previewWidget = nullptr; diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/theme/theme.cpp ukui-control-center-5.0.0.0/plugins/personalized/theme/theme.cpp --- ukui-control-center-5.0.0.0/plugins/personalized/theme/theme.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/theme/theme.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -26,9 +26,6 @@ #include <QtDBus/QDBusConnection> #include <QtConcurrent> #include <QRadioButton> - -#include "iconlabel.h" - #include "cursor/xcursortheme.h" #include "../../../shell/customstyle.h" #include "ukcccommon.h" @@ -179,7 +176,8 @@ mThemeModeFrame->setFrameShape(QFrame::Shape::Box); FlowLayout *hLyt = new FlowLayout(mThemeModeFrame, 20, 40, 24); - mThemeModeLabel = new TitleLabel(mThemeModeFrame); + mThemeModeLabel = new KLabel(mThemeModeFrame); + mThemeModeLabel->setContentsMargins(16, 0, 0, 0); mLightBtn = new ThemeButton(tr("Light"), QPixmap(QString("://img/plugins/theme/%1.png").arg("light")), mThemeModeFrame); mLightBtn->setObjectName("lighttheme"); @@ -210,7 +208,8 @@ ui->thememodeLayout->addSpacing(8); ui->thememodeLayout->addWidget(mThemeModeFrame); - mEffectLabel = new TitleLabel(pluginWidget); + mEffectLabel = new KLabel(pluginWidget); + mEffectLabel->setContentsMargins(16, 0, 0, 0); //~ contents_path /Theme/Effect setting mEffectLabel->setText(tr("Effect setting")); @@ -275,7 +274,9 @@ kwinSettings->endGroup(); - mEffectWidget->setChecked(kwin); + bool effectEnabled = personliseGsettings->get(PERSONALSIE_EFFECT_KEY).toBool(); + mEffectWidget->setChecked(effectEnabled); + mCornerWidget->setVisible(effectEnabled); if (mEffectWidget->isChecked()) { mTranWidget->setVisible(true); @@ -353,7 +354,8 @@ FlowLayout *fLyt = new FlowLayout(mThemeIconFrame, 0, 40, 0); fLyt->setContentsMargins(16, 16, 0, 4); - mThemeIconLabel = new TitleLabel(); + mThemeIconLabel = new KLabel(); + mThemeIconLabel->setContentsMargins(16, 0, 0, 0); // 构建图标主题Widget Group,方便更新选中/非选中状态 mThemeIconBtnGroup = new QButtonGroup; @@ -417,7 +419,8 @@ mControlMap.insert("dustGold", QColor(255, 217, 102)); mControlMap.insert("polarGreen", QColor(82, 196, 41)); - mControlLabel = new TitleLabel(); + mControlLabel = new KLabel(); + mControlLabel->setContentsMargins(16, 0, 0, 0); mControlLabel->setMaximumWidth(100); //~ contents_path /Theme/Corlor mControlLabel->setText(tr("Corlor")); @@ -465,7 +468,7 @@ } void Theme::initCursorTheme(){ - if (UkccCommon::isTablet() || UkccCommon::isWayland()) + if (UkccCommon::isTablet()) return; mThemeCursorFrame = new QFrame(pluginWidget); @@ -475,7 +478,8 @@ FlowLayout *fLyt = new FlowLayout(mThemeCursorFrame, 0, 40, 0); fLyt->setContentsMargins(16, 16, 0, 4); - mThemeCursorLabel = new TitleLabel(mThemeCursorFrame); + mThemeCursorLabel = new KLabel(mThemeCursorFrame); + mThemeCursorLabel->setContentsMargins(16, 0, 0, 0); QStringList cursorThemes = getSystemCursorThemes(); @@ -530,7 +534,8 @@ mFLyt = new FlowLayout(mSwitchFrame, 0, 40, 0); mFLyt->setContentsMargins(16, 16, 0, 4); - mSwitchLabel = new TitleLabel(); + mSwitchLabel = new KLabel(); + mSwitchLabel->setContentsMargins(16, 0, 0, 0); mSwitchLabel->setText(tr("Theme")); ui->switchLyt->addWidget(mSwitchLabel); @@ -602,7 +607,8 @@ void Theme::initJumpTheme() { - mJumpLabel = new TitleLabel(pluginWidget); + mJumpLabel = new KLabel(pluginWidget); + mJumpLabel->setContentsMargins(16, 0, 0, 0); //~ contents_path /Theme/Other mJumpLabel->setText(tr("Other")); @@ -746,9 +752,12 @@ connect(mTranWidget->slider(), &KSlider::valueChanged, this, [=](int value) { changeTranpancySlot(value); - revokeGlobalThemeSlot("getTransparencyBlur", QString::number(value, 10)); + }); + + connect(mTranWidget->slider(), &KSlider::sliderReleased, this, [=]() { + revokeGlobalThemeSlot("getTransparencyBlur", QString::number(mTranWidget->slider()->value(), 10)); revokeGlobalThemeSlot("getSupportTransparency", "true"); - UkccCommon::buriedSettings(name(), "set transparency", QString("select"), QString::number(value)); + UkccCommon::buriedSettings(name(), "set transparency", QString("select"), QString::number(mTranWidget->slider()->value())); }); connect(mCornerWidget, &ComboxWidget::currentIndexChanged, this, [=](int index) { @@ -1358,9 +1367,11 @@ void Theme::changeTranpancySlot(int value) { - personliseGsettings->set(PERSONALSIE_TRAN_KEY,(static_cast<int>(value) / 100.0)); - qtSettings->set(THEME_TRAN_KEY, value); - qtSettings->set(PEONY_TRAN_KEY, value); + if (value % 5 == 0) { + personliseGsettings->set(PERSONALSIE_TRAN_KEY,(static_cast<int>(value) / 100.0)); + qtSettings->set(THEME_TRAN_KEY, value); + qtSettings->set(PEONY_TRAN_KEY, value); + } } void Theme::changeTranpancySliderSlot(int value) diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/theme/theme.h ukui-control-center-5.0.0.0/plugins/personalized/theme/theme.h --- ukui-control-center-5.0.0.0/plugins/personalized/theme/theme.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/theme/theme.h 2025-02-07 16:27:50.000000000 +0800 @@ -38,8 +38,6 @@ #include <libkysettings.h> #endif -#include "uslider.h" -#include "titlelabel.h" #include "flowlayout.h" #include "icontheme.h" @@ -56,6 +54,7 @@ #include "switchwidget.h" #include "sliderwidget.h" #include "comboxwidget.h" +#include <klabel.h> using namespace kdk; @@ -99,13 +98,13 @@ WidgetGroup *cursorThemeWidgetGroup; WidgetGroup *iconThemeWidgetGroup; - TitleLabel *mSwitchLabel; - TitleLabel *mControlLabel; - TitleLabel *mJumpLabel; - TitleLabel *mThemeModeLabel; - TitleLabel *mThemeIconLabel; - TitleLabel *mThemeCursorLabel = nullptr; - TitleLabel *mEffectLabel; + KLabel *mSwitchLabel; + KLabel *mControlLabel; + KLabel *mJumpLabel; + KLabel *mThemeModeLabel; + KLabel *mThemeIconLabel; + KLabel *mThemeCursorLabel = nullptr; + KLabel *mEffectLabel; ThemeButton *mCustomPicUnit = nullptr; ThemeButton *mPrePicUnit = nullptr; diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/theme/theme.pro ukui-control-center-5.0.0.0/plugins/personalized/theme/theme.pro --- ukui-control-center-5.0.0.0/plugins/personalized/theme/theme.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/theme/theme.pro 2025-02-07 16:27:50.000000000 +0800 @@ -6,7 +6,6 @@ include(../../../env.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/FlowLayout/flowlayout.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Label/label.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/Uslider/uslider.pri) include($$PROJECT_ROOTDIR/libukcc/interface.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/SettingWidget/settingwidget.pri) diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/theme/themewidget.cpp ukui-control-center-5.0.0.0/plugins/personalized/theme/themewidget.cpp --- ukui-control-center-5.0.0.0/plugins/personalized/theme/themewidget.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/theme/themewidget.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -65,7 +65,7 @@ selectedLabel->setPixmap(selectIcon.pixmap(selectIcon.actualSize(QSize(16, 16)))); }); - FixLabel * nameLabel = new FixLabel(this); + KLabel * nameLabel = new KLabel(this); QSizePolicy nameSizePolicy = nameLabel->sizePolicy(); nameSizePolicy.setHorizontalPolicy(QSizePolicy::Fixed); nameSizePolicy.setVerticalPolicy(QSizePolicy::Fixed); @@ -132,7 +132,7 @@ selectedLabel->setPixmap(selectIcon.pixmap(selectIcon.actualSize(QSize(16, 16)))); }); - FixLabel * nameLabel = new FixLabel(this); + KLabel * nameLabel = new KLabel(this); QSizePolicy nameSizePolicy = nameLabel->sizePolicy(); nameSizePolicy.setHorizontalPolicy(QSizePolicy::Preferred); nameSizePolicy.setVerticalPolicy(QSizePolicy::Fixed); diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/theme/themewidget.h ukui-control-center-5.0.0.0/plugins/personalized/theme/themewidget.h --- ukui-control-center-5.0.0.0/plugins/personalized/theme/themewidget.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/theme/themewidget.h 2025-02-07 16:27:50.000000000 +0800 @@ -27,7 +27,9 @@ #include <QRadioButton> #include <QFrame> #include <QGSettings> -#include "fixlabel.h" +#include <klabel.h> + +using namespace kdk; #define THEME_QT_SCHEMA "org.ukui.style" diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/colordialog.cpp ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/colordialog.cpp --- ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/colordialog.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/colordialog.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -21,7 +21,6 @@ #include "ui_colordialog.h" #include "colorsquare.h" #include "maskwidget.h" -#include "closebutton.h" #include <QRegExp> extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed); diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaper.cpp ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaper.cpp --- ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaper.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaper.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -24,6 +24,23 @@ #include <QProcess> #include <QFileSystemWatcher> #include <QtConcurrent/QtConcurrent> +#include <QObject> +#include <QPixmap> + +#include "xmlhandle.h" +#include <QStandardPaths> +#include <QtXml> +#include <QThread> +#include <kysdk/applications/accessinfohelper.h> + + +#define LOCAL_USR_PATH QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) +#define LOCAL_APP_PATH QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)\ + %QStringLiteral("/ukui-control-center/") +#define LOCAL_WALLPAPER_PATH QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)\ + %QStringLiteral("/ukui-control-center/wallpaperData/") +#define LOCAL_WALLPAPER_HASH_PATH QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)\ + %QStringLiteral("/ukui-control-center/wallpaperData/HASH") Wallpaper::Wallpaper() : mFirstLoad(true) @@ -31,9 +48,6 @@ pluginName = tr("Background"); pluginType = PERSONALIZED; picInfoList.clear(); - QtConcurrent::run([=]{ - preInitialize(); - }); } Wallpaper::~Wallpaper() @@ -52,7 +66,7 @@ return pluginType; } -void Wallpaper::preInitialize() { +void Wallpaper::loadPictureInfo() { wallpaperInterface = new QDBusInterface("org.ukui.ukcc.session", "/Wallpaper", "org.ukui.ukcc.session.Wallpaper", @@ -68,6 +82,49 @@ return; } picInfoList.clear(); + + QSize IMAGE_SIZE(166, 110); + int num = 0; + QDir dir(LOCAL_WALLPAPER_PATH); + QFileInfoList fileInfoList = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot | QDir::Dirs); + + qDebug() << Q_FUNC_INFO << "wallpaper path" << LOCAL_WALLPAPER_PATH << (fileInfoList.size() - 1) << sourcePictures.size(); + if ((fileInfoList.size() - 1) == sourcePictures.size()) { + qDebug() << Q_FUNC_INFO << "equal file num, skip load"; + picInfoList.clear(); + for (int i = 0; i < previewPictures.size(); ++i) { + PictureInfo* pictureInfo = new PictureInfo(); + if (pictureInfo == nullptr) + continue; + pictureInfo->pixmap.load(previewPictures.at(i)); + pictureInfo->fileName = sourcePictures.at(i); + picInfoList.append(pictureInfo); + } + return; + } + for (QString filename : sourcePictures) { + QPixmap qPixmap = QPixmap(filename); + if (qPixmap.isNull()){ + QFile file(filename); + qint64 fileSize = file.size(); + if (fileSize <= 100000000 && file.open(QIODevice::ReadOnly)){ + qPixmap.loadFromData(file.readAll()); + file.close(); + } + } + if (qPixmap.isNull()) { + qDebug() << Q_FUNC_INFO << "filename" << filename << "to pixmap is null"; + } + QPixmap pixmap = qPixmap.scaled(IMAGE_SIZE); + + QFile wallpaperFile; + filename.replace("/", "-"); + wallpaperFile.setFileName(LOCAL_WALLPAPER_PATH + QString::number(num) + filename); + QFileInfo fileinfo = QFileInfo(filename); + pixmap.save(&wallpaperFile, fileinfo.suffix().toUtf8().data()); + num++; + } + picInfoList.clear(); for (int i = 0; i < previewPictures.size(); ++i) { PictureInfo* pictureInfo = new PictureInfo(); if (pictureInfo == nullptr) @@ -124,6 +181,7 @@ void Wallpaper::initContent() { + loadPictureInfo(); initModes(); initTypes(); initMode(); diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaper.h ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaper.h --- ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaper.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaper.h 2025-02-07 16:27:50.000000000 +0800 @@ -65,9 +65,7 @@ void initPictures(); void connectUiSignals(); void showLocalWpDialog(); - -private: - void preInitialize(); + void loadPictureInfo(); private: bool mFirstLoad; diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaper.pro ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaper.pro --- ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaper.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaper.pro 2025-02-07 16:27:50.000000000 +0800 @@ -7,9 +7,7 @@ include($$PROJECT_ROOTDIR/libukcc/widgets/AddBtn/addbtn.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Label/label.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/MaskWidget/maskwidget.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/CloseButton/closebutton.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/FlowLayout/flowlayout.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/ImageUtil/imageutil.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/HoverWidget/hoverwidget.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/SettingWidget/settingwidget.pri) include($$PROJECT_ROOTDIR/libukcc/interface.pri) diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaper.ui ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaper.ui --- ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaper.ui 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaper.ui 1970-01-01 08:00:00.000000000 +0800 @@ -1,387 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>Wallpaper</class> - <widget class="QWidget" name="Wallpaper"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>846</width> - <height>479</height> - </rect> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="windowTitle"> - <string notr="true">Wallpaper</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QWidget" name="wallpaperWidget" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>550</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <layout class="QVBoxLayout" name="verticalLayout_6"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QVBoxLayout" name="verticalLayout_3"> - <property name="spacing"> - <number>8</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="TitleLabel" name="titleLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Desktop Background</string> - </property> - </widget> - </item> - <item> - <widget class="QStackedWidget" name="previewStackedWidget"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>212</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>212</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="currentIndex"> - <number>0</number> - </property> - <widget class="QWidget" name="pPicturePage"> - <layout class="QHBoxLayout" name="horizontalLayout_8"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <property name="leftMargin"> - <number>16</number> - </property> - <property name="topMargin"> - <number>16</number> - </property> - <property name="rightMargin"> - <number>16</number> - </property> - <property name="bottomMargin"> - <number>16</number> - </property> - <item> - <widget class="PictureLabel" name="previewLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>300</width> - <height>180</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>300</width> - <height>180</height> - </size> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - </layout> - </widget> - <widget class="QWidget" name="pColorPage"> - <layout class="QHBoxLayout" name="horizontalLayout_10"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_9"> - <property name="leftMargin"> - <number>16</number> - </property> - <property name="topMargin"> - <number>16</number> - </property> - <property name="rightMargin"> - <number>16</number> - </property> - <property name="bottomMargin"> - <number>16</number> - </property> - <item> - <widget class="QWidget" name="previewWidget" native="true"> - <property name="minimumSize"> - <size> - <width>300</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>300</width> - <height>16777215</height> - </size> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - </layout> - </widget> - </widget> - </item> - <item> - <layout class="QVBoxLayout" name="centerLayout"> - <property name="spacing"> - <number>0</number> - </property> - </layout> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QWidget" name="bottomWidget" native="true"> - <layout class="QHBoxLayout" name="horizontalLayout_4"> - <property name="spacing"> - <number>32</number> - </property> - <property name="leftMargin"> - <number>4</number> - </property> - <property name="topMargin"> - <number>16</number> - </property> - <property name="rightMargin"> - <number>4</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QPushButton" name="browserLocalwpBtn"> - <property name="minimumSize"> - <size> - <width>110</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>110</width> - <height>16777215</height> - </size> - </property> - <property name="text"> - <string>Browse</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="onlineBtn"> - <property name="text"> - <string>Online Picture</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="resetBtn"> - <property name="minimumSize"> - <size> - <width>120</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="text"> - <string>Reset To Default</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>0</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - <layoutdefault spacing="6" margin="11"/> - <customwidgets> - <customwidget> - <class>TitleLabel</class> - <extends>QLabel</extends> - <header location="global">titlelabel.h</header> - </customwidget> - <customwidget> - <class>PictureLabel</class> - <extends>QLabel</extends> - <header>picturelabel.h</header> - </customwidget> - </customwidgets> - <resources/> - <connections/> -</ui> diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaperui.cpp ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaperui.cpp --- ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaperui.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaperui.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -43,7 +43,8 @@ void WallpaperUi::createObject() { - m_wallpaperTitleLabel = new TitleLabel(this); + m_wallpaperTitleLabel = new KLabel(this); + m_wallpaperTitleLabel->setContentsMargins(16, 0, 0, 0); m_previewFrame = new UkccFrame(this); m_previewFrame->setFixedHeight(193); m_previewLabel = new PreviewLabel(m_previewFrame); diff -Nru ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaperui.h ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaperui.h --- ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaperui.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/personalized/wallpaper/wallpaperui.h 2025-02-07 16:27:50.000000000 +0800 @@ -21,8 +21,6 @@ #define WALLPAPERUI_H #include "previewlabel.h" -#include "titlelabel.h" -#include "fixlabel.h" #include "settinggroup.h" #include "ukccframe.h" #include "addbutton.h" @@ -36,6 +34,9 @@ #include <QRadioButton> #include <QButtonGroup> #include <QScrollArea> +#include <klabel.h> + +using namespace kdk; class WallpaperUi : public QWidget { @@ -76,7 +77,7 @@ QVBoxLayout *m_uiLayout = nullptr; private: - TitleLabel *m_wallpaperTitleLabel = nullptr; + KLabel *m_wallpaperTitleLabel = nullptr; PreviewLabel *m_previewLabel = nullptr; private: diff -Nru ukui-control-center-5.0.0.0/plugins/plugins.pro ukui-control-center-5.0.0.0/plugins/plugins.pro --- ukui-control-center-5.0.0.0/plugins/plugins.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/plugins.pro 2025-02-07 16:27:50.000000000 +0800 @@ -25,11 +25,6 @@ security-updates/backup \ } -if(contains(DEFINES, PANGUW)){ -SUBDIRS += system/display_hw \ - system/vino_hw \ -} - if(contains(DEFINES, MAVIS)){ SUBDIRS += system/display \ system/backup_intel \ diff -Nru ukui-control-center-5.0.0.0/plugins/system/about/about.cpp ukui-control-center-5.0.0.0/plugins/system/about/about.cpp --- ukui-control-center-5.0.0.0/plugins/system/about/about.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/about/about.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -45,6 +45,7 @@ #include <QSvgRenderer> #include <QSqlQuery> #include <QSqlRecord> +#include <QElapsedTimer> const QString kAboutFile = "/usr/share/applications/kylin-user-guide.desktop"; const QString kHPFile = "/usr/share/applications/hp-document.desktop"; @@ -250,6 +251,10 @@ void About::setVersionNumCompenent() { QStringList list = mAboutDBus->property("build").toStringList(); + if (list.size() < 2) { + qDebug() << Q_FUNC_INFO << "get dbus property build size error"; + return; + } QString build = list.at(0); QString pversion = list.at(1); if (build.isEmpty() || build.contains("null")) @@ -404,9 +409,9 @@ mAboutWidget->getDiskLabel()->hide(); mAboutWidget->getDiskContent()->hide(); QHBoxLayout * layout = new QHBoxLayout; - QLabel *label = new FixLabel; + QLabel *label = new KLabel; label->setText(tr("Disk") + QString::number(count + 1)); - QLabel *diskLabel = new FixLabel; + QLabel *diskLabel = new KLabel; diskLabel->setText(iter.value().at(0) + "B (" + iter.value().at(1) + "B "+ tr("avaliable") +")"); layout->addWidget(label); @@ -657,7 +662,10 @@ void About::compareTime(QString date) { + QElapsedTimer timer; + timer.start(); QString s1 = mAboutDBus->property("netDate").toString(); + qDebug() << Q_FUNC_INFO << " ntpTime:" << s1 << timer.elapsed(); QStringList list_1; QStringList list_2 = date.split("-"); int year; diff -Nru ukui-control-center-5.0.0.0/plugins/system/about/about.h ukui-control-center-5.0.0.0/plugins/system/about/about.h --- ukui-control-center-5.0.0.0/plugins/system/about/about.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/about/about.h 2025-02-07 16:27:50.000000000 +0800 @@ -47,8 +47,6 @@ #include "statusdialog.h" #include "shell/interface.h" -#include "titlelabel.h" -#include "fixlabel.h" #include "lightlabel.h" #include "kswitchbutton.h" #include <kysdk/kysdk-system/libkysysinfo.h> diff -Nru ukui-control-center-5.0.0.0/plugins/system/about/aboutui.cpp ukui-control-center-5.0.0.0/plugins/system/about/aboutui.cpp --- ukui-control-center-5.0.0.0/plugins/system/about/aboutui.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/about/aboutui.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -27,11 +27,14 @@ AboutLayout->setContentsMargins(0, 0, 0, 0); AboutLayout->setSpacing(8); - mTitleLabel = new TitleLabel(Aboutwidget); + mTitleLabel = new KLabel(Aboutwidget); + //~ contents_path /About/System Summary mTitleLabel->setText(tr("System Summary")); - mPriTitleLabel = new TitleLabel(Aboutwidget); + mPriTitleLabel = new KLabel(Aboutwidget); + //~ contents_path /About/Privacy and agreement mPriTitleLabel->setText(tr("Privacy and agreement")); - mHoldTitleLabel = new TitleLabel(Aboutwidget); + mHoldTitleLabel = new KLabel(Aboutwidget); + mHoldTitleLabel->setContentsMargins(16, 0, 0, 0); mHoldTitleLabel->setText(tr("Support")); mInformationFrame = new QFrame(Aboutwidget); @@ -42,37 +45,44 @@ mInformationLayout->setContentsMargins(space, space, space, space); /* LOGO */ - mLogoLabel = new FixLabel(mInformationFrame); + mLogoLabel = new QLabel(mInformationFrame); mLogoLabel->setFixedSize(130, 50); /* 版本名称 */ - mVersionLabel_1 = new FixLabel(tr("Version")); + mVersionLabel_1 = new KLabel(this); + mVersionLabel_1->setText(tr("Version")); mVersionLabel_2 = new LightLabel; mVersionFrame = createFrame(mVersionLabel_1, mVersionLabel_2); /* 版本号 */ - mVersionNumberLabel_1 = new FixLabel(tr("Version Number")); + mVersionNumberLabel_1 = new KLabel(this); + mVersionNumberLabel_1->setText(tr("Version Number")); mVersionNumberLabel_2 = new LightLabel; mVersionNumberFrame = createFrame(mVersionNumberLabel_1, mVersionNumberLabel_2); /* 系统补丁版本号 */ - mPatchVersionLabel_1 = new FixLabel(tr("Patch Version")); + mPatchVersionLabel_1 = new KLabel(this); + mPatchVersionLabel_1->setText(tr("Patch Version")); mPatchVersionLabel_2 = new LightLabel; mPatchVersionFrame = createFrame(mPatchVersionLabel_1, mPatchVersionLabel_2); /* 安装日期 */ - mInstallDateLabel_1 = new FixLabel(tr("Installed Date")); + mInstallDateLabel_1 = new KLabel(this); + mInstallDateLabel_1->setText(tr("Installed Date")); mInstallDateLabel_2 = new LightLabel; mInstallDateFrame = createFrame(mInstallDateLabel_1, mInstallDateLabel_2); /* 系统更新时间 */ - mUpgradeDateLabel_1 = new FixLabel(tr("Upgrade Date")); + mUpgradeDateLabel_1 = new KLabel(this); + mUpgradeDateLabel_1->setText(tr("Upgrade Date")); mUpgradeDateLabel_2 = new LightLabel; mUpgradeDateFrame = createFrame(mUpgradeDateLabel_1, mUpgradeDateLabel_2); /* 主机名 */ - mHostNameLabel_1 = new FixLabel(tr("HostName")); + mHostNameLabel_1 = new KLabel(this); + //~ contents_path /About/HostName + mHostNameLabel_1->setText(tr("HostName")); mHostNameLabel_2 = new LightLabel; mHostNameLabel_3 = new LightLabel; mHostNameLabel_3->setFixedSize(16, 16); @@ -84,32 +94,38 @@ mHostNameFrame = createFrame(mHostNameLabel_1, mHostNameLabel_2, mHostNameLabel_3); /* 内核 */ - mKernelLabel_1 = new FixLabel(tr("Kernel")); + mKernelLabel_1 = new KLabel(this); + mKernelLabel_1->setText(tr("Kernel")); mKernelLabel_2 = new LightLabel; mKernelFrame = createFrame(mKernelLabel_1, mKernelLabel_2); /* CPU */ - mCpuLabel_1 = new FixLabel(tr("CPU")); + mCpuLabel_1 = new KLabel(this); + mCpuLabel_1->setText(tr("CPU")); mCpuLabel_2 = new LightLabel; mCpuFrame = createFrame(mCpuLabel_1, mCpuLabel_2); /* 内存 */ - mMemoryLabel_1 = new FixLabel(tr("Memory")); + mMemoryLabel_1 = new KLabel(this); + mMemoryLabel_1->setText(tr("Memory")); mMemoryLabel_2 = new LightLabel; mMemoryFrame = createFrame(mMemoryLabel_1, mMemoryLabel_2); /* 硬盘 */ - mDiskLabel_1 = new FixLabel(tr("Disk")); + mDiskLabel_1 = new KLabel(this); + mDiskLabel_1->setText(tr("Disk")); mDiskLabel_2 = new LightLabel; mDiskFrame = createFrame(mDiskLabel_1, mDiskLabel_2); /* 桌面 */ - mDesktopLabel_1 = new FixLabel(tr("Desktop")); + mDesktopLabel_1 = new KLabel(this); + mDesktopLabel_1->setText(tr("Desktop")); mDesktopLabel_2 = new LightLabel; mDesktopFrame = createFrame(mDesktopLabel_1, mDesktopLabel_2); /* 用户名 */ - mUsernameLabel_1 = new FixLabel(tr("User")); + mUsernameLabel_1 = new KLabel(this); + mUsernameLabel_1->setText(tr("User")); mUsernameLabel_2 = new LightLabel; mUsernameFrame = createFrame(mUsernameLabel_1, mUsernameLabel_2); @@ -117,7 +133,8 @@ mActivationFrame = initActiveUi(); /* 版权所有 */ - mTipLabel = new FixLabel(QString(tr("Copyright ©%1 %2. All rights reserved.").arg(mCopyRightYear).arg(mCopyRightName)), Aboutwidget); + mTipLabel = new KLabel(Aboutwidget); + mTipLabel->setText(QString(tr("Copyright ©%1 %2. All rights reserved.").arg(mCopyRightYear).arg(mCopyRightName))); mTipLabel->setContentsMargins(16, 0, 0, 0); /* 隐私和协议 */ @@ -171,7 +188,7 @@ } } -QFrame *AboutUi::createFrame(FixLabel *label_1, LightLabel *label_2, LightLabel *label_3) +QFrame *AboutUi::createFrame(KLabel *label_1, LightLabel *label_2, LightLabel *label_3) { QFrame *frame = new QFrame; frame->installEventFilter(this); @@ -224,7 +241,7 @@ mHpLabel = new QLabel; mEducateLabel = new QLabel; - mEducateIconLabel = new FixLabel; + mEducateIconLabel = new KLabel; mEducateIconLabel->setFixedSize(96,96); mHpLabel->setWordWrap(true); @@ -298,10 +315,10 @@ QGridLayout *mActivationLayout = new QGridLayout(); mActivationLayout->setVerticalSpacing(8); - mStatusLabel_1 = new FixLabel; + mStatusLabel_1 = new KLabel; mStatusLabel_1->setFixedSize(196, 30); mStatusLabel_2 = new LightLabel; - mSequenceLabel_1 = new FixLabel; + mSequenceLabel_1 = new KLabel; mSequenceLabel_1->setFixedSize(196, 30); mSequenceLabel_2 = new KBorderlessButton; mSequenceLabel_2->setObjectName("sequence"); @@ -333,7 +350,9 @@ mPriBtn = new KSwitchButton(frame); mPriBtn->setObjectName("privacysettings"); - FixLabel *mPriLabel_1 = new FixLabel(tr("Send optional diagnostic data")); + KLabel *mPriLabel_1 = new KLabel(this); + //~ contents_path /About/Send optional diagnostic data + mPriLabel_1->setText(tr("Send optional diagnostic data")); LightLabel *mPriLabel_2 = new LightLabel(tr("By sending us diagnostic data, improve the system experience and solve your problems faster")); QVBoxLayout *mverticalLayout_2 = new QVBoxLayout; mverticalLayout_2->setSpacing(0); @@ -356,8 +375,11 @@ QHBoxLayout *mBtnLyt = new QHBoxLayout(frame); mBtnLyt->setContentsMargins(16, 0, 0, 0); + //~ contents_path /About/<<Protocol>> mTrialBtn = new KBorderlessButton(tr("<<Protocol>>")); - mAndLabel = new FixLabel(tr("and")); + mAndLabel = new KLabel(this); + mAndLabel->setText(tr("and")); + //~ contents_path /About/<<Privacy>> mAgreeBtn = new KBorderlessButton(tr("<<Privacy>>")); mTrialBtn->setStyleSheet("text-decoration:underline"); mAgreeBtn->setStyleSheet("text-decoration:underline"); @@ -388,6 +410,7 @@ mStatusLabel_1->setText(tr("Status")); //~ contents_path /About/Active mActivationBtn->setText(tr("Active")); + //~ contents_path /About/Serial mSequenceLabel_1->setText(tr("Serial")); } diff -Nru ukui-control-center-5.0.0.0/plugins/system/about/aboutui.h ukui-control-center-5.0.0.0/plugins/system/about/aboutui.h --- ukui-control-center-5.0.0.0/plugins/system/about/aboutui.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/about/aboutui.h 2025-02-07 16:27:50.000000000 +0800 @@ -11,12 +11,11 @@ #include "privacydialog.h" #include "statusdialog.h" #include "shell/interface.h" -#include "titlelabel.h" -#include "fixlabel.h" #include "lightlabel.h" #include "kswitchbutton.h" #include <kysdk/kysdk-system/libkysysinfo.h> #include <kborderlessbutton.h> +#include <klabel.h> using namespace ukcc; using namespace kdk; @@ -63,9 +62,9 @@ LightLabel *getUpgradeDate() {return mUpgradeDateLabel_2;} LightLabel *getEditHost() {return mHostNameLabel_3;} - FixLabel *getSequence() {return mSequenceLabel_1;} + KLabel *getSequence() {return mSequenceLabel_1;} KBorderlessButton *getSequenceContent() {return mSequenceLabel_2;} - FixLabel *getDiskLabel() {return mDiskLabel_1;} + KLabel *getDiskLabel() {return mDiskLabel_1;} QFrame *getBuildFrame() {return mVersionNumberFrame;} QFrame *getPatchFrame() {return mPatchVersionFrame;} @@ -79,7 +78,7 @@ private: - QFrame *createFrame(FixLabel *label_1, LightLabel *label_2, LightLabel *label_3 = nullptr); + QFrame *createFrame(KLabel *label_1, LightLabel *label_2, LightLabel *label_3 = nullptr); void setShape(QFrame *frame, QFrame::Shape shape); QPixmap loadSvg(const QString &path, int width, int height); @@ -87,9 +86,9 @@ QFrame *mHoldWidget; QWidget *mQrCodeWidget; - TitleLabel *mTitleLabel; - TitleLabel *mPriTitleLabel; - TitleLabel *mHoldTitleLabel; + KLabel *mTitleLabel; + KLabel *mPriTitleLabel; + KLabel *mHoldTitleLabel; QFrame *mInformationFrame; QFrame *mActivationFrame; @@ -112,21 +111,21 @@ QHBoxLayout *mDiskLayout; - FixLabel *mLogoLabel; - FixLabel *mVersionLabel_1; - FixLabel *mVersionNumLabel_1; - FixLabel *mVersionNumberLabel_1; - FixLabel *mPatchVersionLabel_1; - FixLabel *mInstallDateLabel_1; - FixLabel *mUpgradeDateLabel_1; - FixLabel *mInterVersionLabel_1; - FixLabel *mHostNameLabel_1; - FixLabel *mKernelLabel_1; - FixLabel *mCpuLabel_1; - FixLabel *mMemoryLabel_1; - FixLabel *mDiskLabel_1; - FixLabel *mDesktopLabel_1; - FixLabel *mUsernameLabel_1; + QLabel *mLogoLabel; + KLabel *mVersionLabel_1; + KLabel *mVersionNumLabel_1; + KLabel *mVersionNumberLabel_1; + KLabel *mPatchVersionLabel_1; + KLabel *mInstallDateLabel_1; + KLabel *mUpgradeDateLabel_1; + KLabel *mInterVersionLabel_1; + KLabel *mHostNameLabel_1; + KLabel *mKernelLabel_1; + KLabel *mCpuLabel_1; + KLabel *mMemoryLabel_1; + KLabel *mDiskLabel_1; + KLabel *mDesktopLabel_1; + KLabel *mUsernameLabel_1; LightLabel *mVersionLabel_2; LightLabel *mVersionNumLabel_2; LightLabel *mVersionNumberLabel_2; @@ -144,17 +143,17 @@ LightLabel *mUsernameLabel_2; - FixLabel *mStatusLabel_1; + KLabel *mStatusLabel_1; LightLabel *mStatusLabel_2; - FixLabel *mSequenceLabel_1; + KLabel *mSequenceLabel_1; KBorderlessButton *mSequenceLabel_2; - FixLabel *mTrialLabel; - FixLabel *mAndLabel; - FixLabel *mAgreeLabel; + KLabel *mTrialLabel; + KLabel *mAndLabel; + KLabel *mAgreeLabel; QLabel *mHpLabel; - FixLabel *mEducateIconLabel; + KLabel *mEducateIconLabel; QLabel *mEducateLabel; - FixLabel *mTipLabel; + KLabel *mTipLabel; QPushButton *mActivationBtn; QPushButton *mHpBtn; diff -Nru ukui-control-center-5.0.0.0/plugins/system/about/privacydialog.cpp ukui-control-center-5.0.0.0/plugins/system/about/privacydialog.cpp --- ukui-control-center-5.0.0.0/plugins/system/about/privacydialog.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/about/privacydialog.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -3,6 +3,7 @@ #include <QDebug> #include <QVBoxLayout> #include <QHBoxLayout> +#include <QLabel> PrivacyDialog::PrivacyDialog(QWidget *parent) : QDialog(parent) diff -Nru ukui-control-center-5.0.0.0/plugins/system/about/privacydialog.h ukui-control-center-5.0.0.0/plugins/system/about/privacydialog.h --- ukui-control-center-5.0.0.0/plugins/system/about/privacydialog.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/about/privacydialog.h 2025-02-07 16:27:50.000000000 +0800 @@ -8,7 +8,6 @@ #include <QString> #include <QTextBrowser> -#include "titlelabel.h" #include "ukcccommon.h" using namespace ukcc; diff -Nru ukui-control-center-5.0.0.0/plugins/system/about/statusdialog.cpp ukui-control-center-5.0.0.0/plugins/system/about/statusdialog.cpp --- ukui-control-center-5.0.0.0/plugins/system/about/statusdialog.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/about/statusdialog.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -33,7 +33,7 @@ mVersionFrame->setFixedHeight(36); mVersionFrame->setFrameShape(QFrame::NoFrame); mVersionLabel_1 = new QLabel(mVersionFrame); - mVersionLabel_2 = new FixLabel(mVersionFrame); + mVersionLabel_2 = new KLabel(mVersionFrame); mVersionLabel_1->setFixedWidth(100); mVersionLyt->addWidget(mVersionLabel_1); mVersionLyt->addWidget(mVersionLabel_2); @@ -44,7 +44,7 @@ mStatusLyt->setSpacing(16); mStatusFrame->setFixedHeight(36); mStatusFrame->setFrameShape(QFrame::NoFrame); - mStatusLabel_1 = new FixLabel(mStatusFrame); + mStatusLabel_1 = new KLabel(mStatusFrame); mStatusLabel_2 = new QLabel(mStatusFrame); mStatusLabel_1->setFixedWidth(100); mStatusLyt->addWidget(mStatusLabel_1); @@ -56,8 +56,9 @@ mActivationLyt->setSpacing(16); mActivationFrame->setFixedHeight(36); mActivationFrame->setFrameShape(QFrame::NoFrame); - mActivationCodeLabel_1 = new FixLabel(tr("Activation Code"), mActivationFrame); - mActivationCodeLabel_2 = new FixLabel(mActivationFrame); + mActivationCodeLabel_1 = new KLabel(mActivationFrame); + mActivationCodeLabel_1->setText(tr("Activation Code")); + mActivationCodeLabel_2 = new KLabel(mActivationFrame); mActivationCodeLabel_1->setFixedWidth(100); mActivationLyt->addWidget(mActivationCodeLabel_1); mActivationLyt->addWidget(mActivationCodeLabel_2); @@ -69,7 +70,7 @@ mSerialFrame->setFixedHeight(36); mSerialFrame->setFrameShape(QFrame::NoFrame); mSerialLabel_1 = new QLabel(mSerialFrame); - mSerialLabel_2 = new FixLabel(mSerialFrame); + mSerialLabel_2 = new KLabel(mSerialFrame); mSerialLabel_1->setFixedWidth(100); mSerialLyt->addWidget(mSerialLabel_1); mSerialLyt->addWidget(mSerialLabel_2); @@ -80,7 +81,7 @@ mTimeLyt->setSpacing(16); mTimeFrame->setFixedHeight(36); mTimeFrame->setFrameShape(QFrame::NoFrame); - mTimeLabel_1 = new FixLabel(mTimeFrame); + mTimeLabel_1 = new KLabel(mTimeFrame); mTimeLabel_2 = new QLabel(mTimeFrame); mTimeLabel_1->setFixedWidth(100); mTimeLyt->addWidget(mTimeLabel_1); diff -Nru ukui-control-center-5.0.0.0/plugins/system/about/statusdialog.h ukui-control-center-5.0.0.0/plugins/system/about/statusdialog.h --- ukui-control-center-5.0.0.0/plugins/system/about/statusdialog.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/about/statusdialog.h 2025-02-07 16:27:50.000000000 +0800 @@ -5,8 +5,9 @@ #include <QDialog> #include <QLabel> #include <QPushButton> +#include <klabel.h> -#include "fixlabel.h" +using namespace kdk; const QString vTen = "v10"; const QString vTenEnhance = "v10.1"; @@ -32,15 +33,15 @@ public: QLabel *mLogoLabel; QLabel *mVersionLabel_1; - FixLabel *mVersionLabel_2; - FixLabel *mStatusLabel_1; + KLabel *mVersionLabel_2; + KLabel *mStatusLabel_1; QLabel *mStatusLabel_2; QLabel *mSerialLabel_1; - FixLabel *mSerialLabel_2; - FixLabel *mTimeLabel_1; + KLabel *mSerialLabel_2; + KLabel *mTimeLabel_1; QLabel *mTimeLabel_2; - FixLabel *mActivationCodeLabel_1; - FixLabel *mActivationCodeLabel_2; + KLabel *mActivationCodeLabel_1; + KLabel *mActivationCodeLabel_2; QPushButton *mExtentBtn; private: diff -Nru ukui-control-center-5.0.0.0/plugins/system/about/trialdialog.cpp ukui-control-center-5.0.0.0/plugins/system/about/trialdialog.cpp --- ukui-control-center-5.0.0.0/plugins/system/about/trialdialog.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/about/trialdialog.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -29,7 +29,8 @@ QHBoxLayout *mTitleLayout = new QHBoxLayout; - mTitleLabel = new TitleLabel(mTrialDialog); + mTitleLabel = new KLabel(mTrialDialog); + mTitleLabel->setContentsMargins(16, 0, 0, 0); mTitleLabel->setFixedHeight(30); mTitleLayout->addStretch(); mTitleLayout->addWidget(mTitleLabel); diff -Nru ukui-control-center-5.0.0.0/plugins/system/about/trialdialog.h ukui-control-center-5.0.0.0/plugins/system/about/trialdialog.h --- ukui-control-center-5.0.0.0/plugins/system/about/trialdialog.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/about/trialdialog.h 2025-02-07 16:27:50.000000000 +0800 @@ -3,7 +3,9 @@ #include <QDialog> #include <QTextBrowser> -#include "titlelabel.h" +#include <klabel.h> + +using namespace kdk; class TrialDialog : public QDialog { @@ -16,7 +18,7 @@ void initUi(QDialog *mTrialDialog); private: - TitleLabel *mTitleLabel; + KLabel *mTitleLabel; QLabel *mContentLabel_1; QTextBrowser *mContentLabel_2; diff -Nru ukui-control-center-5.0.0.0/plugins/system/display/brightnessFrame.cpp ukui-control-center-5.0.0.0/plugins/system/display/brightnessFrame.cpp --- ukui-control-center-5.0.0.0/plugins/system/display/brightnessFrame.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display/brightnessFrame.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,3 +1,22 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * Copyright (C) 2019 KylinSoft 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 "brightnessFrame.h" #include <QHBoxLayout> #include <QtConcurrent> @@ -7,16 +26,27 @@ #include <unistd.h> #include <QDBusReply> #include <QDBusInterface> +#include <QDBusMetaType> +#include <KF5/KScreen/kscreen/edid.h> #include "ukcccommon.h" +#include "usdbrightness.h" +#include "utils.h" using namespace ukcc; #define POWER_SCHMES "org.ukui.power-manager" #define POWER_KEY "brightness-ac" #define POWER_KEY_C "brightnessAc" +#define POWER_KEY_MAX_BG "max-brightness" +#define GAMMA_FOR_BRIGHTNESS_KEY "gammaforbrightness" +#define UKUI_CONTORLCENTER_PANEL_SCHEMAS "org.ukui.control-center.panel.plugins" -BrightnessFrame::BrightnessFrame(const QString &name, const bool &isBattery, const QString &edidHash, QWidget *parent) +BrightnessFrame::BrightnessFrame(const QString &name, const bool &isBattery, const QString &edidHash,const KScreen::OutputPtr &output, QWidget *parent) : UkccFrame(parent, UkccFrame::BorderRadiusStyle::None, false) { + this->setFrameShape(QFrame::Shape::NoFrame); + + m_powerGSettings = new QGSettings(QByteArray(POWER_SCHMES), QByteArray(), this); + QHBoxLayout *layout = new QHBoxLayout; layout->setSpacing(6); layout->setMargin(0); @@ -35,7 +65,7 @@ labelMsg->setDisabled(true); labelMsg->setText(tr("Failed to get the brightness information of this monitor"));//未能获得该显示器的亮度信息 - labelName = new FixLabel(this); + labelName = new KLabel(this); labelName->setFixedWidth(118); slider = new KSlider(Qt::Horizontal, this); @@ -62,6 +92,7 @@ this->edidHash = edidHash; this->i2cBus = "-1"; this->mGetBrightnessThread = nullptr; + this->m_output = output; labelValue->setText("0"); //最低亮度10,获取前显示为0 slider->setEnabled(false); //成功连接了再改为true,否则表示无法修改亮度 @@ -70,7 +101,13 @@ } else { this->setFixedHeight(PC_HEIGHT + 36); } - + updateBrightness(); + QByteArray id(UKUI_CONTORLCENTER_PANEL_SCHEMAS); + if (QGSettings::isSchemaInstalled(id)) { + m_panelGsettings = new QGSettings(id, QByteArray(), this); + } else { + qDebug() << Q_FUNC_INFO << "org.ukui.control-center.panel.plugins not install"; + } connect(this, &BrightnessFrame::tabletModeChanged, this, [=](bool isTablet) { if (isTablet) { if (labelMsg) { @@ -114,7 +151,9 @@ { outputEnable = openFlag; if (false == isBattery) { - if (!mGetBrightnessThread) { + if (m_brightnessByGamma) { + initBrightnessGamma(); + } else if (!mGetBrightnessThread) { mGetBrightnessThread = new GetBrightnessThread(this->edidHash, this->i2cBus); connect(mGetBrightnessThread, &GetBrightnessThread::finished, this, [=](){ mGetBrightnessThread->deleteLater(); @@ -261,3 +300,110 @@ this->i2cBus = busNum; return; } + +void BrightnessFrame::setBrightnessByGamma(bool b) +{ + m_brightnessByGamma = b; +} + +void BrightnessFrame::sliderValueChangeSlot(QString outputName) { + m_changedBySlider = true; + QDBusMessage msg = m_usdInterface->call("setScreenBrightness", "ukcc", outputName, uint(slider->value())); + qDebug() << outputName << "gamma brightness" << " is changed, value = " << slider->value() << msg.type(); + setTextLabelValue(QString::number(slider->value())); +} + +void BrightnessFrame::initBrightnessGamma() +{ + if (!m_usdInterface) { + qRegisterMetaType<UsdBrightness>("UsdBrightness"); + qDBusRegisterMetaType<UsdBrightness>(); + m_usdInterface = new QDBusInterface("org.ukui.SettingsDaemon", + "/org/ukui/SettingsDaemon/GammaManager", + "org.ukui.SettingsDaemon.GammaManager", + QDBusConnection::sessionBus(), + this); + } + if (m_usdInterface->isValid()) { + QDBusMessage replyMsg = m_usdInterface->call("getScreensGammaList", qAppName()); + if (replyMsg.type() == QDBusMessage::ErrorMessage) { + qCritical()<<"call getScreensGammaList error:"<<replyMsg.errorMessage(); + } else { + QDBusArgument argument = replyMsg.arguments().at(0).value<QDBusArgument>(); + UsdBrightnessList list = {}; + argument.beginArray(); + while (!argument.atEnd()) { + UsdBrightness cfg; + argument >> cfg; + list.push_back(cfg); + } + argument.endArray(); + qDebug() << Q_FUNC_INFO << "getScreensGammaList size" << list.size(); + QString outputName = m_output.data()->outputName(); + if (!list.isEmpty()) { + for (UsdBrightness u : list) { + qDebug() << Q_FUNC_INFO << "gamma screenName" << u.screenName << "kscreen outputName" << outputName << "kscreen name" << m_output.data()->name(); + if (u.screenName == outputName) { + int brightnessValue = u.gammaB; + qDebug() << Q_FUNC_INFO << "gamma brightness" << brightnessValue; + setTextLabelValue(QString::number(brightnessValue)); + slider->blockSignals(true); + slider->setValue(brightnessValue); + slider->blockSignals(false); + setSliderEnable(true); + labelMsg->hide(); + disconnect(slider,&QSlider::valueChanged,this,0); + connect(slider, &QSlider::valueChanged, this, [=, outputName](){ + sliderValueChangeSlot(outputName); + }); + QDBusConnection::sessionBus().disconnect("org.ukui.SettingsDaemon", + "/org/ukui/SettingsDaemon/GammaManager", + "org.ukui.SettingsDaemon.GammaManager", + "screenBrightnessSetSignal", + this, + SLOT(usdBrightnessSlot(QString, int))); + + QDBusConnection::sessionBus().connect("org.ukui.SettingsDaemon", + "/org/ukui/SettingsDaemon/GammaManager", + "org.ukui.SettingsDaemon.GammaManager", + "screenBrightnessSetSignal", + this, + SLOT(usdBrightnessSlot(QString, int))); + break; + } + } + } + } + } else { + qCritical() << "interface org.ukui.SettingsDaemon error:" << m_usdInterface->lastError(); + } +} + +void BrightnessFrame::usdBrightnessSlot(QString name, int brightness) +{ + qDebug() << "gamma screenName" << name << "gamma brightness" << brightness << outputName; + if (name == outputName && !m_changedBySlider) { + setTextLabelValue(QString::number(brightness)); + slider->blockSignals(true); + slider->setValue(brightness); + slider->blockSignals(false); + } + m_changedBySlider = false; +} + +int BrightnessFrame::getMaxBrightnessAC() +{ + int maxBrightness = -1; + if (m_powerGSettings->keys().contains("maxBrightness") && isBattery) { + maxBrightness = m_powerGSettings->get(POWER_KEY_MAX_BG).toInt(); + } + return ((maxBrightness <= 100 && maxBrightness >=0) ? maxBrightness : -1); +} + +void BrightnessFrame::updateBrightness() +{ + int maxBrightness = getMaxBrightnessAC(); + if ((maxBrightness != -1) && isBattery) { + slider->setRange(0, maxBrightness); + } +} diff -Nru ukui-control-center-5.0.0.0/plugins/system/display/brightnessFrame.h ukui-control-center-5.0.0.0/plugins/system/display/brightnessFrame.h --- ukui-control-center-5.0.0.0/plugins/system/display/brightnessFrame.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display/brightnessFrame.h 2025-02-07 16:27:50.000000000 +0800 @@ -1,3 +1,22 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * Copyright (C) 2019 KylinSoft 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 BRIGHTNESSFRAME_H #define BRIGHTNESSFRAME_H @@ -5,21 +24,30 @@ #include <QLabel> #include <QWidget> #include <QLabel> -#include "uslider.h" #include <QMutex> #include <QFuture> -#include "fixlabel.h" +#include <QDBusInterface> +#include <QDBusArgument> +#include <QGSettings> +#include <kslider.h> +#include <KF5/KScreen/kscreen/output.h> +#include <KF5/KScreen/kscreen/types.h> #include "getBrightnessThread.h" #include "ukccframe.h" #include "lightlabel.h" #include <kslider.h> +#include <klabel.h> +#include "ukcccommon.h" +#include <klabel.h> + +using namespace ukcc; using namespace kdk; class BrightnessFrame : public UkccFrame { Q_OBJECT public: - BrightnessFrame(const QString &name, const bool &isBattery, const QString &edidHash = "", QWidget *parent = nullptr); + BrightnessFrame(const QString &name, const bool &isBattery, const QString &edidHash = "", const KScreen::OutputPtr &output = nullptr, QWidget *parent = nullptr); ~BrightnessFrame(); void setTextLabelName(QString text); void setTextLabelValue(QString text); @@ -33,12 +61,23 @@ QString getEdidHash(); QString getOutputName(); void setI2cbus(QString busNum); + void setBrightnessByGamma(bool b); + void initBrightnessGamma(); Q_SIGNALS: void sliderEnableChanged(); + void brightnessChanged(KScreen::OutputPtr output, int value); + +public Q_SLOTS: + void usdBrightnessSlot(QString name, int brightness); private: - FixLabel *labelName = nullptr; + int getMaxBrightnessAC(); + void updateBrightness(); + void sliderValueChangeSlot(QString outputName); + +private: + KLabel *labelName = nullptr; QLabel *labelValue = nullptr; KSlider *slider = nullptr; QString outputName; //屏幕名 @@ -51,6 +90,13 @@ LightLabel *labelMsg = nullptr; QString i2cBus; GetBrightnessThread *mGetBrightnessThread; + bool m_brightnessByGamma = false; + QDBusInterface *m_usdInterface = nullptr; + bool m_changedBySlider = false; + KScreen::OutputPtr m_output; + + QGSettings* m_powerGSettings = nullptr; + QGSettings* m_panelGsettings = nullptr; }; #endif // BRIGHTNESSFRAME_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display/controlpanel.cpp ukui-control-center-5.0.0.0/plugins/system/display/controlpanel.cpp --- ukui-control-center-5.0.0.0/plugins/system/display/controlpanel.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display/controlpanel.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -41,7 +41,7 @@ mConfig = config; connect(mConfig.data(), &KScreen::Config::outputAdded, this, [=](const KScreen::OutputPtr &output) { - addOutput(output, false); + addOutputSlot(output); }); connect(mConfig.data(), &KScreen::Config::outputRemoved, this, &ControlPanel::removeOutput); @@ -51,6 +51,13 @@ } } +void ControlPanel::addOutputSlot(const KScreen::OutputPtr &output) { + qDebug() << Q_FUNC_INFO << "wait 100ms for addOutput"; + QTimer::singleShot(100, this, [=]() { + addOutput(output, false); + }); +} + void ControlPanel::addOutput(const KScreen::OutputPtr &output, bool connectChanged) { if (!connectChanged) { diff -Nru ukui-control-center-5.0.0.0/plugins/system/display/controlpanel.h ukui-control-center-5.0.0.0/plugins/system/display/controlpanel.h --- ukui-control-center-5.0.0.0/plugins/system/display/controlpanel.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display/controlpanel.h 2025-02-07 16:27:50.000000000 +0800 @@ -33,6 +33,7 @@ private: void isWayland(); + void addOutputSlot(const KScreen::OutputPtr &output); public Q_SLOTS: void activateOutput(const KScreen::OutputPtr &output); diff -Nru ukui-control-center-5.0.0.0/plugins/system/display/display.pro ukui-control-center-5.0.0.0/plugins/system/display/display.pro --- ukui-control-center-5.0.0.0/plugins/system/display/display.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display/display.pro 2025-02-07 16:27:50.000000000 +0800 @@ -5,8 +5,6 @@ #------------------------------------------------- include(../../../env.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Label/label.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/Uslider/uslider.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/CloseButton/closebutton.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/ComboBox/combobox.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/SettingWidget/settingwidget.pri) include($$PROJECT_ROOTDIR/libukcc/interface.pri) @@ -43,8 +41,7 @@ splicedialog.cpp \ unifiedoutputconfig.cpp \ utils.cpp \ - widget.cpp \ - displayperformancedialog.cpp + widget.cpp HEADERS += \ brightnessFrame.h \ @@ -61,12 +58,10 @@ splicedialog.h \ unifiedoutputconfig.h \ utils.h \ - widget.h \ - displayperformancedialog.h + widget.h FORMS += \ display.ui \ - displayperformancedialog.ui \ splicedialog.ui #DISTFILES += \ diff -Nru ukui-control-center-5.0.0.0/plugins/system/display/display.ui ukui-control-center-5.0.0.0/plugins/system/display/display.ui --- ukui-control-center-5.0.0.0/plugins/system/display/display.ui 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display/display.ui 2025-02-07 16:27:50.000000000 +0800 @@ -27,7 +27,7 @@ <number>0</number> </property> <item> - <widget class="TitleLabel" name="titleLabel"> + <widget class="KLabel" name="titleLabel"> <property name="text"> <string>Display</string> </property> @@ -143,9 +143,9 @@ <header location="global">QtQuickWidgets/QQuickWidget</header> </customwidget> <customwidget> - <class>TitleLabel</class> + <class>KLabel</class> <extends>QLabel</extends> - <header location="global">titlelabel.h</header> + <header>klabel.h</header> </customwidget> </customwidgets> <resources/> diff -Nru ukui-control-center-5.0.0.0/plugins/system/display/displayperformancedialog.cpp ukui-control-center-5.0.0.0/plugins/system/display/displayperformancedialog.cpp --- ukui-control-center-5.0.0.0/plugins/system/display/displayperformancedialog.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display/displayperformancedialog.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -47,6 +47,7 @@ setAttribute(Qt::WA_TranslucentBackground); setAttribute(Qt::WA_DeleteOnClose); + ui->titleLabel->setContentsMargins(16, 0, 0, 0); ui->titleLabel->setStyleSheet("QLabel{color: palette(windowText);}"); ui->label->setAlignment(Qt::AlignTop); diff -Nru ukui-control-center-5.0.0.0/plugins/system/display/displayperformancedialog.h ukui-control-center-5.0.0.0/plugins/system/display/displayperformancedialog.h --- ukui-control-center-5.0.0.0/plugins/system/display/displayperformancedialog.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display/displayperformancedialog.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,58 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * Copyright (C) 2019 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 DISPLAYPERFORMANCEDIALOG_H -#define DISPLAYPERFORMANCEDIALOG_H - -#include <QDialog> -#include <QSettings> -#include <QGSettings> - -namespace Ui { -class DisplayPerformanceDialog; -} - -class DisplayPerformanceDialog : public QDialog -{ - Q_OBJECT - -public: - explicit DisplayPerformanceDialog(QWidget *parent = 0); - ~DisplayPerformanceDialog(); - -public: - void setupComponent(); - void setupConnect(); - void initModeStatus(); - void initThresholdStatus(); - - void changeConfValue(); - -private: - void paintEvent(QPaintEvent *event); - -private: - Ui::DisplayPerformanceDialog *ui; - -private: - QGSettings *settings; - QSettings *confSettings; -}; - -#endif // DISPLAYPERFORMANCEDIALOG_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display/displayperformancedialog.ui ukui-control-center-5.0.0.0/plugins/system/display/displayperformancedialog.ui --- ukui-control-center-5.0.0.0/plugins/system/display/displayperformancedialog.ui 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display/displayperformancedialog.ui 2025-02-07 16:27:50.000000000 +0800 @@ -203,7 +203,7 @@ <number>32</number> </property> <item> - <widget class="TitleLabel" name="titleLabel"> + <widget class="KLabel" name="titleLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -231,8 +231,8 @@ <rect> <x>0</x> <y>0</y> - <width>489</width> - <height>556</height> + <width>503</width> + <height>512</height> </rect> </property> <layout class="QVBoxLayout" name="verticalLayout_32"> @@ -800,9 +800,9 @@ </widget> <customwidgets> <customwidget> - <class>TitleLabel</class> + <class>KLabel</class> <extends>QLabel</extends> - <header location="global">titlelabel.h</header> + <header>klabel.h</header> </customwidget> <customwidget> <class>CloseButton</class> diff -Nru ukui-control-center-5.0.0.0/plugins/system/display/outputconfig.cpp ukui-control-center-5.0.0.0/plugins/system/display/outputconfig.cpp --- ukui-control-center-5.0.0.0/plugins/system/display/outputconfig.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display/outputconfig.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -206,7 +206,7 @@ initConnection(); - if (!(UkccCommon::isOpenkylin() && UkccCommon::isWayland())) + if (!((UkccCommon::isOpenkylin() || UkccCommon::isV11()) && UkccCommon::isWayland())) return; // 缩放率下拉框 @@ -533,7 +533,7 @@ void OutputConfig::initScaleItem() { - if (!UkccCommon::isOpenkylin() && !UkccCommon::isWayland()) + if (!((UkccCommon::isOpenkylin() || UkccCommon::isV11()) && UkccCommon::isWayland())) return; mScaleCombox->blockSignals(true); if (!mOutput->currentMode()) diff -Nru ukui-control-center-5.0.0.0/plugins/system/display/qml/Output.qml ukui-control-center-5.0.0.0/plugins/system/display/qml/Output.qml --- ukui-control-center-5.0.0.0/plugins/system/display/qml/Output.qml 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display/qml/Output.qml 2025-02-07 16:27:50.000000000 +0800 @@ -17,9 +17,9 @@ */ import QtQuick 2.1 +import QtQuick.Controls 2.5 import QtGraphicalEffects 1.0 import org.kde.kscreen 1.0 -import org.kde.plasma.components 2.0 as PlasmaComponents QMLOutput { @@ -51,7 +51,6 @@ Component.onCompleted: { root.updateRootProperties(); } - SystemPalette { id: palette; } @@ -205,7 +204,7 @@ } } - PlasmaComponents.Label { + Label { id: labelVendor; y: ((parent.height - orientationPanel.height) / 2) - (implicitHeight / 2) diff -Nru ukui-control-center-5.0.0.0/plugins/system/display/qml/OutputIdentifier.qml ukui-control-center-5.0.0.0/plugins/system/display/qml/OutputIdentifier.qml --- ukui-control-center-5.0.0.0/plugins/system/display/qml/OutputIdentifier.qml 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display/qml/OutputIdentifier.qml 2025-02-07 16:27:50.000000000 +0800 @@ -1,7 +1,6 @@ import QtQuick 2.1 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents +import QtQuick.Controls 2.5 Rectangle { id: root; @@ -15,18 +14,19 @@ width: childrenRect.width + 2 * childrenRect.x height: childrenRect.height + 2 * childrenRect.y - PlasmaComponents.Label { + Label { id: displayName - x: units.largeSpacing * 2 - y: units.largeSpacing - font.pointSize: theme.defaultFont.pointSize * 2 + x: 20 * 2 + y: 20 + font.pointSize: 10 * 2 text: root.outputName; color: "white"; wrapMode: Text.WordWrap; horizontalAlignment: Text.AlignHCenter; + } - PlasmaComponents.Label { + Label { id: modeLabel; anchors { horizontalCenter: displayName.horizontalCenter diff -Nru ukui-control-center-5.0.0.0/plugins/system/display/unifiedoutputconfig.cpp ukui-control-center-5.0.0.0/plugins/system/display/unifiedoutputconfig.cpp --- ukui-control-center-5.0.0.0/plugins/system/display/unifiedoutputconfig.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display/unifiedoutputconfig.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -225,7 +225,7 @@ } }); - if (!(UkccCommon::isOpenkylin() && UkccCommon::isWayland())) + if (!((UkccCommon::isOpenkylin() || UkccCommon::isV11()) && UkccCommon::isWayland())) return; UkccFrame *scaleFrame = new UkccFrame(this, UkccFrame::BorderRadiusStyle::None, true); diff -Nru ukui-control-center-5.0.0.0/plugins/system/display/usdbrightness.h ukui-control-center-5.0.0.0/plugins/system/display/usdbrightness.h --- ukui-control-center-5.0.0.0/plugins/system/display/usdbrightness.h 1970-01-01 08:00:00.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display/usdbrightness.h 2025-02-07 16:27:50.000000000 +0800 @@ -0,0 +1,50 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * Copyright (C) 2024 KylinSoft 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 USDBRIGHTNESS_H +#define USDBRIGHTNESS_H + +#include <QDBusArgument> + +typedef struct usdBrightness { + QString screenName; + int gammaA; + int gammaB; + int gammaC; +} UsdBrightness; + +QDBusArgument &operator<<(QDBusArgument &argument, const UsdBrightness &mystruct) { + argument.beginStructure(); + argument << mystruct.screenName << mystruct.gammaA << mystruct.gammaB << mystruct.gammaC; + argument.endStructure(); + return argument; +} + +const QDBusArgument &operator>>(const QDBusArgument &argument, UsdBrightness &mystruct) { + argument.beginStructure(); + argument >> mystruct.screenName >> mystruct.gammaA >> mystruct.gammaB >> mystruct.gammaC; + argument.endStructure(); + return argument; +} +Q_DECLARE_METATYPE(UsdBrightness) + +typedef QList<UsdBrightness> UsdBrightnessList; + +#endif // USDBRIGHTNESS_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display/widget.cpp ukui-control-center-5.0.0.0/plugins/system/display/widget.cpp --- ukui-control-center-5.0.0.0/plugins/system/display/widget.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display/widget.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -23,7 +23,6 @@ #include "declarative/qmlscreen.h" #include "utils.h" #include "ui_display.h" -#include "displayperformancedialog.h" #include "colorinfo.h" #include "scalesize.h" #include "ukcccommon.h" @@ -133,6 +132,7 @@ qRegisterMetaType<QQuickView *>(); ui->setupUi(this); + ui->titleLabel->setContentsMargins(16, 0, 0, 0); initUi(); initNightModeUi(); initAutoBrihgtUI(); @@ -200,7 +200,8 @@ bool Widget::eventFilter(QObject *object, QEvent *event) { - if (event->type() == QEvent::Resize) { + if (event->type() == QEvent::Resize && m_firstViewResize) { + m_firstViewResize = false; if (mOutputIdentifiers.contains(qobject_cast<QQuickView *>(object))) { QResizeEvent *e = static_cast<QResizeEvent *>(event); const QRect screenSize = object->property("screenSize").toRect(); @@ -225,6 +226,7 @@ mConfig = config; mPrevConfig = config->clone(); if (mMultiScreenFrame) { + qDebug() << Q_FUNC_INFO << "connetedOutputs count" << mConfig->connectedOutputs().size(); mMultiScreenFrame->setVisible(mConfig->connectedOutputs().size() > 1); } updateMultiScreen(); @@ -304,7 +306,8 @@ void Widget::initNightModeUi() { ui->verticalLayout->setSpacing(8); - m_nightModeLabel = new TitleLabel(this); + m_nightModeLabel = new KLabel(this); + m_nightModeLabel->setContentsMargins(16, 0, 0, 0); //~ contents_path /Display/Color Temperature And Eye Care m_nightModeLabel->setText(tr("Color Temperature And Eye Care")); @@ -312,7 +315,8 @@ m_eyesModeFrame = new UkccFrame(); m_eyesModeFrame->setFixedHeight(69); //~ contents_path /Display/Eye protection mode - FixLabel* eyesModeNameLabel = new FixLabel(tr("Eye Protection Mode"), m_eyesModeFrame); + KLabel* eyesModeNameLabel = new KLabel(m_eyesModeFrame); + eyesModeNameLabel->setText(tr("Eye Protection Mode")); LightLabel* eyesModeDescLabel = new LightLabel(tr("The screen color temperature warms up to prevent eye, and can be used all day long."), m_eyesModeFrame); m_eyesModeSwitchButton = new KSwitchButton(m_eyesModeFrame); @@ -596,7 +600,7 @@ if (!mIscloneMode) { unifySetconfig = true; - + qDebug() << Q_FUNC_INFO << "is not clone Mode, setConfig"; setConfig(mPrevConfig); monitorComboBox->setEnabled(isExtendMode); @@ -884,6 +888,13 @@ void Widget::initGSettings() { + QByteArray id(UKUI_CONTORLCENTER_PANEL_SCHEMAS); + if (QGSettings::isSchemaInstalled(id)) { + m_gsettings = new QGSettings(id, QByteArray(), this); + } else { + qDebug() << Q_FUNC_INFO << "org.ukui.control-center.panel.plugins not install"; + } + QByteArray nightId(SETTINGS_DAEMON_COLOR_SCHEMAS); if(QGSettings::isSchemaInstalled(nightId)) { m_colorSettings = new QGSettings(nightId); @@ -1085,6 +1096,22 @@ return reply.value().toBool(); } +bool Widget::isPanguX() +{ + QDBusInterface ukccIfc("com.control.center.qt.systemdbus", + "/", + "com.control.center.interface", + QDBusConnection::systemBus()); + + QDBusReply<QString> reply; + reply = ukccIfc.call("getDmiDecodeRes", "-t baseboard"); + qDebug() << Q_FUNC_INFO << reply.value(); + if (reply.value().contains("SP1PANGUXM")) { + return true; + } + return false; +} + QString Widget::getMonitorType() { QString monitor = monitorComboBox->currentText(); @@ -1201,6 +1228,7 @@ auto *preOp = new KScreen::GetConfigOperation(); preOp->exec(); mPrevConfig = preOp->config()->clone(); //重新获取屏幕当前状态,通过mconfig未必能获取到正确的状态 + qDebug() << Q_FUNC_INFO << "updateScreenConfig connectedOutput count" << mPrevConfig->connectedOutputs().size(); preOp->deleteLater(); return 0; } @@ -1258,7 +1286,7 @@ mOutputIdentifiers.clear(); } -void Widget::addBrightnessFrame(QString name, bool openFlag, QString edidHash) +void Widget::addBrightnessFrame(QString name, bool openFlag, QString edidHash, const KScreen::OutputPtr &output) { #ifdef BUILD_FOR_NO_BRIGHTNESS if (!mIsBattery) { @@ -1266,8 +1294,18 @@ } #endif - if ((mIsBattery && name != firstAddOutputName) || (UkccCommon::getProductName().startsWith("MT") && !mIsBattery)) //笔记本非内置 + if (m_isPanguX || (!m_isSupportGM && !mIsBattery)) { + qDebug() << Q_FUNC_INFO << m_isPanguX << !m_isSupportGM; return; + } + + qDebug() << Q_FUNC_INFO << mIsBattery << name << firstAddOutputName << openFlag << edidHash << m_isSetGM; + // bug#189369 + QString productName = UkccCommon::getProductName(); + if ((mIsBattery && name != firstAddOutputName) || + (productName != "MT401" && productName.startsWith("MT") && !mIsBattery)) { //笔记本非内置 + return; + } if (mIsBattery) { //移除之前的亮度条,适用于kscreen返回当前为笔记本屏幕,但之前已经把第一个屏幕当做笔记本屏幕的情况 for (int i = 0; i < BrightnessFrameV.size(); i = 0) { @@ -1290,9 +1328,9 @@ } BrightnessFrame *frame = nullptr; if (mIsBattery && name == firstAddOutputName) { - frame = new BrightnessFrame(name, true); + frame = new BrightnessFrame(name, true, "", output); } else if(!mIsBattery) { - frame = new BrightnessFrame(name, false, edidHash); + frame = new BrightnessFrame(name, false, edidHash, output); if (edidI2CbusMap.isEmpty()) { for (QMap<QString, QString>::const_iterator it = I2CbusMap.constBegin(); it != I2CbusMap.constEnd(); ++it) { if (name.contains(it.key(), Qt::CaseInsensitive)) { @@ -1309,6 +1347,7 @@ } } } + frame->setBrightnessByGamma(true); // openkylin默认使用gamma进行亮度调节,笔记本使用电源gsetting进行调节 if (frame != nullptr) { connect(frame, &BrightnessFrame::sliderEnableChanged, this, [=](){ showBrightnessFrame(); @@ -1360,7 +1399,7 @@ QString edidHash = QString::fromLatin1(hash.result().toHex()); QString name = Utils::outputName(output); qInfo() << "output:" << name << "edidHash:" << edidHash; - addBrightnessFrame(name, output->isEnabled(), edidHash); + addBrightnessFrame(name, output->isEnabled(), edidHash, output); connectedOutputNum++; checkSpliceFeasibility(); } @@ -1469,7 +1508,7 @@ if (op->hasError() || UkccCommon::isOpenkylin()) { return; } - + m_firstViewResize = true; const KScreen::ConfigPtr config = qobject_cast<KScreen::GetConfigOperation *>(op)->config(); mOutputTimer->stop(); @@ -1477,7 +1516,7 @@ /* Obtain the current active configuration from KScreen */ Q_FOREACH (const KScreen::OutputPtr &output, config->outputs()) { - if (!output->isConnected() || !output->currentMode()) { + if (!output->isConnected() || !output->isEnabled() || !output->currentMode()) { continue; } @@ -2013,6 +2052,7 @@ mIscloneMode = false; } + qDebug() << Q_FUNC_INFO << "screenMode" << status << "mIscloneMode:" << mIscloneMode; int time = 1500; if (mIscloneMode) { time = 0; @@ -2095,7 +2135,6 @@ }); connect(m_tempSlider, &QSlider::valueChanged, this, &Widget::tempSliderChangedSlot); - connect(mMultiScreenCombox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=](int index){ setMultiScreenSlot(index); UkccCommon::buriedSettings(QString("display"), QString("mMultiScreenCombox"), QString("select"), QString::number(index)); @@ -2292,6 +2331,10 @@ mIsBattery = isBacklight(); + m_isPanguX = isPanguX(); + m_isSetGM = isSetGammaBrightness(); + m_isSupportGM = isSupoortGammaBrighnes(); + mUPowerInterface = QSharedPointer<QDBusInterface>( new QDBusInterface("org.freedesktop.UPower", "/org/freedesktop/UPower", @@ -2326,7 +2369,7 @@ void Widget::hideComponent() { - if (UkccCommon::isOpenkylin() && UkccCommon::isWayland()) { + if ((UkccCommon::isOpenkylin() || UkccCommon::isV11()) && UkccCommon::isWayland()) { scaleFrame->hide(); } m_nightModeFrame->setVisible(QString(QLatin1String(kdk_system_get_hostVirtType())) == "none"); @@ -2525,8 +2568,7 @@ void Widget::changescale(QSize size) { - if (UkccCommon::isTablet() || (UkccCommon::isOpenkylin() && UkccCommon::isWayland())) - return; + if (UkccCommon::isTablet() || ((UkccCommon::isOpenkylin() || UkccCommon::isV11()) && UkccCommon::isWayland())) return; mScaleSizeRes = QSize(); if (mIscloneMode && size != QSize()) { @@ -2771,7 +2813,45 @@ } } } - qInfo() << "edidI2CbusMap:"<<edidI2CbusMap; + qDebug() << "edidI2CbusMap:"<<edidI2CbusMap; +} + +bool Widget::isSetGammaBrightness() +{ + QDBusInterface upower("org.ukui.powermanagement", + "/", + "org.ukui.powermanagement.interface", + QDBusConnection::systemBus()); + if (!upower.isValid()) { + qDebug() << "Create UPower Interface Failed : " << QDBusConnection::systemBus().lastError(); + return false; + } + QDBusReply<bool> reply = upower.call("CanSetBrightness"); + qDebug() << Q_FUNC_INFO << reply.value() << reply.isValid() << mMachineType; + if ((!reply.value() && (mMachineType == "all in one")) + || (m_gsettings->keys().contains("gammaforbrightness") && m_gsettings->get("gammaforbrightness").toBool()) + || (!UkccCommon::getProductName().compare("VAH510"))) { + return true; + } + return false; +} + +bool Widget::isSupoortGammaBrighnes() +{ + QDBusInterface usdGlobalSignal("org.ukui.SettingsDaemon", + "/GlobalSignal", + "org.ukui.SettingsDaemon.GlobalSignal", + QDBusConnection::sessionBus()); + if (usdGlobalSignal.isValid()) { + QDBusReply<bool> gamma = usdGlobalSignal.call("isSupportGamma"); + qDebug() << Q_FUNC_INFO << gamma.isValid() << gamma.error().type(); + if (!gamma.isValid() || (gamma.error().type() == QDBusError::ErrorType::UnknownMethod)) { + return true; + } else { + return gamma.value(); + } + } + return true; } bool Widget::checkSpliceFeasibility() @@ -2883,15 +2963,15 @@ spliceFrame = new UkccFrame(modeGroup, UkccFrame::BorderRadiusStyle::Around, true); configGroup = new SettingGroup(this); monitorFrame = new UkccFrame(configGroup, UkccFrame::BorderRadiusStyle::Around, true); - monitorLabel = new FixLabel(monitorFrame); + monitorLabel = new KLabel(monitorFrame); monitorComboBox = new QComboBox(monitorFrame); monitorBtn = new QPushButton(monitorFrame); mControlPanel = new ControlPanel(configGroup); scaleFrame = new UkccFrame(configGroup, UkccFrame::BorderRadiusStyle::Around, true); - scaleLabel = new FixLabel(scaleFrame); + scaleLabel = new KLabel(scaleFrame); scaleComboBox = new QComboBox(scaleFrame); openMonitorFrame = new UkccFrame(configGroup, UkccFrame::BorderRadiusStyle::Around, true); - openMonitorLabel = new FixLabel(openMonitorFrame); + openMonitorLabel = new KLabel(openMonitorFrame); openMonitorButton = new KSwitchButton(openMonitorFrame); //~ contents_path /Display/Auto Brightness mAutoBrightFrame = new SwitchWidget(tr("Auto Brightness")); diff -Nru ukui-control-center-5.0.0.0/plugins/system/display/widget.h ukui-control-center-5.0.0.0/plugins/system/display/widget.h --- ukui-control-center-5.0.0.0/plugins/system/display/widget.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display/widget.h 2025-02-07 16:27:50.000000000 +0800 @@ -48,10 +48,7 @@ #include "outputconfig.h" #include "brightnessFrame.h" #include "screenConfig.h" -#include "titlelabel.h" -#include "fixlabel.h" #include "lightlabel.h" -#include "uslider.h" #include "switchwidget.h" #include "kswitchbutton.h" #include "ukccframe.h" @@ -59,6 +56,7 @@ #include "comboxwidget.h" #include "sliderwidget.h" #include <QRadioButton> +#include <klabel.h> using namespace kdk; @@ -129,7 +127,7 @@ void initUiComponent(); void hideComponent(); - void addBrightnessFrame(QString name, bool openFlag, QString edidHash); + void addBrightnessFrame(QString name, bool openFlag, QString edidHash, const KScreen::OutputPtr &output); void showBrightnessFrame(const int flag = 0); QList<ScreenConfig> getPreScreenCfg(); @@ -212,9 +210,12 @@ bool isRestoreConfig(); bool isCloneMode(); bool isBacklight(); + bool isPanguX(); bool isBacklightAllInOne(); bool isLaptopScreen(); bool isVisibleBrightness(); + bool isSetGammaBrightness(); + bool isSupoortGammaBrighnes(); QString getCpuInfo(); QString getMonitorType(); @@ -269,13 +270,14 @@ KSwitchButton *mAutoBrightBtn = nullptr; KSwitchButton *mBackBrightBtn = nullptr; - TitleLabel *m_nightModeLabel = nullptr; + KLabel *m_nightModeLabel = nullptr; QLabel *mOpenLabel = nullptr; QLabel *mTimeModeLabel = nullptr; + QLabel *m_customTimeLabel = nullptr; - FixLabel *mTemptLabel = nullptr; - FixLabel *mWarmLabel = nullptr; - FixLabel *mColdLabel = nullptr; + KLabel *mTemptLabel = nullptr; + KLabel *mWarmLabel = nullptr; + KLabel *mColdLabel = nullptr; QLabel *m_toLabel = nullptr; QLabel *nightLabel = nullptr; @@ -297,6 +299,7 @@ QGSettings *m_colorSettings = nullptr; QGSettings *mAutoBrightSettings = nullptr; + QGSettings* m_gsettings = nullptr; QSettings *mQsettings = nullptr; QButtonGroup *singleButton; @@ -333,6 +336,9 @@ bool unifySetconfig = false; bool mIscloneMode = false; bool m_isEyeCareMode = false; + bool m_isPanguX = false; + bool m_isSetGM = false; + bool m_isSupportGM = false; QStringList mTimeModeStringList; @@ -358,15 +364,15 @@ UkccFrame *spliceFrame = nullptr; SettingGroup *configGroup = nullptr; UkccFrame *monitorFrame = nullptr; - FixLabel *monitorLabel = nullptr; + KLabel *monitorLabel = nullptr; QComboBox *monitorComboBox = nullptr; QPushButton *monitorBtn = nullptr; ControlPanel *mControlPanel = nullptr; UkccFrame *scaleFrame = nullptr; - FixLabel *scaleLabel = nullptr; + KLabel *scaleLabel = nullptr; QComboBox *scaleComboBox = nullptr; UkccFrame *openMonitorFrame = nullptr; - FixLabel *openMonitorLabel = nullptr; + KLabel *openMonitorLabel = nullptr; KSwitchButton *openMonitorButton = nullptr; UkccFrame *mbrightnessFrame = nullptr; QVBoxLayout *mbrightnesslayout = nullptr; @@ -388,6 +394,7 @@ SettingGroup* m_primaryGroup = nullptr; UkccFrame* m_primaryFrame = nullptr; QFrame* m_primaryLine = nullptr; + bool m_firstViewResize = false; }; #endif // WIDGET_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/brightnessFrame.cpp ukui-control-center-5.0.0.0/plugins/system/display_hw/brightnessFrame.cpp --- ukui-control-center-5.0.0.0/plugins/system/display_hw/brightnessFrame.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/brightnessFrame.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,42 +0,0 @@ -#include "brightnessFrame.h" -#include <QHBoxLayout> - -BrightnessFrame::BrightnessFrame(QWidget *parent) : - QFrame(parent) -{ - this->setFixedHeight(50); - this->setMinimumWidth(550); - this->setFrameShape(QFrame::Shape::Box); - QHBoxLayout *layout = new QHBoxLayout(this); - layout->setSpacing(6); - layout->setMargin(9); - - labelName = new QLabel(this); - labelName->setFixedWidth(118); - - slider = new Uslider(Qt::Horizontal, this); - slider->setRange(10, 100); - - labelValue = new QLabel(this); - labelValue->setAlignment(Qt::AlignRight); - - layout->addWidget(labelName); - layout->addWidget(slider); - layout->addWidget(labelValue); - -} - -BrightnessFrame::~BrightnessFrame() -{ - -} - -void BrightnessFrame::setTextLableName(QString text) -{ - this->labelName->setText(text); -} - -void BrightnessFrame::setTextLableValue(QString text) -{ - this->labelValue->setText(text + "%"); -} diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/brightnessFrame.h ukui-control-center-5.0.0.0/plugins/system/display_hw/brightnessFrame.h --- ukui-control-center-5.0.0.0/plugins/system/display_hw/brightnessFrame.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/brightnessFrame.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,26 +0,0 @@ -#ifndef BRIGHTNESSFRAME_H -#define BRIGHTNESSFRAME_H - -#include <QFrame> -#include <QLabel> -#include <QWidget> -#include <QLabel> -#include "uslider.h" - -class BrightnessFrame : public QFrame -{ - Q_OBJECT -public: - BrightnessFrame(QWidget *parent = nullptr); - ~BrightnessFrame(); - void setTextLableName(QString text); - void setTextLableValue(QString text); - Uslider *slider = nullptr; - QString outputName; - bool openFlag = true; -private: - QLabel *labelName = nullptr; - QLabel *labelValue = nullptr; -}; - -#endif // BRIGHTNESSFRAME_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/colorinfo.h ukui-control-center-5.0.0.0/plugins/system/display_hw/colorinfo.h --- ukui-control-center-5.0.0.0/plugins/system/display_hw/colorinfo.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/colorinfo.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,32 +0,0 @@ -#ifndef COLORINFO_H -#define COLORINFO_H - -#include <QHash> -#include <QVariant> -#include <QString> -#include <QDBusArgument> - -struct ColorInfo { - QString arg; - QDBusVariant out; -}; - -QDBusArgument &operator<<(QDBusArgument &argument, const ColorInfo &mystruct) -{ - argument.beginStructure(); - argument << mystruct.arg << mystruct.out; - argument.endStructure(); - return argument; -} - -const QDBusArgument &operator>>(const QDBusArgument &argument, ColorInfo &mystruct) -{ - argument.beginStructure(); - argument >> mystruct.arg >> mystruct.out; - argument.endStructure(); - return argument; -} - -Q_DECLARE_METATYPE(ColorInfo) - -#endif // COLORINFO_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/controlpanel.cpp ukui-control-center-5.0.0.0/plugins/system/display_hw/controlpanel.cpp --- ukui-control-center-5.0.0.0/plugins/system/display_hw/controlpanel.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/controlpanel.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,175 +0,0 @@ -#include "controlpanel.h" -#include "outputconfig.h" -#include "unifiedoutputconfig.h" -#include "utils.h" -#include "scalesize.h" - -#include <QVBoxLayout> -#include <QDebug> -#include <QLabel> -#include <QDBusInterface> -#include <KF5/KScreen/kscreen/config.h> - -QSize mScaleSize = QSize(); - -ControlPanel::ControlPanel(QWidget *parent) : - QFrame(parent), - mUnifiedOutputCfg(nullptr) -{ - setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - mLayout = new QVBoxLayout(this); - mLayout->setContentsMargins(0, 0, 0, 0); - - isWayland(); -} - -ControlPanel::~ControlPanel() -{ -} - -void ControlPanel::setConfig(const KScreen::ConfigPtr &config) -{ - qDeleteAll(mOutputConfigs); - mOutputConfigs.clear(); - delete mUnifiedOutputCfg; - mUnifiedOutputCfg = nullptr; - - if (mConfig) { - mConfig->disconnect(this); - } - - mConfig = config; - connect(mConfig.data(), &KScreen::Config::outputAdded, - this, [=](const KScreen::OutputPtr &output){ - addOutput(output); - }); - connect(mConfig.data(), &KScreen::Config::outputRemoved, - this, &ControlPanel::removeOutput); - - for (const KScreen::OutputPtr &output : mConfig->outputs()) { - addOutput(output); - } -} - -void ControlPanel::addOutput(const KScreen::OutputPtr &output) -{ - OutputConfig *outputCfg = new OutputConfig(this); - outputCfg->setVisible(false); - outputCfg->setShowScaleOption(mConfig->supportedFeatures().testFlag(KScreen::Config::Feature::PerOutputScaling)); - - outputCfg->setOutput(output); - connect(outputCfg, &OutputConfig::changed, - this, &ControlPanel::changed); - - connect(outputCfg, &OutputConfig::scaleChanged, - this, &ControlPanel::scaleChanged); - - mLayout->addWidget(outputCfg); - - mOutputConfigs << outputCfg; - - if (mIsWayland) { - activateOutput(mCurrentOutput); - } -} - -void ControlPanel::removeOutput(int outputId) -{ - if (mUnifiedOutputCfg) { - mUnifiedOutputCfg->setVisible(false); - mIsCloneMode = false; - } - - for (OutputConfig *outputCfg : mOutputConfigs) { - if (outputCfg->output()->id() == outputId) { - mOutputConfigs.removeOne(outputCfg); - delete outputCfg; - outputCfg = nullptr; - } else { - outputCfg->setVisible(true); - } - } -} - -void ControlPanel::activateOutput(const KScreen::OutputPtr &output) -{ - // Ignore activateOutput when in unified mode - if ((mUnifiedOutputCfg && mIsCloneMode) || output.isNull()) { - return; - } - - mCurrentOutput = output; - - Q_FOREACH (OutputConfig *cfg, mOutputConfigs) { - cfg->setVisible(cfg->output()->id() == output->id()); - } -} - -void ControlPanel::activateOutputNoParam() -{ - // Ignore activateOutput when in unified mode - if (mUnifiedOutputCfg) { - return; - } - - Q_FOREACH (OutputConfig *cfg, mOutputConfigs) { - cfg->setVisible(cfg->output()->id() == 66); - } -} - -void ControlPanel::changescalemax(const KScreen::OutputPtr &output) -{ - QSize sizescale = QSize(); - Q_FOREACH (const KScreen::ModePtr &mode, output->modes()) { - if (sizescale.width() <= mode->size().width()) { - sizescale = mode->size(); - } - } - if (mScaleSize == QSize() || mScaleSize.width() > sizescale.width()) { - mScaleSize = sizescale; - } -} - -void ControlPanel::isWayland() -{ - QString sessionType = getenv("XDG_SESSION_TYPE"); - - if (!sessionType.compare(kSession, Qt::CaseSensitive)) { - mIsWayland = true; - } else { - mIsWayland = false; - } -} - -void ControlPanel::setUnifiedOutput(const KScreen::OutputPtr &output) -{ - Q_FOREACH (OutputConfig *config, mOutputConfigs) { - if (!config->output()->isConnected()) { - continue; - } - - // 隐藏下面控制 - config->setVisible(output == nullptr); - } - - if (output.isNull()) { - mUnifiedOutputCfg->deleteLater(); - mUnifiedOutputCfg = nullptr; - } else { - mUnifiedOutputCfg = new UnifiedOutputConfig(mConfig, this); - mUnifiedOutputCfg->setOutput(output); - mUnifiedOutputCfg->setVisible(true); - mIsCloneMode = true; - mLayout->insertWidget(mLayout->count() - 2, mUnifiedOutputCfg); - connect(mUnifiedOutputCfg, &UnifiedOutputConfig::changed, - this, &ControlPanel::changed); - } -} - -void ControlPanel::deleteUnifiedOutputCfg() -{ - if (mUnifiedOutputCfg) { - delete mUnifiedOutputCfg; - mUnifiedOutputCfg = nullptr; - } -} diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/controlpanel.h ukui-control-center-5.0.0.0/plugins/system/display_hw/controlpanel.h --- ukui-control-center-5.0.0.0/plugins/system/display_hw/controlpanel.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/controlpanel.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,62 +0,0 @@ -#ifndef CONTROLPANEL_H -#define CONTROLPANEL_H - -#include <QFrame> - -#include <KF5/KScreen/kscreen/output.h> - -class QVBoxLayout; -class OutputConfig; -class UnifiedOutputConfig; - -class QLabel; -class QCheckBox; -class QSlider; -class QComboBox; - -const QString kSession = "wayland"; - -class ControlPanel : public QFrame -{ - Q_OBJECT - -public: - explicit ControlPanel(QWidget *parent = nullptr); - ~ControlPanel() override; - - void setConfig(const KScreen::ConfigPtr &config); - void setUnifiedOutput(const KScreen::OutputPtr &output); - void activateOutputNoParam(); - void changescalemax(const KScreen::OutputPtr &output); - void deleteUnifiedOutputCfg(); - -private: - void isWayland(); - -public Q_SLOTS: - void activateOutput(const KScreen::OutputPtr &output); - -Q_SIGNALS: - void changed(); - void scaleChanged(double scale); - -private Q_SLOTS: - void addOutput(const KScreen::OutputPtr &output); - void removeOutput(int outputId); - -public: - QVBoxLayout *mLayout; - -private: - KScreen::ConfigPtr mConfig; - QList<OutputConfig *> mOutputConfigs; - - UnifiedOutputConfig *mUnifiedOutputCfg; - - KScreen::OutputPtr mCurrentOutput; - - bool mIsWayland; - bool mIsCloneMode = false; -}; - -#endif // CONTROLPANEL_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmloutput.cpp ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmloutput.cpp --- ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmloutput.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmloutput.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,606 +0,0 @@ -/* - Copyright (C) 2012 Dan Vratil <dvratil@redhat.com> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#include "qmloutput.h" -#include "qmlscreen.h" - -#include <KF5/KScreen/kscreen/output.h> -#include <KF5/KScreen/kscreen/config.h> - -#include <QStandardItem> -#include <QStandardItemModel> -#include <qquickitem.h> -#include <QRect> - -const static int sMargin = 0; -const static int sSnapArea = 20; -const static int sSnapAlignArea = 6; - -Q_DECLARE_METATYPE(KScreen::ModePtr) - -bool operator>(const QSize &sizeA, const QSize &sizeB) -{ - return ((sizeA.width() > sizeB.width()) && (sizeA.height() > sizeB.height())); -} - -QMLOutput::QMLOutput(QQuickItem *parent): - QQuickItem(parent), - m_screen(nullptr), - m_cloneOf(nullptr), - m_leftDock(nullptr), - m_topDock(nullptr), - m_rightDock(nullptr), - m_bottomDock(nullptr), - pos_clicked(QPointF(0.0,0.0)), - m_isCloneMode(false) -{ - connect(this, &QMLOutput::xChanged, - this, static_cast<void(QMLOutput::*)()>(&QMLOutput::moved)); - connect(this, &QMLOutput::yChanged, - this, static_cast<void(QMLOutput::*)()>(&QMLOutput::moved)); -} - -KScreen::Output* QMLOutput::output() const -{ - return m_output.data(); -} - -KScreen::OutputPtr QMLOutput::outputPtr() const -{ - return m_output; -} - -void QMLOutput::setOutputPtr(const KScreen::OutputPtr &output) -{ - Q_ASSERT(m_output.isNull()); - - m_output = output; - Q_EMIT outputChanged(); - - connect(m_output.data(), &KScreen::Output::rotationChanged, - this, &QMLOutput::updateRootProperties); - connect(m_output.data(), &KScreen::Output::currentModeIdChanged, - this, &QMLOutput::currentModeIdChanged); -} - -QMLScreen *QMLOutput::screen() const -{ - return m_screen; -} - -void QMLOutput::setScreen(QMLScreen *screen) -{ - Q_ASSERT(m_screen == nullptr); - - m_screen = screen; - Q_EMIT screenChanged(); -} - -void QMLOutput::setLeftDockedTo(QMLOutput *output) -{ - if (m_leftDock == output) { - return; - } - - m_leftDock = output; - Q_EMIT leftDockedToChanged(); -} - -QMLOutput *QMLOutput::leftDockedTo() const -{ - return m_leftDock; -} - -void QMLOutput::undockLeft() -{ - setLeftDockedTo(nullptr); -} - -void QMLOutput::setTopDockedTo(QMLOutput *output) -{ - if (m_topDock == output) { - return; - } - - m_topDock = output; - Q_EMIT topDockedToChanged(); -} - -QMLOutput *QMLOutput::topDockedTo() const -{ - return m_topDock; -} - -void QMLOutput::undockTop() -{ - setTopDockedTo(nullptr); -} - -void QMLOutput::setRightDockedTo(QMLOutput *output) -{ - if (m_rightDock == output) { - return; - } - - m_rightDock = output; - Q_EMIT rightDockedToChanged(); -} - -QMLOutput *QMLOutput::rightDockedTo() const -{ - return m_rightDock; -} - -void QMLOutput::undockRight() -{ - setRightDockedTo(nullptr); -} - -void QMLOutput::setBottomDockedTo(QMLOutput *output) -{ - if (m_bottomDock == output) { - return; - } - - m_bottomDock = output; - Q_EMIT bottomDockedToChanged(); -} - -QMLOutput *QMLOutput::bottomDockedTo() const -{ - return m_bottomDock; -} - -void QMLOutput::undockBottom() -{ - setBottomDockedTo(nullptr); -} - -void QMLOutput::setCloneOf(QMLOutput* other) -{ - if (m_cloneOf == other) { - return; - } - - m_cloneOf = other; - Q_EMIT cloneOfChanged(); -} - -QMLOutput* QMLOutput::cloneOf() const -{ - return m_cloneOf; -} - -int QMLOutput::currentOutputHeight() const -{ - if (!m_output) { - return 0; - } - - KScreen::ModePtr mode = m_output->currentMode(); - if (!mode) { - if (m_output->isConnected()) { - mode = bestMode(); - if (!mode) { - return 1000; - } - m_output->setCurrentModeId(mode->id()); - } else { - return 1000; - } - } - return mode->size().height() / m_output->scale(); -} - -int QMLOutput::currentOutputWidth() const -{ - if (!m_output) { - return 0; - } - - KScreen::ModePtr mode = m_output->currentMode(); - if (!mode) { - if (m_output->isConnected()) { - mode = bestMode(); - if (!mode) { - return 1000; - } - m_output->setCurrentModeId(mode->id()); - } else { - return 1000; - } - } - return mode->size().width() / m_output->scale(); -} - -void QMLOutput::currentModeIdChanged() -{ - if (!m_output) { - return; - } - - if (isCloneMode()) { - const float newWidth = currentOutputWidth() * m_screen->outputScale(); - setX((m_screen->width() - newWidth) / 2); - const float newHeight = currentOutputHeight() * m_screen->outputScale(); - setY((m_screen->height() - newHeight) / 2); - } else { - if (m_rightDock) { - QMLOutput *rightDock = m_rightDock; - float newWidth = currentOutputWidth() * m_screen->outputScale(); - setX(rightDock->x() - newWidth); - setRightDockedTo(rightDock); - } - - if (m_bottomDock) { - QMLOutput *bottomDock = m_bottomDock; - float newHeight = currentOutputHeight() * m_screen->outputScale(); - setY(bottomDock->y() - newHeight); - setBottomDockedTo(bottomDock); - } - } - - Q_EMIT currentOutputSizeChanged(); -} - - -int QMLOutput::outputX() const -{ - return m_output->pos().x(); -} - -void QMLOutput::setOutputX(int x) -{ - if (m_output->pos().rx() == x) { - return; - } - - QPoint pos = m_output->pos(); - pos.setX(x); - m_output->setPos(pos); - Q_EMIT outputXChanged(); -} - -int QMLOutput::outputY() const -{ - return m_output->pos().y(); -} - -void QMLOutput::setOutputY(int y) -{ - if (m_output->pos().ry() == y) { - return; - } - - QPoint pos = m_output->pos(); - pos.setY(y); - m_output->setPos(pos); - Q_EMIT outputYChanged(); -} - -bool QMLOutput::isCloneMode() const -{ - return m_isCloneMode; -} - -void QMLOutput::setIsCloneMode(bool isCloneMode) -{ - if (m_isCloneMode == isCloneMode) { - return; - } - - m_isCloneMode = isCloneMode; - Q_EMIT isCloneModeChanged(); -} - -void QMLOutput::dockToNeighbours() -{ - Q_FOREACH (QMLOutput *otherQmlOutput, m_screen->outputs()) { - if (otherQmlOutput == this) { - continue; - } - - if (!otherQmlOutput->output()->isConnected() || !otherQmlOutput->output()->isEnabled()) { - continue; - } - - const QRect geom = m_output->geometry(); - - const QRect otherGeom = otherQmlOutput->output()->geometry(); - - //qDebug()<<"geom is ------>"<<geom<<" other:"<<otherGeom<<endl; - - if (geom.left() - 1 == otherGeom.right()) { - setLeftDockedTo(otherQmlOutput); - continue; - } - if (geom.right() + 1 == otherGeom.left()) { - setRightDockedTo(otherQmlOutput); - continue; - } - if (geom.top() - 1 == otherGeom.bottom()) { - setTopDockedTo(otherQmlOutput); - continue; - } - if (geom.bottom() + 1 == otherGeom.top()) { - setBottomDockedTo(otherQmlOutput); - continue; - } - } -} - -int QMLOutput::enableCount() const -{ - return m_enableCount; -} - -void QMLOutput::setEnableCount(int count) -{ - Q_UNUSED(count); - m_enableCount = count; - Q_EMIT enableCountChanged(); -} - -KScreen::ModePtr QMLOutput::bestMode() const -{ - if (!m_output) { - return KScreen::ModePtr(); - } - - KScreen::ModeList modes = m_output->modes(); - KScreen::ModePtr bestMode; - Q_FOREACH (const KScreen::ModePtr &mode, modes) { - if (!bestMode || (mode->size() > bestMode->size())) { - bestMode = mode; - } - } - - return bestMode; -} - -bool QMLOutput::collidesWithOutput(QObject *other) -{ - QQuickItem* otherItem = qobject_cast<QQuickItem*>(other); - return boundingRect().intersects(otherItem->boundingRect()); -} - -bool QMLOutput::maybeSnapTo(QMLOutput *other) -{ - qreal centerX = x() + (width() / 2.0); - qreal centerY = y() + (height() / 2.0); - - const qreal x2 = other->x(); - const qreal y2 = other->y(); - const qreal height2 = other->height(); - const qreal width2 = other->width(); - const qreal centerX2 = x2 + (width2 / 2.0); - const qreal centerY2 = y2 + (height2 / 2.0); - - /* left of other */ - if ((x() + width() > x2 - sSnapArea) && (x() + width() < x2 + sSnapArea) && - (y() + height() > y2) && (y() < y2 + height2)) - { - setX(x2 - width() + sMargin); - centerX = x() + (width() / 2.0); - setRightDockedTo(other); - other->setLeftDockedTo(this); - //output.cloneOf = null; - - /* output is snapped to other on left and their - * upper sides are aligned */ - if ((y() < y2 + sSnapAlignArea) && (y() > y2 - sSnapAlignArea)) { - setY(y2); - return true; - } - - /* output is snapped to other on left and they - * are centered */ - if ((centerY < centerY2 + sSnapAlignArea) && (centerY > centerY2 - sSnapAlignArea)) { - setY(centerY2 - (height() / 2.0)); - return true; - } - - /* output is snapped to other on left and their - * bottom sides are aligned */ - if ((y() + height() < y2 + height2 + sSnapAlignArea) && - (y() + height() > y2 + height2 - sSnapAlignArea)) - { - setY(y2 + height2 - height()); - return true; - } - - return true; - } - - /* output is right of other */ - if ((x() > x2 + width2 - sSnapArea) && (x() < x2 + width2 + sSnapArea) && - (y() + height() > y2) && (y() < y2 + height2)) - { - setX(x2 + width2 - sMargin); - centerX = x() + (width() / 2.0); - setLeftDockedTo(other); - other->setRightDockedTo(this); - //output.cloneOf = null; - - /* output is snapped to other on right and their - * upper sides are aligned */ - if ((y() < y2 + sSnapAlignArea) && (y() > y2 - sSnapAlignArea)) { - setY(y2); - return true; - } - - /* output is snapped to other on right and they - * are centered */ - if ((centerY < centerY2 + sSnapAlignArea) && (centerY > centerY2 - sSnapAlignArea)) { - setY(centerY2 - (height() / 2.0)); - return true; - } - - /* output is snapped to other on right and their - * bottom sides are aligned */ - if ((y() + height() < y2 + height2 + sSnapAlignArea) && - (y() + height() > y2 + height2 - sSnapAlignArea)) - { - setY(y2 + height2 - height()); - return true; - } - - return true; - } - - /* output is above other */ - if ((y() + height() > y2 - sSnapArea) && (y() + height() < y2 + sSnapArea) && - (x() + width() > x2) && (x() < x2 + width2)) - { - setY(y2 - height() + sMargin); - centerY = y() + (height() / 2.0); - setBottomDockedTo(other); - other->setTopDockedTo(this); - //output.cloneOf = null; - - /* output is snapped to other on top and their - * left sides are aligned */ - if ((x() < x2 + sSnapAlignArea) && (x() > x2 - sSnapAlignArea)) { - setX(x2); - return true; - } - - /* output is snapped to other on top and they - * are centered */ - if ((centerX < centerX2 + sSnapAlignArea) && (centerX > centerX2 - sSnapAlignArea)) { - setX(centerX2 - (width() / 2.0)); - return true; - } - - /* output is snapped to other on top and their - * right sides are aligned */ - if ((x() + width() < x2 + width2 + sSnapAlignArea) && - (x() + width() > x2 + width2 - sSnapAlignArea)) - { - setX(x2 + width2 - width()); - return true; - } - - return true; - } - - /* output is below other */ - if ((y() > y2 + height2 - sSnapArea) && (y() < y2 + height2 + sSnapArea) && - (x() + width() > x2) && (x() < x2 + width2)) - { - setY(y2 + height2 - sMargin); - centerY = y() + (height() / 2.0); - setTopDockedTo(other); - other->setBottomDockedTo(this); - //output.cloneOf = null; - - /* output is snapped to other on bottom and their - * left sides are aligned */ - if ((x() < x2 + sSnapAlignArea) && (x() > x2 - sSnapAlignArea)) { - setX(x2); - return true; - } - - /* output is snapped to other on bottom and they - * are centered */ - if ((centerX < centerX2 + sSnapAlignArea) && (centerX > centerX2 - sSnapAlignArea)) { - setX(centerX2 - (width() / 2.0)); - return true; - } - - /* output is snapped to other on bottom and their - * right sides are aligned */ - if ((x() + width() < x2 + width2 + sSnapAlignArea) && - (x() + width() > x2 + width2 - sSnapAlignArea)) - { - setX(x2 + width2 - width()); - return true; - } - - return true; - } - return false; -} - -void QMLOutput::moved() -{ - const QList<QQuickItem*> siblings = screen()->childItems(); - - // First, if we have moved, then unset the "cloneOf" flag - setCloneOf(nullptr); - - disconnect(this, &QMLOutput::xChanged, this, static_cast<void(QMLOutput::*)()>(&QMLOutput::moved)); - disconnect(this, &QMLOutput::yChanged, this, static_cast<void(QMLOutput::*)()>(&QMLOutput::moved)); - Q_FOREACH (QQuickItem *sibling, siblings) { - QMLOutput *otherOutput = qobject_cast<QMLOutput*>(sibling); - if (!otherOutput || otherOutput == this) { - continue; - } - - if (!maybeSnapTo(otherOutput)) { - if (m_leftDock == otherOutput) { - m_leftDock->undockRight(); - undockLeft(); - } - if (m_topDock == otherOutput) { - m_topDock->undockBottom(); - undockTop(); - } - if (m_rightDock == otherOutput) { - m_rightDock->undockLeft(); - undockRight(); - } - if (m_bottomDock == otherOutput) { - m_bottomDock->undockTop(); - undockBottom(); - } - } - } - connect(this, &QMLOutput::xChanged, this, static_cast<void(QMLOutput::*)()>(&QMLOutput::moved)); - connect(this, &QMLOutput::yChanged, this, static_cast<void(QMLOutput::*)()>(&QMLOutput::moved)); - - Q_EMIT moved(m_output->name()); -} - - -/* Transformation of an item (rotation of the MouseArea) is only visual. - * The coordinates and dimensions are still the same (when you rotated - * 100x500 rectangle by 90 deg, it will still be 100x500, although - * visually it will be 500x100). - * - * This method calculates the real-visual coordinates and dimensions of - * the MouseArea and updates root item to match them. This makes snapping - * work correctly regardless off visual rotation of the output - */ - -//旋转时计算坐标更改方向 -void QMLOutput::updateRootProperties() -{ - const float transformedWidth = (m_output->isHorizontal() ? currentOutputWidth() : currentOutputHeight()) * m_screen->outputScale(); - const float transformedHeight = (m_output->isHorizontal() ? currentOutputHeight() : currentOutputWidth()) * m_screen->outputScale(); - - setSize(QSizeF(transformedWidth, transformedHeight)); -} - -void QMLOutput::setPosClicked(QPointF pos) { - this->pos_clicked = pos; -} - -QPointF QMLOutput::posClicked() { - return this->pos_clicked; -} diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmloutput.h ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmloutput.h --- ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmloutput.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmloutput.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,217 +0,0 @@ -/* - Copyright (C) 2012 Dan Vratil <dvratil@redhat.com> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef QMLOUTPUT_H -#define QMLOUTPUT_H - -#include <QQuickItem> -#include <KF5/KScreen/kscreen/mode.h> - -class QStandardItemModel; -class QAbstractItemModel; - -class ModesProxyModel; -class QMLScreen; - -class QMLOutput : public QQuickItem -{ - Q_OBJECT - - Q_PROPERTY(KScreen::Output *output - READ output - NOTIFY outputChanged) - - Q_PROPERTY(KScreen::OutputPtr outputPtr - READ outputPtr - WRITE setOutputPtr - NOTIFY outputChanged) - - Q_PROPERTY(bool isCloneMode - READ isCloneMode - WRITE setIsCloneMode - NOTIFY isCloneModeChanged) - - Q_PROPERTY(int enableCount - READ enableCount - WRITE setEnableCount - NOTIFY enableCountChanged) - - Q_PROPERTY(QMLScreen* screen - READ screen - WRITE setScreen - NOTIFY screenChanged) - - Q_PROPERTY(QMLOutput* cloneOf - READ cloneOf - WRITE setCloneOf - NOTIFY cloneOfChanged) - - Q_PROPERTY(QMLOutput* leftDockedTo - READ leftDockedTo - WRITE setLeftDockedTo - RESET undockLeft - NOTIFY leftDockedToChanged) - - Q_PROPERTY(QMLOutput* topDockedTo - READ topDockedTo - WRITE setTopDockedTo - RESET undockTop - NOTIFY topDockedToChanged) - - Q_PROPERTY(QMLOutput* rightDockedTo - READ rightDockedTo - WRITE setRightDockedTo - RESET undockRight - NOTIFY rightDockedToChanged) - - Q_PROPERTY(QMLOutput* bottomDockedTo - READ bottomDockedTo - WRITE setBottomDockedTo - RESET undockBottom - NOTIFY bottomDockedToChanged) - - Q_PROPERTY(int currentOutputHeight - READ currentOutputHeight - NOTIFY currentOutputSizeChanged) - - Q_PROPERTY(int currentOutputWidth - READ currentOutputWidth - NOTIFY currentOutputSizeChanged) - - /* Workaround for possible QML bug when calling output.pos.y = VALUE works, - * but output.pos.x = VALUE has no effect */ - Q_PROPERTY(int outputX - READ outputX - WRITE setOutputX - NOTIFY outputXChanged) - - Q_PROPERTY(int outputY - READ outputY - WRITE setOutputY - NOTIFY outputYChanged) - -public: - enum { - ModeRole = Qt::UserRole, - ModeIdRole, - SizeRole, - RefreshRateRole - }; - - explicit QMLOutput(QQuickItem *parent = nullptr); - - KScreen::Output *output() const; // For QML - - KScreen::OutputPtr outputPtr() const; - void setOutputPtr(const KScreen::OutputPtr &output); - - QMLScreen *screen() const; - void setScreen(QMLScreen *screen); - - QMLOutput *leftDockedTo() const; - void setLeftDockedTo(QMLOutput *output); - void undockLeft(); - - QMLOutput *topDockedTo() const; - void setTopDockedTo(QMLOutput *output); - void undockTop(); - - QMLOutput *rightDockedTo() const; - void setRightDockedTo(QMLOutput *output); - void undockRight(); - - QMLOutput *bottomDockedTo() const; - void setBottomDockedTo(QMLOutput *output); - void undockBottom(); - - Q_INVOKABLE bool collidesWithOutput(QObject *other); - Q_INVOKABLE bool maybeSnapTo(QMLOutput *other); - - void setCloneOf(QMLOutput *other); - QMLOutput *cloneOf() const; - - int currentOutputHeight() const; - int currentOutputWidth() const; - - int outputX() const; - void setOutputX(int x); - - int outputY() const; - void setOutputY(int y); - - void setIsCloneMode(bool isCloneMode); - bool isCloneMode() const; - - void dockToNeighbours(); - - int enableCount() const; - void setEnableCount(int count = 0); - void setPosClicked(QPointF pos); - QPointF posClicked(); - -public Q_SLOTS: - void updateRootProperties(); - -Q_SIGNALS: - void changed(); - - void moved(const QString &self); - - /* Property notifications */ - void outputChanged(); - void screenChanged(); - void cloneOfChanged(); - void currentOutputSizeChanged(); - - void leftDockedToChanged(); - void topDockedToChanged(); - void rightDockedToChanged(); - void bottomDockedToChanged(); - - void outputYChanged(); - void outputXChanged(); - - void isCloneModeChanged(); - - void enableCountChanged(); - -private Q_SLOTS: - void moved(); - void currentModeIdChanged(); - -private: - /** - * Returns the biggest resolution available assuming it's the preferred one - */ - KScreen::ModePtr bestMode() const; - - KScreen::OutputPtr m_output; - QMLScreen *m_screen; - - QMLOutput *m_cloneOf; - QMLOutput *m_leftDock; - QMLOutput *m_topDock; - QMLOutput *m_rightDock; - QMLOutput *m_bottomDock; - QPointF pos_clicked; - - bool m_isCloneMode; - int m_enableCount; -}; - -#endif // QMLOUTPUT_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmloutputcomponent.cpp ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmloutputcomponent.cpp --- ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmloutputcomponent.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmloutputcomponent.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,63 +0,0 @@ -/* - Copyright (C) 2012 Dan Vratil <dvratil@redhat.com> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#include "qmloutputcomponent.h" -#include "qmloutput.h" -#include "qmlscreen.h" - -#include <KF5/KScreen/kscreen/output.h> - -#include <QDir> -#include <QStandardPaths> -#include <QQmlEngine> -#include <QDebug> -#include <KF5/KScreen/kscreen/types.h> - -Q_DECLARE_METATYPE(KScreen::OutputPtr) -Q_DECLARE_METATYPE(QMLScreen*) - -QMLOutputComponent::QMLOutputComponent(QQmlEngine *engine, QMLScreen *parent): - QQmlComponent(engine, parent), - m_engine(engine) -{ - loadUrl(QUrl("qrc:/qml/Output.qml")); -} - -QMLOutputComponent::~QMLOutputComponent() -{ -} - -QMLOutput* QMLOutputComponent::createForOutput(const KScreen::OutputPtr &output) -{ - QObject *instance = beginCreate(m_engine->rootContext()); - if (!instance) { - qWarning() << errorString(); - return nullptr; - } - - bool success = instance->setProperty("outputPtr", QVariant::fromValue(qobject_cast<KScreen::OutputPtr>(output))); - - Q_ASSERT(success); - success = instance->setProperty("screen", QVariant::fromValue(qobject_cast<QMLScreen*>(parent()))); - Q_ASSERT(success); - Q_UNUSED(success); - - completeCreate(); - - return qobject_cast<QMLOutput*>(instance); -} diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmloutputcomponent.h ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmloutputcomponent.h --- ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmloutputcomponent.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmloutputcomponent.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,43 +0,0 @@ -/* - Copyright (C) 2012 Dan Vratil <dvratil@redhat.com> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef QMLOUTPUTCOMPONENT_H -#define QMLOUTPUTCOMPONENT_H - -#include <QQmlComponent> - -#include <KF5/KScreen/kscreen/output.h> - -class QMLScreen; -class QMLOutput; - -class QMLOutputComponent : public QQmlComponent -{ - Q_OBJECT - -public: - explicit QMLOutputComponent(QQmlEngine *engine, QMLScreen *parent); - ~QMLOutputComponent() override; - - QMLOutput *createForOutput(const KScreen::OutputPtr &output); - -private: - QQmlEngine *m_engine; -}; - -#endif // QMLOUTPUTCOMPONENT_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmlscreen.cpp ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmlscreen.cpp --- ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmlscreen.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmlscreen.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,708 +0,0 @@ -/* - Copyright (C) 2012 Dan Vratil <dvratil@redhat.com> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#include "qmlscreen.h" -#include "qmloutputcomponent.h" -#include "qmloutput.h" - -#include "screenConfig.h" - -#include <KF5/KScreen/kscreen/output.h> -#include <KF5/KScreen/kscreen/config.h> - -#include <QDBusMessage> -#include <QDBusArgument> -#include <QDBusInterface> - -#include <QTimer> -#include <sys/socket.h> - -Q_DECLARE_METATYPE(KScreen::OutputPtr) - -static bool sizeLessThan(ScreenConfig posxA, ScreenConfig posxB) -{ - return posxA.screenPosX > posxB.screenPosY; -} - -static bool sizeLessThanQml(QPointF posxA, QPointF posxB) -{ - return posxA.x() > posxB.x(); -} - -QMLScreen::QMLScreen(QQuickItem *parent) : - QQuickItem(parent) -{ - connect(this, &QMLScreen::widthChanged, this, &QMLScreen::viewSizeChanged); - connect(this, &QMLScreen::heightChanged, this, &QMLScreen::viewSizeChanged); -} - -QMLScreen::~QMLScreen() -{ - qDeleteAll(m_outputMap); - m_outputMap.clear(); -} - -KScreen::ConfigPtr QMLScreen::config() const -{ - return m_config; -} - -void QMLScreen::setConfig(const KScreen::ConfigPtr &config) -{ - qDeleteAll(m_outputMap); - m_outputMap.clear(); - m_manuallyMovedOutputs.clear(); - m_bottommost = m_leftmost = m_rightmost = m_topmost = nullptr; - m_connectedOutputsCount = 0; - m_enabledOutputsCount = 0; - - if (m_config) { - m_config->disconnect(this); - } - - m_config = config; - connect(m_config.data(), &KScreen::Config::outputAdded, - this, [this](const KScreen::OutputPtr &output) { - addOutput(output); - m_manuallyMovedOutputs.clear(); - updateOutputsPlacement(); - enableChangedSlot(); - }); - connect(m_config.data(), &KScreen::Config::outputRemoved, - this, &QMLScreen::removeOutput); - - for (const KScreen::OutputPtr &output : m_config->outputs()) { - addOutput(output); - } - - updateOutputsPlacement(); - - for (QMLOutput *qmlOutput : m_outputMap) { - if (qmlOutput->output()->isConnected() && qmlOutput->output()->isEnabled()) { - qmlOutput->dockToNeighbours(); - } - } -} - -void QMLScreen::addOutput(const KScreen::OutputPtr &output) -{ - QMLOutputComponent comp(qmlEngine(this), this); - - QMLOutput *qmloutput = comp.createForOutput(output); - if (!qmloutput) { - qWarning() << "Failed to create QMLOutput"; - return; - } - - m_outputMap.insert(output, qmloutput); - - qmloutput->setParentItem(this); - qmloutput->setZ(m_outputMap.count()); - - connect(output.data(), &KScreen::Output::isConnectedChanged, - this, &QMLScreen::outputConnectedChanged); - connect(output.data(), &KScreen::Output::isEnabledChanged, - this, &QMLScreen::outputEnabledChanged); - connect(output.data(), &KScreen::Output::posChanged, - this, &QMLScreen::outputPositionChanged); - connect(qmloutput, &QMLOutput::yChanged, - [this, qmloutput]() { - qmlOutputMoved(qmloutput); - }); - connect(qmloutput, &QMLOutput::xChanged, - [this, qmloutput]() { - qmlOutputMoved(qmloutput); - }); - // 在这里点击上面小屏幕 - connect(qmloutput, SIGNAL(clicked()), - this, SLOT(setActiveOutput())); - - connect(qmloutput, SIGNAL(mouseReleased(bool)), - this, SLOT(setScreenPos(bool))); - - connect(qmloutput, SIGNAL(rotationChanged(bool)), - this, SLOT(setScreenPos(bool))); - - connect(qmloutput, SIGNAL(widthChanged(bool)), - this, SLOT(setScreenPos(bool))); - - connect(qmloutput, SIGNAL(heightChanged(bool)), - this, SLOT(setScreenPos(bool))); - - // bug#65441 - // qmloutput->updateRootProperties(); -} - -void QMLScreen::removeOutput(int outputId) -{ - for (const KScreen::OutputPtr &output : m_outputMap.keys()) { - if (output->id() == outputId) { - QMLOutput *qmlOutput = m_outputMap.take(output); - qmlOutput->setParentItem(nullptr); - qmlOutput->setParent(nullptr); - // TODO:bug51346 - // qmlOutput->deleteLater(); - return; - } - } - enableChangedSlot(); -} - -int QMLScreen::connectedOutputsCount() const -{ - return m_connectedOutputsCount; -} - -int QMLScreen::enabledOutputsCount() const -{ - return m_enabledOutputsCount; -} - -QMLOutput *QMLScreen::primaryOutput() const -{ - Q_FOREACH (QMLOutput *qmlOutput, m_outputMap) { - if (qmlOutput->output()->isPrimary()) { - return qmlOutput; - } - } - - return nullptr; -} - -QList<QMLOutput *> QMLScreen::outputs() const -{ - return m_outputMap.values(); -} - -void QMLScreen::setActiveOutput(QMLOutput *output) -{ - output->setPosClicked(output->position()); - Q_FOREACH (QMLOutput *qmlOutput, m_outputMap) { - if (qmlOutput->z() > output->z()) { - qmlOutput->setZ(qmlOutput->z() - 1); - } - } - - output->setZ(m_outputMap.count()); - // 中屏幕 - output->setFocus(true); - Q_EMIT focusedOutputChanged(output); -} - -void QMLScreen::setScreenCenterPos() -{ - // 组成最大矩形四个边的位置,分别对应左上(1),右下(2)的xy坐标值 - qreal localX1 = -1, localX2 = -1, localY1 = -1, localY2 = -1; - qreal mX1 = 0, mY1 = 0, mX2 = 0, mY2 = 0; // 矩形中点坐标 - qreal moveX = 0, moveY = 0;// 移动的值 - bool firstFlag = true; - bool unifyFlag = false; - Q_FOREACH (QMLOutput *qmlOutput, m_outputMap) { - if (qmlOutput->output()->isConnected()) { - if (qmlOutput->isCloneMode()) { - localX1 = qmlOutput->x(); - localX2 = qmlOutput->x() + qmlOutput->width(); - localY1 = qmlOutput->y(); - localY2 = qmlOutput->y() + qmlOutput->height(); - unifyFlag = true; - break; - } - - if (firstFlag == true || localX1 > qmlOutput->x()) { - localX1 = qmlOutput->x(); - } - if (firstFlag == true || localX2 < qmlOutput->x() + qmlOutput->width()) { - localX2 = qmlOutput->x() + qmlOutput->width(); - } - if (firstFlag == true || localY1 > qmlOutput->y()) { - localY1 = qmlOutput->y(); - } - if (firstFlag == true || localY2 < qmlOutput->y() + qmlOutput->height()) { - localY2 = qmlOutput->y() + qmlOutput->height(); - } - firstFlag = false; - } - } - - mX1 = localX1 + (localX2-localX1)/2; - mY1 = localY1 + (localY2-localY1)/2; - - mX2 = (width() - (localX2 - localX1))/2 + (localX2-localX1)/2; - mY2 = (height() - (localY2 - localY1))/2 + (localY2-localY1)/2; - - moveX = mX2 - mX1; - moveY = mY2 - mY1; - - Q_FOREACH (QMLOutput *qmlOutput, m_outputMap) { - if (false == unifyFlag) { - qmlOutput->setX(qmlOutput->x() + moveX); - qmlOutput->setY(qmlOutput->y() + moveY); - } else { - if (qmlOutput->isCloneMode()) { - qmlOutput->blockSignals(true); - qmlOutput->setX(qmlOutput->x() + moveX); - qmlOutput->setY(qmlOutput->y() + moveY); - qmlOutput->blockSignals(false); - break; - } - } - } -} - -void QMLScreen::setScreenPosCenter(QMLOutput *output, bool isReleased) -{ - if (output == nullptr) { - return; - } - QPointF posBefore = output->posClicked(); - if ((output->outputPtr()->rotation() == KScreen::Output::Left || output->outputPtr()->rotation() == KScreen::Output::Right) - && (output->width() > output->height())) { - qreal fwidth = output->size().width(); - qreal fheight = output->size().height(); - output->setSize(QSizeF(fheight, fwidth)); - } - // 镜像模式下跳过屏幕旋转处理 - if (this->primaryOutput() && isCloneMode()) { - return; - } - - qreal x1 = 0, y1 = 0; - qreal width1 = 0, height1 = 0; - qreal x2 = 0, y2 = 0; - qreal width2 = 0, height2 = 0; - - x1 = output->x(); - y1 = output->y(); - width1 = output->width(); - height1 = output->height(); - - int connectedScreen = 0; - - QMLOutput *other = NULL; - Q_FOREACH (QMLOutput *qmlOutput, m_outputMap) { - if (qmlOutput->output()->isConnected()) { - connectedScreen++; - } - if (qmlOutput != output && qmlOutput->output()->isConnected()) { - other = qmlOutput; - x2 = other->x(); - y2 = other->y(); - if ((other->outputPtr()->rotation() == KScreen::Output::Left || other->outputPtr()->rotation() == KScreen::Output::Right) && - (other->width() > other->height())) { - qreal swidth = qmlOutput->width(); - qreal sheigth = qmlOutput->height(); - qmlOutput->setSize(QSizeF(sheigth, swidth)); - } - width2 = other->width(); - height2 = other->height(); - } - } - - // 坐标为负的情况,bug#76350 - if (x1 < 0 || y1 < 0 || x2 < 0 || y2 < 0) { - return; - } - - if (connectedScreen < 2) { - setScreenCenterPos(); - return; - } - - if (!((x1 + width1 == x2) - || (y1 == y2 + height2) - || (x1 == x2 + width2) - || (y1 + height1 == y2))) { - if (x1 + width1 < x2) { - output->setX(x2 - width1); - output->setY(y2); - } else if (y1 > y2 + height2) { - output->setX(x2); - output->setY(y2 + height2); - } else if (x1 > x2 + width2) { - output->setX(x2 + width2); - output->setY(y2); - } else if (y1 + height1 < y2) { - output->setX(x2); - output->setY(y2 - height1); - } - - - - // 矩形是否相交 - if (!(x1 + width1 <= x2 || x2 + width2 <= x1 - || y1 >= y2 +height2 || y2 >= y1 + height1) - && (x1 != x2 || y1 != y2) && other != NULL - && other->output()->isConnected()) { - if ((x1 + width1 > x2) && (x1 < x2)) { - output->setX(x2 - width1); - } else if ((x1 < x2 + width2) && (x1 + width1 > x2 + width2)) { - output->setX(x2 + width2); - } else if ((y1 + height() > y2) && (y1 < y2 + height2)) { - output->setY(y2 - height1); - } else if ((y1 < y2 + height2) && (y1 + height1 > y2 + height2)) { - output->setY(y2 + height2); - } - } - } - - setScreenCenterPos(); - QPointF posAfter = output->position(); - if (isReleased && (posBefore != posAfter)) { - Q_EMIT released(); - } -} - -void QMLScreen::setActiveOutputByCombox(int screenId) -{ - QHash<KScreen::OutputPtr, QMLOutput *>::const_iterator it = m_outputMap.constBegin(); - while (it != m_outputMap.constEnd()) { - if (screenId == it.key()->id()) { - setActiveOutput(it.value()); - return; - } - it++; - } -} - -void QMLScreen::enableChangedSlot() -{ - int count = 0; - for (KScreen::OutputPtr output : m_config->connectedOutputs()) { - if (output->isEnabled()) { - count++; - } - } - - Q_FOREACH (QQuickItem *item, childItems()) { - QMLOutput *qmlOutput = qobject_cast<QMLOutput *>(item); - qmlOutput->setEnableCount(count); - } -} - -QSize QMLScreen::maxScreenSize() const -{ - return m_config->screen()->maxSize(); -} - -float QMLScreen::outputScale() const -{ - return m_outputScale; -} - -void QMLScreen::outputConnectedChanged() -{ - int connectedCount = 0; - - Q_FOREACH (const KScreen::OutputPtr &output, m_outputMap.keys()) { - if (output->isConnected()) { - ++connectedCount; - } - } - - if (connectedCount != m_connectedOutputsCount) { - m_connectedOutputsCount = connectedCount; - Q_EMIT connectedOutputsCountChanged(); - updateOutputsPlacement(); - } -} - -void QMLScreen::outputEnabledChanged() -{ - const KScreen::OutputPtr output(qobject_cast<KScreen::Output *>(sender()), [](void *){}); - - int enabledCount = 0; - - Q_FOREACH (const KScreen::OutputPtr &output, m_outputMap.keys()) { - if (output->isEnabled()) { - ++enabledCount; - } - } - - if (enabledCount == m_enabledOutputsCount) { - m_enabledOutputsCount = enabledCount; - Q_EMIT enabledOutputsCountChanged(); - } -} - -void QMLScreen::outputPositionChanged() -{ - /* TODO: Reposition the QMLOutputs */ -} - -void QMLScreen::qmlOutputMoved(QMLOutput *qmlOutput) -{ - if (qmlOutput->isCloneMode()) { - return; - } - - if (!m_manuallyMovedOutputs.contains(qmlOutput)) - m_manuallyMovedOutputs.append(qmlOutput); - - updateCornerOutputs(); - - if (m_leftmost) { - m_leftmost->setOutputX(0); - } - if (m_topmost) { - m_topmost->setOutputY(0); - } - - if (qmlOutput == m_leftmost) { - Q_FOREACH (QMLOutput *other, m_outputMap) { - if (other == m_leftmost) { - continue; - } - - if (!other->output()->isConnected() || !other->output()->isEnabled()) { - continue; - } - - other->setOutputX(float(other->x() - m_leftmost->x()) / outputScale()); - } - } else if (m_leftmost) { - qmlOutput->setOutputX(float(qmlOutput->x() - m_leftmost->x()) / outputScale()); - } - - if (qmlOutput == m_topmost) { - Q_FOREACH (QMLOutput *other, m_outputMap) { - if (other == m_topmost) { - continue; - } - - if (!other->output()->isConnected() || !other->output()->isEnabled()) { - continue; - } - - other->setOutputY(float(other->y() - m_topmost->y()) / outputScale()); - } - } else if (m_topmost) { - qmlOutput->setOutputY(float(qmlOutput->y() - m_topmost->y()) / outputScale()); - } -} - -void QMLScreen::viewSizeChanged() -{ - updateOutputsPlacement(); - setScreenCenterPos(); -} - -void QMLScreen::updateCornerOutputs() -{ - m_leftmost = nullptr; - m_topmost = nullptr; - m_rightmost = nullptr; - m_bottommost = nullptr; - - Q_FOREACH (QMLOutput *output, m_outputMap) { - if (!output->output()->isConnected() || !output->output()->isEnabled()) { - continue; - } - - QMLOutput *other = m_leftmost; - if (!other || output->x() < other->x()) { - m_leftmost = output; - } - - if (!other || output->y() < other->y()) { - m_topmost = output; - } - - if (!other || output->x() + output->width() > other->x() + other->width()) { - m_rightmost = output; - } - - if (!other || output->y() + output->height() > other->y() + other->height()) { - m_bottommost = output; - } - } -} - -void QMLScreen::setOutputScale(float scale) -{ - if (qFuzzyCompare(scale, m_outputScale)) - return; - m_outputScale = scale; - emit outputScaleChanged(); -} - -bool QMLScreen::isCloneMode() -{ - KScreen::OutputPtr output = m_config->primaryOutput(); - if (m_config->connectedOutputs().count() >= 2) { - foreach (KScreen::OutputPtr secOutput, m_config->connectedOutputs()) { - if (secOutput->geometry() != output->geometry() || !secOutput->isEnabled()) { - return false; - } - } - } else { - return false; - } - return true; -} - -// 画坐标 -void QMLScreen::updateOutputsPlacement() -{ - if (width() <= 0) - return; - - QSizeF initialActiveScreenSize; - - Q_FOREACH (QQuickItem *item, childItems()) { - QMLOutput *qmlOutput = qobject_cast<QMLOutput *>(item); - if (!qmlOutput->output()->isConnected() || !qmlOutput->output()->isEnabled()) { - continue; - } - - if (qmlOutput->outputX() + qmlOutput->currentOutputWidth() - > initialActiveScreenSize.width()) { - initialActiveScreenSize.setWidth(qmlOutput->outputX() - + qmlOutput->currentOutputWidth()); - } - if (qmlOutput->outputY() + qmlOutput->currentOutputHeight() - > initialActiveScreenSize.height()) { - initialActiveScreenSize.setHeight( - qmlOutput->outputY() + qmlOutput->currentOutputHeight()); - } - } - - auto initialScale = outputScale(); - - auto scale = initialScale; - qreal lastX = -1.0; - int enableCount; - do { - auto activeScreenSize = initialActiveScreenSize * scale; - - const QPointF offset((width() - activeScreenSize.width()) / 2.0, - (height() - activeScreenSize.height()) / 2.0); - - lastX = -1.0; - qreal lastY = -1.0; - enableCount = 0; - Q_FOREACH (QQuickItem *item, childItems()) { - QMLOutput *qmlOutput = qobject_cast<QMLOutput *>(item); - if (m_config->connectedOutputs().count() >= 2 && qmlOutput->outputPtr()->isEnabled()) { - enableCount++; - } - // 连接 - if ((!qmlOutput->output()->isConnected() || !qmlOutput->output()->isEnabled() - || m_manuallyMovedOutputs.contains(qmlOutput)) && !qmlOutput->isCloneMode()) { - continue; - } - - qmlOutput->blockSignals(true); - qmlOutput->setPosition(QPointF(offset.x() + (qmlOutput->outputX() * scale), - offset.y() + (qmlOutput->outputY() * scale))); - lastX = qMax(lastX, - qmlOutput->position().x() + qmlOutput->width() / initialScale * scale); - lastY = qMax(lastY, qmlOutput->position().y()); - qmlOutput->blockSignals(false); - } - - Q_FOREACH (QQuickItem *item, childItems()) { - QMLOutput *qmlOutput = qobject_cast<QMLOutput *>(item); - if (qmlOutput->output()->isConnected() && !qmlOutput->output()->isEnabled() - && !m_manuallyMovedOutputs.contains(qmlOutput)) { - qmlOutput->blockSignals(true); - qmlOutput->setPosition(QPointF(lastX, lastY)); - lastX += qmlOutput->width() / initialScale * scale; - qmlOutput->blockSignals(false); - } - } - // calculate the scale dynamically, so all screens fit to the dialog - if (lastX > width()) { - scale *= 0.8; - } - } while (lastX > width()); - - if (enableCount == 1) { - setPosByConfig(); - } - - // Use a timer to avoid binding loop on width() - QTimer::singleShot(0, this, [scale, this] { - setOutputScale(scale); - }); -} - -void QMLScreen::setPosByConfig() -{ - if (!m_config.isNull()) { - - QDBusInterface mUkccInterface("org.ukui.ukcc.session", - "/", - "org.ukui.ukcc.session.interface", - QDBusConnection::sessionBus()); - - QDBusMessage msg = mUkccInterface.call("getPreScreenCfg"); - if (msg.type() == QDBusMessage::ErrorMessage) { - qWarning() << "get pre screen cfg failed"; - } - QDBusArgument argument = msg.arguments().at(0).value<QDBusArgument>(); - QList<QVariant> infos; - argument >> infos; - - QList<QPointF> qmlScreens; - QList<ScreenConfig> preScreenCfg; - - - QList<QPoint> points; - for (int i = 0; i < infos.size(); i++) { - ScreenConfig cfg; - infos.at(i).value<QDBusArgument>() >> cfg; - preScreenCfg.append(cfg); - // 坐标相同不做处理 - if (points.contains(QPoint(cfg.screenPosX, cfg.screenPosY))) { - return; - } - points.append(QPoint(cfg.screenPosX, cfg.screenPosY)); - } - - // 配置文件为空跳过处理 - if (preScreenCfg.isEmpty()) { - return; - } - - std::sort(preScreenCfg.begin(), preScreenCfg.end(), sizeLessThan); - - Q_FOREACH (QQuickItem *item, childItems()) { - QMLOutput *qmlOutput = qobject_cast<QMLOutput *>(item); - qmlScreens.append(qmlOutput->position()); - } - std::sort(qmlScreens.begin(), qmlScreens.end(), sizeLessThanQml); - - QMLOutput *adjustOutput; - for (int i = 0; i < preScreenCfg.count(); i++) { - for (int j = 0; j < childItems().count(); j++) { - QMLOutput *qmlOutput = qobject_cast<QMLOutput *>(childItems().at(j)); - if (qmlOutput != nullptr) { - adjustOutput = qmlOutput; - } - - if (!qmlOutput->outputPtr()->name().compare(preScreenCfg.at(i).screenId)) { - qmlOutput->blockSignals(true); - qmlOutput->setPosition(qmlScreens.at(i)); - qmlOutput->blockSignals(false); - } - } - } - - setScreenPosCenter(adjustOutput, false); - } -} diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmlscreen.h ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmlscreen.h --- ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmlscreen.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/declarative/qmlscreen.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,133 +0,0 @@ -/* - Copyright (C) 2012 Dan Vratil <dvratil@redhat.com> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef QMLSCREEN_H -#define QMLSCREEN_H - -#include <QQuickItem> - -#include <KF5/KScreen/kscreen/output.h> -#include "qmloutput.h" - -class QQmlEngine; - -namespace KScreen { -class Output; -class Config; -} - -class QMLScreen : public QQuickItem -{ - Q_OBJECT - - Q_PROPERTY(QSize maxScreenSize - READ maxScreenSize - CONSTANT) - - Q_PROPERTY(int connectedOutputsCount - READ connectedOutputsCount - NOTIFY connectedOutputsCountChanged) - - Q_PROPERTY(int enabledOutputsCount - READ enabledOutputsCount - NOTIFY enabledOutputsCountChanged) - - Q_PROPERTY(float outputScale - READ outputScale - NOTIFY outputScaleChanged) - -public: - explicit QMLScreen(QQuickItem *parent = nullptr); - ~QMLScreen() override; - - int connectedOutputsCount() const; - int enabledOutputsCount() const; - - QMLOutput *primaryOutput() const; - QList<QMLOutput*> outputs() const; - - QSize maxScreenSize() const; - - float outputScale() const; - - KScreen::ConfigPtr config() const; - void setConfig(const KScreen::ConfigPtr &config); - - void updateOutputsPlacement(); - void setPosByConfig(); - - void setActiveOutput(QMLOutput *output); - - void setScreenPosCenter(QMLOutput *output, bool isReleased); - - void setScreenCenterPos(); -public Q_SLOTS: - void setActiveOutput() - { - setActiveOutput(qobject_cast<QMLOutput *>(sender())); - } - - void setActiveOutputByCombox(int screenId); - void setScreenPos(bool isReleased) - { - setScreenPosCenter(qobject_cast<QMLOutput*>(sender()), isReleased); - } - - // 是否禁用小屏幕拖动 - void enableChangedSlot(); - -Q_SIGNALS: - void connectedOutputsCountChanged(); - void enabledOutputsCountChanged(); - - void outputScaleChanged(); - - void focusedOutputChanged(QMLOutput *output); - void released(); - -private Q_SLOTS: - void addOutput(const KScreen::OutputPtr &output); - void removeOutput(int outputId); - - void outputConnectedChanged(); - void outputEnabledChanged(); - void outputPositionChanged(); - - void viewSizeChanged(); - -private: - void qmlOutputMoved(QMLOutput *qmlOutput); - void updateCornerOutputs(); - void setOutputScale(float scale); - bool isCloneMode(); - - KScreen::ConfigPtr m_config; - QHash<KScreen::OutputPtr, QMLOutput *> m_outputMap; - QVector<QMLOutput*> m_manuallyMovedOutputs; - int m_connectedOutputsCount = 0; - int m_enabledOutputsCount = 0; - - float m_outputScale = 1.0 / 14.0;// 缩放比例 - - QMLOutput *m_leftmost = nullptr; - QMLOutput *m_topmost = nullptr; - QMLOutput *m_rightmost = nullptr; - QMLOutput *m_bottommost = nullptr; -}; - -#endif // QMLSCREEN_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/display_hw.cpp ukui-control-center-5.0.0.0/plugins/system/display_hw/display_hw.cpp --- ukui-control-center-5.0.0.0/plugins/system/display_hw/display_hw.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/display_hw.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,105 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * Copyright (C) 2019 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 <QtWidgets> - -#include "display_hw.h" -#include "ui_display_hw.h" -#include "ukcccommon.h" -using namespace ukcc; - -#include <KF5/KScreen/kscreen/getconfigoperation.h> -#include <KF5/KScreen/kscreen/output.h> -#include <QDebug> -#include <QDBusInterface> -#include <QDBusConnection> - -DisplaySet::DisplaySet() : mFirstLoad(true) -{ - pluginName = tr("Display"); - pluginType = SYSTEM; -} - -DisplaySet::~DisplaySet() -{ -} - -QString DisplaySet::plugini18nName() -{ - return pluginName; -} - -int DisplaySet::pluginTypes() -{ - return pluginType; -} - -QWidget *DisplaySet::pluginUi() -{ - if (mFirstLoad) { - requestBackend(); - mFirstLoad = false; - pluginWidget = new Widget; - pluginWidget->adjustSize(); - QObject::connect(new KScreen::GetConfigOperation(), &KScreen::GetConfigOperation::finished, - [&](KScreen::ConfigOperation *op) { - pluginWidget->setConfig(qobject_cast<KScreen::GetConfigOperation *>(op)->config(), true); - }); - } - return pluginWidget; -} - -const QString DisplaySet::name() const -{ - return QStringLiteral("Display"); -} - -bool DisplaySet::isShowOnHomePage() const -{ - return UkccCommon::isWayland(); -} - -QIcon DisplaySet::icon() const -{ - return QIcon::fromTheme("system-computer-symbolic"); -} - -bool DisplaySet::isEnable() const -{ - return UkccCommon::isWayland(); -} - -void DisplaySet::requestBackend() -{ - QDBusInterface screenIft("org.kde.KScreen", - "/", - "org.kde.KScreen", - QDBusConnection::sessionBus()); - if (!screenIft.isValid()) { - QProcess process; - process.start("uname -m"); - process.waitForFinished(); - QString output = process.readAll(); - output = output.simplified(); - - QString command = "/usr/lib/" + output + "-linux-gnu" - +"/libexec/kf5/kscreen_backend_launcher"; - QProcess::startDetached(command); - } -} diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/display_hw.h ukui-control-center-5.0.0.0/plugins/system/display_hw/display_hw.h --- ukui-control-center-5.0.0.0/plugins/system/display_hw/display_hw.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/display_hw.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,64 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * Copyright (C) 2019 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 DISPLAYSET_H -#define DISPLAYSET_H - -#include <QObject> -#include <QtPlugin> - -#include <QGSettings> - -#include "shell/interface.h" -#include "widget.h" - -namespace Ui { -class DisplayWindow; -} - -class DisplaySet : public QObject, CommonInterface -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.kycc.CommonInterface") - Q_INTERFACES(CommonInterface) - -public: - DisplaySet(); - ~DisplaySet(); - - QString plugini18nName() Q_DECL_OVERRIDE; - int pluginTypes() Q_DECL_OVERRIDE; - QWidget *pluginUi() Q_DECL_OVERRIDE; - const QString name() const Q_DECL_OVERRIDE; - bool isShowOnHomePage() const Q_DECL_OVERRIDE; - QIcon icon() const Q_DECL_OVERRIDE; - bool isEnable() const Q_DECL_OVERRIDE; - -private: - void requestBackend(); -private: - Ui::DisplayWindow *ui; - QString pluginName; - int pluginType; - Widget *pluginWidget; - - bool mFirstLoad; -}; - -#endif // DISPLAYSET_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/display_hw.pro ukui-control-center-5.0.0.0/plugins/system/display_hw/display_hw.pro --- ukui-control-center-5.0.0.0/plugins/system/display_hw/display_hw.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/display_hw.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,70 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2019-02-20T15:36:43 -# -#------------------------------------------------- -include(../../../env.pri) -include($$PROJECT_ROOTDIR/libukcc/interface.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/Uslider/uslider.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/CloseButton/closebutton.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/ComboBox/combobox.pri) - -QT += widgets core gui quickwidgets quick xml KScreen dbus concurrent KConfigCore -TEMPLATE = lib -CONFIG += c++11 link_pkgconfig plugin - -TARGET = $$qtLibraryTarget(display_hw) -DESTDIR = ../.. -target.path = $${PLUGIN_INSTALL_DIRS} -INSTALLS += target - -INCLUDEPATH += \ - $$PROJECT_ROOTDIR \ - -LIBS += -L$$[QT_INSTALL_LIBS] -lgsettings-qt - -PKGCONFIG += gsettings-qt \ - kysdk-qtwidgets - -QMAKE_CXXFLAGS *= -D_FORTIFY_SOURCE=2 -O2 - -SOURCES += \ - brightnessFrame.cpp \ - declarative/qmloutput.cpp \ - declarative/qmloutputcomponent.cpp \ - declarative/qmlscreen.cpp \ - controlpanel.cpp \ - display_hw.cpp \ - outputconfig.cpp \ - resolutionslider.cpp \ - unifiedoutputconfig.cpp \ - utils.cpp \ - widget.cpp \ - displayperformancedialog.cpp - -HEADERS += \ - brightnessFrame.h \ - colorinfo.h \ - declarative/qmloutput.h \ - declarative/qmloutputcomponent.h \ - declarative/qmlscreen.h \ - controlpanel.h \ - display_hw.h \ - outputconfig.h \ - resolutionslider.h \ - scalesize.h \ - unifiedoutputconfig.h \ - utils.h \ - widget.h \ - displayperformancedialog.h - -FORMS += \ - display_hw.ui \ - displayperformancedialog.ui - -#DISTFILES += \ -# qml/main.qml \ -# qml/Output.qml - -RESOURCES += \ - qml.qrc diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/display_hw.ui ukui-control-center-5.0.0.0/plugins/system/display_hw/display_hw.ui --- ukui-control-center-5.0.0.0/plugins/system/display_hw/display_hw.ui 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/display_hw.ui 1970-01-01 08:00:00.000000000 +0800 @@ -1,931 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>DisplayWindow</class> - <widget class="QWidget" name="DisplayWindow"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>945</width> - <height>1260</height> - </rect> - </property> - <property name="windowTitle"> - <string>Form</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_5"> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="TitleLabel" name="titleLabel"> - <property name="text"> - <string>Display</string> - </property> - </widget> - </item> - <item> - <spacer name="verticalSpacer_2"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>12</width> - <height>12</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QFrame" name="mainframe"> - <property name="minimumSize"> - <size> - <width>550</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QQuickWidget" name="quickWidget"> - <property name="minimumSize"> - <size> - <width>550</width> - <height>300</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>300</height> - </size> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <layout class="QVBoxLayout" name="verticalLayout_3"> - <property name="spacing"> - <number>2</number> - </property> - <item> - <widget class="QFrame" name="screenframe"> - <property name="minimumSize"> - <size> - <width>550</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QLabel" name="primaryLabel"> - <property name="minimumSize"> - <size> - <width>118</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>118</width> - <height>30</height> - </size> - </property> - <property name="text"> - <string>monitor</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="primaryCombo"> - <property name="minimumSize"> - <size> - <width>200</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>30</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="mainScreenButton"> - <property name="minimumSize"> - <size> - <width>120</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>150</width> - <height>30</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>11</pointsize> - </font> - </property> - <property name="focusPolicy"> - <enum>Qt::NoFocus</enum> - </property> - <property name="text"> - <string>as main</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <layout class="QVBoxLayout" name="controlPanelLayout"> - <property name="spacing"> - <number>1</number> - </property> - <property name="sizeConstraint"> - <enum>QLayout::SetNoConstraint</enum> - </property> - </layout> - </item> - <item> - <widget class="QFrame" name="frame"> - <property name="minimumSize"> - <size> - <width>550</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_4"> - <item> - <widget class="QLabel" name="scaleLabel"> - <property name="minimumSize"> - <size> - <width>118</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>118</width> - <height>30</height> - </size> - </property> - <property name="text"> - <string>screen zoom</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="scaleCombo"> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>30</height> - </size> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QFrame" name="showMonitorframe"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>550</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <layout class="QHBoxLayout" name="showScreenLayout"> - <item> - <widget class="QLabel" name="label"> - <property name="minimumSize"> - <size> - <width>118</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>30</height> - </size> - </property> - <property name="text"> - <string>open monitor</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_6"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>78</width> - <height>29</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="advancedHorLayout"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>9</number> - </property> - <property name="topMargin"> - <number>8</number> - </property> - <property name="rightMargin"> - <number>9</number> - </property> - <property name="bottomMargin"> - <number>32</number> - </property> - <item> - <widget class="QPushButton" name="advancedBtn"> - <property name="minimumSize"> - <size> - <width>120</width> - <height>36</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>120</width> - <height>36</height> - </size> - </property> - <property name="text"> - <string>Advanced</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_8"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - <item> - <widget class="QFrame" name="unionframe"> - <property name="minimumSize"> - <size> - <width>550</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_6"> - <item> - <layout class="QHBoxLayout" name="unionLayout"> - <item> - <widget class="QLabel" name="unifyLabel"> - <property name="text"> - <string>Mirror Display</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>98</width> - <height>17</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - </layout> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QFrame" name="unifyBrightFrame"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>106</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <property name="spacing"> - <number>2</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QVBoxLayout" name="unifyBrightLayout"> - <property name="spacing"> - <number>2</number> - </property> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <layout class="QVBoxLayout" name="verticalLayout"> - <property name="spacing"> - <number>2</number> - </property> - <item> - <widget class="QFrame" name="nightframe"> - <property name="minimumSize"> - <size> - <width>550</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - </widget> - </item> - <item> - <widget class="QFrame" name="themeFrame"> - <property name="minimumSize"> - <size> - <width>550</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>960</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - </widget> - </item> - <item> - <widget class="QFrame" name="sunframe"> - <property name="minimumSize"> - <size> - <width>550</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_8"> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_9"> - <item> - <widget class="QLabel" name="label_6"> - <property name="minimumSize"> - <size> - <width>118</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>30</height> - </size> - </property> - <property name="text"> - <string>follow the sunrise and sunset(17:55-05:04)</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QRadioButton" name="sunradioBtn"> - <property name="text"> - <string/> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QFrame" name="customframe"> - <property name="minimumSize"> - <size> - <width>550</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_12"> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_13"> - <item> - <widget class="QLabel" name="label_12"> - <property name="minimumSize"> - <size> - <width>118</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>30</height> - </size> - </property> - <property name="text"> - <string>custom time</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QRadioButton" name="customradioBtn"> - <property name="text"> - <string/> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QFrame" name="opframe"> - <property name="minimumSize"> - <size> - <width>550</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_18"> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_19"> - <item> - <widget class="QLabel" name="label_21"> - <property name="minimumSize"> - <size> - <width>118</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>30</height> - </size> - </property> - <property name="text"> - <string>opening time</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_5"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QComboBox" name="opHourCom"> - <property name="minimumSize"> - <size> - <width>80</width> - <height>32</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>80</width> - <height>32</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="opMinCom"> - <property name="minimumSize"> - <size> - <width>80</width> - <height>32</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>80</width> - <height>32</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QFrame" name="clsframe"> - <property name="minimumSize"> - <size> - <width>550</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_10"> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_11"> - <item> - <widget class="QLabel" name="label_10"> - <property name="text"> - <string>closing time</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_7"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QComboBox" name="clHourCom"> - <property name="minimumSize"> - <size> - <width>80</width> - <height>32</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>80</width> - <height>32</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="clMinCom"> - <property name="minimumSize"> - <size> - <width>80</width> - <height>32</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>80</width> - <height>32</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QFrame" name="temptframe"> - <property name="minimumSize"> - <size> - <width>550</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_16"> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_17"> - <item> - <widget class="QLabel" name="label_18"> - <property name="minimumSize"> - <size> - <width>118</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>30</height> - </size> - </property> - <property name="text"> - <string>color temperature</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_19"> - <property name="text"> - <string>warm</string> - </property> - </widget> - </item> - <item> - <widget class="Uslider" name="temptSlider"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_20"> - <property name="text"> - <string>cold</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_5"> - <property name="spacing"> - <number>6</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - </layout> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - </layout> - <zorder>mainframe</zorder> - <zorder>unifyBrightFrame</zorder> - <zorder>titleLabel</zorder> - </widget> - <customwidgets> - <customwidget> - <class>QQuickWidget</class> - <extends>QWidget</extends> - <header location="global">QtQuickWidgets/QQuickWidget</header> - </customwidget> - <customwidget> - <class>TitleLabel</class> - <extends>QLabel</extends> - <header location="global">titlelabel.h</header> - </customwidget> - <customwidget> - <class>Uslider</class> - <extends>QSlider</extends> - <header>uslider.h</header> - </customwidget> - </customwidgets> - <resources/> - <connections/> -</ui> diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/displayperformancedialog.cpp ukui-control-center-5.0.0.0/plugins/system/display_hw/displayperformancedialog.cpp --- ukui-control-center-5.0.0.0/plugins/system/display_hw/displayperformancedialog.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/displayperformancedialog.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,213 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * Copyright (C) 2019 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 "displayperformancedialog.h" -#include "ui_displayperformancedialog.h" -#include "closebutton.h" - -#include <QFile> -#include <QDBusReply> -#include <QDBusInterface> -#include <QPainter> -#include <QPainterPath> -#include <QProcess> -#include <QDebug> - -#define ADVANCED_SCHEMAS "org.ukui.session.required-components" -#define ADVANCED_KEY "windowmanager" - -#define WM_CHOOSER_CONF "/etc/kylin-wm-chooser/default.conf" -#define WM_CHOOSER_CONF_TMP "/tmp/default.conf" - -extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed); - -DisplayPerformanceDialog::DisplayPerformanceDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::DisplayPerformanceDialog) -{ - ui->setupUi(this); - - setWindowFlags(Qt::FramelessWindowHint | Qt::Tool); - setAttribute(Qt::WA_TranslucentBackground); - setAttribute(Qt::WA_DeleteOnClose); - - ui->titleLabel->setStyleSheet("QLabel{font-size: 18px; color: palette(windowText);}"); - - ui->label->setAlignment(Qt::AlignTop); - ui->label_2->setAlignment(Qt::AlignTop); - ui->label_3->setAlignment(Qt::AlignTop); - ui->label_4->setAlignment(Qt::AlignTop); - ui->label_5->setAlignment(Qt::AlignTop); - ui->label_6->setAlignment(Qt::AlignTop); - - ui->closeBtn->setIcon(QIcon("://img/titlebar/close.svg")); - - const QByteArray id(ADVANCED_SCHEMAS); - settings = new QGSettings(id); - - confSettings = new QSettings(WM_CHOOSER_CONF, QSettings::NativeFormat); - - setupComponent(); - setupConnect(); - initModeStatus(); - initThresholdStatus(); - -} - -DisplayPerformanceDialog::~DisplayPerformanceDialog() -{ - delete ui; - ui = nullptr; - delete settings; - settings = nullptr; - delete confSettings; - confSettings = nullptr; -} - -void DisplayPerformanceDialog::setupComponent(){ - ui->performanceRadioBtn->setProperty("wm", "mutter"); - ui->compatibleRadioBtn->setProperty("wm", "marco"); - ui->autoRadioBtn->setProperty("wm", "kylin-wm-chooser"); -} - -void DisplayPerformanceDialog::setupConnect(){ - connect(ui->closeBtn, &CloseButton::clicked, [=]{ - close(); - }); - -#if QT_VERSION <= QT_VERSION_CHECK(5, 12, 0) - connect(ui->buttonGroup, static_cast<void (QButtonGroup::*)(QAbstractButton *)>(&QButtonGroup::buttonClicked), [=](QAbstractButton * button){ -#else - connect(ui->buttonGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked), [=](QAbstractButton * button){ -#endif - QString mode = button->property("wm").toString(); - settings->set(ADVANCED_KEY, mode); - }); - - connect(ui->autoRadioBtn, &QRadioButton::toggled, this, [=](bool checked){ - ui->lineEdit->setEnabled(checked); - ui->applyBtn->setEnabled(checked); - ui->resetBtn->setEnabled(checked); - }); - - connect(ui->applyBtn, &QPushButton::clicked, this, [=]{ - changeConfValue(); - }); - - connect(ui->resetBtn, &QPushButton::clicked, this, [=]{ - ui->lineEdit->setText("256"); - changeConfValue(); - }); -} - -void DisplayPerformanceDialog::initModeStatus(){ - QString mode = settings->get(ADVANCED_KEY).toString(); - - if (mode == ui->performanceRadioBtn->property("wm").toString()){ - ui->performanceRadioBtn->blockSignals(true); - ui->performanceRadioBtn->setChecked(true); - ui->performanceRadioBtn->blockSignals(false); - } else if (mode == ui->compatibleRadioBtn->property("wm").toString()){ - ui->compatibleRadioBtn->blockSignals(true); - ui->compatibleRadioBtn->setChecked(true); - ui->compatibleRadioBtn->blockSignals(false); - } else{ - ui->autoRadioBtn->blockSignals(true); - ui->autoRadioBtn->setChecked(true); - ui->autoRadioBtn->blockSignals(false); - } -} - -void DisplayPerformanceDialog::initThresholdStatus(){ - confSettings->beginGroup("mutter"); - QString value = confSettings->value("threshold").toString(); - ui->lineEdit->blockSignals(true); - ui->lineEdit->setText(value); - ui->lineEdit->blockSignals(false); - confSettings->endGroup(); -} - -void DisplayPerformanceDialog::changeConfValue(){ - if (!QFile::copy(WM_CHOOSER_CONF, WM_CHOOSER_CONF_TMP)) - return; - - QSettings * tempSettings = new QSettings(WM_CHOOSER_CONF_TMP, QSettings::NativeFormat); - tempSettings->beginGroup("mutter"); - tempSettings->setValue("threshold", ui->lineEdit->text()); - tempSettings->endGroup(); - - delete tempSettings; - tempSettings = nullptr; - - //替换kylin-wm-chooser - QDBusInterface * sysinterface = new QDBusInterface("com.control.center.qt.systemdbus", - "/", - "com.control.center.interface", - QDBusConnection::systemBus()); - - if (!sysinterface->isValid()){ - qCritical() << "Create Client Interface Failed When Copy Face File: " << QDBusConnection::systemBus().lastError(); - return; - } - - QString cmd = QString("mv %1 %2").arg(WM_CHOOSER_CONF_TMP).arg(WM_CHOOSER_CONF); - - QProcess::execute(cmd); - delete sysinterface; - sysinterface = nullptr; -} - -void DisplayPerformanceDialog::paintEvent(QPaintEvent *event){ - Q_UNUSED(event); - QPainter p(this); - p.setRenderHint(QPainter::Antialiasing); - QPainterPath rectPath; - rectPath.addRoundedRect(this->rect().adjusted(10, 10, -10, -10), 6, 6); - - // 画一个黑底 - QPixmap pixmap(this->rect().size()); - pixmap.fill(Qt::transparent); - QPainter pixmapPainter(&pixmap); - pixmapPainter.setRenderHint(QPainter::Antialiasing); - pixmapPainter.setPen(Qt::transparent); - pixmapPainter.setBrush(Qt::black); - pixmapPainter.setOpacity(0.65); - pixmapPainter.drawPath(rectPath); - pixmapPainter.end(); - - // 模糊这个黑底 - QImage img = pixmap.toImage(); - qt_blurImage(img, 10, false, false); - // 挖掉中心 - pixmap = QPixmap::fromImage(img); - QPainter pixmapPainter2(&pixmap); - pixmapPainter2.setRenderHint(QPainter::Antialiasing); - pixmapPainter2.setCompositionMode(QPainter::CompositionMode_Clear); - pixmapPainter2.setPen(Qt::transparent); - pixmapPainter2.setBrush(Qt::transparent); - pixmapPainter2.drawPath(rectPath); - - // 绘制阴影 - p.drawPixmap(this->rect(), pixmap, pixmap.rect()); - // 绘制一个背景 - p.save(); - p.fillPath(rectPath,palette().color(QPalette::Base)); - - p.restore(); -} diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/displayperformancedialog.h ukui-control-center-5.0.0.0/plugins/system/display_hw/displayperformancedialog.h --- ukui-control-center-5.0.0.0/plugins/system/display_hw/displayperformancedialog.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/displayperformancedialog.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,58 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * Copyright (C) 2019 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 DISPLAYPERFORMANCEDIALOG_H -#define DISPLAYPERFORMANCEDIALOG_H - -#include <QDialog> -#include <QSettings> -#include <QGSettings> - -namespace Ui { -class DisplayPerformanceDialog; -} - -class DisplayPerformanceDialog : public QDialog -{ - Q_OBJECT - -public: - explicit DisplayPerformanceDialog(QWidget *parent = 0); - ~DisplayPerformanceDialog(); - -public: - void setupComponent(); - void setupConnect(); - void initModeStatus(); - void initThresholdStatus(); - - void changeConfValue(); - -private: - void paintEvent(QPaintEvent *event); - -private: - Ui::DisplayPerformanceDialog *ui; - -private: - QGSettings *settings; - QSettings *confSettings; -}; - -#endif // DISPLAYPERFORMANCEDIALOG_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/displayperformancedialog.ui ukui-control-center-5.0.0.0/plugins/system/display_hw/displayperformancedialog.ui --- ukui-control-center-5.0.0.0/plugins/system/display_hw/displayperformancedialog.ui 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/displayperformancedialog.ui 1970-01-01 08:00:00.000000000 +0800 @@ -1,813 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>DisplayPerformanceDialog</class> - <widget class="QDialog" name="DisplayPerformanceDialog"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>580</width> - <height>646</height> - </rect> - </property> - <property name="minimumSize"> - <size> - <width>580</width> - <height>646</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>580</width> - <height>646</height> - </size> - </property> - <property name="windowTitle"> - <string>Dialog</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>9</number> - </property> - <property name="rightMargin"> - <number>9</number> - </property> - <property name="bottomMargin"> - <number>9</number> - </property> - <item> - <widget class="QFrame" name="frame"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QVBoxLayout" name="verticalLayout_3"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QVBoxLayout" name="verticalLayout"> - <property name="spacing"> - <number>0</number> - </property> - <property name="sizeConstraint"> - <enum>QLayout::SetDefaultConstraint</enum> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QFrame" name="closeFrame"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>36</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>36</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_6"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <property name="spacing"> - <number>0</number> - </property> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="CloseButton" name="closeBtn"> - <property name="minimumSize"> - <size> - <width>32</width> - <height>32</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>32</width> - <height>32</height> - </size> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QWidget" name="widget" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <property name="spacing"> - <number>8</number> - </property> - <property name="sizeConstraint"> - <enum>QLayout::SetDefaultConstraint</enum> - </property> - <property name="leftMargin"> - <number>32</number> - </property> - <property name="topMargin"> - <number>16</number> - </property> - <property name="rightMargin"> - <number>32</number> - </property> - <property name="bottomMargin"> - <number>32</number> - </property> - <item> - <widget class="QLabel" name="titleLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Display Advanced Settings</string> - </property> - </widget> - </item> - <item> - <widget class="QScrollArea" name="scrollArea"> - <property name="verticalScrollBarPolicy"> - <enum>Qt::ScrollBarAsNeeded</enum> - </property> - <property name="horizontalScrollBarPolicy"> - <enum>Qt::ScrollBarAlwaysOff</enum> - </property> - <property name="widgetResizable"> - <bool>true</bool> - </property> - <widget class="QWidget" name="scrollAreaWidgetContents"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>526</width> - <height>564</height> - </rect> - </property> - <layout class="QVBoxLayout" name="verticalLayout_32"> - <item> - <layout class="QVBoxLayout" name="verticalLayout_6"> - <property name="spacing"> - <number>2</number> - </property> - <item> - <widget class="QFrame" name="performanceFrame"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>16</number> - </property> - <item> - <widget class="QRadioButton" name="performanceRadioBtn"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Performance</string> - </property> - <attribute name="buttonGroup"> - <string notr="true">buttonGroup</string> - </attribute> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QFrame" name="performanceTipFrame"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - <layout class="QVBoxLayout" name="verticalLayout_11"> - <property name="spacing"> - <number>8</number> - </property> - <property name="leftMargin"> - <number>16</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>16</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QLabel" name="label"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="autoFillBackground"> - <bool>false</bool> - </property> - <property name="text"> - <string>Applicable to machine with discrete graphics, which can accelerate the rendering of 3D graphics.</string> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>(Note: not support connect graphical with xmanager on windows.)</string> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QVBoxLayout" name="verticalLayout_8"> - <property name="spacing"> - <number>2</number> - </property> - <item> - <widget class="QFrame" name="compatibleFrame"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_5"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_4"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>16</number> - </property> - <item> - <widget class="QRadioButton" name="compatibleRadioBtn"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Compatible</string> - </property> - <attribute name="buttonGroup"> - <string notr="true">buttonGroup</string> - </attribute> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QFrame" name="compatibleTipFrame"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - <layout class="QVBoxLayout" name="verticalLayout_12"> - <property name="spacing"> - <number>8</number> - </property> - <property name="leftMargin"> - <number>16</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>16</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QLabel" name="label_3"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Applicable to machine with integrated graphics, there is no 3D graphics acceleration. </string> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_4"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>(Note: need connect graphical with xmanager on windows, use this option.)</string> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QVBoxLayout" name="verticalLayout_9"> - <property name="spacing"> - <number>2</number> - </property> - <item> - <widget class="QFrame" name="automaticFrame"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_8"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_7"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>16</number> - </property> - <item> - <widget class="QRadioButton" name="autoRadioBtn"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Automatic</string> - </property> - <attribute name="buttonGroup"> - <string notr="true">buttonGroup</string> - </attribute> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_4"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QFrame" name="automaticTipFrame"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - <layout class="QVBoxLayout" name="verticalLayout_5"> - <property name="spacing"> - <number>8</number> - </property> - <property name="leftMargin"> - <number>16</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>16</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QLabel" name="label_5"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Auto select according to environment, delay the login time (about 0.5 sec).</string> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="autoHorLayout"> - <property name="spacing"> - <number>16</number> - </property> - <item> - <widget class="QLabel" name="label_7"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Threshold:</string> - </property> - </widget> - </item> - <item> - <widget class="QLineEdit" name="lineEdit"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="applyBtn"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Apply</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="resetBtn"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Reset</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="label_6"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>(Note: select this option to use 3D graphics acceleration and xmanager.)</string> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </item> - </layout> - <zorder></zorder> - <zorder></zorder> - <zorder></zorder> - </widget> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - <customwidgets> - <customwidget> - <class>CloseButton</class> - <extends>QPushButton</extends> - <header location="global">../../../libukcc/widgets/CloseButton/closebutton.h</header> - </customwidget> - </customwidgets> - <resources/> - <connections/> - <buttongroups> - <buttongroup name="buttonGroup"/> - </buttongroups> -</ui> diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/outputconfig.cpp ukui-control-center-5.0.0.0/plugins/system/display_hw/outputconfig.cpp --- ukui-control-center-5.0.0.0/plugins/system/display_hw/outputconfig.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/outputconfig.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,439 +0,0 @@ -#include "outputconfig.h" -#include "resolutionslider.h" -#include "utils.h" - -#include <QStringBuilder> -#include <QFormLayout> -#include <QComboBox> -#include <QCheckBox> -#include <QHBoxLayout> -#include <QLabel> -#include <QPushButton> -#include <QGroupBox> -#include <QMessageBox> - -#include <QComboBox> -#include <QGSettings> -#include <QDBusInterface> - -#include <KF5/KScreen/kscreen/output.h> -#include <KF5/KScreen/kscreen/edid.h> - -#include "combobox.h" - -double mScreenScale = 1.0; -int changeItm = -1; - -OutputConfig::OutputConfig(QWidget *parent) : - QWidget(parent), - mOutput(nullptr) -{ - initDpiConnection(); -} - -OutputConfig::OutputConfig(const KScreen::OutputPtr &output, QWidget *parent) : - QWidget(parent) -{ - initDpiConnection(); - setOutput(output); -} - -OutputConfig::~OutputConfig() -{ -} - -void OutputConfig::setTitle(const QString &title) -{ - mTitle->setText(title); -} - -void OutputConfig::initUi() -{ - connect(mOutput.data(), &KScreen::Output::isConnectedChanged, - this, [=]() { - if (!mOutput->isConnected()) { - setVisible(false); - } - }); - - connect(mOutput.data(), &KScreen::Output::rotationChanged, - this, [=]() { - const int index = mRotation->findData(mOutput->rotation()); - mRotation->blockSignals(true); - mRotation->setCurrentIndex(index); - mRotation->blockSignals(false); - }); - - connect(mOutput.data(), &KScreen::Output::currentModeIdChanged, - this, [=]() { - if (mOutput->currentMode()) { - if (mRefreshRate) { - mRefreshRate->blockSignals(true); - slotResolutionChanged(mOutput->currentMode()->size(), false); - mRefreshRate->blockSignals(false); - } - } - }); - - connect(mOutput.data(), &KScreen::Output::isEnabledChanged, this, [=](){ - slotEnableWidget(); - }); - - setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - - QVBoxLayout *vbox = new QVBoxLayout(this); - vbox->setContentsMargins(0, 0, 0, 0); - vbox->setSpacing(2); - - // 分辨率下拉框 - mResolution = new ResolutionSlider(mOutput, this); - mResolution->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - - QLabel *resLabel = new QLabel(this); - //~ contents_path /display/resolution - resLabel->setText(tr("resolution")); - resLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - resLabel->setFixedSize(118, 30); - - QHBoxLayout *resLayout = new QHBoxLayout(); - resLayout->addWidget(resLabel); - resLayout->addWidget(mResolution); - - QFrame *resFrame = new QFrame(this); - resFrame->setFrameShape(QFrame::Shape::Box); - resFrame->setLayout(resLayout); - - resFrame->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - resFrame->setMinimumSize(552, 50); - resFrame->setMaximumSize(16777215, 50); - - vbox->addWidget(resFrame); - - connect(mResolution, &ResolutionSlider::resolutionChanged, - this, [=](QSize size){ - slotResolutionChanged(size, true); - }); - - // 方向下拉框 - mRotation = new QComboBox(this); - mRotation->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - - QLabel *rotateLabel = new QLabel(this); - // ~contents_path /display/orientation - rotateLabel->setText(tr("orientation")); - rotateLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - rotateLabel->setFixedSize(118, 30); - - QHBoxLayout *rotateLayout = new QHBoxLayout(); - rotateLayout->addWidget(rotateLabel); - - rotateLayout->addWidget(mRotation); - - QFrame *rotateFrame = new QFrame(this); - rotateFrame->setFrameShape(QFrame::Shape::Box); - rotateFrame->setLayout(rotateLayout); - - rotateFrame->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - rotateFrame->setMinimumSize(550, 50); - rotateFrame->setMaximumSize(16777215, 50); - - mRotation->addItem(tr("arrow-up"), KScreen::Output::None); - mRotation->addItem(tr("90° arrow-right"), KScreen::Output::Right); - mRotation->addItem(tr("90° arrow-left"), KScreen::Output::Left); - mRotation->addItem(tr("arrow-down"), KScreen::Output::Inverted); - connect(mRotation, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), - this, &OutputConfig::slotRotationChanged); - mRotation->setCurrentIndex(mRotation->findData(mOutput->rotation())); - - vbox->addWidget(rotateFrame); - - // 刷新率下拉框 - mRefreshRate = new QComboBox(this); - - QLabel *freshLabel = new QLabel(this); - // ~contents_path /display/frequency - freshLabel->setText(tr("frequency")); - freshLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - freshLabel->setFixedSize(118, 30); - - QHBoxLayout *freshLayout = new QHBoxLayout(); - freshLayout->addWidget(freshLabel); - freshLayout->addWidget(mRefreshRate); - - QFrame *freshFrame = new QFrame(this); - freshFrame->setFrameShape(QFrame::Shape::Box); - freshFrame->setLayout(freshLayout); - - freshFrame->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - freshFrame->setMinimumSize(550, 50); - freshFrame->setMaximumSize(16777215, 50); - - vbox->addWidget(freshFrame); - - slotResolutionChanged(mResolution->currentResolution(), true); - connect(mRefreshRate, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), - this, &OutputConfig::slotRefreshRateChanged); - - mScaleCombox = new QComboBox(this); - mScaleCombox->setObjectName("scaleCombox"); - - double scale = getScreenScale(); - - mScaleCombox->setCurrentText(scaleToString(scale)); - - if (mScaleCombox->findData(scale) == -1) { - mScaleCombox->addItem(scaleToString(scale), scale); - mScaleCombox->setCurrentText(scaleToString(scale)); - } - - QLabel *scaleLabel = new QLabel(this); - //~ contents_path /display/screen zoom - scaleLabel->setText(tr("screen zoom")); - scaleLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - scaleLabel->setFixedSize(118, 30); - - QHBoxLayout *scaleLayout = new QHBoxLayout(); - scaleLayout->addWidget(scaleLabel); - scaleLayout->addWidget(mScaleCombox); - - QFrame *scaleFrame = new QFrame(this); - scaleFrame->setFrameShape(QFrame::Shape::Box); - scaleFrame->setLayout(scaleLayout); - - scaleFrame->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - scaleFrame->setMinimumSize(550, 50); - scaleFrame->setMaximumSize(16777215, 50); - vbox->addWidget(scaleFrame); - scaleFrame->hide(); - - slotEnableWidget(); -} - -double OutputConfig::getScreenScale() -{ - double scale = 1.0; - if (QGSettings::isSchemaInstalled(SCALE_SCHEMAS)) { - if (mDpiSettings->keys().contains("scalingFactor")) { - scale = mDpiSettings->get(SCALE_KEY).toDouble(); - } - } - return scale; -} - -void OutputConfig::initDpiConnection() -{ - QByteArray id(SCALE_SCHEMAS); - if (QGSettings::isSchemaInstalled(SCALE_SCHEMAS)) { - mDpiSettings = new QGSettings(id, QByteArray(), this); - connect(mDpiSettings, &QGSettings::changed, this, [=](QString key) { - slotDPIChanged(key); - }); - } -} - -QString OutputConfig::scaleToString(double scale) -{ - return QString::number(scale * 100) + "%"; -} - -KScreen::ModePtr OutputConfig::findBestMode(const QSize &size) -{ - KScreen::ModePtr m_mode; - float refreshRate = 0; - Q_FOREACH (const KScreen::ModePtr &mode, mOutput->modes()) { - if (mode->size() == size && mode->refreshRate() > refreshRate) { - refreshRate = mode->refreshRate(); - m_mode = mode; - } - } - return m_mode; -} - -void OutputConfig::setOutput(const KScreen::OutputPtr &output) -{ - mOutput = output; - initUi(); -} - -KScreen::OutputPtr OutputConfig::output() const -{ - return mOutput; -} - -void OutputConfig::slotResolutionChanged(const QSize &size, bool emitFlag) -{ - // Ignore disconnected outputs - if (!size.isValid()) { - return; - } - bool mIsModeInit = false; - QString modeID; - KScreen::ModePtr selectMode; - KScreen::ModePtr currentMode = mOutput->currentMode(); - QList<KScreen::ModePtr> modes; - Q_FOREACH (const KScreen::ModePtr &mode, mOutput->modes()) { - //初始化时,currentMode可能为空(比如刚插上屏幕) - if (!currentMode || (currentMode && currentMode->size() == size)) { - if (currentMode) { - selectMode = currentMode; - } - mIsModeInit = true; - } - if (mode->size() == size) { - if (!mIsModeInit || !currentMode) { - selectMode = mode; - } - modes << mode; - } - } - //非初始化,则设置选中(用户设置)的mode为该分辨率下刷新率最大的mode - if (!mIsModeInit) { - selectMode = findBestMode(selectMode->size()); - } - modeID = selectMode->id(); - mRefreshRate->blockSignals(true); - mRefreshRate->clear(); - mRefreshRate->blockSignals(false); - - for (int i = 0, total = modes.count(); i < total; ++i) { - const KScreen::ModePtr mode = modes.at(i); - QString comText = refreshRateToText(mode->refreshRate()); - int comIndex = 0; - bool alreadyExisted = false; - for (int j = 0; j < mRefreshRate->count(); ++j) { - if (comText == mRefreshRate->itemText(j)) { - alreadyExisted = true; - break; - } - } - - if (alreadyExisted == false) { //不添加已经存在的项 - if (mRefreshRate->count() > 0) { - for (int r = 0; r < mRefreshRate->count(); ++r) { - if (comText.compare(mRefreshRate->itemText(r)) < 0) { - comIndex = r + 1; - } else { - break; - } - } - } - mRefreshRate->blockSignals(true); - mRefreshRate->insertItem(comIndex, comText, mode->id()); - mRefreshRate->blockSignals(false); - } - - //mode是选中的mode,则设置 - if (mode == selectMode && mRefreshRate->count() > 0) { - mRefreshRate->blockSignals(true); - mRefreshRate->setCurrentIndex(comIndex); - mRefreshRate->blockSignals(false); - } - } - - if (mRefreshRate->count() == 0) { - mRefreshRate->blockSignals(true); - mRefreshRate->addItem(tr("auto"), -1); - mRefreshRate->blockSignals(false); - } else { - if (-1 == mRefreshRate->currentIndex()) { - modeID = mRefreshRate->itemData(0).toString(); - // 避免选择50hz以下刷新率为空 - mRefreshRate->blockSignals(true); - mRefreshRate->setCurrentIndex(0); - mRefreshRate->blockSignals(false); - } - } - - mOutput->setCurrentModeId(modeID); - - if (!mIsModeInit) { - if (emitFlag) { - changeItm = RESOLUTION; - Q_EMIT changed(); - } - } -} - -void OutputConfig::slotRotationChanged(int index) -{ - KScreen::Output::Rotation rotation - = static_cast<KScreen::Output::Rotation>(mRotation->itemData(index).toInt()); - mOutput->setRotation(rotation); - - changeItm = ORIENTATION; - Q_EMIT changed(); -} - -void OutputConfig::slotRefreshRateChanged(int index) -{ - QString modeId; - if (index < 0) { - // Item 0 is "Auto" - "Auto" is equal to highest refresh rate (at least - // that's how I understand it, and since the combobox is sorted in descending - // order, we just pick the second item from top - modeId = mRefreshRate->itemData(0).toString(); - } else { - modeId = mRefreshRate->itemData(index).toString(); - } - qDebug() << "modeId is:" << modeId << endl; - mOutput->setCurrentModeId(modeId); - changeItm = FREQUENCY; - Q_EMIT changed(); -} - -void OutputConfig::slotScaleChanged(int index) -{ - Q_EMIT scaleChanged(mScaleCombox->itemData(index).toDouble()); -} - -void OutputConfig::slotDPIChanged(QString key) -{ - if (mScaleCombox == nullptr) - return; - if (!key.compare("scalingFactor", Qt::CaseSensitive)) { - double scale = mDpiSettings->get(key).toDouble(); - if (mScaleCombox->findData(scale) == -1) { - mScaleCombox->addItem(scaleToString(scale), scale); - } - mScaleCombox->blockSignals(true); - mScaleCombox->setCurrentText(scaleToString(scale)); - mScaleCombox->blockSignals(false); - } -} - -void OutputConfig::slotEnableWidget() -{ - if (mOutput.data()->isEnabled()) { - mResolution->setEnabled(true); - mRotation->setEnabled(true); - mRefreshRate->setEnabled(true); - } else { - mResolution->setEnabled(false); - mRotation->setEnabled(false); - mRefreshRate->setEnabled(false); - } -} - -void OutputConfig::setShowScaleOption(bool showScaleOption) -{ - mShowScaleOption = showScaleOption; - if (mOutput) { - initUi(); - } -} - -bool OutputConfig::showScaleOption() const -{ - return mShowScaleOption; -} - -// 拿取配置 -void OutputConfig::initConfig(const KScreen::ConfigPtr &config) -{ - mConfig = config; -} - -QString OutputConfig::refreshRateToText(float refreshRate) -{ - return tr("%1 Hz").arg(QLocale().toString(refreshRate)); -} diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/outputconfig.h ukui-control-center-5.0.0.0/plugins/system/display_hw/outputconfig.h --- ukui-control-center-5.0.0.0/plugins/system/display_hw/outputconfig.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/outputconfig.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,88 +0,0 @@ -#ifndef OUTPUTCONFIG_H -#define OUTPUTCONFIG_H - -#include <QGroupBox> -#include <QComboBox> -#include <QWidget> - -#include <KF5/KScreen/kscreen/output.h> - -#include <QGSettings> - -#include "scalesize.h" - -class QCheckBox; -class ResolutionSlider; -class QLabel; -class QStyledItemDelegate; - -namespace Ui { -class KScreenWidget; -} - -class OutputConfig : public QWidget -{ - Q_OBJECT - -public: - explicit OutputConfig(QWidget *parent); - explicit OutputConfig(const KScreen::OutputPtr &output, QWidget *parent = nullptr); - ~OutputConfig() override; - - virtual void setOutput(const KScreen::OutputPtr &output); - KScreen::OutputPtr output() const; - - void setTitle(const QString &title); - void setShowScaleOption(bool showScaleOption); - bool showScaleOption() const; - - void initConfig(const KScreen::ConfigPtr &config); - QString refreshRateToText(float refreshRate); - -protected Q_SLOTS: - void slotResolutionChanged(const QSize &size, bool emitFlag); - void slotRotationChanged(int index); - void slotRefreshRateChanged(int index); - void slotScaleChanged(int index); - void slotDPIChanged(QString key); - void slotEnableWidget(); - -Q_SIGNALS: - void changed(); - void scaleChanged(double scale); - -protected: - virtual void initUi(); - double getScreenScale(); - -private: - void initDpiConnection(); - QString scaleToString(double scale); - KScreen::ModePtr findBestMode(const QSize &size); - -protected: - KScreen::OutputPtr mOutput; - QLabel *mTitle = nullptr; - QCheckBox *mEnabled = nullptr; - ResolutionSlider *mResolution = nullptr; - - QComboBox *mRotation = nullptr; - QComboBox *mScale = nullptr; - QComboBox *mRefreshRate = nullptr; - QComboBox *mMonitor = nullptr; - QComboBox *mScaleCombox = nullptr; - - bool mShowScaleOption = false; - bool mIsWayland = false; - bool mIsFirstLoad = true; - -#if QT_VERSION <= QT_VERSION_CHECK(5, 12, 0) - KScreen::ConfigPtr mConfig; -#else - KScreen::ConfigPtr mConfig = nullptr; -#endif - - QGSettings *mDpiSettings = nullptr; -}; - -#endif // OUTPUTCONFIG_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/qml/Output.qml ukui-control-center-5.0.0.0/plugins/system/display_hw/qml/Output.qml --- ukui-control-center-5.0.0.0/plugins/system/display_hw/qml/Output.qml 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/qml/Output.qml 1970-01-01 08:00:00.000000000 +0800 @@ -1,277 +0,0 @@ -/* - Copyright (C) 2012 Dan Vratil <dvratil@redhat.com> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -import QtQuick 2.1 -import QtGraphicalEffects 1.0 -import org.kde.kscreen 1.0 - -QMLOutput { - - id: root; - - signal clicked(); - signal primaryTriggered(string self); - signal enabledToggled(string self); - signal mousePressed(); - signal mouseReleased(bool isReleased); - signal positionChanged(bool isReleased); - signal rotationChanged(bool isReleased); - signal widthChanged(bool isReleased); - signal heightChanged(bool isReleased); - - property bool isDragged: monitorMouseArea.drag.active; - property bool isDragEnabled: true; - property bool isToggleButtonVisible: false; - property bool hasMoved: false; - - property var screenName:[ - "Unknown", - "VGA", - "DVI", - "DVII", - "DVIA", - "DVID", - "HDMI", - "eDP", - "TV", - "TVComposite", - "TVSVideo", - "TVComponent", - "TVSCART", - "TVC4", - "DP" - ]; - - width: monitorMouseArea.width; - height: monitorMouseArea.height; - - visible: (opacity > 0); - opacity: output.connected ? 1.0 : 0.0; - - Component.onCompleted: { - root.updateRootProperties(); - } - - SystemPalette { - id: palette; - } - - MouseArea { - id: monitorMouseArea; - width: root.currentOutputWidth * screen.outputScale; - height: root.currentOutputHeight * screen.outputScale - anchors.centerIn: parent; - //是否激活时的透明度 - opacity: root.output.enabled ? 1.0 : 0.3; - transformOrigin: Item.Center; - rotation: { - if (output.rotation === KScreenOutput.None) { - return 0; - } else if (output.rotation === KScreenOutput.Left) { - return 270; - } else if (output.rotation === KScreenOutput.Inverted) { - return 180; - } else { - return 90; - } - } - - hoverEnabled: true; - preventStealing: true; - - drag { - target: root.isDragEnabled && !root.isCloneMode && (root.enableCount >= 2) ? root : null; - axis: Drag.XandYAxis; - minimumX: 0; - maximumX: screen.maxScreenSize.width - root.width; - minimumY: 0; - maximumY: screen.maxScreenSize.height - root.height; - - filterChildren: false; - } - - drag.onActiveChanged: { - /* If the drag is shorter then the animation then make sure - * we won't end up in an inconsistent state */ - if (dragActiveChangedAnimation.running) { - dragActiveChangedAnimation.complete(); - } - - dragActiveChangedAnimation.running = true; - } - - onPressed: root.clicked(); - onReleased: root.mouseReleased(true) - onRotationChanged: root.rotationChanged(false); - onWidthChanged: root.widthChanged(false); - onHeightChanged: root.heightChanged(false); - - /* FIXME: This could be in 'Behavior', but MouseArea had - * some complaints...to tired to investigate */ - PropertyAnimation { - id: dragActiveChangedAnimation; - - target: monitor; - property: "opacity"; - from: monitorMouseArea.drag.active ? 0.7 : 1.0 - to: monitorMouseArea.drag.active ? 1.0 : 0.7 - duration: 100; - easing.type: "OutCubic"; - } - - Behavior on opacity { - PropertyAnimation { - property: "opacity"; - easing.type: "OutCubic"; - duration: 250; - } - } - - Behavior on rotation { - RotationAnimation { - easing.type: "OutCubic" - duration: 250; - direction: RotationAnimation.Shortest; - } - } - - Behavior on width { - PropertyAnimation { - property: "width"; - easing.type: "OutCubic"; - duration: 150; - } - } - - Behavior on height { - PropertyAnimation { - property: "height"; - easing.type: "OutCubic"; - duration: 150; - } - } - - Rectangle { - id: monitor; - anchors.fill: parent; - //圆角 - radius: 8; - //是否点击到屏幕 - color: root.focus? "#3D6BE5" : "#AEACAD"; - smooth: true; - clip: true; - - border { - color: root.focus ? "#3498DB" : "#AED6F1"; - width: 1; - - Behavior on color { - PropertyAnimation { - duration: 150; - } - } - } - - Rectangle { - id: posLabel; - y: 4; - x: 4; - width: childrenRect.width + 5; - height: childrenRect.height + 2; - radius: 8; - opacity: root.output.enabled && monitorMouseArea.drag.active ? 1.0 : 0.0; - visible: opacity != 0.0; - - color: "#101010"; - - Text { - id: posLabelText; - text: root.outputX + "," + root.outputY; - color: "white"; - y: 2; - x: 2; - } - } - - Item { - //文字位置 - y: ((parent.height - orientationPanel.height) / 2) - (implicitHeight / 2) - - anchors { - left: parent.left; - right: parent.right; - leftMargin: 5; - rightMargin: 5; - } - - Text { - id: labelVendor; - text: if (root.isCloneMode) { - return ("Unity"); - } else { - return screenName[root.output.type]; - } - - anchors { - verticalCenter: parent.verticalCenter; - left: parent.left; - right: parent.right; - } - horizontalAlignment: Text.AlignHCenter; - color: "#FFFFFF"; - font.pixelSize: 12; - elide: Text.ElideRight; - } - } - } - Item { - id: orientationPanelContainer; - - anchors.fill: monitor; - - visible: false - - Rectangle { - id: orientationPanel; - height: 10; - //底部颜色 - color: palette.highlight ; - smooth: true; - - Behavior on color { - PropertyAnimation { - duration: 150; - } - } - } - } - - OpacityMask { - anchors.fill: orientationPanelContainer; - source: orientationPanelContainer; - maskSource: monitor; - } - } - - Behavior on opacity { - PropertyAnimation { - duration: 200; - easing.type: "OutCubic"; - } - } -} diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/qml/main.qml ukui-control-center-5.0.0.0/plugins/system/display_hw/qml/main.qml --- ukui-control-center-5.0.0.0/plugins/system/display_hw/qml/main.qml 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/qml/main.qml 1970-01-01 08:00:00.000000000 +0800 @@ -1,75 +0,0 @@ -/* - Copyright (C) 2012 Dan Vratil <dvratil@redhat.com> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -*/ - -import QtQuick 2.1 -import QtQuick.Controls 1.1 as Controls -import org.kde.kscreen 1.0 - -Item { - id: root; - - property variant virtualScreen: null; - - objectName: "root"; - focus: true; - - SystemPalette { - id: palette; - } - - MouseArea { - anchors.fill: parent; - focus: true; - - Rectangle { - id: background; - - anchors.fill: parent; - focus: true; - - color: "transparent"; - - FocusScope { - - id: outputViewFocusScope; - - anchors.fill: parent; - focus: true; - - QMLScreen { - id: outputView; - anchors.fill: parent; - clip: true; - objectName: "outputView"; - } - } - - Column { - anchors { - left: parent.left; - bottom: parent.bottom; - margins: 5; - } - spacing: 5; - } - } - - } - -} diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/qml.qrc ukui-control-center-5.0.0.0/plugins/system/display_hw/qml.qrc --- ukui-control-center-5.0.0.0/plugins/system/display_hw/qml.qrc 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/qml.qrc 1970-01-01 08:00:00.000000000 +0800 @@ -1,6 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>qml/Output.qml</file> - <file>qml/main.qml</file> - </qresource> -</RCC> diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/resolutionslider.cpp ukui-control-center-5.0.0.0/plugins/system/display_hw/resolutionslider.cpp --- ukui-control-center-5.0.0.0/plugins/system/display_hw/resolutionslider.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/resolutionslider.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,206 +0,0 @@ -#include "resolutionslider.h" -#include "utils.h" - -#include <QGridLayout> -#include <QLabel> -#include <QSlider> -#include <QComboBox> -#include <QFile> -#include <QStyledItemDelegate> - -#include <QDBusInterface> - -#include <KF5/KScreen/kscreen/output.h> - -static bool sizeLessThan(const QSize &sizeA, const QSize &sizeB) -{ - return sizeA.width() * sizeA.height() < sizeB.width() * sizeB.height(); -} - -ResolutionSlider::ResolutionSlider(const KScreen::OutputPtr &output, QWidget *parent) : - QWidget(parent), - mOutput(output) -{ - QString sessionType = getenv("XDG_SESSION_TYPE"); - if (sessionType.compare("wayland", Qt::CaseSensitive)) { - mExcludeModes.push_back(QSize(1152, 864)); - } - - connect(output.data(), &KScreen::Output::currentModeIdChanged, - this, &ResolutionSlider::slotOutputModeChanged); - connect(output.data(), &KScreen::Output::modesChanged, - this, &ResolutionSlider::init); - init(); -} - -ResolutionSlider::~ResolutionSlider() -{ -} - -void ResolutionSlider::init() -{ - this->setMinimumSize(402, 30); - this->setMaximumSize(1677215, 30); - mModes.clear(); - Q_FOREACH (const KScreen::ModePtr &mode, mOutput->modes()) { - if (mModes.contains(mode->size()) - || (mode->size().width() * mode->size().height()) < (1024 * 768) - || mExcludeModes.contains(mode->size())) { - continue; - } - mModes << mode->size(); - } - std::sort(mModes.begin(), mModes.end(), sizeLessThan); - - delete layout(); - delete mSmallestLabel; - mSmallestLabel = nullptr; - delete mBiggestLabel; - mBiggestLabel = nullptr; - delete mCurrentLabel; - mCurrentLabel = nullptr; - delete mSlider; - mSlider = nullptr; - delete mComboBox; - mComboBox = nullptr; - - QGridLayout *layout = new QGridLayout(this); - int margin = layout->margin(); - // Avoid double margins - layout->setContentsMargins(0, 0, 0, 0); - if (!mModes.empty()) { - std::reverse(mModes.begin(), mModes.end()); - mComboBox = new QComboBox(this); - mComboBox->setMinimumSize(402, 30); - mComboBox->setMaximumSize(1677215, 30); - - int currentModeIndex = -1; - int preferredModeIndex = -1; - Q_FOREACH (const QSize &size, mModes) { -#ifdef __sw_64__ - if (size.width() < int(1920)) { - continue; - } -#endif - mComboBox->addItem(Utils::sizeToString(size)); - - if (mOutput->currentMode() && (mOutput->currentMode()->size() == size)) { - currentModeIndex = mComboBox->count() - 1; - } else if (mOutput->preferredMode() && (mOutput->preferredMode()->size() == size)) { - preferredModeIndex = mComboBox->count() - 1; - } - } - if (currentModeIndex != -1) { - mComboBox->setCurrentIndex(currentModeIndex); - } else if (preferredModeIndex != -1) { - mComboBox->setCurrentIndex(preferredModeIndex); - } - - layout->addWidget(mComboBox, 0, 0, 1, 1); - connect(mComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), - this, &ResolutionSlider::slotValueChanged, Qt::UniqueConnection); - // bug#75687触发两次应用信号 - // Q_EMIT resolutionChanged(mModes.at(mComboBox->currentIndex())); - } else { - mCurrentLabel = new QLabel(this); - mCurrentLabel->setAlignment(Qt::AlignCenter); - layout->addWidget(mCurrentLabel, 1, 0, 1, 3); - - if (mModes.isEmpty()) { - mCurrentLabel->setText(tr("No available resolutions")); - } else if (mModes.count() == 1) { - mCurrentLabel->setText(Utils::sizeToString(mModes.first())); - } else { - // No double margins left and right, but they are needed on top and bottom - layout->setContentsMargins(0, margin, 0, margin); - mSlider = new Uslider(Qt::Horizontal, this); - mSlider->setTickInterval(1); - mSlider->setTickPosition(QSlider::TicksBelow); - mSlider->setSingleStep(1); - mSlider->setPageStep(1); - mSlider->setMinimum(0); - mSlider->setMaximum(mModes.size() - 1); - mSlider->setSingleStep(1); - if (mOutput->currentMode()) { - mSlider->setValue(mModes.indexOf(mOutput->currentMode()->size())); - } else if (mOutput->preferredMode()) { - mSlider->setValue(mModes.indexOf(mOutput->preferredMode()->size())); - } else { - mSlider->setValue(mSlider->maximum()); - } - layout->addWidget(mSlider, 0, 1); - connect(mSlider, &QSlider::valueChanged, - this, &ResolutionSlider::slotValueChanged); - - mSmallestLabel = new QLabel(this); - mSmallestLabel->setText(Utils::sizeToString(mModes.first())); - layout->addWidget(mSmallestLabel, 0, 0); - mBiggestLabel = new QLabel(this); - mBiggestLabel->setText(Utils::sizeToString(mModes.last())); - layout->addWidget(mBiggestLabel, 0, 2); - - const auto size = mModes.at(mSlider->value()); - mCurrentLabel->setText(Utils::sizeToString(size)); - Q_EMIT resolutionChanged(size); - } - } -} - -QSize ResolutionSlider::currentResolution() const -{ - if (mModes.isEmpty()) { - return QSize(); - } - - if (mModes.size() < 2) { - return mModes.first(); - } - - if (mSlider) { - return mModes.at(mSlider->value()); - } else { - const int i = mComboBox->currentIndex(); - return i > -1 ? mModes.at(i) : QSize(); - } -} - -QSize ResolutionSlider::getMaxResolution() const -{ - if (mModes.isEmpty()) { - return QSize(); - } - return mModes.first(); -} - -void ResolutionSlider::setResolution(const QSize &size) -{ - mComboBox->blockSignals(true); - mComboBox->setCurrentIndex(mModes.indexOf(size)); - mComboBox->blockSignals(false); -} - -void ResolutionSlider::slotOutputModeChanged() -{ - if (!mOutput->currentMode()) { - return; - } - - if (mSlider) { - mSlider->blockSignals(true); - mSlider->setValue(mModes.indexOf(mOutput->currentMode()->size())); - mSlider->blockSignals(false); - } else if (mComboBox) { - mComboBox->blockSignals(true); - mComboBox->setCurrentIndex(mModes.indexOf(mOutput->currentMode()->size())); - mComboBox->blockSignals(false); - } -} - -void ResolutionSlider::slotValueChanged(int value) -{ - const QSize &size = mModes.at(value); - if (mCurrentLabel) { - mCurrentLabel->setText(Utils::sizeToString(size)); - } - Q_EMIT resolutionChanged(size); -} diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/resolutionslider.h ukui-control-center-5.0.0.0/plugins/system/display_hw/resolutionslider.h --- ukui-control-center-5.0.0.0/plugins/system/display_hw/resolutionslider.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/resolutionslider.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,53 +0,0 @@ -#ifndef RESOLUTIONSLIDER_H -#define RESOLUTIONSLIDER_H - -#include <QWidget> -#include <QSet> - -#include <KF5/KScreen/kscreen/output.h> -#include "uslider.h" - -class QSlider; -class QLabel; -class QComboBox; -class QStyledItemDelegate; - -class ResolutionSlider : public QWidget -{ - Q_OBJECT - -public: - explicit ResolutionSlider(const KScreen::OutputPtr &output, QWidget *parent = nullptr); - ~ResolutionSlider() override; - - QSize currentResolution() const; - QSize getMaxResolution() const; - - void setResolution(const QSize &size); - -Q_SIGNALS: - void resolutionChanged(const QSize &size, bool emitFlag = true); - -public Q_SLOTS: - void slotValueChanged(int); - void slotOutputModeChanged(); - -private: - void init(); - -private: - KScreen::OutputPtr mOutput; - - QList<QSize> mModes; - QList<QSize> mExcludeModes; - - QLabel *mSmallestLabel = nullptr; - QLabel *mBiggestLabel = nullptr; - QLabel *mCurrentLabel = nullptr; - Uslider *mSlider = nullptr; - QComboBox *mComboBox = nullptr; - - bool mIsWayland = false; -}; - -#endif // RESOLUTIONSLIDER_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/scalesize.h ukui-control-center-5.0.0.0/plugins/system/display_hw/scalesize.h --- ukui-control-center-5.0.0.0/plugins/system/display_hw/scalesize.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/scalesize.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,42 +0,0 @@ -#ifndef SCALESIZE_H -#define SCALESIZE_H - -#include <QSize> -typedef enum{ - RESOLUTION, - ORIENTATION, - FREQUENCY -}CONFIG; - -#define SCALE_SCHEMAS "org.ukui.SettingsDaemon.plugins.xsettings" -#define SCALE_KEY "scaling-factor" - -const QSize KRsolution(1920, 1080); - -const QVector<QSize> k125Scale{QSize(1280, 1024), QSize(1440, 900), QSize(1600, 900), - QSize(1680, 1050)}; - -const QVector<QSize> k150Scale{ QSize(1920, 1080), QSize(1920, 1200), - QSize(1920, 1280), QSize(2048, 1080), QSize(2048, 1280), - QSize(2160, 1440), QSize(2560, 1440),QSize(3840, 2160)}; - -const QVector<QSize> k175Scale{QSize(2048, 1080), QSize(2048, 1280), QSize(2160, 1440), - QSize(2560, 1440), QSize(3840, 2160)}; - -const QVector<QSize> k200Scale{QSize(2048, 1080), QSize(2048, 1280), QSize(2160, 1440), - QSize(2560, 1440), QSize(3840, 2160)}; - -const QVector<QSize> k250Scale{QSize(2560, 1440), QSize(3840, 2160)}; - -const QVector<QSize> k275Scale{QSize(3840, 2160)}; - - -extern QSize mScaleSize; - -extern QSize mScaleSizeRes; - -extern double mScreenScale; - -extern int changeItm; - -#endif // SCALESIZE_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/screenConfig.h ukui-control-center-5.0.0.0/plugins/system/display_hw/screenConfig.h --- ukui-control-center-5.0.0.0/plugins/system/display_hw/screenConfig.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/screenConfig.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,35 +0,0 @@ -#ifndef SCREENCONFIG_H -#define SCREENCONFIG_H - -#include <QDBusArgument> -#include <QString> - -struct ScreenConfig -{ - QString screenId; - QString screenModeId; - int screenPosX; - int screenPosY; - bool primary; - - friend QDBusArgument &operator<<(QDBusArgument &argument, const ScreenConfig &screenStruct) - { - argument.beginStructure(); - argument << screenStruct.screenId << screenStruct.screenModeId << screenStruct.screenPosX - << screenStruct.screenPosY << screenStruct.primary; - argument.endStructure(); - return argument; - } - - friend const QDBusArgument &operator>>(const QDBusArgument &argument, ScreenConfig &screenStruct) - { - argument.beginStructure(); - argument >> screenStruct.screenId >> screenStruct.screenModeId - >> screenStruct.screenPosX >> screenStruct.screenPosY >> screenStruct.primary; - argument.endStructure(); - return argument; - } -}; -Q_DECLARE_METATYPE(ScreenConfig) - -#endif // SCREENCONFIG_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/unifiedoutputconfig.cpp ukui-control-center-5.0.0.0/plugins/system/display_hw/unifiedoutputconfig.cpp --- ukui-control-center-5.0.0.0/plugins/system/display_hw/unifiedoutputconfig.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/unifiedoutputconfig.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,489 +0,0 @@ -#include "unifiedoutputconfig.h" -#include "resolutionslider.h" -#include "utils.h" - -#include <QComboBox> -#include <QIcon> -#include <QLabel> -#include <QGridLayout> -#include <QSpacerItem> -#include <QCheckBox> -#include <QGroupBox> -#include <QFormLayout> -#include <QStyledItemDelegate> -#include <QFile> -#include <QVector> -#include <QCryptographicHash> - -#include <KF5/KScreen/kscreen/output.h> -#include <KF5/KScreen/kscreen/config.h> -#include <KF5/KScreen/kscreen/getconfigoperation.h> - -#include <KF5/KConfigCore/KSharedConfig> -#include <KF5/KConfigCore/KConfigGroup> - -bool operator<(const QSize &s1, const QSize &s2) -{ - return s1.width() * s1.height() < s2.width() * s2.height(); -} - -template<> -bool qMapLessThanKey(const QSize &s1, const QSize &s2) -{ - return s1 < s2; -} - -UnifiedOutputConfig::UnifiedOutputConfig(const KScreen::ConfigPtr &config, QWidget *parent) : - OutputConfig(parent), - mConfig(config) -{ - -} - -UnifiedOutputConfig::~UnifiedOutputConfig() -{ -} - -void UnifiedOutputConfig::setOutput(const KScreen::OutputPtr &output) -{ - mOutput = output; - - mClones.clear(); - mClones.reserve(mOutput->clones().count()); - Q_FOREACH (int id, mOutput->clones()) { - mClones << mConfig->output(id); - } - mClones << mOutput; - - OutputConfig::setOutput(output); -} - -void UnifiedOutputConfig::initUi() -{ - QVBoxLayout *vbox = new QVBoxLayout(this); - vbox->setContentsMargins(0, 0, 0, 0); - setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - - KScreen::OutputPtr fakeOutput = createFakeOutput(); - mResolution = new ResolutionSlider(fakeOutput, this); - - mResolution->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - mResolution->setMinimumSize(402, 30); - - //监听,否则无法处理修改分辨率/刷新率未保存 - connect(mOutput.data(), &KScreen::Output::currentModeIdChanged, - this, &UnifiedOutputConfig::slotRestoreResoltion); - - connect(mOutput.data(), &KScreen::Output::rotationChanged, - this, &UnifiedOutputConfig::slotRestoreRatation); - - QLabel *resLabel = new QLabel(this); - resLabel->setText(tr("resolution")); - resLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - resLabel->setMinimumSize(118, 30); - resLabel->setMaximumSize(118, 30); - - QHBoxLayout *resLayout = new QHBoxLayout(); - resLayout->addWidget(resLabel); - resLayout->addWidget(mResolution); - - QFrame *resFrame = new QFrame(this); - resFrame->setFrameShape(QFrame::Shape::Box); - resFrame->setLayout(resLayout); - - resFrame->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - resFrame->setMinimumSize(552, 50); - resFrame->setMaximumSize(16777215, 50); - - vbox->addWidget(resFrame); - connect(mResolution, &ResolutionSlider::resolutionChanged, - this, [=](QSize size, bool emitFlag){ - slotResolutionChanged(size, emitFlag); - }); - - // 方向下拉框 - mRotation = new QComboBox(this); - - mRotation->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - mRotation->setMinimumSize(402, 30); - mRotation->setMaximumSize(16777215, 30); - - QLabel *rotateLabel = new QLabel(this); - rotateLabel->setText(tr("orientation")); - rotateLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - rotateLabel->setMinimumSize(118, 30); - rotateLabel->setMaximumSize(118, 30); - - mRotation->addItem(tr("arrow-up"), KScreen::Output::None); - mRotation->addItem(tr("90° arrow-right"), KScreen::Output::Right); - mRotation->addItem(tr("90° arrow-left"), KScreen::Output::Left); - mRotation->addItem(tr("arrow-down"), KScreen::Output::Inverted); - - int index = mRotation->findData(mOutput->rotation()); - mRotation->setCurrentIndex(index); - - connect(mRotation, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), - this, &UnifiedOutputConfig::slotRotationChangedDerived); - - QHBoxLayout *roatateLayout = new QHBoxLayout(); - roatateLayout->addWidget(rotateLabel); - roatateLayout->addWidget(mRotation); - - QFrame *rotateFrame = new QFrame(this); - rotateFrame->setFrameShape(QFrame::Shape::Box); - rotateFrame->setLayout(roatateLayout); - - rotateFrame->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - rotateFrame->setMinimumSize(552, 50); - rotateFrame->setMaximumSize(16777215, 50); - - vbox->addWidget(rotateFrame); - - // 统一输出刷新率下拉框 - mRefreshRate = new QComboBox(this); - mRefreshRate->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - mRefreshRate->setMinimumSize(402, 30); - mRefreshRate->setMaximumSize(16777215, 30); - - QLabel *freshLabel = new QLabel(this); - freshLabel->setText(tr("frequency")); - freshLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - freshLabel->setMinimumSize(118, 30); - freshLabel->setMaximumSize(118, 30); - - mRefreshRate->addItem(tr("auto"), -1); - - QHBoxLayout *freshLayout = new QHBoxLayout(); - freshLayout->addWidget(freshLabel); - freshLayout->addWidget(mRefreshRate); - - QFrame *freshFrame = new QFrame(this); - freshFrame->setFrameShape(QFrame::Shape::Box); - freshFrame->setLayout(freshLayout); - - vbox->addWidget(freshFrame); - - freshFrame->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - freshFrame->setMinimumSize(552, 50); - freshFrame->setMaximumSize(16777215, 50); - - slotResolutionChanged(mResolution->currentResolution(), false); - connect(mRefreshRate, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), - this, &UnifiedOutputConfig::slotRefreshRateChanged); - QObject::connect(new KScreen::GetConfigOperation(), &KScreen::GetConfigOperation::finished, this, - [&](KScreen::ConfigOperation *op) { - KScreen::ConfigPtr sConfig = qobject_cast<KScreen::GetConfigOperation *>(op)->config(); - KScreen::OutputPtr sOutput = sConfig -> primaryOutput(); - - for (int i = 0; i < mRefreshRate->count(); ++i) { - if (!sOutput.isNull() && !sOutput->currentMode().isNull() && mRefreshRate->itemText(i) == refreshRateToText(sOutput->currentMode()->refreshRate())) { - mRefreshRate->setCurrentIndex(i); - } - } - }); - initscale(vbox); -} - -void UnifiedOutputConfig::initscale(QVBoxLayout *vbox) -{ - QFrame *scaleFrame = new QFrame(this); - vbox->addWidget(scaleFrame); - scaleFrame->hide(); -} - -void UnifiedOutputConfig::slotScaleChanged(int index) -{ - Q_EMIT scaleChanged(mScaleCombox->itemData(index).toDouble()); -} - -KScreen::OutputPtr UnifiedOutputConfig::createFakeOutput() -{ - // Find set of common resolutions - QMap<QSize, int> commonSizes; - Q_FOREACH (const KScreen::OutputPtr &clone, mClones) { - QList<QSize> processedSizes; - Q_FOREACH (const KScreen::ModePtr &mode, clone->modes()) { - // Make sure we don't count some modes multiple times because of different - // refresh rates - if (processedSizes.contains(mode->size())) { - continue; - } - - processedSizes << mode->size(); - - if (commonSizes.contains(mode->size())) { - commonSizes[mode->size()]++; - } else { - commonSizes.insert(mode->size(), 1); - } - } - } - - KScreen::OutputPtr fakeOutput(new KScreen::Output); - - // This will give us list of resolution that are shared by all outputs - QList<QSize> commonResults = commonSizes.keys(mClones.count()); - // If there are no common resolution, fallback to smallest preferred mode - if (commonResults.isEmpty()) { - QSize smallestMode; - Q_FOREACH (const KScreen::OutputPtr &clone, mClones) { - if (!smallestMode.isValid() || clone->preferredMode()->size() < smallestMode) { - smallestMode = clone->preferredMode()->size(); - } - } - commonResults << smallestMode; - } - std::sort(commonResults.begin(), commonResults.end()); - - KScreen::ModeList modes; - Q_FOREACH (const QSize &size, commonResults) { - KScreen::ModePtr mode(new KScreen::Mode); - mode->setSize(size); - mode->setId(Utils::sizeToString(size)); - mode->setName(mode->id()); - modes.insert(mode->id(), mode); - } - fakeOutput->setModes(modes); - if (!mOutput->currentModeId().isEmpty()) { - fakeOutput->setCurrentModeId(Utils::sizeToString(mOutput->currentMode()->size())); - } else { - fakeOutput->setCurrentModeId(Utils::sizeToString(commonResults.last())); - } - - return fakeOutput; -} - -void UnifiedOutputConfig::slotResolutionChanged(const QSize &size, bool emitFlag = false) -{ - // Ignore disconnected outputs - if (!size.isValid()) { - return; - } - bool mIsModeInit = true; - QVector<QString>Vrefresh; - bool mIsCloneMode = isCloneMode(); - mRefreshRate->blockSignals(true); - mRefreshRate->clear(); - mRefreshRate->blockSignals(false); - Q_FOREACH (const KScreen::OutputPtr &clone, mClones) { - const QString &id = findBestMode(clone, size, emitFlag); - if (id.isEmpty() || id == "auto-fill") { - // FIXME: Error? - return; - } - //本来就是镜像模式且当前分辨率就是选中分辨率,就不需要重新设置显示参数 - //用于镜像模式下刚打开控制面板时的显示,否则显示的不是实际刷新率而是findBestMode - if (!mIsCloneMode || size != clone->currentMode()->size()) { - mIsModeInit = false; - clone->blockSignals(true); //必须加blockSignals,否则在这里就会触发currentModeIdChanged的信号 - clone->setCurrentModeId(id); - clone->setPos(QPoint(0, 0)); - clone->blockSignals(false); - } - - QList<KScreen::ModePtr> modes; - Q_FOREACH (const KScreen::ModePtr &mode, clone->modes()) { - if (mode->size() == size) { - modes << mode; - } - } - - QVector<QString>VrefreshTemp; - for (int i = 0, total = modes.count(); i < total; ++i) { - const KScreen::ModePtr mode = modes.at(i); - - bool alreadyExisted = false; //判断该显示器的刷新率是否有重复的,确保同一刷新率在一个屏幕上只出现一次 - for (int j = 0; j < VrefreshTemp.size(); ++j) { - if (refreshRateToText(mode->refreshRate()) == VrefreshTemp[j]) { - alreadyExisted = true; - break; - } - } - if (alreadyExisted == false) { //不添加重复的项 - VrefreshTemp.append(refreshRateToText(mode->refreshRate())); - } - } - - for (int i = 0; i < VrefreshTemp.size(); ++i) { - Vrefresh.append(VrefreshTemp[i]); - } - } - - for (int i = 0; i < Vrefresh.size(); ++i) { - if (Vrefresh.count(Vrefresh[i]) == mClones.size()) { //该刷新率出现次数等于屏幕数,即每个屏幕都有该刷新率 - bool existFlag = false; - for (int j = 0; j < mRefreshRate->count(); ++j) { //已经存在就不再添加 - if (Vrefresh[i] == mRefreshRate->itemText(j)) { - existFlag = true; - break; - } - } - if (existFlag == false) { //不存在添加到容器中 - mRefreshRate->blockSignals(true); - mRefreshRate->addItem(Vrefresh[i]); - mRefreshRate->blockSignals(false); - } - } - } - - if (mRefreshRate->count() > 1) { - float currentRereshRate = mClones[0]->currentMode()->refreshRate(); - for (int i = 0; i < mRefreshRate->count(); i++) { - if (refreshRateToText(currentRereshRate) == mRefreshRate->itemText(i)) { - mRefreshRate->blockSignals(true); - mRefreshRate->setCurrentIndex(i); - mRefreshRate->blockSignals(false); - break; - } - } - } - - if (mRefreshRate->count() == 0) { - mRefreshRate->blockSignals(true); - mRefreshRate->addItem(tr("auto"), -1); - mRefreshRate->blockSignals(false); - } - if (emitFlag && !mIsModeInit){ - changeItm = RESOLUTION; - Q_EMIT changed(); - } -} - -void UnifiedOutputConfig::slotRefreshRateChanged(int index) -{ - Q_FOREACH (const KScreen::OutputPtr &clone, mClones) { - Q_FOREACH (const KScreen::ModePtr &mode, clone->modes()) { - if (mode->size() == mResolution->currentResolution() && \ - refreshRateToText(mode->refreshRate()) == mRefreshRate->itemText(index)) { - clone->blockSignals(true); - clone->setCurrentModeId(mode->id()); - clone->blockSignals(false); - } - } - } - changeItm = FREQUENCY; - Q_EMIT changed(); -} - -QString UnifiedOutputConfig::findBestMode(const KScreen::OutputPtr &output, const QSize &size, bool isUser) -{ - float refreshRate = 0; - QString id = "auto-fill"; - Q_FOREACH (const KScreen::ModePtr &mode, output->modes()) { - if (mode->size() == size && mode->refreshRate() > refreshRate) { - refreshRate = mode->refreshRate(); - id = mode->id(); - } - } - - // 第一次开启镜像模式读取kwin配置 - if (!isUser) { - QVector<KScreen::Output *> outputs; - Q_FOREACH (const auto &output, mConfig->outputs()) { - outputs << output.data(); - } - - QCryptographicHash hash(QCryptographicHash::Md5); - Q_FOREACH (const KScreen::Output *output, outputs) { - hash.addData(output->uuid()); - } - QByteArray groupUuid = QByteArray(1, '1').append(hash.result().toHex()).left(15); - const auto config = KSharedConfig::openConfig(QLatin1String("ukui-kwinrc")); - const auto outputGroup = config->group("DrmOutputs"); - const auto configGroup = outputGroup.group(groupUuid); - - QSize outputSize; - Q_FOREACH (const auto &aimOutput, outputs) { - const auto outputConfig = configGroup.group(output->uuid()); - QString res = outputConfig.readEntry("Mode"); - // don't change mode if cannot found config - if (outputConfig.hasKey("Mode")) { - QStringList list = res.split(QLatin1String("_")); - QStringList size = list[0].split(QLatin1String("x")); - if (list.size() > 1 && size.size() > 1) { - outputSize = QSize(size[0].toInt(), size[1].toInt()); - int refreshRate = list[1].toInt(); - Q_FOREACH (const auto &m, output->modes()) { - if (m->size() == outputSize && m->refreshRate() * 1000 == refreshRate && output == aimOutput) { - id = m->id(); - } - } - } - } - } - if (outputSize.isValid()) { - mResolution->setResolution(outputSize); - if (outputSize != size) { - slotResolutionChanged(outputSize, false); //重新填充刷新率 - id = "auto-fill"; //已经填充了刷新率 - } - } - } - return id; -} - -// 统一输出方向信号改变 -void UnifiedOutputConfig::slotRotationChangedDerived(int index) -{ - KScreen::Output::Rotation rotation = static_cast<KScreen::Output::Rotation>(mRotation->itemData(index).toInt()); - Q_FOREACH (const KScreen::OutputPtr &clone, mClones) { - if (clone->isConnected() && clone->isEnabled()) { - clone->setRotation(rotation); - clone->setPos(QPoint(0, 0)); - } - } - changeItm = ORIENTATION; - Q_EMIT changed(); -} - -void UnifiedOutputConfig::slotRestoreResoltion() -{ - if (!mOutput->currentMode()) { - return; - } - if (mResolution->currentResolution() != mOutput->currentMode()->size()) { //分辨率改变时,触发该信号重新加载刷新率,用于修改分辨率之后但未保存 - mResolution->setResolution(mOutput->currentMode()->size()); //这里面不会触发分辨率改变信号 - slotResolutionChanged(mOutput->currentMode()->size(), false); - } else { //分辨率未修改,刷新率修改,用于修改刷新率之后但未保存 - for (int i = 0; i < mRefreshRate->count(); i++) { - if (refreshRateToText(mOutput->currentMode()->refreshRate()) == mRefreshRate->itemText(i)\ - || mRefreshRate->count() == 1) { - mRefreshRate->blockSignals(true); - mRefreshRate->setCurrentIndex(i); - mRefreshRate->blockSignals(false); - break; - } - } - } -} - -void UnifiedOutputConfig::slotRestoreRatation() -{ - mRotation->blockSignals(true); - mRotation->setCurrentIndex(mRotation->findData(mOutput->rotation())); - mRotation->blockSignals(false); -} - -bool UnifiedOutputConfig::isCloneMode() -{ - /* - *不能直接用isVisible判断是否为镜像模式 - *设置镜像模式时,visiable总是true,但此时还未设置currentMode - *导致某些情况异常 - */ - //return this->isVisible(); //显示则表示是统一输出 - if (!mClones.isEmpty() && mClones[0] && mClones[0]->currentMode()) { - QSize cloneSize(mClones[0]->currentMode()->size()); - QPoint clonePos(mClones[0]->pos()); - Q_FOREACH (const KScreen::OutputPtr &clone, mClones) { - if (clone->currentMode() && (clone->currentMode()->size() != cloneSize || clone->pos() != clonePos)) { - return false; - } - } - return true; - } else { - return false; - } - -} - diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/unifiedoutputconfig.h ukui-control-center-5.0.0.0/plugins/system/display_hw/unifiedoutputconfig.h --- ukui-control-center-5.0.0.0/plugins/system/display_hw/unifiedoutputconfig.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/unifiedoutputconfig.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,46 +0,0 @@ -#ifndef UNIFIEDOUTPUTCONFIG_H -#define UNIFIEDOUTPUTCONFIG_H - -#include "outputconfig.h" -#include <QVBoxLayout> - -namespace KScreen { -class Output; -class Config; -} - -class UnifiedOutputConfig : public OutputConfig -{ - Q_OBJECT -public: - explicit UnifiedOutputConfig(const KScreen::ConfigPtr &config, QWidget *parent); - ~UnifiedOutputConfig() override; - - void setOutput(const KScreen::OutputPtr &output) override; - bool isCloneMode(); -private Q_SLOTS: - void slotResolutionChanged(const QSize &size, bool emitFlag); - - // 统一输出后调整屏幕方向统一代码 - void slotRotationChangedDerived(int index); - void slotRestoreResoltion(); - void slotRestoreRatation(); - void slotRefreshRateChanged(int index); - void slotScaleChanged(int index); - -Q_SIGNALS: - void scaleChanged(double scale); - -private: - void initUi() override; - void initscale(QVBoxLayout *vbox); - KScreen::OutputPtr createFakeOutput(); - QString findBestMode(const KScreen::OutputPtr &output, const QSize &size, bool isUser); - -private: - KScreen::ConfigPtr mConfig; - QList<KScreen::OutputPtr> mClones; - QComboBox *mScaleCombox = nullptr; -}; - -#endif // UNIFIEDOUTPUTCONFIG_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/utils.cpp ukui-control-center-5.0.0.0/plugins/system/display_hw/utils.cpp --- ukui-control-center-5.0.0.0/plugins/system/display_hw/utils.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/utils.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,24 +0,0 @@ -#include "utils.h" - -#include <KF5/KScreen/kscreen/output.h> -#include <KF5/KScreen/kscreen/edid.h> - -QString Utils::outputName(const KScreen::OutputPtr &output) -{ - return outputName(output.data()); -} - -QString Utils::outputName(const KScreen::Output *output) -{ - if (output != nullptr) { - return kOutput.at(output->type()); - } - - return kOutput.at(0); -} - -QString Utils::sizeToString(const QSize &size) -{ - return QStringLiteral("%1x%2").arg(size.width()).arg(size.height()); -} - diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/utils.h ukui-control-center-5.0.0.0/plugins/system/display_hw/utils.h --- ukui-control-center-5.0.0.0/plugins/system/display_hw/utils.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/utils.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,36 +0,0 @@ -#ifndef KSCREEN_KCM_UTILS_H -#define KSCREEN_KCM_UTILS_H - -#include <QString> -#include <QSize> -#include <QStringList> - -#include <KF5/KScreen/kscreen/types.h> -#include <KF5/KScreen/kscreen/output.h> - -const QStringList kOutput { - "Unknown", - "VGA", - "DVI", - "DVII", - "DVIA", - "DVID", - "HDMI", - "eDP", - "TV", - "TVComposite", - "TVSVideo", - "TVComponent", - "TVSCART", - "TVC4", - "DP" -}; - -namespace Utils { -QString outputName(const KScreen::Output *output); -QString outputName(const KScreen::OutputPtr &output); - -QString sizeToString(const QSize &size); -} - -#endif diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/widget.cpp ukui-control-center-5.0.0.0/plugins/system/display_hw/widget.cpp --- ukui-control-center-5.0.0.0/plugins/system/display_hw/widget.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/widget.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,2440 +0,0 @@ -#include "widget.h" -#include "controlpanel.h" -#include "declarative/qmloutput.h" -#include "declarative/qmlscreen.h" -#include "utils.h" -#include "ui_display_hw.h" -#include "displayperformancedialog.h" -#include "colorinfo.h" -#include "ukcccommon.h" -using namespace ukcc; -#include "../../../shell/mainwindow.h" - -#include <QHBoxLayout> -#include <QTimer> -#include <QLabel> -#include <QVBoxLayout> -#include <QSplitter> -#include <QtGlobal> -#include <QQuickView> -#include <qquickitem.h> -#include <QDebug> -#include <QPushButton> -#include <QProcess> -#include <QtAlgorithms> -#include <QtXml> -#include <QDomDocument> -#include <QDir> -#include <QStandardPaths> -#include <QComboBox> -#include <QQuickWidget> -#include <QMessageBox> -#include <QDBusConnection> -#include <QJsonDocument> -#include <QtConcurrent> -#include <QDBusMetaType> - -#include <KF5/KScreen/kscreen/output.h> -#include <KF5/KScreen/kscreen/edid.h> -#include <KF5/KScreen/kscreen/mode.h> -#include <KF5/KScreen/kscreen/config.h> -#include <KF5/KScreen/kscreen/getconfigoperation.h> -#include <KF5/KScreen/kscreen/configmonitor.h> -#include <KF5/KScreen/kscreen/setconfigoperation.h> -#include <KF5/KScreen/kscreen/edid.h> -#include <KF5/KScreen/kscreen/types.h> - -#include <KF5/KConfigCore/KSharedConfig> -#include <KF5/KConfigCore/KConfigGroup> - -#ifdef signals -#undef signals -#endif - -#define QML_PATH "kcm_kscreen/qml/" - -#define UKUI_CONTORLCENTER_PANEL_SCHEMAS "org.ukui.control-center.panel.plugins" -#define THEME_NIGHT_KEY "themebynight" - -#define FONT_RENDERING_DPI "org.ukui.SettingsDaemon.plugins.xsettings" -#define SCALE_KEY "scaling-factor" - -#define MOUSE_SIZE_SCHEMAS "org.ukui.peripherals-mouse" -#define CURSOR_SIZE_KEY "cursor-size" - -#define POWER_SCHMES "org.ukui.power-manager" -#define POWER_KEY "brightness-ac" - -#define ADVANCED_SCHEMAS "org.ukui.session.required-components" -#define ADVANCED_KEY "windowmanager" - -const QString kCpu = "ZHAOXIN"; -const QString kLoong = "Loongson"; -const QString tempDayBrig = "6500"; - -QSize mScaleSizeRes = QSize(); - -Q_DECLARE_METATYPE(KScreen::OutputPtr) - -Widget::Widget(QWidget *parent) : - QWidget(parent), - ui(new Ui::DisplayWindow()) -{ - qRegisterMetaType<QQuickView *>(); - - ui->setupUi(this); - ui->quickWidget->setResizeMode(QQuickWidget::SizeRootObjectToView); - ui->quickWidget->setContentsMargins(0, 0, 0, 9); - - mCloseScreenButton = new KSwitchButton(this); - ui->showScreenLayout->addWidget(mCloseScreenButton); - - mUnifyButton = new KSwitchButton(this); - ui->unionLayout->addWidget(mUnifyButton); - - qDBusRegisterMetaType<ScreenConfig>(); - - setHideModuleInfo(); - initNightUI(); - isWayland(); - - QProcess *process = new QProcess; - process->start("lsb_release -r"); - process->waitForFinished(); - - QByteArray ba = process->readAllStandardOutput(); - QString osReleaseCrude = QString(ba.data()); - QStringList res = osReleaseCrude.split(":"); - QString osRelease = res.length() >= 2 ? res.at(1) : ""; - osRelease = osRelease.simplified(); - - const QByteArray idd(ADVANCED_SCHEMAS); - if (QGSettings::isSchemaInstalled(idd) && osRelease == "V10") { - ui->advancedBtn->show(); - ui->advancedHorLayout->setContentsMargins(9, 8, 9, 32); - } else { - ui->advancedBtn->hide(); - ui->advancedHorLayout->setContentsMargins(9, 0, 9, 0); - } - - setTitleLabel(); - initGSettings(); - initTemptSlider(); - initUiComponent(); - initNightStatus(); - -#if QT_VERSION <= QT_VERSION_CHECK(5, 12, 0) - ui->nightframe->setVisible(false); -#else - ui->nightframe->setVisible(this->mRedshiftIsValid); -#endif - - mNightButton->setChecked(this->mIsNightMode); - showNightWidget(mNightButton->isChecked()); - - initConnection(); - loadQml(); - - connect(ui->scaleCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), - this, [=](int index){ - scaleChangedSlot(ui->scaleCombo->itemData(index).toDouble()); - }); -} - -Widget::~Widget() -{ - exitFlag = true; - clearOutputIdentifiers(); - delete ui; - ui = nullptr; -} - -bool Widget::eventFilter(QObject *object, QEvent *event) -{ - if (event->type() == QEvent::Resize) { - if (mOutputIdentifiers.contains(qobject_cast<QQuickView *>(object))) { - QResizeEvent *e = static_cast<QResizeEvent *>(event); - const QRect screenSize = object->property("screenSize").toRect(); - QRect geometry(QPoint(0, 0), e->size()); - geometry.moveCenter(screenSize.center()); - static_cast<QQuickView *>(object)->setGeometry(geometry); - // Pass the event further - } - } - return QObject::eventFilter(object, event); -} - -void Widget::setConfig(const KScreen::ConfigPtr &config, bool showBrightnessFrameFlag) -{ - if (mConfig) { - KScreen::ConfigMonitor::instance()->removeConfig(mConfig); - for (const KScreen::OutputPtr &output : mConfig->outputs()) { - output->disconnect(this); - } - mConfig->disconnect(this); - } - mConfig = config; - mPrevConfig = config->clone(); - mPreScreenConfig = config->clone(); - for (int i = 0; i < BrightnessFrameV.size(); i = 0) { - BrightnessFrameV[BrightnessFrameV.size() - 1]->deleteLater(); - BrightnessFrameV[BrightnessFrameV.size() - 1] = nullptr; - BrightnessFrameV.pop_back(); - } - - changescale(); - KScreen::ConfigMonitor::instance()->addConfig(mConfig); - resetPrimaryCombo(); - connect(mConfig.data(), &KScreen::Config::outputAdded, - this, &Widget::outputAdded); - connect(mConfig.data(), &KScreen::Config::outputRemoved, - this, &Widget::outputRemoved); - for (const KScreen::OutputPtr &output : mConfig->outputs()) { - if (output->isConnected()) { - connect(output.data(), &KScreen::Output::currentModeIdChanged, - this, [=]() { - if (output->currentMode()) { - if (ui->scaleCombo) { - changescale(); - } - } - }); - } - - } - - if (!mIsWayland) { - connect(mConfig.data(), &KScreen::Config::primaryOutputChanged, - this, &Widget::primaryOutputChanged); - } - - // 上面屏幕拿取配置 - mScreen->setConfig(mConfig); - mControlPanel->setConfig(mConfig); - mUnifyButton->setEnabled(mConfig->connectedOutputs().count() > 1); - ui->unionframe->setVisible(mConfig->outputs().count() > 1); - - for (const KScreen::OutputPtr &output : mConfig->outputs()) { - outputAdded(output); - } - - // 择主屏幕输出 - QMLOutput *qmlOutput = mScreen->primaryOutput(); - - if (qmlOutput) { - mScreen->setActiveOutput(qmlOutput); - } else { - if (!mScreen->outputs().isEmpty()) { - mScreen->setActiveOutput(mScreen->outputs().at(0)); - // 择一个主屏幕,避免闪退现象 - primaryButtonEnable(true); - } - } - slotOutputEnabledChanged(); - - if (mFirstLoad && isCloneMode()) { - mUnifyButton->blockSignals(true); - mUnifyButton->setChecked(true); - mUnifyButton->blockSignals(false); - slotUnifyOutputs(); - } - mFirstLoad = false; - - if (showBrightnessFrameFlag == true) { - showBrightnessFrame(); //初始化的时候,显示 - } - - enableChangedSlot(); -} - -KScreen::ConfigPtr Widget::currentConfig() const -{ - return mConfig; -} - -void Widget::loadQml() -{ - qmlRegisterType<QMLOutput>("org.kde.kscreen", 1, 0, "QMLOutput"); - qmlRegisterType<QMLScreen>("org.kde.kscreen", 1, 0, "QMLScreen"); - - qmlRegisterType<KScreen::Output>("org.kde.kscreen", 1, 0, "KScreenOutput"); - qmlRegisterType<KScreen::Edid>("org.kde.kscreen", 1, 0, "KScreenEdid"); - qmlRegisterType<KScreen::Mode>("org.kde.kscreen", 1, 0, "KScreenMode"); - - ui->quickWidget->setSource(QUrl("qrc:/qml/main.qml")); - - QQuickItem *rootObject = ui->quickWidget->rootObject(); - mScreen = rootObject->findChild<QMLScreen *>(QStringLiteral("outputView")); - - connect(mScreen, &QMLScreen::released, this, [=] { - delayApply(); - }); - - if (!mScreen) { - return; - } - connect(mScreen, &QMLScreen::focusedOutputChanged, - this, &Widget::slotFocusedOutputChanged); -} - -void Widget::resetPrimaryCombo() -{ - // Don't emit currentIndexChanged when resetting - bool blocked = ui->primaryCombo->blockSignals(true); - ui->primaryCombo->clear(); - ui->primaryCombo->blockSignals(blocked); - - if (!mConfig) { - return; - } - - for (auto &output: mConfig->outputs()) { - addOutputToPrimaryCombo(output); - } -} - -void Widget::addOutputToPrimaryCombo(const KScreen::OutputPtr &output) -{ - // 注释后让他显示全部屏幕下拉框 - if (!output->isConnected()) { - return; - } - - ui->primaryCombo->addItem(Utils::outputName(output), output->id()); - if (output->isPrimary() && !mIsWayland) { - Q_ASSERT(mConfig); - int lastIndex = ui->primaryCombo->count() - 1; - ui->primaryCombo->setCurrentIndex(lastIndex); - } -} - -// 这里从屏幕点击来读取输出 -void Widget::slotFocusedOutputChanged(QMLOutput *output) -{ - mControlPanel->activateOutput(output->outputPtr()); - - // 读取屏幕点击选择下拉框 - Q_ASSERT(mConfig); - int index = output->outputPtr().isNull() ? 0 : ui->primaryCombo->findData(output->outputPtr()->id()); - if (index == -1 || index == ui->primaryCombo->currentIndex()) { - return; - } - ui->primaryCombo->setCurrentIndex(index); -} - -void Widget::slotOutputEnabledChanged() -{ - // 点击禁用屏幕输出后的改变 - resetPrimaryCombo(); - setActiveScreen(mKDSCfg); - int enabledOutputsCount = 0; - Q_FOREACH (const KScreen::OutputPtr &output, mConfig->outputs()) { - for (int i = 0; i < BrightnessFrameV.size(); ++i) { - if (BrightnessFrameV[i]->outputName == Utils::outputName(output)){ - if (!output->isEnabled()) - BrightnessFrameV[i]->openFlag = false; - else - BrightnessFrameV[i]->openFlag = true; - } - } - if (output->isEnabled()) { - ++enabledOutputsCount; - } - if (enabledOutputsCount > 1) { - break; - } - } - mUnifyButton->setEnabled(screenEnableCount() > 1); - ui->unionframe->setVisible(screenEnableCount() > 1); - showBrightnessFrame(10); -} - -void Widget::slotOutputConnectedChanged() -{ - resetPrimaryCombo(); -} - -// 更改方向,再更改分辨率重叠问题 -void Widget::slotQmloutOutChanged() -{ - QMLOutput *output = mScreen->primaryOutput(); - if (output != nullptr && !output->outputPtr().isNull()) { - mScreen->setScreenPosCenter(output, false); - } - -} - -void Widget::slotUnifyOutputs() -{ - QMLOutput *base = mScreen->primaryOutput(); - - QList<int> clones; - - if (!base) { - for (QMLOutput *output: mScreen->outputs()) { - if (output->output()->isConnected() && output->output()->isEnabled()) { - base = output; - break; - } - } - if (!base) { - // WTF? - return; - } - } - - // 取消统一输出 - if (!mUnifyButton->isChecked()) { - KScreen::OutputList screens = mPrevConfig->connectedOutputs(); - if (mKDSCfg.isEmpty()) { - if (!getPreScreenCfg().isEmpty()) { - QList<ScreenConfig> preScreenCfg = getPreScreenCfg(); - int posX = preScreenCfg.at(0).screenPosX; - bool isOverlap = false; - for (int i = 1; i< preScreenCfg.count(); i++) { - if (posX == preScreenCfg.at(i).screenPosX) { - isOverlap = true; - setScreenKDS("expand"); - break; - } - } - Q_FOREACH(ScreenConfig cfg, preScreenCfg) { - Q_FOREACH(KScreen::OutputPtr output, screens) { - if (!cfg.screenId.compare(output->name()) && !isOverlap) { - output->setCurrentModeId(cfg.screenModeId); - output->setPos(QPoint(cfg.screenPosX, cfg.screenPosY)); - } - } - } - } - - QPoint raw(0,0); - int originCount = 0; - Q_FOREACH(KScreen::OutputPtr output, screens) { - if (output->pos() == raw) { - originCount++; - } - if (originCount >= 2) { - setScreenKDS("expand"); - } - } - } - - setConfig(mPrevConfig); - - ui->primaryCombo->setEnabled(true); - mCloseScreenButton->setEnabled(true); - ui->showMonitorframe->setVisible(true); - ui->primaryCombo->setEnabled(true); - } else if (mUnifyButton->isChecked()) { - // Clone the current config, so that we can restore it in case user - // breaks the cloning - mPrevConfig = mConfig->clone(); - - if (!mFirstLoad && !mIsOutputAdd && mKDSCfg.isEmpty()) { - setPreScreenCfg(mPrevConfig->connectedOutputs()); - } - - for (QMLOutput *output: mScreen->outputs()) { - if (output != mScreen->primaryOutput() && mScreen->primaryOutput()) { - output->output()->setRotation(mScreen->primaryOutput()->output()->rotation()); - } - - if (!output->output()->isConnected()) { - continue; - } - - if (!output->output()->isEnabled()) { - output->setVisible(false); - continue; - } - - if (!base) { - base = output; - } - - output->setOutputX(0); - output->setOutputY(0); - output->output()->setPos(QPoint(0, 0)); - output->output()->setClones(QList<int>()); - - if (base != output) { - clones << output->output()->id(); - output->setCloneOf(base); - output->setVisible(false); - } - } - - base->output()->setClones(clones); - - base->setIsCloneMode(true); - - mScreen->updateOutputsPlacement(); - - // 关闭开关 - mCloseScreenButton->setEnabled(false); - ui->showMonitorframe->setVisible(false); - ui->primaryCombo->setEnabled(false); - ui->mainScreenButton->setEnabled(false); - mControlPanel->setUnifiedOutput(base->outputPtr()); - } -} - -// FIXME: Copy-pasted from KDED's Serializer::findOutput() -KScreen::OutputPtr Widget::findOutput(const KScreen::ConfigPtr &config, const QVariantMap &info) -{ - KScreen::OutputList outputs = config->outputs(); - Q_FOREACH (const KScreen::OutputPtr &output, outputs) { - if (!output->isConnected()) { - continue; - } - - const QString outputId - = (output->edid() - && output->edid()->isValid()) ? output->edid()->hash() : output->name(); - if (outputId != info[QStringLiteral("id")].toString()) { - continue; - } - - QVariantMap posInfo = info[QStringLiteral("pos")].toMap(); - QPoint point(posInfo[QStringLiteral("x")].toInt(), posInfo[QStringLiteral("y")].toInt()); - output->setPos(point); - output->setPrimary(info[QStringLiteral("primary")].toBool()); - output->setEnabled(info[QStringLiteral("enabled")].toBool()); - output->setRotation(static_cast<KScreen::Output::Rotation>(info[QStringLiteral("rotation")]. - toInt())); - - QVariantMap modeInfo = info[QStringLiteral("mode")].toMap(); - QVariantMap modeSize = modeInfo[QStringLiteral("size")].toMap(); - QSize size(modeSize[QStringLiteral("width")].toInt(), - modeSize[QStringLiteral("height")].toInt()); - - const KScreen::ModeList modes = output->modes(); - Q_FOREACH (const KScreen::ModePtr &mode, modes) { - if (mode->size() != size) { - continue; - } - if (QString::number(mode->refreshRate()) - != modeInfo[QStringLiteral("refresh")].toString()) { - continue; - } - - output->setCurrentModeId(mode->id()); - break; - } - return output; - } - - return KScreen::OutputPtr(); -} - -void Widget::setHideModuleInfo() -{ - mCPU = getCpuInfo(); - if (!mCPU.startsWith(kCpu, Qt::CaseInsensitive)) { - ui->quickWidget->setAttribute(Qt::WA_AlwaysStackOnTop); - ui->quickWidget->setClearColor(Qt::transparent); - } -} - -void Widget::setTitleLabel() -{ - - //~ contents_path /display/monitor - ui->primaryLabel->setText(tr("monitor")); - - //~ contents_path /display/screen zoom - ui->scaleLabel->setText(tr("screen zoom")); -} -void Widget::writeScale(double scale) -{ - if (scale != scaleGSettings->get(SCALE_KEY).toDouble()) { - mIsScaleChanged = true; - } - - if (mIsScaleChanged) { - if (!mIsChange) { - showZoomtips(); - } else { - // 非主动切换缩放率,则不弹提示弹窗 - mIsChange = false; - } - } else { - return; - } - - mIsScaleChanged = false; - int cursize; - QByteArray iid(MOUSE_SIZE_SCHEMAS); - if (QGSettings::isSchemaInstalled(MOUSE_SIZE_SCHEMAS)) { - QGSettings cursorSettings(iid); - - if (1.0 == scale) { - cursize = 24; - } else if (2.0 == scale) { - cursize = 48; - } else if (3.0 == scale) { - cursize = 96; - } else { - cursize = 24; - } - - QStringList keys = scaleGSettings->keys(); - if (keys.contains("scalingFactor")) { - - scaleGSettings->set(SCALE_KEY, scale); - } - cursorSettings.set(CURSOR_SIZE_KEY, cursize); - UkccCommon::setKwinMouseSize(cursize); - } -} - -void Widget::initGSettings() -{ - QByteArray id(UKUI_CONTORLCENTER_PANEL_SCHEMAS); - if (QGSettings::isSchemaInstalled(id)) { - mGsettings = new QGSettings(id, QByteArray(), this); - if (mGsettings->keys().contains(THEME_NIGHT_KEY)) { - mThemeButton->setChecked(mGsettings->get(THEME_NIGHT_KEY).toBool()); - } - } else { - qDebug() << Q_FUNC_INFO << "org.ukui.control-center.panel.plugins not install"; - return; - } - - QByteArray powerId(POWER_SCHMES); - if (QGSettings::isSchemaInstalled(powerId)) { - mPowerGSettings = new QGSettings(powerId, QByteArray(), this); - mPowerKeys = mPowerGSettings->keys(); - connect(mPowerGSettings, &QGSettings::changed, this, [=](QString key) { - if ("brightnessAc" == key || "brightnessBat" == key) { - int value = mPowerGSettings->get(key).toInt(); - if (mIsWayland && !mIsBattery) { - value = (value == 0 ? 0 : value / 10); - } - - for (int i = 0; i < BrightnessFrameV.size(); ++i) { - if (BrightnessFrameV[i]->outputName == "eDP") { - BrightnessFrameV[i]->slider->blockSignals(true); - BrightnessFrameV[i]->setTextLableValue(QString::number(value)); - BrightnessFrameV[i]->slider->setValue(value); - BrightnessFrameV[i]->slider->blockSignals(false); - } - } - } - }); - } - - QByteArray scaleId(FONT_RENDERING_DPI); - if (QGSettings::isSchemaInstalled(scaleId)) { - scaleGSettings = new QGSettings(scaleId, QByteArray(), this); - } -} - -void Widget::initNightUI() -{ - //~ contents_path /display/unify output - ui->unifyLabel->setText(tr("Mirror Display")); - - QHBoxLayout *nightLayout = new QHBoxLayout(ui->nightframe); - //~ contents_path /display/night mode - nightLabel = new QLabel(tr("night mode"), this); - mNightButton = new KSwitchButton(this); - nightLayout->addWidget(nightLabel); - nightLayout->addStretch(); - nightLayout->addWidget(mNightButton); - - QHBoxLayout *themeLayout = new QHBoxLayout(ui->themeFrame); - mThemeButton = new KSwitchButton(this); - themeLayout->addWidget(new QLabel(tr("Theme follow night mode"))); - themeLayout->addStretch(); - themeLayout->addWidget(mThemeButton); -} - -bool Widget::isRestoreConfig() -{ - int cnt = 30; - int ret; - MainWindow *mainWindow = static_cast<MainWindow*>(this->topLevelWidget()); - QMessageBox msg; - QPushButton *saveBtn = msg.addButton(tr("Save"), QMessageBox::AcceptRole); - QPushButton *canelBtn = msg.addButton(tr("Not Save"), QMessageBox::RejectRole); - msg.setDefaultButton(saveBtn); - saveBtn->setFocusPolicy(Qt::TabFocus); - canelBtn->setFocusPolicy(Qt::TabFocus); - connect(mainWindow, &MainWindow::posChanged, this, [=,&msg]() { - QTimer::singleShot(8, this, [=,&msg]() { //窗管会移动窗口,等待8ms,确保在窗管移动之后再move,时间不能太长,否则会看到移动的路径 - QRect rect = this->topLevelWidget()->geometry(); - int msgX = 0, msgY = 0; - msgX = rect.x() + rect.width()/2 - msg.width()/2; - msgY = rect.y() + rect.height()/2 - (msg.height()+40)/2; - msg.move(msgX, msgY); - }); - }); - - if (mConfigChanged && !mIsUnifyChanged) { - QString config_name; - switch (changeItm) { - case 0: - config_name = tr("resolution"); - break; - case 1: - config_name = tr("orientation"); - break; - case 2: - config_name = tr("frequency"); - break; - } - msg.setIcon(QMessageBox::Warning); - msg.setText(QString(tr("The screen %1 has been modified, whether to save it ? " - "<br/>" - "<font style= 'color:#626c6e'>the settings will be saved after 29 seconds</font>")).arg(config_name)); - - QTimer cntDown; - QObject::connect(&cntDown, &QTimer::timeout, [&msg, &cnt, &cntDown, &ret ,&config_name]()->void { - if (--cnt < 0) { - cntDown.stop(); - msg.hide(); - msg.close(); - } else { - msg.setText(QString(tr("The screen %1 has been modified, whether to save it ? " - "<br/>" - "<font style= 'color:#626c6e'>the settings will be saved after %2 seconds</font>")).arg(config_name).arg(cnt)); - msg.show(); - } - }); - cntDown.start(1000); - QTimer::singleShot(100, this, [=,&msg]() { //延时获取msg的size - QRect rect = this->topLevelWidget()->geometry(); - int msgX = 0, msgY = 0; - msgX = rect.x() + rect.width()/2 - msg.width()/2; - msgY = rect.y() + rect.height()/2 - (msg.height()+40)/2; - msg.move(msgX, msgY); - }); - ret = msg.exec(); - } - disconnect(mainWindow, &MainWindow::posChanged, 0, 0); - - bool res = false; - switch (ret) { - case QMessageBox::AcceptRole: - res = false; - break; - case QMessageBox::RejectRole: - if (mIsSCaleRes) { - QStringList keys = scaleGSettings->keys(); - if (keys.contains("scalingFactor")) { - scaleGSettings->set(SCALE_KEY,scaleres); - } - mIsSCaleRes = false; - } - res = true; - break; - } - return res; -} - -QString Widget::getCpuInfo() -{ - return Utils::getCpuInfo(); -} - -bool Widget::isCloneMode() -{ - KScreen::OutputPtr output = mConfig->primaryOutput(); - if (mConfig->connectedOutputs().count() >= 2) { - foreach (KScreen::OutputPtr secOutput, mConfig->connectedOutputs()) { - if (secOutput->geometry() != output->geometry() || !secOutput->isEnabled()) { - return false; - } - } - } else { - return false; - } - return true; -} - -bool Widget::isBacklight() -{ - QString cmd = "ukui-power-backlight-helper --get-max-brightness"; - QProcess process; - process.start(cmd); - process.waitForFinished(); - QString result = process.readAllStandardOutput().trimmed(); - - QString pattern("^[0-9]*$"); - QRegExp reg(pattern); - - return reg.exactMatch(result); -} - -QString Widget::getMonitorType() -{ - QString monitor = ui->primaryCombo->currentText(); - QString type; - if (monitor.contains("VGA", Qt::CaseInsensitive)) { - type = "4"; - } else { - type = "8"; - } - return type; -} - -bool Widget::isLaptopScreen() -{ - const QString &monitor = ui->primaryCombo->currentText(); - if (monitor == "eDP") { - return true; - } - return false; -} - -bool Widget::isVisibleBrightness() -{ - if ((mIsBattery && isLaptopScreen()) - || (mIsWayland && !mIsBattery) - || (!mIsWayland && mIsBattery)) { - return true; - } - return false; -} - -int Widget::getDDCBrighthess() -{ - QString type = getMonitorType(); - QDBusInterface ukccIfc("com.control.center.qt.systemdbus", - "/", - "com.control.center.interface", - QDBusConnection::systemBus()); - - QDBusReply<int> reply = ukccIfc.call("getDDCBrightness", type); - - if (reply.isValid()) { - return reply.value(); - } - return 0; -} - -int Widget::getDDCBrighthess(QString name) -{ - QString type; - int times = 100; - if (name.contains("VGA", Qt::CaseInsensitive)) { - type = "4"; - } else { - type = "8"; - } - QDBusInterface ukccIfc("com.control.center.qt.systemdbus", - "/", - "com.control.center.interface", - QDBusConnection::systemBus()); - - while (--times) { - if (exitFlag == true) - return -1; - for (int i = 0; i < deleteFrameNameV.size(); ++i) { - if (name == deleteFrameNameV[i]) { //该屏幕已经被remove - deleteFrameNameV.remove(i); - return -1; - } - } - QDBusReply<int> reply = ukccIfc.call("getDDCBrightness", type); - if (reply.isValid() && reply.value() > 0) { - return reply.value(); - } - usleep(80000); - } - return 0; -} - -int Widget::getDDCBrighthess(QString edidHash, QString i2cBus) { - int times = 600; - QDBusInterface ukccIfc("com.control.center.qt.systemdbus", - "/", - "com.control.center.interface", - QDBusConnection::systemBus()); - QDBusReply<int> reply; - while (times) { - //防止调用terminate不会结束线程,锁屏在龙芯架构上出现过 - if (exitFlag) { - return -1; - } - if (times %10 != 0) { - times--; - usleep(100000); - continue; - } - if (i2cBus == "") { - return -1; - } - reply = ukccIfc.call("getDisplayBrightness", edidHash, i2cBus); - if (reply.isValid() && reply.value() >= 0 && reply.value() <= 100) { - return reply.value(); - } - times--; - usleep(100000); - } - return -1; -} - -int Widget::getLaptopBrightness() const -{ - return mPowerGSettings->get(POWER_KEY).toInt(); -} - -void Widget::showNightWidget(bool judge) -{ - if (judge) { - ui->sunframe->setVisible(true); - ui->customframe->setVisible(true); - ui->temptframe->setVisible(true); - ui->themeFrame->setVisible(false); - } else { - ui->sunframe->setVisible(false); - ui->customframe->setVisible(false); - ui->temptframe->setVisible(false); - ui->themeFrame->setVisible(false); - } - - if (judge && ui->customradioBtn->isChecked()) { - showCustomWiget(CUSTOM); - } else { - showCustomWiget(SUN); - } -} - -void Widget::showCustomWiget(int index) -{ - if (SUN == index) { - ui->opframe->setVisible(false); - ui->clsframe->setVisible(false); - } else if (CUSTOM == index) { - ui->opframe->setVisible(true); - ui->clsframe->setVisible(true); - } -} - -void Widget::slotThemeChanged(bool judge) -{ - if (mGsettings->keys().contains(THEME_NIGHT_KEY)) { - mGsettings->set(THEME_NIGHT_KEY, judge); - } -} - -void Widget::clearOutputIdentifiers() -{ - mOutputTimer->stop(); - qDeleteAll(mOutputIdentifiers); - mOutputIdentifiers.clear(); -} - -void Widget::addBrightnessFrame(QString name, bool openFlag, const KScreen::OutputPtr &output, QString i2cBus) -{ - if (mIsBattery && name != "eDP") //笔记本非内置 - return; - - for (int i = 0; i < BrightnessFrameV.size(); ++i) { //已经有了 - if (name == BrightnessFrameV[i]->outputName ) - return; - } - BrightnessFrame *frame = new BrightnessFrame; - frame->openFlag = openFlag; - frame->setTextLableValue("0"); //最低亮度10,获取前为0 - BrightnessFrameV.push_back(frame); - - for (int i = 0; i < deleteFrameNameV.size(); ++i) { - if (deleteFrameNameV[i] == name) { - deleteFrameNameV.remove(i); - } - } - if (mIsBattery && name == "eDP") { - frame->outputName = name; - int initValue = mPowerGSettings->get(POWER_KEY).toInt(); - frame->setTextLableValue(QString::number(initValue)); - frame->slider->setValue(initValue); - ui->unifyBrightLayout->addWidget(frame); - connect(frame->slider, &QSlider::valueChanged, this, [=](){ - qDebug()<<name<<"brightness"<<" is changed, value = "<<frame->slider->value(); - mPowerGSettings->set(POWER_KEY, frame->slider->value()); - frame->setTextLableValue(QString::number(mPowerGSettings->get(POWER_KEY).toInt())); - }); - } else if(!mIsBattery && output) { - frame->outputName = name; - ui->unifyBrightLayout->addWidget(frame); - frame->slider->setValue(10); - if (output->supportBrightness()) { - QtConcurrent::run([=]{ - int initValue = output->brightness(); - if (initValue == -1 || frame == nullptr) - return; - frame->slider->setValue(initValue); - frame->setTextLableValue(QString::number(initValue)); - connect(frame->slider, &QSlider::valueChanged, this, [=](){ - qDebug()<<name<<"brightness"<<" is changed, value = "<<frame->slider->value(); - frame->setTextLableValue(QString::number(frame->slider->value())); - output->setBrightness(frame->slider->value()); - setKscreenConfig(this->currentConfig()); - Q_FOREACH (const KScreen::OutputPtr &pOutput, mPrevConfig->outputs()) { - if (Utils::outputName(pOutput) == name) { - pOutput->setBrightness(frame->slider->value()); - } - } - }); - }); - } else { - frame->slider->setEnabled(false); - //使用DDC - QtConcurrent::run([=]{ - if (openFlag == false) - return; - - int initValue = getDDCBrighthess("", i2cBus); - if (initValue == -1 || frame == nullptr) - return; - - frame->slider->setEnabled(true); - frame->slider->setValue(initValue); - frame->setTextLableValue(QString::number(initValue)); - connect(frame->slider, &QSlider::valueChanged, this, [=](){ - qDebug()<<name<<"brightness"<<" is changed, value = "<<frame->slider->value(); - frame->setTextLableValue(QString::number(frame->slider->value())); - setDDCBrightnessN(frame->slider->value(), "", i2cBus); - }); - }); - } - } -} - -void Widget::outputAdded(const KScreen::OutputPtr &output) -{ - getAllI2Cbus(); - mPreScreenConfig = mConfig->clone(); - QString name = Utils::outputName(output); - QMap<QString, QString>::iterator it; - QString outPutI2cBus = ""; - for (it = I2CbusMap.begin(); it != I2CbusMap.end(); it++) { - if (name.contains(it.key(), Qt::CaseInsensitive)) { - outPutI2cBus = it.value(); - break; - } - } - addBrightnessFrame(name, output->isEnabled(), output, outPutI2cBus); - // 刷新缩放选项,监听新增显示屏的mode变化 - changescale(); - if (output->isConnected()) { - connect(output.data(), &KScreen::Output::currentModeIdChanged, - this, [=]() { - if (output->currentMode()) { - if (ui->scaleCombo) { - ui->scaleCombo->blockSignals(true); - changescale(); - ui->scaleCombo->blockSignals(false); - } - } - }); - } - - // 刷新缩放选项,监听新增显示屏的mode变化 - changescale(); - if (output->isConnected()) { - connect(output.data(), &KScreen::Output::currentModeIdChanged, - this, [=]() { - if (output->currentMode()) { - if (ui->scaleCombo) { - ui->scaleCombo->blockSignals(true); - changescale(); - ui->scaleCombo->blockSignals(false); - } - } - }); - } - - connect(output.data(), &KScreen::Output::isConnectedChanged, - this, &Widget::slotOutputConnectedChanged); - connect(output.data(), &KScreen::Output::isEnabledChanged, - this, &Widget::slotOutputEnabledChanged); - - addOutputToPrimaryCombo(output); - - // 检查统一输出-防止多显示屏幕 - if (mUnifyButton->isChecked()) { - for (QMLOutput *qmlOutput: mScreen->outputs()) { - if (!qmlOutput->output()->isConnected()) { - continue; - } - if (!qmlOutput->isCloneMode()) { - qmlOutput->blockSignals(true); - qmlOutput->setVisible(false); - qmlOutput->blockSignals(false); - } - } - } - - ui->unionframe->setVisible(screenEnableCount() > 1); - mUnifyButton->setEnabled(screenEnableCount() > 1); - - if (!mFirstLoad) { - QTimer::singleShot(1500, this, [=] { - mIsOutputAdd = true; - mainScreenButtonSelect(ui->primaryCombo->currentIndex()); - mUnifyButton->setChecked(isCloneMode()); - mIsOutputAdd = false; - }); - } - showBrightnessFrame(); -} - -void Widget::outputRemoved(int outputId) -{ - // 刷新缩放选项 - changescale(); - - KScreen::OutputPtr output = mConfig->output(outputId); - if (!output.isNull()) { - output->disconnect(this); - } - - const int index = ui->primaryCombo->findData(outputId); - if (index == -1) { - return; - } - - if (index == ui->primaryCombo->currentIndex()) { - // We'll get the actual primary update signal eventually - // Don't emit currentIndexChanged - const bool blocked = ui->primaryCombo->blockSignals(true); - ui->primaryCombo->setCurrentIndex(0); - ui->primaryCombo->blockSignals(blocked); - } - - QString name = ui->primaryCombo->itemText(index); - for (int i = 0; i < BrightnessFrameV.size(); ++i) { - if (BrightnessFrameV[i]->outputName == name) { - delete BrightnessFrameV[i]; - BrightnessFrameV[i] = nullptr; - BrightnessFrameV.remove(i); - bool existFlag = false; - for (int i = 0; i < deleteFrameNameV.size(); ++i) { - if (deleteFrameNameV[i] == name) { - existFlag = true; - break; - } - } - if (existFlag == false) - deleteFrameNameV.push_back(name); - } - } - ui->primaryCombo->removeItem(index); - - // 检查统一输出-防止移除后没有屏幕可显示 - if (mUnifyButton->isChecked()) { - for (QMLOutput *qmlOutput: mScreen->outputs()) { - if (!qmlOutput->output()->isConnected()) { - continue; - } - qmlOutput->setIsCloneMode(false); - qmlOutput->blockSignals(true); - qmlOutput->setVisible(true); - qmlOutput->blockSignals(false); - } - } - ui->unionframe->setVisible(mConfig->connectedOutputs().count() > 1); - mUnifyButton->blockSignals(true); - mUnifyButton->setChecked(mConfig->connectedOutputs().count() > 1); - mUnifyButton->blockSignals(false); - mainScreenButtonSelect(ui->primaryCombo->currentIndex()); - // 在双屏下拔掉显示器,然后更改配置应用,恢复到原来配置崩溃 - mPreScreenConfig = mConfig->clone(); - showBrightnessFrame(); -} - -void Widget::primaryOutputSelected(int index) -{ - if (!mConfig) { - return; - } - - const KScreen::OutputPtr newPrimary = index == 0 ? KScreen::OutputPtr() : mConfig->output(ui->primaryCombo->itemData(index).toInt()); - if (newPrimary == mConfig->primaryOutput()) { - return; - } - - mConfig->setPrimaryOutput(newPrimary); -} - -// 主输出 -void Widget::primaryOutputChanged(const KScreen::OutputPtr &output) -{ - Q_ASSERT(mConfig); - int index = output.isNull() ? 0 : ui->primaryCombo->findData(output->id()); - if (index == -1 || index == ui->primaryCombo->currentIndex()) { - return; - } - ui->primaryCombo->setCurrentIndex(index); -} - -void Widget::slotIdentifyButtonClicked(bool checked) -{ - Q_UNUSED(checked); - connect(new KScreen::GetConfigOperation(), &KScreen::GetConfigOperation::finished, - this, &Widget::slotIdentifyOutputs); -} - -void Widget::slotIdentifyOutputs(KScreen::ConfigOperation *op) -{ - if (op->hasError()) { - return; - } - - const KScreen::ConfigPtr config = qobject_cast<KScreen::GetConfigOperation *>(op)->config(); - - const QString qmlPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral(QML_PATH "OutputIdentifier.qml")); - - mOutputTimer->stop(); - clearOutputIdentifiers(); - - /* Obtain the current active configuration from KScreen */ - Q_FOREACH (const KScreen::OutputPtr &output, config->outputs()) { - if (!output->isConnected() || !output->currentMode()) { - continue; - } - - const KScreen::ModePtr mode = output->currentMode(); - - QQuickView *view = new QQuickView(); - - view->setFlags(Qt::X11BypassWindowManagerHint | Qt::FramelessWindowHint); - view->setResizeMode(QQuickView::SizeViewToRootObject); - view->setSource(QUrl::fromLocalFile(qmlPath)); - view->installEventFilter(this); - - QQuickItem *rootObj = view->rootObject(); - if (!rootObj) { - qWarning() << "Failed to obtain root item"; - continue; - } - - QSize deviceSize, logicalSize; - if (output->isHorizontal()) { - deviceSize = mode->size(); - } else { - deviceSize = QSize(mode->size().height(), mode->size().width()); - } - -#if QT_VERSION <= QT_VERSION_CHECK(5, 12, 0) -#else - if (config->supportedFeatures() & KScreen::Config::Feature::PerOutputScaling) { - // no scale adjustment needed on Wayland - logicalSize = deviceSize; - } else { - logicalSize = deviceSize / devicePixelRatioF(); - } -#endif - - rootObj->setProperty("outputName", Utils::outputName(output)); - rootObj->setProperty("modeName", Utils::sizeToString(deviceSize)); - -#if QT_VERSION <= QT_VERSION_CHECK(5, 12, 0) - view->setProperty("screenSize", QRect(output->pos(), deviceSize)); -#else - view->setProperty("screenSize", QRect(output->pos(), logicalSize)); -#endif - - mOutputIdentifiers << view; - } - - for (QQuickView *view: mOutputIdentifiers) { - view->show(); - } - - mOutputTimer->start(2500); -} - -void Widget::isWayland() -{ - QString sessionType = getenv("XDG_SESSION_TYPE"); - - if (!sessionType.compare(kSession, Qt::CaseSensitive)) { - mIsWayland = true; - } else { - mIsWayland = false; - } -} - - -void Widget::setDDCBrightnessN(int value, QString screenName) -{ - QString type; - if (screenName.contains("VGA", Qt::CaseInsensitive)) { - type = "4"; - } else { - type = "8"; - } - QDBusInterface ukccIfc("com.control.center.qt.systemdbus", - "/", - "com.control.center.interface", - QDBusConnection::systemBus()); - - - if (mLock.tryLock()) { - ukccIfc.call("setDDCBrightness", QString::number(value), type); - mLock.unlock(); - } -} - -void Widget::setDDCBrightnessN(int value, QString edidHash, QString i2cBus) -{ - if (i2cBus == "") - return; - - QDBusInterface ukccIfc("com.control.center.qt.systemdbus", - "/", - "com.control.center.interface", - QDBusConnection::systemBus()); - - - if (mLock.tryLock()) { - ukccIfc.call("setDisplayBrightness", QString::number(value), edidHash, i2cBus); - mLock.unlock(); - } - -} - -void Widget::setScreenKDS(QString kdsConfig) -{ - KScreen::OutputList screens = mConfig->connectedOutputs(); - int firstScreenID = screens.begin().key(); - int endScreenID = screens.end().key(); - if (kdsConfig == "expand") { - Q_FOREACH(KScreen::OutputPtr output, screens) { - if (!output.isNull() && !mUnifyButton->isChecked()) { - output->setEnabled(true); - output->setCurrentModeId("0"); - } - } - - KScreen::OutputList screensPre = mPrevConfig->connectedOutputs(); - - KScreen::OutputPtr mainScreen = mPrevConfig->primaryOutput(); - if (!mainScreen.isNull()) { - mainScreen->setPos(QPoint(0, 0)); - } - - KScreen::OutputPtr preIt = mainScreen; - QMap<int, KScreen::OutputPtr>::iterator nowIt = screensPre.begin(); - - while (nowIt != screensPre.end()) { - if (nowIt.value() != mainScreen) { - nowIt.value()->setPos(QPoint(preIt->pos().x() + preIt->size().width(), 0)); - KScreen::ModeList modes = preIt->modes(); - Q_FOREACH (const KScreen::ModePtr &mode, modes) { - if (preIt->currentModeId() == mode->id()) { - if (preIt->rotation() != KScreen::Output::Rotation::Left && preIt->rotation() != KScreen::Output::Rotation::Right) { - nowIt.value()->setPos(QPoint(preIt->pos().x() + mode->size().width(), 0)); - } else { - nowIt.value()->setPos(QPoint(preIt->pos().x() + mode->size().height(), 0)); - } - } - } - preIt = nowIt.value(); - } - nowIt++; - } - } else if (kdsConfig == "first") { - QMapIterator<int, KScreen::OutputPtr> firstIt(screens); - while (firstIt.hasNext()) { - firstIt.next(); - firstIt.value()->setEnabled(firstIt.key() == firstScreenID); - } - } else if (kdsConfig == "second") { - QMapIterator<int, KScreen::OutputPtr> endIt(screens); - while (endIt.hasNext()) { - endIt.next(); - endIt.value()->setEnabled(endIt.key() == endScreenID); - } - } else { - Q_FOREACH(KScreen::OutputPtr output, screens) { - if (!output.isNull()) { - output->setEnabled(true); - } - } - } - delayApply(); -} - -void Widget::setActiveScreen(QString status) -{ - int activeScreenId = 1; - int enableCount = 0; - int connectCount = 0; - Q_FOREACH(const KScreen::OutputPtr &output, mConfig->connectedOutputs()) { - connectCount++; - enableCount = (output->isEnabled() ? (++enableCount) : enableCount); - } - - if (status == "second") { - activeScreenId = connectCount; - } - - for (int index = 0; index <= ui->primaryCombo->count(); index++) { - KScreen::OutputPtr output = mConfig->output(ui->primaryCombo->itemData(index).toInt()); - if (status.isEmpty() && connectCount > enableCount && !output.isNull() && output->isEnabled()) { - ui->primaryCombo->setCurrentIndex(index); - } - - if (!status.isEmpty() && !output.isNull() && activeScreenId == output->id()) { - ui->primaryCombo->setCurrentIndex(index); - } - } -} - -QList<ScreenConfig> Widget::getPreScreenCfg() -{ - QDBusMessage msg = mUkccInterface.get()->call("getPreScreenCfg"); - if(msg.type() == QDBusMessage::ErrorMessage) { - qWarning() << "get pre screen cfg failed"; - } - QDBusArgument argument = msg.arguments().at(0).value<QDBusArgument>(); - QList<QVariant> infos; - argument >> infos; - - QList<ScreenConfig> preScreenCfg; - for (int i = 0; i < infos.size(); i++){ - ScreenConfig cfg; - infos.at(i).value<QDBusArgument>() >> cfg; - preScreenCfg.append(cfg); - } - - return preScreenCfg; -} - -void Widget::setPreScreenCfg(KScreen::OutputList screens) -{ - QMap<int, KScreen::OutputPtr>::iterator nowIt = screens.begin(); - - QVariantList retlist; - int enableCount = 0; - while (nowIt != screens.end()) { - ScreenConfig cfg; - cfg.screenId = nowIt.value()->name(); - cfg.screenModeId = nowIt.value()->currentModeId(); - cfg.screenPosX = nowIt.value()->pos().x(); - cfg.screenPosY = nowIt.value()->pos().y(); - cfg.primary = nowIt.value()->isPrimary(); - - QVariant variant = QVariant::fromValue(cfg); - retlist << variant; - if (nowIt.value()->isEnabled()) { - enableCount++; - } - nowIt++; - } - if (enableCount < 2) { - return; - } - - mUkccInterface.get()->call("setPreScreenCfg", retlist); - - QVariantList outputList; - Q_FOREACH(QVariant variant, retlist) { - ScreenConfig screenCfg = variant.value<ScreenConfig>(); - QVariantMap map; - map["id"] = screenCfg.screenId; - map["modeid"] = screenCfg.screenModeId; - map["x"] = screenCfg.screenPosX; - map["y"] = screenCfg.screenPosY; - map["primary"] = screenCfg.primary; - outputList << map; - } - - QString filePath = QDir::homePath() + "/.config/ukui/ukcc-screenPreCfg.json"; - QFile file(filePath); - if (!file.open(QIODevice::WriteOnly)) { - qWarning() << "Failed to open config file for writing! " << file.errorString(); - - } - file.write(QJsonDocument::fromVariant(outputList).toJson()); -} - -void Widget::setScreenIsApply(bool isApply) -{ - mIsScreenAdd = !isApply; -} - -int Widget::screenEnableCount() -{ - int enableCount = 0; - Q_FOREACH(KScreen::OutputPtr output, mConfig->connectedOutputs()) { - if (output->isEnabled()) { - enableCount++; - } - } - return enableCount; -} - -void Widget::setExtendPrimaryScreen() -{ - QVector<KScreen::Output *> outputs; - Q_FOREACH (const auto &output, mConfig->outputs()) { - outputs << output.data(); - } - - QCryptographicHash hash(QCryptographicHash::Md5); - Q_FOREACH (const KScreen::Output *output, outputs) { - hash.addData(output->uuid()); - } - QByteArray groupUuid = QByteArray(1, '0').append(hash.result().toHex()).left(15); - const auto config = KSharedConfig::openConfig(QLatin1String("ukui-kwinrc")); - const auto outputGroup = config->group("DrmOutputs"); - const auto configGroup = outputGroup.group(groupUuid); - - Q_FOREACH (const auto &output, outputs) { - const auto outputConfig = configGroup.group(output->uuid()); - bool primary = outputConfig.readEntry<bool>("Primary", false); - if (primary) { - output->setPrimary(true); - } - } -} - -void Widget::showZoomtips() -{ - int ret; - QMessageBox msg(this->topLevelWidget()); - msg.setWindowTitle(tr("Hint")); - msg.setIcon(QMessageBox::Warning); - msg.setText(tr("The zoom has been modified, it will take effect after you log off")); - msg.addButton(tr("Log out now"), QMessageBox::AcceptRole); - msg.addButton(tr("Later"), QMessageBox::RejectRole); - - ret = msg.exec(); - - switch (ret) { - case QMessageBox::AcceptRole: - system("ukui-session-tools --logout"); - break; - case QMessageBox::RejectRole: - break; - } -} - -//通过win+p修改,不存在按钮影响亮度显示的情况,直接就应用了,此时每个屏幕的openFlag是没有修改的,需要单独处理(setScreenKDS) -void Widget::kdsScreenchangeSlot(QString status) -{ - qDebug() << Q_FUNC_INFO << "changed by kds"; - if (!status.compare(mPreKDSCfg)) { - return; - } - if (!mUnifyButton->isChecked()) { - setPreScreenCfg(mConfig->connectedOutputs()); - } - //fix bug#107519,由于从镜像变为扩展之后,UnifiedOutputCfg监听到currentModeId改变从而修改了分辨率导致 - if (status != "copy") { - mControlPanel->deleteUnifiedOutputCfg(); - } - QTimer::singleShot(2500, this, [=] { - bool isPreChecked = mUnifyButton->isChecked(); - bool isCheck = (status == "copy") ? true : false; - mKDSCfg = status; - mPreKDSCfg = status; - mPrevConfig = mConfig->clone(); - if (mConfig->connectedOutputs().count() >= 2) { - mUnifyButton->setChecked(isCheck); - } - bool afterChecked = mUnifyButton->isChecked(); - - Q_FOREACH(KScreen::OutputPtr output, mConfig->connectedOutputs()) { - if (output.isNull()) - continue; - for (int i = 0; i < BrightnessFrameV.size(); ++i) { - if (BrightnessFrameV[i]->outputName == Utils::outputName(output)) { - BrightnessFrameV[i]->openFlag = output->isEnabled(); - } - } - } - if (isCheck == true) { - showBrightnessFrame(1); - } else { - showBrightnessFrame(2); - } - // 统一输出按钮状态未改变,清除标志位 - if (isPreChecked == afterChecked) { - mKDSCfg.clear(); - } - enableChangedSlot(); - mainScreenButtonSelect(ui->primaryCombo->currentIndex()); - }); -} - -void Widget::delayApply() -{ - QTimer::singleShot(500, this, [=] { - if (mKDSCfg.isEmpty() && !mIsScreenAdd) { - slotQmloutOutChanged(); - save(); - enableChangedSlot(); - } - mIsUnifyChanged = false; - mKDSCfg.clear(); - mIsScreenAdd = false; - }); -} - -void Widget::enableChangedSlot() -{ - int count = 0; - for (KScreen::OutputPtr output : mConfig->connectedOutputs()) { - if (output->isEnabled()) { - count++; - } - } - - for (QMLOutput *output: mScreen->outputs()) { - output->setEnableCount(count); - } -} - -void Widget::setKscreenConfig(const KScreen::ConfigPtr &config) -{ - /* Store the current config, apply settings */ - auto *op = new KScreen::SetConfigOperation(config); - - /* Block until the operation is completed, otherwise KCMShell will terminate - * before we get to execute the Operation */ - op->exec(); - op->deleteLater(); - op = nullptr; -} - -void Widget::save() -{ - qDebug() << Q_FUNC_INFO << "apply config"; - if (!this) { - return; - } - - const KScreen::ConfigPtr &config = this->currentConfig(); - - Q_FOREACH (const KScreen::OutputPtr &output, config->outputs()) { - if (!output->isConnected()) - continue; - - QMLOutput *base = mScreen->primaryOutput(); - if (!base) { - for (QMLOutput *output: mScreen->outputs()) { - if (output->output()->isConnected() && output->output()->isEnabled()) { - base = output; - break; - } - } - - if (!base) { - // WTF? - return; - } - } - } - - if (((ui->opHourCom->currentIndex() < ui->clHourCom->currentIndex()) - || (ui->opHourCom->currentIndex() == ui->clHourCom->currentIndex() - && ui->opMinCom->currentIndex() <= ui->clMinCom->currentIndex())) - && CUSTOM == singleButton->checkedId() && mNightButton->isChecked()) { - QMessageBox::warning(this, tr("Warning"), - tr("Open time should be earlier than close time!")); - mCloseScreenButton->setChecked(true); - return; - } - - setNightMode(mNightButton->isChecked()); - - if (!KScreen::Config::canBeApplied(config)) { - QMessageBox::information(this, - tr("Warnning"), - tr("Sorry, your configuration could not be applied.\nCommon reasons are that the overall screen size is too big, or you enabled more displays than supported by your GPU.")); - return; - } - - int enableScreenCount = 0; - KScreen::OutputPtr enableOutput; - for (const KScreen::OutputPtr &output : mConfig->outputs()) { - if (output->isEnabled()) { - enableOutput = output; - enableScreenCount++; - } - } - KScreen::ConfigPtr mPrevConfig = mPreScreenConfig->clone(); - if (enableScreenCount > 0) { - auto *preOp = new KScreen::GetConfigOperation(); - preOp->exec(); - mPrevConfig = preOp->config()->clone(); //重新获取屏幕当前状态 - preOp->deleteLater(); - } - - setKscreenConfig(config); - - // The 1000ms is a bit "random" here, it's what works on the systems I've tested, but ultimately, this is a hack - // due to the fact that we just can't be sure when xrandr is done changing things, 1000 doesn't seem to get in the way - QTimer::singleShot(1000, this, - [=]() { - if (mIsWayland) { - QString hash = config->connectedOutputsHash(); - writeFile(mDir % hash); - } - mIsUnifyChanged = false; - mConfigChanged = false; - mainScreenButtonSelect(ui->primaryCombo->currentIndex()); - }); - - if (isRestoreConfig()) { - auto *op = new KScreen::SetConfigOperation(mPrevConfig); - op->exec(); - // 无法知道什么时候执行完操作 - QTimer::singleShot(1000, this, [=]() { - writeFile(mDir % mPrevConfig->connectedOutputsHash()); - }); - } else { - mPreKDSCfg.clear(); // 控制面板主动操作,清除win+p标志位 - mPreScreenConfig = mConfig->clone(); - } - - if (enableScreenCount >= 2 && !mUnifyButton->isChecked()) { - setPreScreenCfg(mConfig->connectedOutputs()); - } - - setActiveScreen(); - - for (int i = 0; i < BrightnessFrameV.size(); ++i) { //应用成功再更新屏幕是否开启的状态,判断亮度条是否打开 - for (KScreen::OutputPtr output : mConfig->outputs()) { - if (BrightnessFrameV[i]->outputName == Utils::outputName(output)) { - BrightnessFrameV[i]->openFlag = output->isEnabled(); - } - } - } - int flag = mUnifyButton->isChecked() ? 1 : 2; - showBrightnessFrame(flag); //成功应用之后,重新显示亮度条,传入是否统一输出,1表示打开,2表示关闭 -} - -QVariantMap metadata(const KScreen::OutputPtr &output) -{ - QVariantMap metadata; - metadata[QStringLiteral("name")] = output->name(); - if (!output->edid() || !output->edid()->isValid()) { - return metadata; - } - - metadata[QStringLiteral("fullname")] = output->edid()->deviceId(); - return metadata; -} - -QString Widget::globalFileName(const QString &hash) -{ - QString s_dirPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) - %QStringLiteral("/kscreen/"); - QString dir = s_dirPath % QStringLiteral("outputs/"); - if (!QDir().mkpath(dir)) { - return QString(); - } - return QString(); -} - -QVariantMap Widget::getGlobalData(KScreen::OutputPtr output) -{ - QFile file(globalFileName(output->hashMd5())); - if (!file.open(QIODevice::ReadOnly)) { - qDebug() << "Failed to open file" << file.fileName(); - return QVariantMap(); - } - QJsonDocument parser; - return parser.fromJson(file.readAll()).toVariant().toMap(); -} - -void Widget::writeGlobal(const KScreen::OutputPtr &output) -{ - // get old values and subsequently override - QVariantMap info = getGlobalData(output); - if (!writeGlobalPart(output, info, nullptr)) { - return; - } - QFile file(globalFileName(output->hashMd5())); - if (!file.open(QIODevice::WriteOnly)) { - qWarning() << "Failed to open global output file for writing! " << file.errorString(); - return; - } - - file.write(QJsonDocument::fromVariant(info).toJson()); - return; -} - -bool Widget::writeGlobalPart(const KScreen::OutputPtr &output, QVariantMap &info, - const KScreen::OutputPtr &fallback) -{ - info[QStringLiteral("id")] = output->hash(); - info[QStringLiteral("metadata")] = metadata(output); - info[QStringLiteral("rotation")] = output->rotation(); - - // Round scale to four digits - info[QStringLiteral("scale")] = int(output->scale() * 10000 + 0.5) / 10000.; - - QVariantMap modeInfo; - float refreshRate = -1.; - QSize modeSize; - if (output->currentMode() && output->isEnabled()) { - refreshRate = output->currentMode()->refreshRate(); - modeSize = output->currentMode()->size(); - } else if (fallback && fallback->currentMode()) { - refreshRate = fallback->currentMode()->refreshRate(); - modeSize = fallback->currentMode()->size(); - } - - if (refreshRate < 0 || !modeSize.isValid()) { - return false; - } - - modeInfo[QStringLiteral("refresh")] = refreshRate; - - QVariantMap modeSizeMap; - modeSizeMap[QStringLiteral("width")] = modeSize.width(); - modeSizeMap[QStringLiteral("height")] = modeSize.height(); - modeInfo[QStringLiteral("size")] = modeSizeMap; - - info[QStringLiteral("mode")] = modeInfo; - - return true; -} - -bool Widget::writeFile(const QString &filePath) -{ - const KScreen::OutputList outputs = mConfig->outputs(); - const auto oldConfig = mPreScreenConfig; - KScreen::OutputList oldOutputs; - if (oldConfig) { - oldOutputs = oldConfig->outputs(); - } - QVariantList outputList; - for (const KScreen::OutputPtr &output : outputs) { - QVariantMap info; - const auto oldOutputIt = std::find_if(oldOutputs.constBegin(), oldOutputs.constEnd(), - [output](const KScreen::OutputPtr &out) { - return out->hashMd5() == output->hashMd5(); - }); - const KScreen::OutputPtr oldOutput = oldOutputIt != oldOutputs.constEnd() ? *oldOutputIt - : nullptr; - if (!output->isConnected()) { - continue; - } - - writeGlobalPart(output, info, oldOutput); - info[QStringLiteral("primary")] = output->isPrimary(); - info[QStringLiteral("enabled")] = output->isEnabled(); - - auto setOutputConfigInfo = [&info](const KScreen::OutputPtr &out) { - if (!out) { - return; - } - - QVariantMap pos; - pos[QStringLiteral("x")] = out->pos().x(); - pos[QStringLiteral("y")] = out->pos().y(); - info[QStringLiteral("pos")] = pos; - }; - setOutputConfigInfo(output->isEnabled() ? output : oldOutput); - - if (output->isEnabled()) { - // try to update global output data - writeGlobal(output); - } - outputList.append(info); - } - - QFile file(filePath); - if (!file.open(QIODevice::WriteOnly)) { - qWarning() << "Failed to open config file for writing! " << file.errorString(); - return false; - } - file.write(QJsonDocument::fromVariant(outputList).toJson()); - qDebug() << "Config saved on: " << file.fileName(); - - return true; -} - -void Widget::scaleChangedSlot(double scale) -{ - if (scaleGSettings->get(SCALE_KEY).toDouble() != scale) { - mIsScaleChanged = true; - } else { - mIsScaleChanged = false; - } - writeScale(scale); -} - -void Widget::changedSlot() -{ - mConfigChanged = true; -} - -void Widget::propertiesChangedSlot(QString property, QMap<QString, QVariant> propertyMap, - QStringList propertyList) -{ - Q_UNUSED(property); - Q_UNUSED(propertyList); - if (propertyMap.keys().contains("OnBattery")) { - mOnBattery = propertyMap.value("OnBattery").toBool(); - } -} - -// 是否禁用主屏按钮 -void Widget::mainScreenButtonSelect(int index) -{ - if (!mConfig || ui->primaryCombo->count() <= 0) { - return; - } - - const KScreen::OutputPtr newPrimary = mConfig->output(ui->primaryCombo->itemData(index).toInt()); - - if (!newPrimary->isEnabled()) { - ui->scaleCombo->setEnabled(false); - } else { - ui->scaleCombo->setEnabled(true); - } - - int connectCount = mConfig->connectedOutputs().count(); - - if (newPrimary == mConfig->primaryOutput() || mUnifyButton->isChecked() || (mConfig->connectedOutputs().count() == 1) || !newPrimary->isEnabled()) { - ui->mainScreenButton->setEnabled(false); - } else { - ui->mainScreenButton->setEnabled(true); - } - - // 设置是否勾选 - mCloseScreenButton->setEnabled(true); - ui->showMonitorframe->setVisible(connectCount > 1 && !mUnifyButton->isChecked()); - - // 初始化时不要发射信号 - mCloseScreenButton->blockSignals(true); - mCloseScreenButton->setChecked(newPrimary->isEnabled()); - mCloseScreenButton->blockSignals(false); - mControlPanel->activateOutput(newPrimary); - - mScreen->setActiveOutputByCombox(newPrimary->id()); -} - -// 设置主屏按钮 -void Widget::primaryButtonEnable(bool status) -{ - Q_UNUSED(status); - if (!mConfig) { - return; - } - int index = ui->primaryCombo->currentIndex(); - ui->mainScreenButton->setEnabled(false); - const KScreen::OutputPtr newPrimary = mConfig->output(ui->primaryCombo->itemData(index).toInt()); - mConfig->setPrimaryOutput(newPrimary); -} - -void Widget::checkOutputScreen(bool judge) -{ - const KScreen::ConfigPtr &config = this->currentConfig(); - - int enableOutputCount = 0; - Q_FOREACH (const KScreen::OutputPtr &output, config->outputs()) { - if (output->isEnabled()) { - enableOutputCount++; - } - } - if (enableOutputCount < 2 && !judge) { - QMessageBox::warning(this, tr("Warning"), tr("please insure at least one output!")); - mCloseScreenButton->blockSignals(true); - mCloseScreenButton->setChecked(true); - mCloseScreenButton->blockSignals(false); - return; - } - - int index = ui->primaryCombo->currentIndex(); - KScreen::OutputPtr newPrimary = mConfig->output(ui->primaryCombo->itemData(index).toInt()); - - KScreen::OutputPtr mainScreen = mConfig->primaryOutput(); - - if (!mainScreen) { - mConfig->setPrimaryOutput(newPrimary); - } - mainScreen = mConfig->primaryOutput(); - - if (!judge) { - setPreScreenCfg(mConfig->connectedOutputs()); - } else { - QList<ScreenConfig> preScreenCfg = getPreScreenCfg(); - KScreen::OutputList screens = mConfig->connectedOutputs(); - - if (!preScreenCfg.isEmpty()) { - Q_FOREACH(ScreenConfig cfg, preScreenCfg) { - Q_FOREACH(KScreen::OutputPtr output, screens) { - if (!cfg.screenId.compare(output->name())) { - output->setPos(QPoint(cfg.screenPosX, cfg.screenPosY)); - } - } - } - } else { - KScreen::OutputPtr enableOutput; - Q_FOREACH(KScreen::OutputPtr output, screens) { - if (output->isEnabled()) { - enableOutput = output; - break; - } - } - newPrimary->setEnabled(judge); - newPrimary->setPos(QPoint(enableOutput->size().width(), 0)); - } - setExtendPrimaryScreen(); - } - - newPrimary->setEnabled(judge); - - - ui->primaryCombo->blockSignals(true); - ui->primaryCombo->setCurrentIndex(index); - ui->primaryCombo->blockSignals(false); - mainScreenButtonSelect(index); -} - - -void Widget::initConnection() -{ - connect(mNightButton, SIGNAL(checkedChanged(bool)), this, SLOT(showNightWidget(bool))); - connect(mThemeButton, SIGNAL(checkedChanged(bool)), this, SLOT(slotThemeChanged(bool))); - connect(singleButton, SIGNAL(buttonClicked(int)), this, SLOT(showCustomWiget(int))); - - connect(ui->mainScreenButton, &QPushButton::clicked, this, [=](bool status) { - primaryButtonEnable(status); - delayApply(); - }); - - mControlPanel = new ControlPanel(this); - connect(mControlPanel, &ControlPanel::changed, this, &Widget::changed); - connect(this, &Widget::changed, this, &Widget::changedSlot); - connect(mControlPanel, &ControlPanel::scaleChanged, this, &Widget::scaleChangedSlot); - - connect(this, &Widget::changed, this, [=](){ - changedSlot(); - delayApply(); - }); - - ui->controlPanelLayout->addWidget(mControlPanel); - - connect(mCloseScreenButton, &KSwitchButton::stateChanged, this, [this](bool checked){ - checkOutputScreen(checked); - delayApply(); - changescale(); - }); - - connect(ui->advancedBtn, &QPushButton::clicked, this, [=] { - DisplayPerformanceDialog *dialog = new DisplayPerformanceDialog; - dialog->exec(); - }); - - connect(mUnifyButton, &KSwitchButton::stateChanged, - [this] { - mIsUnifyChanged = true; - slotUnifyOutputs(); - setScreenIsApply(true); - delayApply(); - }); - - QDBusConnection::sessionBus().connect(QString(), - QString("/"), - "org.ukui.ukcc.session.interface", - "screenChanged", - this, - SLOT(kdsScreenchangeSlot(QString))); - - QDBusConnection::sessionBus().connect(QString(), - QString("/ColorCorrect"), - "org.ukui.kwin.ColorCorrect", - "nightColorConfigChanged", - this, - SLOT(nightChangedSlot(QHash<QString,QVariant>))); - - mOutputTimer = new QTimer(this); - connect(mOutputTimer, &QTimer::timeout, - this, &Widget::clearOutputIdentifiers); - - mApplyShortcut = new QShortcut(QKeySequence("Ctrl+A"), this); - connect(mApplyShortcut, SIGNAL(activated()), this, SLOT(save())); - - connect(ui->primaryCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), - this, [=](int index) { - mainScreenButtonSelect(index); - showBrightnessFrame(); //当前屏幕框变化的时候,显示,此时不判断 - - }); -} - - -void Widget::initTemptSlider() -{ - ui->temptSlider->setRange(1.1*1000, 6500); - ui->temptSlider->setTracking(true); - - for (int i = 0; i < 24; i++) { - ui->opHourCom->addItem(QStringLiteral("%1").arg(i, 2, 10, QLatin1Char('0'))); - ui->clHourCom->addItem(QStringLiteral("%1").arg(i, 2, 10, QLatin1Char('0'))); - } - - for (int i = 0; i < 60; i++) { - ui->opMinCom->addItem(QStringLiteral("%1").arg(i, 2, 10, QLatin1Char('0'))); - ui->clMinCom->addItem(QStringLiteral("%1").arg(i, 2, 10, QLatin1Char('0'))); - } -} - -void Widget::setNightMode(const bool nightMode) -{ - QDBusInterface colorIft("org.ukui.KWin", - "/ColorCorrect", - "org.ukui.kwin.ColorCorrect", - QDBusConnection::sessionBus()); - if (!colorIft.isValid()) { - qWarning() << "create org.ukui.kwin.ColorCorrect failed"; - return; - } - - if (!nightMode) { - mNightConfig["Active"] = false; - } else { - mNightConfig["Active"] = true; - mNightConfig["Mode"] = 2; - - if (ui->sunradioBtn->isChecked()) { - mNightConfig["EveningBeginFixed"] = "17:55:00"; - mNightConfig["MorningBeginFixed"] = "05:55:04"; - } else if (ui->customradioBtn->isChecked()) { - mNightConfig["EveningBeginFixed"] = ui->opHourCom->currentText() + ":" - + ui->opMinCom->currentText() + ":00"; - mNightConfig["MorningBeginFixed"] = ui->clHourCom->currentText() + ":" - + ui->clMinCom->currentText() + ":00"; - } - mNightConfig["NightTemperature"] = ui->temptSlider->value(); - } - - colorIft.call("setNightColorConfig", mNightConfig); -} - -void Widget::initUiComponent() -{ - mDir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) - %QStringLiteral("/kscreen/") - %QStringLiteral("" /*"configs/"*/); - - singleButton = new QButtonGroup(); - singleButton->addButton(ui->sunradioBtn); - singleButton->addButton(ui->customradioBtn); - - singleButton->setId(ui->sunradioBtn, SUN); - singleButton->setId(ui->customradioBtn, CUSTOM); - - MODE value = ui->customradioBtn->isChecked() == SUN ? SUN : CUSTOM; - showNightWidget(mNightButton->isChecked()); - if (mNightButton->isChecked()) { - showCustomWiget(value); - } - - QDBusInterface brightnessInterface("org.freedesktop.UPower", - "/org/freedesktop/UPower/devices/DisplayDevice", - "org.freedesktop.DBus.Properties", - QDBusConnection::systemBus()); - if (!brightnessInterface.isValid()) { - qDebug() << "Create UPower Interface Failed : " << QDBusConnection::systemBus().lastError(); - return; - } - - QDBusReply<QVariant> briginfo; - briginfo = brightnessInterface.call("Get", "org.freedesktop.UPower.Device", "PowerSupply"); - mIsBattery = briginfo.value().toBool(); - - mUPowerInterface = QSharedPointer<QDBusInterface>( - new QDBusInterface("org.freedesktop.UPower", - "/org/freedesktop/UPower", - "org.freedesktop.DBus.Properties", - QDBusConnection::systemBus())); - - if (!mUPowerInterface.get()->isValid()) { - qDebug() << "Create UPower Battery Interface Failed : " << - QDBusConnection::systemBus().lastError(); - return; - } - - QDBusReply<QVariant> batteryInfo; - batteryInfo = mUPowerInterface.get()->call("Get", "org.freedesktop.UPower", "OnBattery"); - if (batteryInfo.isValid()) { - mOnBattery = batteryInfo.value().toBool(); - } - - mUPowerInterface.get()->connection().connect("org.freedesktop.UPower", - "/org/freedesktop/UPower", - "org.freedesktop.DBus.Properties", - "PropertiesChanged", - this, - SLOT(propertiesChangedSlot(QString,QMap<QString, QVariant>, - QStringList))); - mUkccInterface = QSharedPointer<QDBusInterface>( - new QDBusInterface("org.ukui.ukcc.session", - "/", - "org.ukui.ukcc.session.interface", - QDBusConnection::sessionBus())); -} - -void Widget::initNightStatus() -{ - QDBusInterface colorIft("org.ukui.KWin", - "/ColorCorrect", - "org.ukui.kwin.ColorCorrect", - QDBusConnection::sessionBus()); - if (colorIft.isValid() && UkccCommon::isExistEffect() && !mIsWayland) { - this->mRedshiftIsValid = true; - } else { - qWarning() << "create org.ukui.kwin.ColorCorrect failed"; - return; - } - - QDBusMessage result = colorIft.call("nightColorInfo"); - - QList<QVariant> outArgs = result.arguments(); - QVariant first = outArgs.at(0); - QDBusArgument dbvFirst = first.value<QDBusArgument>(); - QVariant vFirst = dbvFirst.asVariant(); - const QDBusArgument &dbusArgs = vFirst.value<QDBusArgument>(); - - QVector<ColorInfo> nightColor; - - dbusArgs.beginArray(); - while (!dbusArgs.atEnd()) { - ColorInfo color; - dbusArgs >> color; - nightColor.push_back(color); - } - dbusArgs.endArray(); - - for (ColorInfo it : nightColor) { - mNightConfig.insert(it.arg, it.out.variant()); - } - - this->mIsNightMode = mNightConfig["Active"].toBool(); - ui->temptSlider->setValue(mNightConfig["CurrentColorTemperature"].toInt()); - if (0 == mNightConfig["Mode"].toInt()) { - ui->sunradioBtn->setChecked(true); - } else if (2 == mNightConfig["Mode"].toInt()) { - ui->customradioBtn->setChecked(true); - QString openTime = mNightConfig["EveningBeginFixed"].toString(); - QString ophour = openTime.split(":").at(0); - QString opmin = openTime.split(":").at(1); - - ui->opHourCom->setCurrentIndex(ophour.toInt()); - ui->opMinCom->setCurrentIndex(opmin.toInt()); - - QString cltime = mNightConfig["MorningBeginFixed"].toString(); - QString clhour = cltime.split(":").at(0); - QString clmin = cltime.split(":").at(1); - - ui->clHourCom->setCurrentIndex(clhour.toInt()); - ui->clMinCom->setCurrentIndex(clmin.toInt()); - } -} - -void Widget::nightChangedSlot(QHash<QString, QVariant> nightArg) -{ - if (this->mRedshiftIsValid) { - mNightButton->setChecked(nightArg["Active"].toBool()); - } -} - - -/* 总结: 亮度条怎么显示和实际的屏幕状态有关,与按钮选择状态关系不大: - * 实际为镜像模式,就显示所有屏幕的亮度(笔记本外显除外,笔记本外显任何情况均隐藏,这里未涉及)。 - * 实际为扩展模式,就显示当前选中的屏幕亮度,如果当前选中复制模式,则亮度条隐藏不显示,应用之后再显示所有亮度条; - * 实际为单屏模式,即另一个屏幕关闭,则显示打开屏幕的亮度,关闭的显示器不显示亮度 - * - *ps: by feng chao -*/ - -void Widget::showBrightnessFrame(const int flag) -{ - QTimer::singleShot(0, this, [=]{ - int *pFlag = new int(flag); - QObject::connect(new KScreen::GetConfigOperation(), &KScreen::GetConfigOperation::finished, - [&, pFlag](KScreen::ConfigOperation *op) { - bool allShowFlag = true; - - KScreen::ConfigPtr config = this->currentConfig(); - - KScreen::OutputPtr output = config->primaryOutput(); - if (mConfig->connectedOutputs().count() >= 2 && !output.isNull()) { - foreach (KScreen::OutputPtr secOutput, config->connectedOutputs()) { - if (secOutput->geometry() != output->geometry() || !secOutput->isEnabled()) { - allShowFlag = false; - } - for (int i = 0; i < BrightnessFrameV.size(); ++i) { //检查其它显示屏是否实际打开,否则关闭,适用于显示器插拔 - if (BrightnessFrameV[i]->outputName == Utils::outputName(secOutput)){ - if (!secOutput->isEnabled()) - BrightnessFrameV[i]->openFlag = false; - else - BrightnessFrameV[i]->openFlag = true; - } - } - } - } else { //只有一个屏幕,把它亮度条打开,防止remove出问题 - allShowFlag = false; - for (int i = 0; i < BrightnessFrameV.size(); ++i) { - if (BrightnessFrameV[i]->outputName == Utils::outputName(output)) { - BrightnessFrameV[i]->openFlag = true; - } - } - } - - ui->unifyBrightFrame->setFixedHeight(0); - if (*pFlag == 0 && allShowFlag == false && mUnifyButton->isChecked()) { //选中了镜像模式,实际是扩展模式 - - } else if ((allShowFlag == true && *pFlag == 0) || *pFlag == 1) { //镜像模式/即将成为镜像模式 - ui->unifyBrightFrame->setFixedHeight(BrightnessFrameV.size() * (50 + 2 + 2)); - for (int i = 0; i < BrightnessFrameV.size(); ++i) { - BrightnessFrameV[i]->openFlag = true; - BrightnessFrameV[i]->setTextLableName(tr("Brightness") + QString("(") + BrightnessFrameV[i]->outputName + QString(")")); - BrightnessFrameV[i]->setVisible(true); - } - } else { - for (int i = 0; i < BrightnessFrameV.size(); ++i) { - if (ui->primaryCombo->currentText() == BrightnessFrameV[i]->outputName && BrightnessFrameV[i]->openFlag) { - ui->unifyBrightFrame->setFixedHeight(52); - BrightnessFrameV[i]->setTextLableName(tr("Brightness")); - BrightnessFrameV[i]->setVisible(true); - //不能break,要把其他的frame隐藏 - } else { - BrightnessFrameV[i]->setVisible(false); - } - } - } - if (ui->unifyBrightFrame->height() > 0) { - ui->unifyBrightFrame->setVisible(true); - } else { - ui->unifyBrightFrame->setVisible(false); - } - delete pFlag; - }); - }); -} - -void Widget::changescale() -{ - mScaleSizeRes = QSize(); - for (const KScreen::OutputPtr &output : mConfig->outputs()) { - if (output->isEnabled()) { - if (output->currentMode()) { - if (mScaleSizeRes == QSize()) { - mScaleSizeRes = output->currentMode()->size(); - } else { - mScaleSizeRes = mScaleSizeRes.width() < output->currentMode()->size().width()?mScaleSizeRes:output->currentMode()->size(); - } - } else { - return; - } - - } - } - if (mScaleSizeRes != QSize(0,0)) { - QSize scalesize = mScaleSizeRes; - ui->scaleCombo->blockSignals(true); - ui->scaleCombo->clear(); - ui->scaleCombo->addItem("100%", 1.0); - - if (scalesize.width() > 1024 ) { - ui->scaleCombo->addItem("125%", 1.25); - } - if (scalesize.width() == 1920 ) { - ui->scaleCombo->addItem("150%", 1.5); - } - if (scalesize.width() > 1920) { - ui->scaleCombo->addItem("150%", 1.5); - ui->scaleCombo->addItem("175%", 1.75); - } - if (scalesize.width() >= 2160) { - ui->scaleCombo->addItem("200%", 2.0); - } - if (scalesize.width() > 2560) { - ui->scaleCombo->addItem("225%", 2.25); - } - if (scalesize.width() > 3072) { - ui->scaleCombo->addItem("250%", 2.5); - } - if (scalesize.width() > 3840) { - ui->scaleCombo->addItem("275%", 2.75); - } - - double scale; - QStringList keys = scaleGSettings->keys(); - if (keys.contains("scalingFactor")) { - scale = scaleGSettings->get(SCALE_KEY).toDouble(); - } - if (ui->scaleCombo->findData(scale) == -1) { - //记录分辨率切换时,新分辨率不存在的缩放率,在用户点击恢复设置时写入 - mIsSCaleRes = true; - //记录是否因分辨率导致的缩放率变化 - mIsChange = true; - scaleres = scale; - scale = 1.0; - } - ui->scaleCombo->setCurrentText(QString::number(scale * 100) + "%"); - scaleChangedSlot(scale); - ui->scaleCombo->blockSignals(false); - mScaleSizeRes = QSize(); - - } -} - -void Widget::getAllI2Cbus() -{ - I2CbusMap.clear(); - QMap<QString, QString> msg; - QString cmd = "find /sys/class/drm/card0-*/*/ -name '*i2c-[0-9]*'"; - QProcess process; - process.start("bash", QStringList() <<"-c"<<cmd); - process.waitForFinished(); - QString strResult = process.readAllStandardOutput(); - QStringList resultList = strResult.split("\n"); //所有结果 - - qDebug()<<"read i2c process result = "<<resultList; - for (int i = 0; i < resultList.size(); i++) { - QStringList i2cList = resultList.at(i).split("/"); //切割每一行结果 - if (i2cList.size() >= 5) { - if (!msg.keys().contains(i2cList.at(4))) { - //当不存在时就添加 - msg.insert(i2cList.at(4), resultList.at(i)); - } else { - //已经存在,但是内容更少时也重新替换,drm中文件是嵌套的,可能存在包含关系,故做此处理 - if (msg[i2cList.at(4)].size() > resultList.at(i).size()) { - msg[i2cList.at(4)] = resultList.at(i); - } - } - } - } - QMap<QString, QString>::const_iterator it; - for (it = msg.constBegin(); it != msg.constEnd(); ++it) { - qDebug()<<" ----------MAP-MSG--------- "<<it.key()<<" "<<it.value(); - //显示器名只取中间的(HDMI\VGA...),因为后面的内容kscreen和内核提供的不一定一致 - //因此当有多个HDMI接口时此方式并不适用 - QString name = it.key().split("-").at(1); - QStringList i2cList = it.value().split("/"); - QString i2cStr = i2cList.at(i2cList.size() - 1); - if (!i2cStr.contains("i2c-",Qt::CaseInsensitive)) { - i2cStr = i2cList.at(i2cList.size() - 2); - } - - QString busNum = i2cStr.split("-").at(1); - if (QString::number(busNum.toInt()) == busNum) { - if (I2CbusMap.keys().contains(name)) { - qDebug()<<"Unable to get the correct bus number from the kernel ... "<<name; - I2CbusMap.clear(); //如果出现了一样的,表明有重复的接口,舍弃使用内核提供的bus号 - return; - } - qDebug()<<" i2c-name = "<<name<<" *** "<<"i2c-bus="<<busNum; - I2CbusMap.insert(name, busNum); - } - } - return; -} diff -Nru ukui-control-center-5.0.0.0/plugins/system/display_hw/widget.h ukui-control-center-5.0.0.0/plugins/system/display_hw/widget.h --- ukui-control-center-5.0.0.0/plugins/system/display_hw/widget.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/display_hw/widget.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,260 +0,0 @@ -#ifndef WIDGET_H -#define WIDGET_H - -#include <QMutex> -#include <QWidget> -#include <QVariantMap> -#include <QGSettings> -#include <QSettings> -#include <QButtonGroup> -#include <QDBusInterface> -#include <QDBusConnection> -#include <QDBusError> -#include <QDBusReply> -#include <QStringList> -#include <QSharedPointer> -#include <QHash> -#include <QVariant> -#include <QScreen> -#include <QMultiMap> -#include <QShortcut> -#include <QFuture> - -#include <KF5/KScreen/kscreen/config.h> -#include <unistd.h> - -#include "outputconfig.h" -#include "brightnessFrame.h" -#include "screenConfig.h" -#include "scalesize.h" -#include "kswitchbutton.h" -using namespace kdk; - -class QLabel; -class QMLOutput; -class QMLScreen; -class ControlPanel; -class PrimaryOutputCombo; - -class QPushButton; -class QComboBox; - -class QQuickView; -class QQuickWidget; -class QStyledItemDelegate; - -typedef enum { - SUN, - CUSTOM, -}MODE; - -namespace KScreen { -class ConfigOperation; -} - -namespace Ui { -class DisplayWindow; -} - -class Widget : public QWidget -{ - Q_OBJECT - -public: - explicit Widget(QWidget *parent = nullptr); - ~Widget() override; - - void setConfig(const KScreen::ConfigPtr &config, bool showBrightnessFrameFlag = false); - KScreen::ConfigPtr currentConfig() const; - - void initConnection(); - QString getScreenName(QString name = ""); - void initTemptSlider(); - - bool writeFile(const QString &filePath); - void writeGlobal(const KScreen::OutputPtr &output); - bool writeGlobalPart(const KScreen::OutputPtr &output, QVariantMap &info, - const KScreen::OutputPtr &fallback); - QString globalFileName(const QString &hash); - QVariantMap getGlobalData(KScreen::OutputPtr output); - - float converToScale(const int value); - int scaleToSlider(const float value); - - void initUiComponent(); - void addBrightnessFrame(QString name, bool openFlag, const KScreen::OutputPtr &output = nullptr, QString i2cBus = ""); - void showBrightnessFrame(const int flag = 0); - void getAllI2Cbus(); - - void changescale(); - void setKscreenConfig(const KScreen::ConfigPtr &config); -protected: - bool eventFilter(QObject *object, QEvent *event) override; - -Q_SIGNALS: - void changed(); - - void nightModeChanged(const bool nightMode) const; - void redShiftValidChanged(const bool isValid) const; - -private Q_SLOTS: - void slotFocusedOutputChanged(QMLOutput *output); - - void slotOutputEnabledChanged(); - void slotOutputConnectedChanged(); - void slotQmloutOutChanged(); - - void slotUnifyOutputs(); - - void slotIdentifyButtonClicked(bool checked = true); - void slotIdentifyOutputs(KScreen::ConfigOperation *op); - void clearOutputIdentifiers(); - - void outputAdded(const KScreen::OutputPtr &output); - void outputRemoved(int outputId); - void primaryOutputSelected(int index); - void primaryOutputChanged(const KScreen::OutputPtr &output); - - void showNightWidget(bool judge); - void showCustomWiget(int index); - - void slotThemeChanged(bool judge); - - void primaryButtonEnable(bool); // 按钮选择主屏确认按钮 - void mainScreenButtonSelect(int index); // 是否禁用设置主屏按钮 - void checkOutputScreen(bool judge); // 是否禁用屏幕 - - void setNightMode(const bool nightMode); // 设置夜间模式 - - void initNightStatus(); // 初始化夜间模式 - void nightChangedSlot(QHash<QString, QVariant> nightArg); - - void isWayland(); - - void kdsScreenchangeSlot(QString status); - void delayApply(); - - void enableChangedSlot(); // 是否禁用小屏幕拖动 - -public Q_SLOTS: - void save(); - void scaleChangedSlot(double scale); - void changedSlot(); - void propertiesChangedSlot(QString, QMap<QString, QVariant>, QStringList); - -private: - void loadQml(); - void resetPrimaryCombo(); - void addOutputToPrimaryCombo(const KScreen::OutputPtr &output); - KScreen::OutputPtr findOutput(const KScreen::ConfigPtr &config, const QVariantMap &info); - - void setHideModuleInfo(); - void setTitleLabel(); - void writeScale(double scale); - void initGSettings(); - void initNightUI(); - - bool isRestoreConfig(); // 是否恢复应用之前的配置 - bool isCloneMode(); - bool isBacklight(); - bool isLaptopScreen(); - bool isVisibleBrightness(); - - QString getCpuInfo(); - QString getMonitorType(); - - int getDDCBrighthess(); - int getDDCBrighthess(QString name); - int getDDCBrighthess(QString edidHash, QString i2cBus); - int getLaptopBrightness() const; - - void setDDCBrightnessN(int value, QString screenName); - void setDDCBrightnessN(int value, QString edidHash, QString i2cBus); - void setScreenKDS(QString kdsConfig); - void setActiveScreen(QString status = ""); - - QList<ScreenConfig> getPreScreenCfg(); - void setPreScreenCfg(KScreen::OutputList screens); - - void setScreenIsApply(bool isApply); - - int screenEnableCount(); - - void setExtendPrimaryScreen(); - - void showZoomtips(); - -private: - Ui::DisplayWindow *ui; - QMLScreen *mScreen = nullptr; - - KScreen::ConfigPtr mConfig = nullptr; - KScreen::ConfigPtr mPrevConfig = nullptr; - KScreen::ConfigPtr mPreScreenConfig = nullptr; - - ControlPanel *mControlPanel = nullptr; - - OutputConfig *mOutputConfig = nullptr; // 设置主显示器相关控件 - - QList<QQuickView *> mOutputIdentifiers; - QTimer *mOutputTimer = nullptr; - - QMutex mLock; - - QString mCPU; - QString mDir; - QStringList mPowerKeys; - QString mKDSCfg; - QString mPreKDSCfg; - - KSwitchButton *mNightButton = nullptr; - KSwitchButton *mCloseScreenButton = nullptr; - KSwitchButton *mUnifyButton = nullptr; - KSwitchButton *mThemeButton = nullptr; - - QLabel *nightLabel = nullptr; - - QGSettings *mGsettings = nullptr; - QGSettings *scaleGSettings = nullptr; - QGSettings *mPowerGSettings = nullptr; - - QSettings *mQsettings = nullptr; - - QButtonGroup *singleButton; - - QSharedPointer<QDBusInterface> mUPowerInterface; - QSharedPointer<QDBusInterface> mUkccInterface; - - QHash<QString, QVariant> mNightConfig; - - double scaleres = 1.0; - - bool mIsNightMode = false; - bool mRedshiftIsValid = false; - bool mIsScaleChanged = false; - bool mConfigChanged = false; - bool mOnBattery = false; - bool mIsUnifyChanged = false; - bool mFirstLoad = true; - bool mIsWayland = false; - bool mIsBattery = false; - bool mIsOutputAdd = false; - bool mIsScreenAdd = false; - bool mIsSCaleRes = false; - bool mIsChange = false; - - QSize mScaleSizeRes = QSize(); - - bool threadRunExit = false; - QFuture<void> threadRun; - - QShortcut *mApplyShortcut; - QVector<BrightnessFrame*> BrightnessFrameV; - QVector<QString> deleteFrameNameV; //用二级指针判断null出现问题,只想到这种方式排除段错误 - BrightnessFrame *currentBrightnessFrame; - bool exitFlag = false; - QMap<QString, QString> I2CbusMap; - -}; - -#endif // WIDGET_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/notice/notice.h ukui-control-center-5.0.0.0/plugins/system/notice/notice.h --- ukui-control-center-5.0.0.0/plugins/system/notice/notice.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/notice/notice.h 2025-02-07 16:27:50.000000000 +0800 @@ -31,7 +31,6 @@ #include <QComboBox> #include <shell/interface.h> -#include "titlelabel.h" #include "lightlabel.h" #include "kswitchbutton.h" #include "switchwidget.h" diff -Nru ukui-control-center-5.0.0.0/plugins/system/notice/noticeui.h ukui-control-center-5.0.0.0/plugins/system/notice/noticeui.h --- ukui-control-center-5.0.0.0/plugins/system/notice/noticeui.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/notice/noticeui.h 2025-02-07 16:27:50.000000000 +0800 @@ -6,7 +6,6 @@ #include <QComboBox> #include <shell/interface.h> -#include "titlelabel.h" #include "lightlabel.h" #include "kswitchbutton.h" #include "switchwidget.h" diff -Nru ukui-control-center-5.0.0.0/plugins/system/power/power.h ukui-control-center-5.0.0.0/plugins/system/power/power.h --- ukui-control-center-5.0.0.0/plugins/system/power/power.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/power/power.h 2025-02-07 16:27:50.000000000 +0800 @@ -30,9 +30,7 @@ #include <QButtonGroup> #include "shell/interface.h" -#include "widgets/Label/titlelabel.h" #include "widgets/ComboxFrame/comboxframe.h" -#include "widgets/Label/fixlabel.h" #include <kysdk/kysdk-system/libkysysinfo.h> #include "kswitchbutton.h" using namespace kdk; diff -Nru ukui-control-center-5.0.0.0/plugins/system/vino/inputpwddialog.cpp ukui-control-center-5.0.0.0/plugins/system/vino/inputpwddialog.cpp --- ukui-control-center-5.0.0.0/plugins/system/vino/inputpwddialog.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/vino/inputpwddialog.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -6,27 +6,37 @@ #include <QLabel> #include <QPushButton> #include <QKeyEvent> +#include "sharemain.h" #include "fixlabel.h" +#include <kysdk/applications/accessinfohelper.h> -InputPwdDialog::InputPwdDialog(QWidget *parent) +#include "ukcccommon.h" +using namespace ukcc; + +InputPwdDialog::InputPwdDialog(QGSettings *Keygsettiings,QWidget *parent) : + QDialog(parent), + m_pGsettings(Keygsettiings) { - mVinoDBus = new QDBusInterface("org.ukui.ukcc.session", - "/Vino", - "org.ukui.ukcc.session.Vino", - QDBusConnection::sessionBus(), this); - initUi(); + setupInit(); initConnect(); } -InputPwdDialog::~InputPwdDialog() +InputPwdDialog::InputPwdDialog(ComKylinRemoteDesktopInterface *waylandDbus, QWidget *parent) : + QDialog(parent), + m_pWaylandDbus(waylandDbus) { + setupInit(); + initConnect(); +} +InputPwdDialog::~InputPwdDialog() +{ } -void InputPwdDialog::initUi() +void InputPwdDialog::setupInit() { - setWindowTitle(tr("Set")); + setWindowTitle(tr("VNC password")); this->setFixedSize(480, 160); QVBoxLayout *mInputPwdLyt = new QVBoxLayout(this); @@ -42,25 +52,28 @@ mLyt_1->setSpacing(8); FixLabel *mSetPwdLabel = new FixLabel(mInputPwdFrame); + KDK_EXTEND_ALL_INFO_FORMAT(mSetPwdLabel, "Vino", "InputPwdDialog", ""); mSetPwdLabel->setFixedSize(72, 36); - mSetPwdLabel->setText(tr("Set Password")); + mSetPwdLabel->setText(tr("Password")); - mPwdLineEdit = new QLineEdit(mInputPwdFrame); - mPwdLineEdit->setAttribute(Qt::WA_InputMethodEnabled, false); //限制中文输入法 - mPwdLineEdit->setFixedSize(352, 36); - mPwdLineEdit->installEventFilter(this); + m_pPasswordEdit = new KPasswordEdit(mInputPwdFrame); + KDK_EXTEND_ALL_INFO_FORMAT(m_pPasswordEdit, "Vino", "InputPwdDialog", ""); + m_pPasswordEdit->setFixedSize(352, 36); + QRegExp inputRegExp("^[A-Za-z0-9`~!@#$%^&*()_-+=<>,.\\\/?:;\"'|\{\}\ ]+$"); + QRegExpValidator *inputLimits = new QRegExpValidator(inputRegExp, this); + m_pPasswordEdit->setValidator(inputLimits); mLyt_1->addWidget(mSetPwdLabel); - mLyt_1->addWidget(mPwdLineEdit); + mLyt_1->addWidget(m_pPasswordEdit); - mFirstload = true; - mStatus = false; + m_isEdited = false; - mHintLabel = new QLabel(this); - mHintLabel->setFixedSize(432,24); - mHintLabel->setContentsMargins(84, 0, 0, 0); - mHintLabel->setText(tr("Must be 1-8 characters long")); - mHintLabel->setStyleSheet("QLabel{color:red; font-size : 14px}"); + m_pHintLabel = new QLabel(this); + KDK_EXTEND_ALL_INFO_FORMAT(m_pHintLabel, "Vino", "InputPwdDialog", ""); + m_pHintLabel->setFixedSize(432,24); + m_pHintLabel->setContentsMargins(84, 0, 0, 0); + m_pHintLabel->setText(tr("Must be 1-8 characters long")); + m_pHintLabel->setStyleSheet("QLabel{color:red; font-size : 14px}"); QFrame *mInputPwdFrame_1 = new QFrame(this); mInputPwdFrame_1->setFixedSize(432, 48); @@ -70,110 +83,121 @@ mLyt_2->setContentsMargins(0, 0, 0, 0); mLyt_2->setSpacing(16); - mLyt_1->addWidget(mSetPwdLabel); - mLyt_1->addWidget(mPwdLineEdit); + mLyt_1->addWidget(m_pPasswordEdit); - mCancelBtn = new QPushButton(mInputPwdFrame_1); - mCancelBtn->setMinimumWidth(96); - mCancelBtn->setText(tr("Cancel")); - - mConfirmBtn = new QPushButton(mInputPwdFrame_1); - mConfirmBtn->setMinimumWidth(96); - mConfirmBtn->setText(tr("Confirm")); + m_pCancelBtn = new QPushButton(mInputPwdFrame_1); + KDK_EXTEND_ALL_INFO_FORMAT(m_pCancelBtn, "Vino", "InputPwdDialog", ""); + m_pCancelBtn->setMinimumWidth(96); + m_pCancelBtn->setText(tr("Cancel")); + m_pCancelBtn->setProperty("useButtonPalette", true); + + m_pConfirmBtn = new QPushButton(mInputPwdFrame_1); + KDK_EXTEND_ALL_INFO_FORMAT(m_pConfirmBtn, "Vino", "InputPwdDialog", ""); + m_pConfirmBtn->setMinimumWidth(96); + m_pConfirmBtn->setText(tr("Confirm")); + m_pConfirmBtn->setProperty("isImportant", true); mLyt_2->addStretch(); - mLyt_2->addWidget(mCancelBtn); - mLyt_2->addWidget(mConfirmBtn); + mLyt_2->addWidget(m_pCancelBtn); + mLyt_2->addWidget(m_pConfirmBtn); mInputPwdLyt->addWidget(mInputPwdFrame); - mInputPwdLyt->addWidget(mHintLabel); + mInputPwdLyt->addWidget(m_pHintLabel); mInputPwdLyt->addStretch(); mInputPwdLyt->addWidget(mInputPwdFrame_1); - if(QByteArray::fromBase64(mVinoDBus->property("password").toString().toLatin1()).length() <= 8) { - if (mVinoDBus->property("password").toString() == "keyring") { - mPwdLineEdit->setText(""); - mConfirmBtn->setEnabled(false); - mHintLabel->setVisible(true); - } else { - mPwdLineEdit->setText(QByteArray::fromBase64(mVinoDBus->property("password").toString().toLatin1())); - mHintLabel->setVisible(false); + if (UkccCommon::isWayland()) { + QString pwd = m_pWaylandDbus->GetPassword(); + m_pPasswordEdit->setText(pwd); + m_pConfirmBtn->setEnabled(!pwd.isEmpty()); + m_pHintLabel->setVisible(pwd.isEmpty()); + } else { + if(QByteArray::fromBase64(m_pGsettings->get(kVncPwdKey).toString().toLatin1()).length() <= 8) { + if (m_pGsettings->get(kVncPwdKey).toString() == "keyring") { + m_pPasswordEdit->setText(""); + m_pConfirmBtn->setEnabled(false); + m_pHintLabel->setVisible(true); + } else { + m_pPasswordEdit->setText(QByteArray::fromBase64(m_pGsettings->get(kVncPwdKey).toString().toLatin1())); + m_pHintLabel->setVisible(false); + } } } - } -void InputPwdDialog::mPwdLineEditInputSlot(const QString &pwd) +void InputPwdDialog::mpwdInputSlot(const QString &pwd) { Q_UNUSED(pwd); - mStatus = true; - mConfirmBtn->setEnabled(true); + m_isEdited = true; + m_pConfirmBtn->setEnabled(true); if (pwd.length() <= 8 && !pwd.isEmpty()) { QByteArray text = pwd.toLocal8Bit(); - secPwd = text.toBase64(); - mHintLabel->setVisible(false); + m_password = text.toBase64(); + m_pHintLabel->setVisible(false); } else if (pwd.isEmpty()) { - mConfirmBtn->setEnabled(false); - mHintLabel->setVisible(true); - secPwd = NULL; + m_pConfirmBtn->setEnabled(false); + m_pHintLabel->setVisible(true); + m_password = NULL; } else { - mPwdLineEdit->setText(pwd.mid(0, 8)); + m_pPasswordEdit->setText(pwd.mid(0, 8)); QByteArray text = pwd.mid(0, 8).toLocal8Bit(); - mHintLabel->setVisible(true); - secPwd = text.toBase64(); + m_pHintLabel->setVisible(true); + m_password = text.toBase64(); } } -void InputPwdDialog::initConnect() { - - connect(mCancelBtn, &QPushButton::clicked, [=](bool checked){ +void InputPwdDialog::initConnect() +{ + connect(m_pCancelBtn, &QPushButton::clicked, [=](bool checked){ Q_UNUSED(checked) this->close(); }); - connect(mConfirmBtn, &QPushButton::clicked, [=](bool checked){ - Q_UNUSED(checked) - if (mStatus && secPwd.length() == 0) { - return; - } else if (!mStatus){ - mVinoDBus->call("setVinoKey", kAuthenticationKey, "vnc"); - this->close(); - } else { - mVinoDBus->call("setVinoKey", kVncPwdKey, secPwd); - mVinoDBus->call("setVinoKey", kAuthenticationKey, "vnc"); - this->close(); - } - }); + connect(m_pConfirmBtn, &QPushButton::clicked, this, &InputPwdDialog::setPasswordSlot); + //使用textEdited信号是为了防止密码框setText时触发信号 - connect(mPwdLineEdit, &QLineEdit::textEdited, this, &InputPwdDialog::mPwdLineEditInputSlot); + connect(m_pPasswordEdit, &QLineEdit::textChanged, this, &InputPwdDialog::mpwdInputSlot); } -bool InputPwdDialog::eventFilter(QObject *wcg, QEvent *event) +void InputPwdDialog::setPasswordSlot() { - //过滤 - if(wcg==mPwdLineEdit){ - if(event->type() == QEvent::MouseButtonPress){ - if(mPwdLineEdit->hasFocus()){ - if (mFirstload) { - mPwdLineEdit->setText(""); - mFirstload = false; - } - } - } - } - // 回车键触发确定按钮点击事件 - if (event->type() == QEvent::KeyPress) { - QKeyEvent *mEvent = static_cast<QKeyEvent *>(event); - if (mEvent->key() == Qt::Key_Enter || mEvent->key() == Qt::Key_Return) { - if (mConfirmBtn->isEnabled()) { - emit mConfirmBtn->clicked(); - } else { - this->close(); - } + if (m_isEdited && m_password.length() == 0) { // 输入框被编辑,密码为空 + return; + } else if (!m_isEdited){ // 输入框未编辑 + if (UkccCommon::isWayland()) { + m_pWaylandDbus->SetAuthMethod(true); + } else { + m_pGsettings->set(kAuthenticationKey, "vnc"); } + this->close(); + } else { // 输入框被编辑,密码不为空 + if (UkccCommon::isWayland()) { + m_pWaylandDbus->SetPassword(m_pPasswordEdit->text()); + m_pWaylandDbus->SetAuthMethod(true); + } else { + m_pGsettings->set(kVncPwdKey, m_password); + m_pGsettings->set(kAuthenticationKey, "vnc"); + } + this->close(); + } +} +void InputPwdDialog::keyPressEvent(QKeyEvent * event) +{ + switch (event->key()) + { + case Qt::Key_Enter: + if (m_pConfirmBtn->isEnabled()) + m_pConfirmBtn->clicked(); + break; + case Qt::Key_Return: + if (m_pConfirmBtn->isEnabled()) + m_pConfirmBtn->clicked(); + break; + default: + QDialog::keyPressEvent(event); } - return QWidget::eventFilter(wcg,event); } + diff -Nru ukui-control-center-5.0.0.0/plugins/system/vino/inputpwddialog.h ukui-control-center-5.0.0.0/plugins/system/vino/inputpwddialog.h --- ukui-control-center-5.0.0.0/plugins/system/vino/inputpwddialog.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/vino/inputpwddialog.h 2025-02-07 16:27:50.000000000 +0800 @@ -5,9 +5,10 @@ #include <QGSettings> #include <QLabel> #include <QLineEdit> -#include <QDBusInterface> -#include "vinoui.h" +#include <kpasswordedit.h> +using namespace kdk; +#include "krd.h" namespace Ui { class InputPwdDialog; @@ -17,31 +18,34 @@ Q_OBJECT public: - InputPwdDialog(QWidget *parent = nullptr); + InputPwdDialog(QGSettings *Keygsettiings,QWidget *parent = nullptr); + InputPwdDialog(ComKylinRemoteDesktopInterface *waylandDbus, QWidget *parent = nullptr); ~InputPwdDialog(); - private: - QPushButton *mCancelBtn; - QPushButton *mConfirmBtn; + QGSettings *m_pGsettings; + ComKylinRemoteDesktopInterface *m_pWaylandDbus; + + QPushButton *m_pCancelBtn; + QPushButton *m_pConfirmBtn; - QLabel *mHintLabel; - QLineEdit *mPwdLineEdit; - QByteArray secPwd; - bool mFirstload; + KPasswordEdit *m_pPasswordEdit; + QLabel *m_pHintLabel; - bool mStatus; - QDBusInterface *mVinoDBus; + QByteArray m_password; + bool m_isEdited; private: - void initUi(); - void initConnect(); - bool eventFilter(QObject *wcg, QEvent *event); + void setupInit(); -private slots: - void mPwdLineEditInputSlot(const QString &pwd); + void initConnect(); +protected: + void keyPressEvent(QKeyEvent * event); +private slots: + void mpwdInputSlot(const QString &pwd); + void setPasswordSlot(); }; diff -Nru ukui-control-center-5.0.0.0/plugins/system/vino/krd.cpp ukui-control-center-5.0.0.0/plugins/system/vino/krd.cpp --- ukui-control-center-5.0.0.0/plugins/system/vino/krd.cpp 1970-01-01 08:00:00.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/vino/krd.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -0,0 +1,27 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp -N com.kylin.RemoteDesktop.xml -p krd.h:krd.cpp + * + * qdbusxml2cpp is Copyright (C) 2020 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#include "krd.h" + +/* + * Implementation of interface class ComKylinRemoteDesktopInterface + */ + +ComKylinRemoteDesktopInterface::ComKylinRemoteDesktopInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) + : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent) +{ + qDBusRegisterMetaType<ClientInfo>(); +} + +ComKylinRemoteDesktopInterface::~ComKylinRemoteDesktopInterface() +{ +} + diff -Nru ukui-control-center-5.0.0.0/plugins/system/vino/krd.h ukui-control-center-5.0.0.0/plugins/system/vino/krd.h --- ukui-control-center-5.0.0.0/plugins/system/vino/krd.h 1970-01-01 08:00:00.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/vino/krd.h 2025-02-07 16:27:50.000000000 +0800 @@ -0,0 +1,142 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp -N com.kylin.RemoteDesktop.xml -p krd.h:krd.cpp + * + * qdbusxml2cpp is Copyright (C) 2020 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#ifndef KRD_H +#define KRD_H + +#include <QtCore/QObject> +#include <QtCore/QByteArray> +#include <QtCore/QList> +#include <QtCore/QMap> +#include <QtCore/QString> +#include <QtCore/QStringList> +#include <QtCore/QVariant> +#include <QtDBus/QtDBus> + +typedef QList<QVariantMap> ClientInfo; +Q_DECLARE_METATYPE(ClientInfo) + +/* + * Proxy class for interface com.kylin.RemoteDesktop + */ +class ComKylinRemoteDesktopInterface: public QDBusAbstractInterface +{ + Q_OBJECT +public: + static inline const char *staticInterfaceName() + { return "com.kylin.RemoteDesktop"; } + +public: + ComKylinRemoteDesktopInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); + + ~ComKylinRemoteDesktopInterface(); + + Q_PROPERTY(ClientInfo ClientsInfo READ clientsInfo) + inline ClientInfo clientsInfo() const + { return qvariant_cast< ClientInfo >(property("ClientsInfo")); } + +public Q_SLOTS: // METHODS + inline QDBusPendingReply<> CloseClient(int id) + { + QList<QVariant> argumentList; + argumentList << QVariant::fromValue(id); + return asyncCallWithArgumentList(QStringLiteral("CloseClient"), argumentList); + } + + // 退出服务 + inline QDBusPendingReply<> Exit() + { + QList<QVariant> argumentList; + return asyncCallWithArgumentList(QStringLiteral("Exit"), argumentList); + } + + // 开启VNC远程连接 + inline QDBusPendingReply<int> Start(const QString &output) + { + QList<QVariant> argumentList; + argumentList << QVariant::fromValue(output); + return asyncCallWithArgumentList(QStringLiteral("Start"), argumentList); + } + + inline QDBusReply<bool> GetStatus() + { + return call(QStringLiteral("GetStatus")); + } + + // 设置自动开启,开机启动 krd-daemon 服务 + inline QDBusPendingReply<int> SetAutoStart(const bool isAuto) + { + QList<QVariant> argumentList; + argumentList << QVariant::fromValue(isAuto); + return asyncCallWithArgumentList(QStringLiteral("SetAutoStart"), argumentList); + } + + // 设置远程连接时是否需要密码 + inline QDBusPendingReply<int> SetAuthMethod(const uchar need) + { + QList<QVariant> argumentList; + argumentList << QVariant::fromValue(need); + return asyncCallWithArgumentList(QStringLiteral("SetAuthMethod"), argumentList); + } + + inline QDBusReply<uchar> GetAuthMethod() + { + return call(QStringLiteral("GetAuthMethod")); + } + + // 设置远程连接密码 + inline QDBusPendingReply<int> SetPassword(const QString &passwd) + { + QList<QVariant> argumentList; + argumentList << QVariant::fromValue(passwd); + return asyncCallWithArgumentList(QStringLiteral("SetPassword"), argumentList); + } + inline QDBusReply<QString> GetPassword() + { + return call(QStringLiteral("GetPassword")); + } + + // 获取输出显示器列表 + inline QDBusReply<QStringList> GetSupportedOutputDevice() + { + return call(QStringLiteral("GetSupportedOutputDevice")); + } + + // 获取当前可远程连接的显示器 + inline QDBusReply<QString> GetCurrentDevice() + { + return call(QStringLiteral("GetCurrentDevice")); + } + + // 设置允许连接的远程客户端数量 + inline QDBusPendingReply<int> SetAllowedMaxClient(const uint maxCount) + { + QList<QVariant> argumentList; + argumentList << QVariant::fromValue(maxCount); + return asyncCallWithArgumentList(QStringLiteral("SetAllowedMaxClient"), argumentList); + } + + inline QDBusReply<uint> GetAllowedMaxClient() + { + return call(QStringLiteral("GetAllowedMaxClient")); + } + + inline QDBusPendingReply<> SetViewOnly(int id, bool viewOnly) + { + QList<QVariant> argumentList; + argumentList << QVariant::fromValue(id) << QVariant::fromValue(viewOnly); + return asyncCallWithArgumentList(QStringLiteral("SetViewOnly"), argumentList); + } + +Q_SIGNALS: // SIGNALS + void Changed(int type); +}; + +#endif diff -Nru ukui-control-center-5.0.0.0/plugins/system/vino/sharemain.cpp ukui-control-center-5.0.0.0/plugins/system/vino/sharemain.cpp --- ukui-control-center-5.0.0.0/plugins/system/vino/sharemain.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/vino/sharemain.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -26,17 +26,38 @@ #include <QMessageBox> #include <QInputDialog> #include <QTimer> + #include <QDBusInterface> #include <QDBusConnection> +#include <QtConcurrent> + +#include <kysdk/applications/accessinfohelper.h> +using namespace kdk; -#include "common.h" +#include "ukcccommon.h" +using namespace ukcc; ShareMain::ShareMain(QWidget *parent) : QWidget(parent) { - mVlayout = new QVBoxLayout(this); - mVlayout->setContentsMargins(0, 0, 0, 0); initUI(); + + m_pServiceDbus = new QDBusInterface("com.control.center.qt.systemdbus", + "/", + "com.control.center.interface", + QDBusConnection::systemBus(), this); + + m_pKrd = new ComKylinRemoteDesktopInterface("com.kylin.RemoteDesktop", + "/com/kylin/RemoteDesktop", + QDBusConnection::sessionBus(), + this); + if (!m_pKrd->isValid()) { + qDebug() << "start com.kylin.RemoteDesktop service failed"; + } + if (UkccCommon::isWayland()) { + initWaylandData(); + } + initConnection(); } @@ -46,84 +67,362 @@ void ShareMain::initUI() { - SettingGroup *mVinoFrame = new SettingGroup; - mVinoTitleLabel = new TitleLabel(this); - mVinoTitleLabel->setText(tr("Remote Desktop")); + TitleLabel *vinoTitleLabel = new TitleLabel(this); + //~ contents_path /Vino/Remote Desktop + vinoTitleLabel->setText(tr("Remote Desktop")); + KDK_EXTEND_ALL_INFO_FORMAT(vinoTitleLabel, "Vino", "", ""); + + //~ contents_path /Vino/Connect to your desktop remotely + m_pEnableFrame = new SwitchWidget(tr("Connect to your desktop remotely"), this); + m_pEnableFrame->switchButton()->setObjectName("enable"); + KDK_EXTEND_ALL_INFO_FORMAT(m_pEnableFrame, "Vino", "", ""); + + //~ contents_path /Vino/Allow others to connect to your desktop remotely using RDP + m_pRdpEnableFrame = new SwitchWidget(tr("Allow others to connect to your desktop remotely using RDP"), this); + KDK_EXTEND_ALL_INFO_FORMAT(m_pRdpEnableFrame->switchButton(), "Vino", "", "rdp switchbutton"); + m_pRdpEnableFrame->switchButton()->setObjectName("rdp-enable"); + KDK_EXTEND_ALL_INFO_FORMAT(m_pRdpEnableFrame, "Vino", "", "rdp label"); + + m_pVncFrameGroup = new SettingGroup(this); + //~ contents_path /Vino/Allow others to connect to your desktop remotely using VNC + m_pVncEnableFrame = new SwitchWidget(tr("Allow others to connect to your desktop remotely using VNC"),this); + KDK_EXTEND_ALL_INFO_FORMAT(m_pVncEnableFrame->switchButton(), "Vino", "", "vnc enable switchbutton"); + m_pVncEnableFrame->switchButton()->setObjectName("vnc-enable"); + KDK_EXTEND_ALL_INFO_FORMAT(m_pVncEnableFrame, "Vino", "", "vnc enable label"); - mEnableWidget = new SwitchWidget(tr("Allow others to view your desktop")); //~ contents_path /Vino/Allow connection to control screen - mViewWidget = new SwitchWidget(tr("Allow connection to control screen")); + m_pViewFrame = new SwitchWidget(tr("Allow connection to control screen"), this); + KDK_EXTEND_ALL_INFO_FORMAT(m_pViewFrame->switchButton(), "Vino", "", "view only switchbutton"); + m_pViewFrame->switchButton()->setObjectName("vnc-control"); + KDK_EXTEND_ALL_INFO_FORMAT(m_pViewFrame, "Vino", "", "view only label"); + //~ contents_path /Vino/You must confirm every visit for this machine - mSecurityWidget = new SwitchWidget(tr("You must confirm every visit for this machine")); - //~ contents_path /Vino/Require user to enter this password: - mSecurityPwdWidget = new SwitchWidget(tr("Require user to enter this password: ")); - mPwdinputBtn = new QPushButton(this); - mSecurityPwdWidget->insertWidget(1, mPwdinputBtn); + m_pSecurityFrame = new SwitchWidget(tr("You must confirm every visit for this machine"),this); + KDK_EXTEND_ALL_INFO_FORMAT(m_pSecurityFrame->switchButton(), "Vino", "", "need confirm switchbutton"); + m_pSecurityFrame->switchButton()->setObjectName("vnc-confirm"); + KDK_EXTEND_ALL_INFO_FORMAT(m_pSecurityFrame, "Vino", "", "need confirm label"); + + //~ contents_path /Vino/Require user to enter this password while using VNC: + m_pSecurityPwdFrame = new SwitchWidget(tr("Require user to enter this password while using VNC: "), this); + KDK_EXTEND_ALL_INFO_FORMAT(m_pSecurityPwdFrame->switchButton(), "Vino", "", "password switchbutton"); + m_pSecurityPwdFrame->switchButton()->setObjectName("vnc-pwd"); + KDK_EXTEND_ALL_INFO_FORMAT(m_pSecurityPwdFrame, "Vino", "", "password label"); + m_pPwdinputLabel = new PasswordLabel(this); + m_pPwdinputLabel->setObjectName("vnc-pwdsettings"); + m_pPwdEditBtn = new QPushButton(tr("Edit"), this); + KDK_EXTEND_ALL_INFO_FORMAT(m_pPwdEditBtn, "Vino", "", ""); + m_pPwdEditBtn->setObjectName("vnc-pwdsettings"); + m_pSecurityPwdFrame->insertWidget(1, m_pPwdinputLabel); + m_pSecurityPwdFrame->insertWidget(2, m_pPwdEditBtn, 8, Qt::AlignRight); + + m_pVncFrameGroup->insertWidget(0, m_pVncEnableFrame); + m_pVncFrameGroup->insertWidget(1, m_pViewFrame); + m_pVncFrameGroup->insertWidget(2, m_pSecurityFrame); + m_pVncFrameGroup->insertWidget(3, m_pSecurityPwdFrame); + + //~ contents_path /Vino/Displays that allow remote access + m_pOutputDisplayFrame = new ComboxWidget(tr("Displays that allow remote access"), this); + m_pOutputDisplayFrame->comboBox()->setFixedWidth(220); + m_pOutputDisplayFrame->setTitleMaximumWidth(16777215); + KDK_EXTEND_ALL_INFO_FORMAT(m_pOutputDisplayFrame->comboBox(), "Vino", "", "display combox"); + m_pOutputDisplayFrame->comboBox()->setObjectName("display"); + KDK_EXTEND_ALL_INFO_FORMAT(m_pOutputDisplayFrame, "Vino", "", "display label"); + + //~ contents_path /Vino/The number of remote clients allowed to connect + m_pClientsFrame = new ComboxWidget(tr("The number of remote clients allowed to connect"), this); + m_pClientsFrame->comboBox()->setFixedWidth(220); + m_pClientsFrame->setTitleMaximumWidth(16777215); + KDK_EXTEND_ALL_INFO_FORMAT(m_pClientsFrame->comboBox(), "Vino", "", "client combox"); + m_pClientsFrame->comboBox()->setObjectName("display"); + KDK_EXTEND_ALL_INFO_FORMAT(m_pClientsFrame, "Vino", "", "client label"); + + m_pDisplayWithClientsFrameGroup = new SettingGroup(this); + m_pDisplayWithClientsFrameGroup->insertWidget(0, m_pOutputDisplayFrame); + m_pDisplayWithClientsFrameGroup->insertWidget(1, m_pClientsFrame); + + QVBoxLayout *mainVLayout = new QVBoxLayout(this); + mainVLayout->setContentsMargins(0, 0, 0, 0); + mainVLayout->addWidget(vinoTitleLabel); + mainVLayout->setSpacing(8); + mainVLayout->addWidget(m_pEnableFrame); + mainVLayout->addWidget(m_pRdpEnableFrame); + mainVLayout->addWidget(m_pVncFrameGroup); + mainVLayout->addWidget(m_pDisplayWithClientsFrameGroup); + mainVLayout->addStretch(); + + m_pRdpEnableFrame->hide(); + + if (UkccCommon::isWayland()) { + m_pEnableFrame->setVisible(false); + m_pRdpEnableFrame->setVisible(false); + m_pViewFrame->setVisible(false); + m_pSecurityFrame->setVisible(false); + } else { + m_pDisplayWithClientsFrameGroup->setVisible(false); + } +} + +void ShareMain::initWaylandData() +{ + bool isOpen = m_pKrd->GetStatus(); + bool needPwd = m_pKrd->GetAuthMethod(); + QString password = m_pKrd->GetPassword(); + + m_pVncEnableFrame->switchButton()->setChecked(isOpen); + setFrameVisible(isOpen); + m_pSecurityPwdFrame->switchButton()->setChecked(needPwd); + m_pPwdinputLabel->setVisible(needPwd); + m_pPwdEditBtn->setVisible(needPwd); + m_pPwdinputLabel->setText(password); + + initOutputs(); + initMaxClientValue(); +} + +void ShareMain::initOutputs() +{ + QStringList outputs = m_pKrd->GetSupportedOutputDevice(); + qDebug() << "GetSupportedOutputDevice" << outputs; + + /* first delete output that is removed */ + for(int i = 0; i< m_pOutputDisplayFrame->comboBox()->count(); i++) { + if (!outputs.contains(m_pOutputDisplayFrame->comboBox()->itemText(i))) { + qDebug() << "remove output" << m_pOutputDisplayFrame->comboBox()->itemText(i); + m_pOutputDisplayFrame->comboBox()->removeItem(i); + } + } + + /* add output that is new */ + foreach (const QString &output, outputs) { + if (m_pOutputDisplayFrame->comboBox()->findText(output) == -1) { + qDebug() << "add output" << output; + m_pOutputDisplayFrame->comboBox()->addItem(output); + } + } + if (m_pOutputDisplayFrame->comboBox()->count() == 1) { + m_pOutputDisplayFrame->comboBox()->setEnabled(false); + } else { + m_pOutputDisplayFrame->comboBox()->setEnabled(true); + } + + QString output = m_pKrd->GetCurrentDevice(); + qDebug() << "GetCurrentDevice" << output; + if (!output.isEmpty() && m_pOutputDisplayFrame->comboBox()->findText(output) != -1) { + m_pOutputDisplayFrame->comboBox()->setCurrentText(output); + } else { + m_pOutputDisplayFrame->comboBox()->setCurrentIndex(0); + // 以开启远程连接的情况下使用 start 接口切换输出屏幕是否生效,是否需要断开上一次设置的output; + currentDisplayChanged(m_pOutputDisplayFrame->comboBox()->currentText()); + } +} + +void ShareMain::currentDisplayChanged(QString output) +{ + qDebug() << "selected output" << output; + if (!m_pVncEnableFrame->switchButton()->isChecked()) { + return; + } + if (output.isEmpty()) { + QMessageBox::warning(NULL, tr("Warning"), tr("please select an output")); + m_pEnableFrame->switchButton()->setChecked(false); + return; + } + + m_pKrd->Start(output); + UkccCommon::buriedSettings(QStringLiteral("Vino"), m_pOutputDisplayFrame->title(), QString("selected"), output); + + qDebug() << "ZDEBUG " << "start " << output << __LINE__ ; +} + +void ShareMain::initMaxClientValue() +{ + int maxClient = m_pKrd->GetAllowedMaxClient(); + ClientInfo client = m_pKrd->clientsInfo(); + m_pClientsFrame->comboBox()->clear(); + QStringList clientCountList; + // 最小应为已连接的客户端数量 + for(int i = client.count() > 0 ? client.count() : 1; i <= 10; i++) { + clientCountList << QString::number(i); + } + + m_pClientsFrame->comboBox()->addItems(clientCountList); + + // 当连接数量大于0且,大于maxClient,SetAllowedMaxClient为当前连接数量 + if (client.count() > 0 && client.count() > maxClient) { + maxClient = client.count(); + } + + // 当maxClient=0,SetAllowedMaxClient最小为1 + if (maxClient == 0 ) { + maxClient = 1; + } + + m_pClientsFrame->comboBox()->setCurrentText(QString::number(maxClient)); + m_pKrd->SetAllowedMaxClient(maxClient); +} + +void ShareMain::maxClientValueChangedSlot(QString cNum) +{ + m_pKrd->SetAllowedMaxClient(cNum.toInt()); + UkccCommon::buriedSettings(QStringLiteral("Vino"), m_pClientsFrame->title(), QString("selected"), cNum); +} - mVinoFrame->addWidget(mEnableWidget); - mVinoFrame->addWidget(mViewWidget); - mVinoFrame->addWidget(mSecurityWidget); - mVinoFrame->addWidget(mSecurityPwdWidget); - - mVlayout->addWidget(mVinoTitleLabel); - mVlayout->addWidget(mVinoFrame); - mVlayout->addStretch(); +void ShareMain::onChanged(int type) +{ + if (type == 1) { + initOutputs(); + } else if (type == 2) { + // 调整m_pClientsCombox中可供设置的值 + int allowMax = m_pKrd->GetAllowedMaxClient(); + ClientInfo client = m_pKrd->clientsInfo(); + qDebug() << "client active number == " << client.count(); + + if(client.count() > 0) { + // 将小于已连接数的移除 + for(int i = 1; i < client.count(); i++) { + if (m_pClientsFrame->comboBox()->findText(QString::number(i)) != -1) { + m_pClientsFrame->comboBox()->removeItem(m_pClientsFrame->comboBox()->findText(QString::number(i))); + } + } + // 将大于等于的数添加 + for(int i = client.count(); i <= 10; i++) { + if (m_pClientsFrame->comboBox()->findText(QString::number(i)) == -1) { + qDebug() << "m_pClientsCombox add number" << i;; + m_pClientsFrame->comboBox()->insertItem(i - 1, QString::number(i)); + } + } + } + // 已连接数量大于当前设置的最大允许连接数,设置最大允许连接为已连接数? 无已连接大于允许的情况 + if(client.count() > 0 && client.count() > allowMax) { + allowMax = client.count(); + } + m_pClientsFrame->comboBox()->setCurrentText(QString::number(allowMax)); + } +} + +void ShareMain::setSecurityControl() +{ + // 深信服控件禁用 + QVariantMap ModuleMap = UkccCommon::getModuleHideStatus(); + QString moduleSettings = ModuleMap.value("vinoSettings").toString(); + QStringList setItems = moduleSettings.split(","); + + qDebug() << Q_FUNC_INFO << moduleSettings; + foreach (QString setItem, setItems) { + QStringList item = setItem.split(":"); + qDebug() << "set item Name: " << item.at(0); + if (item.at(0) == "mEnableFrame") { + m_pEnableFrame->setVisible(item.at(1) == "true"); + } + if (item.at(0) == "mRdpEnableFrame") { + m_pRdpEnableFrame->setVisible(item.at(1) == "true"); + } + if (item.at(0) == "mVncEnableFrame") { + m_pVncEnableFrame->setVisible(item.at(1) == "true"); + } + if (item.at(0) == "mViewFrame") { + m_pViewFrame->setVisible(item.at(1) == "true"); + } + if (item.at(0) == "mSecurityFrame") { + m_pSecurityFrame->setVisible(item.at(1) == "true"); + } + if (item.at(0) == "mSecurityPwdFrame") { + m_pSecurityPwdFrame->setVisible(item.at(1) == "true"); + } + } + + // 安全管控 禁用与启用 + QString moduleEnable = ModuleMap.value("vinoEnable").toString(); + QStringList enableItems = moduleEnable.split(","); + + foreach (QString setItem, enableItems) { + QStringList item = setItem.split(":"); + qDebug() << "set item Name: " << item.at(0); + if (item.at(0) == "mEnableFrame") { + m_pEnableFrame->setEnabled(item.at(1) == "true"); + } + if (item.at(0) == "mRdpEnableFrame") { + m_pRdpEnableFrame->setEnabled(item.at(1) == "true"); + } + if (item.at(0) == "mVncEnableFrame") { + m_pVncEnableFrame->setEnabled(item.at(1) == "true"); + } + if (item.at(0) == "mViewFrame") { + m_pViewFrame->setEnabled(item.at(1) == "true"); + } + if (item.at(0) == "mSecurityFrame") { + m_pSecurityFrame->setEnabled(item.at(1) == "true"); + } + if (item.at(0) == "mSecurityPwdFrame") { + m_pSecurityPwdFrame->setEnabled(item.at(1) == "true"); + } + } } void ShareMain::initConnection() { QByteArray id(kVinoSchemas); - if (QGSettings::isSchemaInstalled(id)) { - mVinoGsetting = new QGSettings(kVinoSchemas, QByteArray(), this); + QByteArray idd(kUkccSchmas); + if (QGSettings::isSchemaInstalled(idd)) { + m_pUkccGsettings = new QGSettings(kUkccSchmas, QByteArray(), this); + } + if (QGSettings::isSchemaInstalled(id) && !UkccCommon::isWayland()) { + m_pVinoGsetting = new QGSettings(kVinoSchemas, QByteArray(), this); initEnableStatus(); + initServiceStatus(); - connect(mEnableWidget, &SwitchWidget::stateChanged, this, [=](bool status) { - Common::buriedSettings(QStringLiteral("Vino"), "whether allow others to connect to your desktop remotely", QString("settings"), status ? "true" : "false"); - enableSlot(status); - }); - connect(mViewWidget, &SwitchWidget::stateChanged, this, [=](bool status) { - Common::buriedSettings(QStringLiteral("Vino"), "whether allow others to control your desktop remotely", QString("settings"), status ? "true" : "false"); - viewBoxSlot(status); - }); - connect(mSecurityWidget, &SwitchWidget::stateChanged, this, [=](bool status) { - Common::buriedSettings(QStringLiteral("Vino"), "whether to confirm each visit for the local mach", QString("settings"), status ? "true" : "false"); - accessSlot(status); - }); - connect(mSecurityPwdWidget, &SwitchWidget::stateChanged, this, [=](bool status) { - Common::buriedSettings(QStringLiteral("Vino"), "whether password verification is required", QString("settings"), status ? "true" : "false"); - pwdEnableSlot(status); - }); - connect(mPwdinputBtn, &QPushButton::clicked, this, [=]() { - Common::buriedSettings(QStringLiteral("Vino"), "set password", QString("clicked")); - pwdInputSlot(); - }); + connect(m_pEnableFrame->switchButton(), &KSwitchButton::stateChanged, this, &ShareMain::enableSlot); + + connect(m_pRdpEnableFrame->switchButton(), &KSwitchButton::stateChanged, this, &ShareMain::xrdpEnabledSlot); + + connect(m_pViewFrame->switchButton(), &KSwitchButton::stateChanged, this, &ShareMain::viewBoxSlot); + + connect(m_pSecurityFrame->switchButton(), &KSwitchButton::stateChanged, this, &ShareMain::accessSlot); + } + + connect(m_pVncEnableFrame->switchButton(), &KSwitchButton::stateChanged, this, &ShareMain::vinoEnableSlot); + + connect(m_pSecurityPwdFrame->switchButton(), &KSwitchButton::stateChanged, this, &ShareMain::pwdEnableSlot); + + connect(m_pPwdEditBtn, &QPushButton::clicked, this, &ShareMain::pwdInputSlot); + + if (UkccCommon::isWayland()) { + connect(m_pKrd, &ComKylinRemoteDesktopInterface::Changed, this, &ShareMain::onChanged); + connect(m_pOutputDisplayFrame->comboBox(), &QComboBox::currentTextChanged, this, &ShareMain::currentDisplayChanged); + + connect(m_pClientsFrame->comboBox(), &QComboBox::currentTextChanged, this, &ShareMain::maxClientValueChangedSlot); } + + setSecurityControl(); + QDBusConnection::sessionBus().connect(QString(), QString("/"), "org.ukui.ukcc.session.interface", "configChanged", this, SLOT(setSecurityControl())); } void ShareMain::initEnableStatus() { - bool isShared = mVinoGsetting->get(kVinoViewOnlyKey).toBool(); - bool secPwd = mVinoGsetting->get(kVinoPromptKey).toBool(); - QString pwd = mVinoGsetting->get(kAuthenticationKey).toString(); - secpwd = mVinoGsetting->get(kVncPwdKey).toString(); + bool isShared = m_pVinoGsetting->get(kVinoViewOnlyKey).toBool(); + bool need = m_pVinoGsetting->get(kVinoPromptKey).toBool(); + QString pwd = m_pVinoGsetting->get(kAuthenticationKey).toString(); + m_secpwd = m_pVinoGsetting->get(kVncPwdKey).toString(); - mSecurityWidget->setChecked(secPwd); - mViewWidget->setChecked(!isShared); + m_pSecurityFrame->switchButton()->setChecked(need); + m_pViewFrame->switchButton()->setChecked(!isShared); if (pwd == "vnc") { - if (secpwd == "keyring") { - mSecurityPwdWidget->setChecked(false); - mPwdinputBtn->hide(); - mVinoGsetting->set(kAuthenticationKey, "none"); + if (m_secpwd == "keyring") { + m_pSecurityPwdFrame->switchButton()->setChecked(false); + m_pPwdinputLabel->hide(); + m_pPwdEditBtn->hide(); + m_pVinoGsetting->set(kAuthenticationKey, "none"); } else { - mSecurityPwdWidget->setChecked(true); - mPwdinputBtn->setText(QByteArray::fromBase64(secpwd.toLatin1())); + m_pSecurityPwdFrame->switchButton()->setChecked(true); + m_pPwdinputLabel->setText(QByteArray::fromBase64(m_secpwd.toLatin1())); } } else { - mSecurityPwdWidget->setChecked(false); - mPwdinputBtn->setVisible(false); + m_pSecurityPwdFrame->switchButton()->setChecked(false); + m_pPwdinputLabel->setVisible(false); + m_pPwdEditBtn->setVisible(false); } QProcess *process = new QProcess; @@ -137,10 +436,15 @@ void ShareMain::setFrameVisible(bool visible) { - mEnableWidget->setChecked(visible); - mViewWidget->setVisible(visible); - mSecurityWidget->setVisible(visible); - mSecurityPwdWidget->setVisible(visible); + m_pVncEnableFrame->switchButton()->setChecked(visible); + if (!UkccCommon::isWayland()) { + m_pViewFrame->setVisible(visible); + m_pSecurityFrame->setVisible(visible); + } else { + m_pDisplayWithClientsFrameGroup->setVisible(visible); + } + m_pSecurityPwdFrame->setVisible(visible); + m_pPwdinputLabel->setStatus(visible); } void ShareMain::setVinoService(bool status) @@ -160,45 +464,191 @@ void ShareMain::enableSlot(bool status) { + if (status) { + m_pUkccGsettings->set(kUkccEnableKey, status); + initServiceStatus(); + if (m_isExsitXrdp) { + if (m_pServiceDbus->isValid()) { + m_pRdpEnableFrame->switchButton()->setChecked(status); + setXrdpService(status); + } + m_pRdpEnableFrame->setVisible(true); + } + m_pVncEnableFrame->switchButton()->setChecked(status); + vinoEnableSlot(status); + m_pVncFrameGroup->setVisible(true); + } else { + m_pUkccGsettings->set(kUkccEnableKey, status); + if (m_isExsitXrdp) { + m_pUkccGsettings->set(kUkccRdpEnableKey, status); + m_pRdpEnableFrame->hide(); + if (m_pServiceDbus->isValid()) { + setXrdpService(false); + } + m_pRdpEnableFrame->switchButton()->blockSignals(true); + m_pRdpEnableFrame->switchButton()->setChecked(false); + m_pRdpEnableFrame->switchButton()->blockSignals(false); + } + m_pUkccGsettings->set(kUkccVncEnableKey, status); + vinoEnableSlot(false); + m_pVncFrameGroup->setVisible(false); + } + UkccCommon::buriedSettings(QStringLiteral("Vino"), "whether allow others to connect to your desktop remotely", QString("settings"), status ? "true" : "false"); +} + +void ShareMain::xrdpEnabledSlot(bool status) +{ + m_pUkccGsettings->set(kUkccRdpEnableKey, status); + if (m_isExsitXrdp) { + if (m_pServiceDbus->isValid()) { + setXrdpService(status); + } + } else { + m_pRdpEnableFrame->setVisible(false); + } + UkccCommon::buriedSettings(QStringLiteral("Vino"), "Allow others to connect to your desktop remotely using RDP", QString("settings"), status ? "true" : "false"); +} + +void ShareMain::vinoEnableSlot(bool status) +{ setFrameVisible(status); - setVinoService(status); + if(UkccCommon::isWayland()) { + if (status) { + QString output = m_pKrd->GetCurrentDevice(); + qDebug() << "GetCurrentDevice" << output; + if (!output.isEmpty()) { + m_pKrd->Start(m_pKrd->GetCurrentDevice()); + } else { + m_pKrd->Start(m_pOutputDisplayFrame->comboBox()->itemText(0)); + } + } else { + m_pKrd->Exit(); + } + } else { + setVinoService(status); + } + UkccCommon::buriedSettings(QStringLiteral("Vino"), "Allow others to connect to your desktop remotely using VNC", QString("settings"), status ? "true" : "false"); } void ShareMain::viewBoxSlot(bool status) { - mVinoGsetting->set(kVinoViewOnlyKey, !status); + m_pVinoGsetting->set(kVinoViewOnlyKey, !status); + UkccCommon::buriedSettings(QStringLiteral("Vino"), "whether allow others to control your desktop remotely", QString("settings"), status ? "true" : "false"); } void ShareMain::accessSlot(bool status) { if (status) { - mVinoGsetting->set(kVinoPromptKey, true); + m_pVinoGsetting->set(kVinoPromptKey, true); } else { - mVinoGsetting->set(kVinoPromptKey, false); + m_pVinoGsetting->set(kVinoPromptKey, false); } + UkccCommon::buriedSettings(QStringLiteral("Vino"), "whether to confirm each visit for the local mach", QString("settings"), status ? "true" : "false"); } void ShareMain::pwdEnableSlot(bool status) { - if (status) { - mPwdinputBtn->setVisible(secpwd == "keyring" ? false:true); - mPwdinputBtn->setText(QByteArray::fromBase64(mVinoGsetting->get(kVncPwdKey).toString().toLatin1())); - pwdInputSlot(); - mPwdinputBtn->setVisible(status); - if (mVinoGsetting->get(kAuthenticationKey).toString() == "none") { - mSecurityPwdWidget->setChecked(false); + if (UkccCommon::isWayland()) { + if (status) { + QString pwd = m_pKrd->GetPassword(); + m_pPwdinputLabel->setVisible(!pwd.isEmpty()); + m_pPwdEditBtn->setVisible(!pwd.isEmpty()); + m_pPwdinputLabel->setStatus(true); + m_pPwdinputLabel->setText(pwd); + pwdInputSlot(); + if (!m_pKrd->GetAuthMethod()) { + m_pSecurityPwdFrame->switchButton()->setChecked(false); + } } - + m_pPwdinputLabel->setVisible(m_pSecurityPwdFrame->switchButton()->isChecked()); + m_pPwdEditBtn->setVisible(m_pSecurityPwdFrame->switchButton()->isChecked()); + m_pKrd->SetAuthMethod(m_pSecurityPwdFrame->switchButton()->isChecked()); } else { - mPwdinputBtn->setVisible(false); - mVinoGsetting->set(kAuthenticationKey, "none"); + if (status) { + m_pPwdinputLabel->setVisible(m_secpwd == "keyring" ? false:true); + m_pPwdEditBtn->setVisible(m_secpwd == "keyring" ? false:true); + m_pPwdinputLabel->setStatus(true); + m_pPwdinputLabel->setText(QByteArray::fromBase64(m_pVinoGsetting->get(kVncPwdKey).toString().toLatin1())); + pwdInputSlot(); + m_pPwdinputLabel->setVisible(status); + m_pPwdEditBtn->setVisible(status); + if (m_pVinoGsetting->get(kAuthenticationKey).toString() == "none") { + m_pSecurityPwdFrame->switchButton()->setChecked(false); + } + + } else { + m_pPwdinputLabel->setVisible(status); + m_pPwdEditBtn->setVisible(status); + m_pVinoGsetting->set(kAuthenticationKey, "none"); + } } + UkccCommon::buriedSettings(QStringLiteral("Vino"), "whether password verification is required", QString("settings"), status ? "true" : "false"); } void ShareMain::pwdInputSlot() { - InputPwdDialog *mwindow = new InputPwdDialog(mVinoGsetting,this); - mwindow->exec(); - secpwd = mVinoGsetting->get(kVncPwdKey).toString(); - mPwdinputBtn->setText(QByteArray::fromBase64(secpwd.toLatin1())); + if (UkccCommon::isWayland()) { + InputPwdDialog *mwindow = new InputPwdDialog(m_pKrd,this); + mwindow->exec(); + m_pPwdinputLabel->setText(m_pKrd->GetPassword()); + } else { + InputPwdDialog *mwindow = new InputPwdDialog(m_pVinoGsetting,this); + mwindow->exec(); + m_secpwd = m_pVinoGsetting->get(kVncPwdKey).toString(); + m_pPwdinputLabel->setText(QByteArray::fromBase64(m_secpwd.toLatin1())); + } + UkccCommon::buriedSettings(QStringLiteral("Vino"), "set password", QString("clicked")); +} + +void ShareMain::initServiceStatus() +{ + bool isEnabled = m_pUkccGsettings->get(kUkccEnableKey).toBool(); + if (isEnabled) { + m_pEnableFrame->switchButton()->setChecked(true); + XrdpServiceStatus xrdpstatus = getXrdpServiceStatus(); + switch (xrdpstatus) { + case NONE: + m_pRdpEnableFrame->hide(); + m_isExsitXrdp = false; + break; + case RUNNING: + m_pRdpEnableFrame->switchButton()->setChecked(true); + break; + case INACTIVE: + m_pRdpEnableFrame->switchButton()->setChecked(false); + break; + } + } else { + m_pEnableFrame->switchButton()->setChecked(false); + m_pRdpEnableFrame->hide(); + m_pVncFrameGroup->hide(); + } +} + +XrdpServiceStatus ShareMain::getXrdpServiceStatus() +{ + QProcess process; + QString cmd = "systemctl status xrdp.service | grep Active:"; + process.start("bash", QStringList() <<"-c" << cmd); + process.waitForFinished(); + QString strResult = process.readAllStandardOutput()+process.readAllStandardError(); + if (strResult.replace("\n", "") == "Unit xrdp.service could not be found.") { + return NONE; + } + cmd = "systemctl is-failed xrdp.service"; + process.start("bash", QStringList() <<"-c" << cmd); + process.waitForFinished(); + strResult = process.readAllStandardOutput()+process.readAllStandardError(); + if ((strResult.replace("\n", "") == "active")) + return RUNNING; + else + return INACTIVE; + +} + +void ShareMain::setXrdpService(bool status) +{ + QtConcurrent::run([=]() { + m_pServiceDbus->call("setXrdpService", status); + }); } diff -Nru ukui-control-center-5.0.0.0/plugins/system/vino/sharemain.h ukui-control-center-5.0.0.0/plugins/system/vino/sharemain.h --- ukui-control-center-5.0.0.0/plugins/system/vino/sharemain.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/vino/sharemain.h 2025-02-07 16:27:50.000000000 +0800 @@ -32,12 +32,18 @@ #include <QDebug> #include <QGSettings/QGSettings> #include <QPushButton> +#include <QDBusInterface> +#include <QComboBox> +#include "krd.h" #include "inputpwddialog.h" #include "titlelabel.h" -#include "kswitchbutton.h" +#include "fixlabel.h" #include "switchwidget.h" +#include "comboxwidget.h" #include "settinggroup.h" -#include "ukccframe.h" + +#include "passwordlabel.h" +#include "kswitchbutton.h" using namespace kdk; const QByteArray kVinoSchemas = "org.gnome.Vino"; @@ -46,14 +52,22 @@ const QString kAuthenticationKey = "authentication-methods"; const QString kVncPwdKey = "vnc-password"; -const QByteArray kUkccVnoSchmas = "org.ukui.control-center.vino"; -const QString kUkccPromptKey = "remote"; +const QByteArray kUkccSchmas = "org.ukui.control-center"; +const QString kUkccEnableKey = "enabled"; +const QString kUkccRdpEnableKey = "xrdp-enabled"; +const QString kUkccVncEnableKey = "vino-enabled"; enum RequestPwd { NOPWD, NEEDPWD }; +enum XrdpServiceStatus { + RUNNING, + INACTIVE, + NONE +}; + class ShareMain : public QWidget { Q_OBJECT @@ -61,20 +75,34 @@ ShareMain(QWidget *parent = nullptr); ~ShareMain(); + void initServiceStatus(); + private: - SwitchWidget *mEnableWidget; - SwitchWidget *mViewWidget; - SwitchWidget *mSecurityWidget; - SwitchWidget *mSecurityPwdWidget; - - TitleLabel *mVinoTitleLabel; - - QPushButton *mPwdinputBtn; - QVBoxLayout *mVlayout; - QGSettings *mVinoGsetting; - QString secpwd; + SwitchWidget *m_pEnableFrame; // 允许其他人查看桌面 + SwitchWidget *m_pRdpEnableFrame; // 允许其他用户使用rdp远程连接这台电脑 + SettingGroup *m_pVncFrameGroup; + SwitchWidget *m_pVncEnableFrame; // 允许其他用户使用vnc远程连接这台电脑 + SwitchWidget *m_pViewFrame; // 允许连接控制屏幕 + SwitchWidget *m_pSecurityFrame; // 为本机确认每次访问 + SwitchWidget *m_pSecurityPwdFrame; // 要求用户输入密码 + PasswordLabel *m_pPwdinputLabel; + QPushButton *m_pPwdEditBtn; + + QGSettings *m_pVinoGsetting; + QGSettings *m_pUkccGsettings = nullptr; + + bool m_isExsitXrdp = true; + QDBusInterface *m_pServiceDbus; + + QString m_secpwd; + + ComKylinRemoteDesktopInterface *m_pKrd; + ComboxWidget *m_pOutputDisplayFrame; + ComboxWidget *m_pClientsFrame; + SettingGroup *m_pDisplayWithClientsFrameGroup; private: + void initWaylandData(); void initUI(); void initConnection(); void initShareStatus(bool isConnnect, bool isPwd); @@ -82,12 +110,26 @@ void setFrameVisible(bool visible); void setVinoService(bool status); + XrdpServiceStatus getXrdpServiceStatus(); + void setXrdpService(bool status); + + void initOutputs(); + void initMaxClientValue(); + private slots: void enableSlot(bool status); + void xrdpEnabledSlot(bool status); + void vinoEnableSlot(bool status); void viewBoxSlot(bool status); void accessSlot(bool status); void pwdEnableSlot(bool status); void pwdInputSlot(); + + void onChanged(int type); + void currentDisplayChanged(QString output); + void maxClientValueChangedSlot(QString cNum); + + void setSecurityControl(); }; #endif // SHAREMAIN_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/vino/vino.cpp ukui-control-center-5.0.0.0/plugins/system/vino/vino.cpp --- ukui-control-center-5.0.0.0/plugins/system/vino/vino.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/vino/vino.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -47,25 +47,10 @@ { if (mFirstLoad) { mFirstLoad = false; - mVinoWidget = new VinoUi; - mServiceDbus = new QDBusInterface("com.control.center.qt.systemdbus", - "/", - "com.control.center.interface", - QDBusConnection::systemBus(), this); - mVinoDBus = new QDBusInterface("org.ukui.ukcc.session", - "/Vino", - "org.ukui.ukcc.session.Vino", - QDBusConnection::sessionBus(), this); - if (!mVinoDBus->isValid()) { - qCritical() << "org.ukui.ukcc.session.Vino DBus error:" << mVinoDBus->lastError(); - } else { - initStatus(); - initServiceStatus(); - initConnection(); - } + pluginWidget = new ShareMain; } - return mVinoWidget; + return pluginWidget; } const QString Vino::name() const @@ -85,237 +70,14 @@ bool Vino::isEnable() const { - return !UkccCommon::isCommunity() && !UkccCommon::isWayland() && isExistVino(); -} - -bool Vino::isExistVino() const -{ - return QGSettings::isSchemaInstalled(QByteArray("org.gnome.Vino")); -} - -void Vino::setVinoService(bool status) -{ - QDBusInterface vinoIfc("org.ukui.SettingsDaemon", - "/org/ukui/SettingsDaemon/Sharing", - "org.ukui.SettingsDaemon.Sharing", - QDBusConnection::sessionBus()); - if (vinoIfc.isValid()) { - if (status) { - vinoIfc.call("EnableService", "vino-server"); - } else { - vinoIfc.call("DisableService", "vino-server"); - } - } -} - -void Vino::enabledSlot(bool status) -{ - if (status) { - mVinoDBus->call("setVinoKey", kEnableKey, true); - initServiceStatus(); - if (isExsitXrdp) { - if (mServiceDbus->isValid()) { - mVinoWidget->getXrdpEnableWidget()->setChecked(status); - setXrdpService(status); - } - mVinoWidget->getXrdpEnableWidget()->setVisible(true); - } - mVinoWidget->getVinoEnableWidget()->setChecked(status); - vinoEnableSlot(status); - mVinoWidget->getVinoFrame()->setVisible(true); - } else { - mVinoDBus->call("setVinoKey", kEnableKey, false); - if (isExsitXrdp) { - mVinoDBus->call("setVinoKey", kXrdpEnableKey, status); - mVinoWidget->getXrdpEnableWidget()->hide(); - if (mServiceDbus->isValid()) { - setXrdpService(false); - } - mVinoWidget->getXrdpEnableWidget()->blockSignals(true); - mVinoWidget->getXrdpEnableWidget()->setChecked(false); - mVinoWidget->getXrdpEnableWidget()->blockSignals(false); - } - mVinoDBus->call("setVinoKey", kVinoEnableKey, status); - vinoEnableSlot(false); - mVinoWidget->getVinoFrame()->setVisible(false); - } -} - -void Vino::xrdpEnabledSlot(bool status) -{ - mVinoDBus->call("setVinoKey", kXrdpEnableKey, status); - if (isExsitXrdp) { - if (mServiceDbus->isValid()) { - setXrdpService(status); - } - } else { - mVinoWidget->getXrdpEnableWidget()->setVisible(false); - } - -} -void Vino::vinoEnableSlot(bool status) -{ - mVinoWidget->setFrameVisible(status); - setVinoService(status); -} - -void Vino::viewBoxSlot(bool status) -{ - mVinoDBus->call("setVinoKey", kVinoViewOnlyKey, !status); -} - -void Vino::accessSlot(bool status) -{ - mVinoDBus->call("setVinoKey", kVinoPromptKey, status); -} - -void Vino::pwdEnableSlot(bool status) -{ - if (status) { - mVinoWidget->getPwdLabel()->setVisible(secpwd == "keyring" ? false:true); - if (mVinoWidget->getPwdLabel()->isVisible()) { - mVinoWidget->getPwdLabel()->setText(QByteArray::fromBase64(mVinoDBus->property("password").toString().toLatin1())); - mVinoDBus->call("setVinoKey", kAuthenticationKey, "vnc"); - } else { - pwdEditSlot(); - if (mVinoDBus->property("method").toString() == "none") { - mVinoWidget->getSecurityPwdWidget()->setChecked(false); - } - } - - mVinoWidget->getPwdLabel()->setVisible(mVinoWidget->getSecurityPwdWidget()->isChecked()); - mVinoWidget->getPwdEditBtn()->setVisible(secpwd == "keyring" ? false:true); - + if (!UkccCommon::isWayland()) { + return !UkccCommon::isCommunity() && isExistVino(); } else { - mVinoWidget->getPwdLabel()->setVisible(false); - mVinoWidget->getPwdEditBtn()->setVisible(false); - mVinoDBus->call("setVinoKey", kAuthenticationKey, "none"); + return true; } } -void Vino::pwdEditSlot() -{ - InputPwdDialog *dialog = new InputPwdDialog(mVinoWidget); - dialog->exec(); - mVinoWidget->getPwdLabel()->setText(QByteArray::fromBase64(mVinoDBus->property("password").toString().toLatin1())); -} - -void Vino::initConnection() -{ - connect(mVinoWidget->getEnableWidget(), &SwitchWidget::stateChanged, this, [=](bool status) { - UkccCommon::buriedSettings(QStringLiteral("Vino"), mVinoWidget->getEnableWidget()->objectName(), QString("settings"), status ? "true" : "false"); - enabledSlot(status); - }); - - connect(mVinoWidget->getXrdpEnableWidget(), &SwitchWidget::stateChanged, this, [=](bool status) { - UkccCommon::buriedSettings(QStringLiteral("Vino"), mVinoWidget->getXrdpEnableWidget()->objectName(), QString("settings"), status ? "true" : "false"); - xrdpEnabledSlot(status); - }); - - connect(mVinoWidget->getVinoEnableWidget(), &SwitchWidget::stateChanged, this, [=](bool status) { - UkccCommon::buriedSettings(QStringLiteral("Vino"), mVinoWidget->getVinoEnableWidget()->objectName(), QString("settings"), status ? "true" : "false"); - vinoEnableSlot(status); - }); - connect(mVinoWidget->getViewWidget(), &SwitchWidget::stateChanged, this, [=](bool status) { - UkccCommon::buriedSettings(QStringLiteral("Vino"), "Allow connection to control screen", QString("settings"), status ? "true" : "false"); - viewBoxSlot(status); - }); - connect(mVinoWidget->getSecurityWidget(), &SwitchWidget::stateChanged, this, [=](bool status) { - UkccCommon::buriedSettings(QStringLiteral("Vino"), "You must confirm every visit for this machine", QString("settings"), status ? "true" : "false"); - accessSlot(status); - }); - connect(mVinoWidget->getSecurityPwdWidget(), &SwitchWidget::stateChanged, this, [=](bool status) { - UkccCommon::buriedSettings(QStringLiteral("Vino"), "Require user to enter this password: ", QString("settings"), status ? "true" : "false"); - pwdEnableSlot(status); - }); - connect(mVinoWidget->getPwdEditBtn(), &QPushButton::clicked, this, [=]() { - UkccCommon::buriedSettings(QStringLiteral("Vino"), "set password", QString("clicked")); - pwdEditSlot(); - }); -} - -void Vino::initStatus() -{ - bool isShared = mVinoDBus->property("isViewOnly").toBool(); - bool isPrompt = mVinoDBus->property("isPrompt").toBool(); - - QString pwd = mVinoDBus->property("method").toString(); - secpwd = mVinoDBus->property("password").toString(); - mVinoWidget->getPwdEditBtn()->setVisible(secpwd == "keyring" ? false:true); - - mVinoWidget->getSecurityWidget()->setChecked(isPrompt); - mVinoWidget->getViewWidget()->setChecked(!isShared); - if (pwd == "vnc") { - if (secpwd == "keyring") { - mVinoWidget->getSecurityPwdWidget()->setChecked(false); - mVinoWidget->getPwdLabel()->hide(); - mVinoWidget->getPwdEditBtn()->hide(); - mVinoDBus->call("setVinoKey", kAuthenticationKey, "none"); - } else { - mVinoWidget->getSecurityPwdWidget()->setChecked(true); - mVinoWidget->getPwdLabel()->setText(QByteArray::fromBase64(secpwd.toLatin1())); - } - } else { - mVinoWidget->getSecurityPwdWidget()->setChecked(false); - mVinoWidget->getPwdLabel()->setVisible(false); - mVinoWidget->getPwdEditBtn()->setVisible(false); - } - - mVinoWidget->setFrameVisible(mVinoDBus->property("isActive").toBool()); -} - -void Vino::initServiceStatus() -{ - bool isEnabled = mVinoDBus->property("isEnable").toBool(); - if (isEnabled) { - mVinoWidget->getEnableWidget()->setChecked(true); - XrdpServiceStatus xrdpstatus = getXrdpServiceStatus(); - switch (xrdpstatus) { - case NONE: - mVinoWidget->getXrdpEnableWidget()->hide(); - isExsitXrdp = false; - break; - case RUNNING: - mVinoWidget->getXrdpEnableWidget()->setChecked(true); - break; - case INACTIVE: - mVinoWidget->getXrdpEnableWidget()->setChecked(false); - break; - } - } else { - mVinoWidget->getEnableWidget()->setChecked(false); - mVinoWidget->getXrdpEnableWidget()->hide(); - mVinoWidget->getVinoFrame()->hide(); - } -} - -XrdpServiceStatus Vino::getXrdpServiceStatus() -{ - QProcess process; - QString cmd = "systemctl status xrdp.service | grep Active:"; - process.start("bash", QStringList() <<"-c" << cmd); - process.waitForFinished(); - QString strResult = process.readAllStandardOutput()+process.readAllStandardError(); - if (strResult.replace("\n", "") == "Unit xrdp.service could not be found.") { - return NONE; - } - cmd = "systemctl is-failed xrdp.service"; - process.start("bash", QStringList() <<"-c" << cmd); - process.waitForFinished(); - strResult = process.readAllStandardOutput()+process.readAllStandardError(); - if ((strResult.replace("\n", "") == "active")) - return RUNNING; - else - return INACTIVE; - -} - -void Vino::setXrdpService(bool status) +bool Vino::isExistVino() const { - QTimer::singleShot(1, this, [=]() { - QtConcurrent::run([=]() { - mServiceDbus->call("setXrdpService", status); - }); - - }); + return QGSettings::isSchemaInstalled(QByteArray("org.gnome.Vino")); } diff -Nru ukui-control-center-5.0.0.0/plugins/system/vino/vino.h ukui-control-center-5.0.0.0/plugins/system/vino/vino.h --- ukui-control-center-5.0.0.0/plugins/system/vino/vino.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/vino/vino.h 2025-02-07 16:27:50.000000000 +0800 @@ -23,15 +23,10 @@ #include <QWidget> #include <QSharedPointer> #include <QStringLiteral> -#include <QtConcurrent> -#include "vinoui.h" + #include "shell/interface.h" +#include "sharemain.h" -enum XrdpServiceStatus { - RUNNING, - INACTIVE, - NONE -}; class Vino : public QObject, CommonInterface { Q_OBJECT @@ -50,35 +45,14 @@ QIcon icon() const Q_DECL_OVERRIDE; bool isEnable() const Q_DECL_OVERRIDE; - void initConnection(); - void initStatus(); - void initServiceStatus(); - private: - VinoUi *mVinoWidget; QString pluginName; int pluginType; + ShareMain* pluginWidget; bool mFirstLoad; - bool isExsitXrdp = true; - QString secpwd; - QDBusInterface *mVinoDBus; - QDBusInterface *mServiceDbus; - private: bool isExistVino() const; - void setVinoService(bool status); - XrdpServiceStatus getXrdpServiceStatus(); - void setXrdpService(bool status); - -private slots: - void enabledSlot(bool status); - void xrdpEnabledSlot(bool status); - void vinoEnableSlot(bool status); - void viewBoxSlot(bool status); - void accessSlot(bool status); - void pwdEnableSlot(bool status); - void pwdEditSlot(); }; #endif // VINO_H diff -Nru ukui-control-center-5.0.0.0/plugins/system/vino/vino.pro ukui-control-center-5.0.0.0/plugins/system/vino/vino.pro --- ukui-control-center-5.0.0.0/plugins/system/vino/vino.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/system/vino/vino.pro 2025-02-07 16:27:50.000000000 +0800 @@ -2,7 +2,6 @@ include($$PROJECT_ROOTDIR/libukcc/widgets/Label/label.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/SettingWidget/settingwidget.pri) include($$PROJECT_ROOTDIR/libukcc/interface.pri) - QT += widgets concurrent greaterThan(QT_MAJOR_VERSION, 4): QT += widgets dbus @@ -10,8 +9,7 @@ TEMPLATE = lib CONFIG += plugin link_pkgconfig PKGCONFIG += gsettings-qt \ - kysdk-qtwidgets \ - kysdk-diagnostics \ + kysdk-qtwidgets TARGET = $$qtLibraryTarget(vino) DESTDIR = ../.. @@ -25,6 +23,7 @@ # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS +#DEFINES += UKCC2309 # You can also make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. @@ -33,13 +32,15 @@ SOURCES += \ inputpwddialog.cpp \ + krd.cpp \ + sharemain.cpp \ vino.cpp \ - vinoui.cpp HEADERS += \ inputpwddialog.h \ + krd.h \ + sharemain.h \ vino.h \ - vinoui.h FORMS += diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/area/area.pro ukui-control-center-5.0.0.0/plugins/time-language/area/area.pro --- ukui-control-center-5.0.0.0/plugins/time-language/area/area.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/area/area.pro 2025-02-07 16:27:50.000000000 +0800 @@ -6,7 +6,6 @@ include(../../../env.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Label/label.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/AddBtn/addbtn.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/ImageUtil/imageutil.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/HoverWidget/hoverwidget.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Frame/frame.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/SettingWidget/settingwidget.pri) diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/area/area.ui ukui-control-center-5.0.0.0/plugins/time-language/area/area.ui --- ukui-control-center-5.0.0.0/plugins/time-language/area/area.ui 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/area/area.ui 1970-01-01 08:00:00.000000000 +0800 @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>Area</class> - <widget class="QWidget" name="Area"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>700</width> - <height>551</height> - </rect> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="windowTitle"> - <string>Area</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_3"> - <property name="spacing"> - <number>8</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="TitleLabel" name="titleLabel"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="text"> - <string>Language Format</string> - </property> - </widget> - </item> - <item> - <layout class="QVBoxLayout" name="formatLayout"/> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_11"> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>32</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="TitleLabel" name="title3Label"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="text"> - <string>System Language</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_10"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - <item> - <widget class="LightLabel" name="summaryLabel"> - <property name="minimumSize"> - <size> - <width>550</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>960</width> - <height>16777215</height> - </size> - </property> - <property name="text"> - <string>TextLabel</string> - </property> - </widget> - </item> - <item> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <property name="spacing"> - <number>1</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <item> - <layout class="QVBoxLayout" name="languageLayout"> - <property name="spacing"> - <number>0</number> - </property> - </layout> - </item> - <item> - <layout class="QVBoxLayout" name="addLayout"> - <property name="spacing"> - <number>0</number> - </property> - </layout> - </item> - </layout> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>0</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - <layoutdefault spacing="6" margin="11"/> - <customwidgets> - <customwidget> - <class>TitleLabel</class> - <extends>QLabel</extends> - <header location="global">titlelabel.h</header> - </customwidget> - <customwidget> - <class>LightLabel</class> - <extends>QLabel</extends> - <header>lightlabel.h</header> - </customwidget> - </customwidgets> - <resources/> - <connections/> -</ui> diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/area/areaui.cpp ukui-control-center-5.0.0.0/plugins/time-language/area/areaui.cpp --- ukui-control-center-5.0.0.0/plugins/time-language/area/areaui.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/area/areaui.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -32,7 +32,8 @@ void AreaUi::initLanguageFormat() { - formatTitleLabel = new TitleLabel(this); + formatTitleLabel = new KLabel(this); + formatTitleLabel->setContentsMargins(16, 0, 0, 0); formatGroup = new SettingGroup(this); //~ contents_path /Area/Regional Format countryWidget = new ComboxWidget(tr("Regional Format"), formatGroup, UkccFrame::BorderRadiusStyle::Top); @@ -40,13 +41,11 @@ calendarWidget = new ComboxWidget(tr("Calendar"), formatGroup, UkccFrame::BorderRadiusStyle::None); //~ contents_path /Area/First Day Of Week dayWidget = new ComboxWidget(tr("First Day Of Week"), formatGroup, UkccFrame::BorderRadiusStyle::None); - //~ contents_path /Area/Date -#ifdef Nile + + //~ contents_path /Area/Short Foramt Date shortDateWidget = new ComboxWidget(tr("Short Foramt Date"), formatGroup, UkccFrame::BorderRadiusStyle::None); + //~ contents_path /Area/Long Format Date longDateWidget = new ComboxWidget(tr("Long Format Date"), formatGroup, UkccFrame::BorderRadiusStyle::None); -#else - shortDateWidget = new ComboxWidget(tr("Date"), formatGroup, UkccFrame::BorderRadiusStyle::None); -#endif //~ contents_path /Area/Time timeWidget = new ComboxWidget(tr("Time"), formatGroup, UkccFrame::BorderRadiusStyle::None); @@ -73,10 +72,11 @@ QHBoxLayout* formatDateLayout = new QHBoxLayout(); formatDateLayout->setContentsMargins(16, 0, 16, 0); //~ contents_path /Area/Language Format Example - m_formatDateNameLabel = new FixLabel(tr("Language Format Example"), m_formatDateFrame); + m_formatDateNameLabel = new KLabel(m_formatDateFrame); + m_formatDateNameLabel->setText(tr("Language Format Example")); m_formatDateNameLabel->setFixedSize(214, 59); - m_formatDateValueLabel = new FixLabel(m_formatDateFrame); + m_formatDateValueLabel = new KLabel(m_formatDateFrame); formatDateLayout->addWidget(m_formatDateNameLabel); formatDateLayout->setSpacing(16); @@ -89,7 +89,8 @@ void AreaUi::initSystemLanguage() { - languageTitleLable = new TitleLabel(this); + languageTitleLable = new KLabel(this); + languageTitleLable->setContentsMargins(16, 0, 0, 0); languageGroup = new SettingGroup(this); addLanguageBtn = new AddButton(this, UkccFrame::BorderRadiusStyle::Bottom); addLanguageDialog = new AddLanguageDialog(this); diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/area/areaui.h ukui-control-center-5.0.0.0/plugins/time-language/area/areaui.h --- ukui-control-center-5.0.0.0/plugins/time-language/area/areaui.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/area/areaui.h 2025-02-07 16:27:50.000000000 +0800 @@ -4,14 +4,16 @@ #include "languageframe.h" #include "addlanguagedialog.h" #include "addinputmethoddialog.h" -#include "libukcc/widgets/Label/titlelabel.h" #include "addbutton.h" #include "settinggroup.h" #include "comboxwidget.h" #include <QWidget> #include <QVBoxLayout> #include "ukcccommon.h" +#include <klabel.h> + using namespace ukcc; +using namespace kdk; class AreaUi : public QWidget { @@ -119,7 +121,7 @@ return m_formatDateFrame; } - inline FixLabel* formatDateValueLabel() { + inline KLabel* formatDateValueLabel() { return m_formatDateValueLabel; } @@ -137,7 +139,7 @@ QVBoxLayout *LanguageLayout = nullptr; private: - TitleLabel *formatTitleLabel = nullptr; + KLabel *formatTitleLabel = nullptr; SettingGroup *formatGroup = nullptr; ComboxWidget *countryWidget = nullptr; ComboxWidget *calendarWidget = nullptr; @@ -147,14 +149,14 @@ ComboxWidget *timeWidget = nullptr; private: - TitleLabel *languageTitleLable = nullptr; + KLabel *languageTitleLable = nullptr; AddButton *addLanguageBtn = nullptr; SettingGroup *languageGroup = nullptr; AddLanguageDialog *addLanguageDialog = nullptr; AddInputMethodDialog *addInputMehtodDialog = nullptr; UkccFrame* m_formatDateFrame = nullptr; - FixLabel* m_formatDateNameLabel = nullptr; - FixLabel* m_formatDateValueLabel = nullptr; + KLabel* m_formatDateNameLabel = nullptr; + KLabel* m_formatDateValueLabel = nullptr; private: QList<LanguageFrame*> languageFrameList = {}; diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/area/languageframe.cpp ukui-control-center-5.0.0.0/plugins/time-language/area/languageframe.cpp --- ukui-control-center-5.0.0.0/plugins/time-language/area/languageframe.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/area/languageframe.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,9 +1,29 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * Copyright (C) 2019 KylinSoft 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 "languageframe.h" #include <QHBoxLayout> #include <QMenu> #include <QProcess> #include <QDebug> #include <QTextCodec> +#include <QFile> #include "ukcccommon.h" using namespace ukcc; @@ -72,6 +92,12 @@ menu->addAction(edit); menu->addAction(del); + QString inputMethodSetCmd = getInputMethodSetCmd(); + qDebug() << "input method seting cmd = " << inputMethodSetCmd; + if (inputMethodSetCmd.isEmpty()) { + edit->setVisible(false); + } + connect(menu, &QMenu::aboutToShow, [=](){ if (selectedIconLabel->isVisible()) { del->setEnabled(false); @@ -86,9 +112,7 @@ }); connect(edit, &QAction::triggered, this, [=](){ - QProcess process; - process.startDetached("fcitx5-config-qt"); - + editInputMethodSlot(); }); btn->setIcon(QIcon::fromTheme("view-more-horizontal-symbolic")); @@ -96,6 +120,26 @@ return btn; } +void LanguageFrame::editInputMethodSlot() { + QString cmd = getInputMethodSetCmd(); + QProcess process; + process.startDetached(cmd); +} + +QString LanguageFrame::getInputMethodSetCmd() { + QFile inputSetCmd("/usr/bin/fcitx5-config-qt"); + if (inputSetCmd.exists()) { + return "/usr/bin/fcitx5-config-qt"; + } + + QFile inputSetCmd1("/usr/bin/fcitx-config-gtk3"); + if (inputSetCmd1.exists()) { + return "/usr/bin/fcitx-config-gtk3"; + } + + return ""; +} + QString LanguageFrame::getShowName() { return this->nameLabel->text(); diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/area/languageframe.h ukui-control-center-5.0.0.0/plugins/time-language/area/languageframe.h --- ukui-control-center-5.0.0.0/plugins/time-language/area/languageframe.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/area/languageframe.h 2025-02-07 16:27:50.000000000 +0800 @@ -1,3 +1,22 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * Copyright (C) 2019 KylinSoft 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 LANGUAGEFRAME_H #define LANGUAGEFRAME_H @@ -21,6 +40,8 @@ private: void mousePressEvent(QMouseEvent *e); + void editInputMethodSlot(); + QString getInputMethodSetCmd(); private: QLabel *nameLabel = nullptr; diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/datetime/changtime.cpp ukui-control-center-5.0.0.0/plugins/time-language/datetime/changtime.cpp --- ukui-control-center-5.0.0.0/plugins/time-language/datetime/changtime.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/datetime/changtime.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -19,7 +19,6 @@ */ #include "changtime.h" #include "ui_changtime.h" -#include "closebutton.h" #include <QDebug> #include <QStringList> diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/datetime/changtime.ui ukui-control-center-5.0.0.0/plugins/time-language/datetime/changtime.ui --- ukui-control-center-5.0.0.0/plugins/time-language/datetime/changtime.ui 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/datetime/changtime.ui 1970-01-01 08:00:00.000000000 +0800 @@ -1,627 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>changtimedialog</class> - <widget class="QDialog" name="changtimedialog"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>421</width> - <height>425</height> - </rect> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>421</width> - <height>412</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>421</width> - <height>425</height> - </size> - </property> - <property name="windowTitle"> - <string>Dialog</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QFrame" name="frame"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <property name="midLineWidth"> - <number>0</number> - </property> - <layout class="QVBoxLayout" name="verticalLayout_3"> - <property name="leftMargin"> - <number>24</number> - </property> - <property name="topMargin"> - <number>16</number> - </property> - <property name="rightMargin"> - <number>9</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_6"> - <property name="leftMargin"> - <number>20</number> - </property> - <property name="topMargin"> - <number>4</number> - </property> - <property name="rightMargin"> - <number>8</number> - </property> - <property name="bottomMargin"> - <number>4</number> - </property> - <item> - <widget class="TitleLabel" name="titleLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>190</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>190</width> - <height>30</height> - </size> - </property> - <property name="text"> - <string>current date</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>41</height> - </size> - </property> - </spacer> - </item> - <item> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="spacing"> - <number>1</number> - </property> - <property name="leftMargin"> - <number>20</number> - </property> - <property name="rightMargin"> - <number>31</number> - </property> - <item> - <widget class="QFrame" name="timeframe"> - <property name="minimumSize"> - <size> - <width>336</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>336</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_4"> - <property name="spacing"> - <number>0</number> - </property> - <item> - <widget class="QLabel" name="timelabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>50</width> - <height>16777215</height> - </size> - </property> - <property name="text"> - <string>time</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="hourcomboBox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>83</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>84</width> - <height>16777215</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="mincomboBox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>80</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>84</width> - <height>32</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="seccomboBox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>80</width> - <height>32</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>84</width> - <height>32</height> - </size> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QFrame" name="yearframe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>336</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>336</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QLabel" name="yearlabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>50</width> - <height>16777215</height> - </size> - </property> - <property name="text"> - <string>year</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="yearcomboBox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>258</width> - <height>32</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>257</width> - <height>16777215</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QFrame" name="monthframe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>336</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>336</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <widget class="QLabel" name="monthlabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>27</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>50</width> - <height>16777215</height> - </size> - </property> - <property name="text"> - <string>month</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="monthcomboBox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>258</width> - <height>32</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>258</width> - <height>16777215</height> - </size> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QFrame" name="dayframe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>336</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>336</width> - <height>50</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <item> - <widget class="QLabel" name="daylabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>50</width> - <height>16777215</height> - </size> - </property> - <property name="text"> - <string>day</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="daycomboBox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>258</width> - <height>32</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>258</width> - <height>16777215</height> - </size> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </item> - <item> - <spacer name="verticalSpacer_3"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>17</width> - <height>14</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QWidget" name="widget" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>345</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_5"> - <property name="rightMargin"> - <number>32</number> - </property> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="cancelButton"> - <property name="minimumSize"> - <size> - <width>120</width> - <height>36</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>120</width> - <height>30</height> - </size> - </property> - <property name="sizeIncrement"> - <size> - <width>120</width> - <height>30</height> - </size> - </property> - <property name="text"> - <string>cancel</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="confirmButton"> - <property name="minimumSize"> - <size> - <width>120</width> - <height>36</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>120</width> - <height>30</height> - </size> - </property> - <property name="text"> - <string>confirm</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <spacer name="verticalSpacer_2"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>17</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - <customwidgets> - <customwidget> - <class>TitleLabel</class> - <extends>QLabel</extends> - <header location="global">titlelabel.h</header> - </customwidget> - </customwidgets> - <resources/> - <connections/> -</ui> diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetime.cpp ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetime.cpp --- ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetime.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetime.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -76,7 +76,12 @@ datetimeUi->updateDate(); #endif } - + if (datetimeUi) { + datetimeUi->update(); + datetimeUi->resetDateFormat(); + datetimeUi->updateDate(); + qDebug() << Q_FUNC_INFO << "datetimeUi update"; + } return datetimeUi; } diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetime.pro ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetime.pro --- ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetime.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetime.pro 2025-02-07 16:27:50.000000000 +0800 @@ -13,10 +13,8 @@ include(../../../env.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/FlowLayout/flowlayout.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/ImageUtil/imageutil.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Label/label.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/AddBtn/addbtn.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/CloseButton/closebutton.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/HoverWidget/hoverwidget.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Frame/frame.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/SettingWidget/settingwidget.pri) diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetime.ui ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetime.ui --- ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetime.ui 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetime.ui 1970-01-01 08:00:00.000000000 +0800 @@ -1,342 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>DateTime</class> - <widget class="QWidget" name="DateTime"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>684</width> - <height>669</height> - </rect> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="windowTitle"> - <string>DateTime</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout"> - <property name="spacing"> - <number>8</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="TitleLabel" name="titleLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="text"> - <string>current date</string> - </property> - </widget> - </item> - <item> - <layout class="QVBoxLayout" name="currentDateLayout"> - <property name="spacing"> - <number>0</number> - </property> - </layout> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>32</height> - </size> - </property> - </spacer> - </item> - <item> - <layout class="QVBoxLayout" name="timeLayout"> - <property name="spacing"> - <number>0</number> - </property> - <item> - <widget class="QFrame" name="TilleFrame"> - <property name="minimumSize"> - <size> - <width>552</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - <property name="lineWidth"> - <number>1</number> - </property> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QVBoxLayout" name="verticalLayout_3"> - <property name="spacing"> - <number>0</number> - </property> - <item> - <widget class="TitleLabel" name="titleLabel_2"> - <property name="text"> - <string>titleLabel</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <spacer name="verticalSpacer_3"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>4</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="UkccFrame" name="frame_7"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <property name="lineWidth"> - <number>0</number> - </property> - <layout class="QVBoxLayout" name="verticalLayout_11"> - <property name="spacing"> - <number>1</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="SettingGroup" name="showFrame"> - <property name="minimumSize"> - <size> - <width>552</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - <property name="lineWidth"> - <number>0</number> - </property> - <layout class="QVBoxLayout" name="verticalLayout_7"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - </layout> - </widget> - </item> - <item> - <widget class="UkccFrame" name="addFrame"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout" name="addLayout"> - <property name="spacing"> - <number>0</number> - </property> - </layout> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QFrame" name="hourFrame"> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - </widget> - </item> - <item> - <spacer name="verticalSpacer_2"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>0</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - <layoutdefault spacing="6" margin="11"/> - <customwidgets> - <customwidget> - <class>TitleLabel</class> - <extends>QLabel</extends> - <header location="global">titlelabel.h</header> - </customwidget> - <customwidget> - <class>UkccFrame</class> - <extends>QFrame</extends> - <header location="global">ukccframe.h</header> - <container>1</container> - </customwidget> - <customwidget> - <class>SettingGroup</class> - <extends>QFrame</extends> - <header location="global">settinggroup.h</header> - <container>1</container> - </customwidget> - </customwidgets> - <resources/> - <connections/> -</ui> diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetimeui.cpp ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetimeui.cpp --- ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetimeui.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetimeui.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -37,29 +37,31 @@ void DatetimeUi::initObject() { // 当前时间 - currentTitleLabel = new TitleLabel(this); // 标题 + currentTitleLabel = new KLabel(this); // 标题 + currentTitleLabel->setContentsMargins(16, 0, 0, 0); clockWidget = new ClockWidget(); // 时钟 timeLabel = new TimeLabel(this); // 时间 - mDateLabel = new FixLabel(this); // 日期 - changeTZbutton = new FixButton(this); // 修改时区 - setTimeModeLabel = new FixLabel(this); // 设置时间 + mDateLabel = new KLabel(this); // 日期 + changeTZbutton = new KPushButton(this); // 修改时区 + setTimeModeLabel = new KLabel(this); // 设置时间 manualRadioButton = new QRadioButton(this); // 手动设置时间 syncRadioButton = new QRadioButton(this); // 自动同步时间 - syncResultLabel = new FixLabel(); // 同步时间结果 - setDateLabel = new FixLabel(this); // 手动设置日期 + syncResultLabel = new KLabel(); // 同步时间结果 + setDateLabel = new KLabel(this); // 手动设置日期 dategroupWidget = new DategroupWidget(this); timeBtnGroup = new QButtonGroup(this); //~ contents_path /Date/Sync Server ntpSerWidget = new ComboxWidget(tr("Sync Server"), this); - setNtpLabel = new FixLabel(this); + setNtpLabel = new KLabel(this); setNtpLineEdit = new QLineEdit(this); - setNtpButton = new FixButton(this); + setNtpButton = new KPushButton(this); timeBtnGroup->addButton(manualRadioButton, 0); timeBtnGroup->addButton(syncRadioButton, 1); syncResultLabel->setStyleSheet("QLabel{color: #D9F82929;}"); - otherTimezoneTitleLabel = new TitleLabel(this); + otherTimezoneTitleLabel = new KLabel(this); + otherTimezoneTitleLabel->setContentsMargins(16, 0, 0, 0); addTimezoneButton = new AddButton(this, UkccFrame::BorderRadiusStyle::Around); } @@ -123,8 +125,8 @@ setTimeLayout->addStretch(); QHBoxLayout *setDateLayout = new QHBoxLayout(setDateFrame); - //~ contents_path /Date/Set Date Manually - setDateLabel->setText(tr("Set Date Manually")); + //~ contents_path /Date/Set Time Manually + setDateLabel->setText(tr("Set Time Manually")); setDateLabel->setFixedWidth(136); setDateLayout->setSpacing(16); setDateLayout->setContentsMargins(16, 0, 0, 0); @@ -181,14 +183,12 @@ setNtpLineEdit->blockSignals(false); setNtpButton->setEnabled(!setNtpLineEdit->text().isEmpty()); //为空时不允许保存 }); -#ifdef Nile QDBusConnection::sessionBus().connect("com.kylin.kysdk.DateServer", "/com/kylin/kysdk/Date", "com.kylin.kysdk.DateInterface", "LongDateSignal", this, SLOT(updateDateFormat(QString))); -#endif } void DatetimeUi::initOtherTimezone() @@ -214,7 +214,7 @@ Q_EMIT timeModeChanged(toggledBtn, "automatic"); } }); - connect(changeTZbutton, &FixButton::clicked, this, &DatetimeUi::timezoneButtonClicked); + connect(changeTZbutton, &KPushButton::clicked, this, &DatetimeUi::timezoneButtonClicked); connect(ntpSerWidget->comboBox(), QOverload<const QString&>::of(&QComboBox::activated), this, [=](QString server){ if (ntpSerWidget->comboBox()->currentIndex() == 0) { server = "default"; @@ -225,7 +225,7 @@ Q_EMIT ntpServerChanged(server); } }); - connect(setNtpButton, &FixButton::clicked, this, [=](){ + connect(setNtpButton, &KPushButton::clicked, this, [=](){ Q_EMIT ntpServerChanged(setNtpLineEdit->text()); }); connect(addTimezoneButton, &AddButton::clicked, this, &DatetimeUi::addTimezoneButtonClicked); @@ -233,16 +233,7 @@ void DatetimeUi::updateDate() { -#ifdef Nile updateDateFormat(kdk_system_get_longformat_date()); -#else - QString timeAndWeek; - timeAndWeek = timeLabel->dateText(); - if (!timeAndWeek.isEmpty() && !timezoneStr.isEmpty()) - { - mDateLabel->setText(timeAndWeek + " " + timezoneStr); - } -#endif } void DatetimeUi::updateDateFormat(QString date) @@ -367,7 +358,5 @@ } void DatetimeUi::resetDateFormat() { -#ifdef Nile dategroupWidget->resetDateEdit(kdk_system_get_shortformat()); -#endif } diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetimeui.h ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetimeui.h --- ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetimeui.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/datetime/datetimeui.h 2025-02-07 16:27:50.000000000 +0800 @@ -1,17 +1,14 @@ #ifndef DATETIMEUI_H #define DATETIMEUI_H -#include "titlelabel.h" #include "timeBtn.h" #include "timelabel.h" #include "clockwidget.h" #include "calendarwidget.h" #include "dategroupwidget.h" #include "dateedit.h" -#include "fixlabel.h" #include "settinggroup.h" #include "ukccframe.h" -#include "fixbutton.h" #include "addbutton.h" #include "comboxwidget.h" #include <QWidget> @@ -19,6 +16,10 @@ #include <QLineEdit> #include <QRadioButton> #include <QButtonGroup> +#include <kpushbutton.h> +#include <klabel.h> + +using namespace kdk; class DatetimeUi : public QWidget { @@ -54,23 +55,23 @@ private: // 当前时间 - TitleLabel *currentTitleLabel = nullptr; + KLabel *currentTitleLabel = nullptr; ClockWidget *clockWidget = nullptr; TimeLabel *timeLabel = nullptr; - FixLabel *mDateLabel = nullptr; - FixButton *changeTZbutton = nullptr; - FixLabel *setTimeModeLabel = nullptr; + KLabel *mDateLabel = nullptr; + KPushButton *changeTZbutton = nullptr; + KLabel *setTimeModeLabel = nullptr; QRadioButton *manualRadioButton = nullptr; QRadioButton *syncRadioButton = nullptr; - FixLabel *syncResultLabel = nullptr; - FixLabel *setDateLabel = nullptr; + KLabel *syncResultLabel = nullptr; + KLabel *setDateLabel = nullptr; DategroupWidget *dategroupWidget = nullptr; ComboxWidget *ntpSerWidget = nullptr; - FixLabel *setNtpLabel = nullptr; + KLabel *setNtpLabel = nullptr; QLineEdit *setNtpLineEdit = nullptr; - FixButton *setNtpButton = nullptr; + KPushButton *setNtpButton = nullptr; // 其他时区时间 - TitleLabel *otherTimezoneTitleLabel = nullptr; + KLabel *otherTimezoneTitleLabel = nullptr; AddButton *addTimezoneButton = nullptr; private: diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/datetime/timeBtn.cpp ukui-control-center-5.0.0.0/plugins/time-language/datetime/timeBtn.cpp --- ukui-control-center-5.0.0.0/plugins/time-language/datetime/timeBtn.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/datetime/timeBtn.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -13,7 +13,7 @@ QHBoxLayout *timeShowLayout = new QHBoxLayout(this); QWidget *timeWid = new QWidget(this); QVBoxLayout *timeLayout = new QVBoxLayout(timeWid); - labelInfo = new FixLabel(this); //时间,和标题字号一致 + labelInfo = new KLabel(this); //时间,和标题字号一致 labelTime = new LightLabel(this); //日期 deleteBtn = new QPushButton(this); @@ -51,10 +51,12 @@ } else { gmData = QString("(GMT%1:%2)").arg(utcOff, 3, 10, QLatin1Char('0')).arg(utcOff / 60, 2, 10, QLatin1Char('0')); } + ZoneInfo m_zoneinfo; + const QString locale = QLocale::system().name(); if (kyTimezone.isEmpty()) { - labelInfo->setText(timezone + " " + gmData); + labelInfo->setText(m_zoneinfo.getLocalTimezoneName(timezone, locale) + " " + gmData); } else { - labelInfo->setText(kyTimezone + " " + gmData); + labelInfo->setText(m_zoneinfo.getLocalTimezoneName(kyTimezone, locale) + " " + gmData); } QFont font; QGSettings *m_fontSetting = new QGSettings("org.ukui.style"); @@ -72,7 +74,6 @@ }); } - TimeBtn::~TimeBtn() { killTimer(timerId); @@ -102,9 +103,9 @@ QDateTime thisZoneTime; const double timeDelta = (thisZone.offsetFromUtc(QDateTime::currentDateTime()) - currentZone.offsetFromUtc(QDateTime::currentDateTime())) / 3600.0; QString dateLiteral; - if (QDateTime::currentDateTime().toTimeZone(thisZone).time().hour() + timeDelta >= 24) { + if ((QDateTime::currentDateTime().time().hour() + timeDelta) >= 24) { dateLiteral = tr("Tomorrow"); - } else if (QDateTime::currentDateTime().toTimeZone(thisZone).time().hour() + timeDelta < 0) { + } else if ((QDateTime::currentDateTime().time().hour() + timeDelta) < 0) { dateLiteral = tr("Yesterday"); } else { dateLiteral = tr("Today"); diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/datetime/timeBtn.h ukui-control-center-5.0.0.0/plugins/time-language/datetime/timeBtn.h --- ukui-control-center-5.0.0.0/plugins/time-language/datetime/timeBtn.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/datetime/timeBtn.h 2025-02-07 16:27:50.000000000 +0800 @@ -1,13 +1,15 @@ #ifndef TIMEBTN_H #define TIMEBTN_H #include <QPushButton> -#include "fixlabel.h" #include "lightlabel.h" #include <QGSettings> #include <QTimeZone> #include <QLabel> #include "ukccframe.h" #include <QTimerEvent> +#include <klabel.h> + +using namespace kdk; class TimeBtn : public UkccFrame { @@ -25,7 +27,7 @@ private: QTimeZone thisZone; int timerId = 0; - FixLabel *labelInfo = nullptr; + KLabel *labelInfo = nullptr; LightLabel *labelTime = nullptr; QDBusInterface *areaInterface = nullptr; QPushButton *deleteBtn = nullptr; diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/datetime/timelabel.cpp ukui-control-center-5.0.0.0/plugins/time-language/datetime/timelabel.cpp --- ukui-control-center-5.0.0.0/plugins/time-language/datetime/timelabel.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/datetime/timelabel.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -4,7 +4,7 @@ #include <QDateTime> TimeLabel::TimeLabel(QWidget *parent) : - FixLabel(parent) + KLabel(parent) { QFont font = QApplication::font(); if (QLocale::system().amText() == "སྔ་དྲོ་") { diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/datetime/timelabel.h ukui-control-center-5.0.0.0/plugins/time-language/datetime/timelabel.h --- ukui-control-center-5.0.0.0/plugins/time-language/datetime/timelabel.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/datetime/timelabel.h 2025-02-07 16:27:50.000000000 +0800 @@ -1,10 +1,12 @@ #ifndef TIMELABEL_H #define TIMELABEL_H -#include "fixlabel.h" #include <QDBusInterface> +#include <klabel.h> -class TimeLabel : public FixLabel +using namespace kdk; + +class TimeLabel : public KLabel { Q_OBJECT diff -Nru ukui-control-center-5.0.0.0/plugins/time-language/datetime/worldMap/timezonechooser.cpp ukui-control-center-5.0.0.0/plugins/time-language/datetime/worldMap/timezonechooser.cpp --- ukui-control-center-5.0.0.0/plugins/time-language/datetime/worldMap/timezonechooser.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/plugins/time-language/datetime/worldMap/timezonechooser.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -15,7 +15,6 @@ #include <QtCore/qmath.h> #include <QDialog> #include <QGSettings> -#include "imageutil.h" const QString kcnBj = "北京"; const QString kenBj = "Asia/Beijing"; diff -Nru ukui-control-center-5.0.0.0/registeredSession/area/areainterface.cpp ukui-control-center-5.0.0.0/registeredSession/area/areainterface.cpp --- ukui-control-center-5.0.0.0/registeredSession/area/areainterface.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/area/areainterface.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,268 +0,0 @@ -#include "areainterface.h" -#include <unistd.h> -#include <QDBusConnection> - -AreaInterface::AreaInterface() -{ - ukccPanelGsettings = UniversalInterface::self()->ukccPanelGsettings(); - accountInterface = UniversalInterface::self()->accountUserDbus(); - fcitxInterface = UniversalInterface::self()->fcitxInputMethodDbus(); - styleGsettings = UniversalInterface::self()->ukuiStyleGsettings(); - connect(ukccPanelGsettings, &QGSettings::changed, this, [=](QString key) { - if (key == CALENDAR_KEY) { - mCalendar.clear(); - getCalendar(); - Q_EMIT changed("calendar"); - } else if (key == FIRST_DAY_KEY) { - mFirstDay.clear(); - getFirstDay(); - Q_EMIT changed("firstDay"); - } else if (key == DATE_FORMATE_KEY) { - mDateFormat.clear(); - getDateFormat(); - Q_EMIT changed("dateFormat"); - } else if (key == TIME_FORMAT_KEY) { - mTimeFormat.clear(); - getTimeFormat(); - Q_EMIT changed("timeFormat"); - } else if (key == SHOW_LANGUAGE_KEY) { - mShowLanguageList.clear(); - getShowLanguageList(); - Q_EMIT changed("showLanguageList"); - } - }); - - connect(styleGsettings, &QGSettings::changed, this, [=](QString key) { - if (key == "iconThemeName") { - Q_EMIT changed("iconThemeName"); - } - }); -} - -AreaInterface::~AreaInterface() -{ - -} - -const QString AreaInterface::gsettingGet(const QString &key) const -{ - if (ukccPanelGsettings->keys().contains(key)) { - return ukccPanelGsettings->get(key).toString(); - } else { - return ""; - } -} - -void AreaInterface::gsettingSet(const QString &key, const QString &value) -{ - if (ukccPanelGsettings->keys().contains(key)) { - ukccPanelGsettings->set(key, value); - } -} - -const QStringList AreaInterface::getFormatCountryList() -{ - if (mFormatCountryList.isEmpty()) { - mFormatCountryList.append(QString("en_US.UTF-8")); - mFormatCountryList.append(QString("zh_CN.UTF-8")); - mFormatCountryList.append(QString("bo_CN.UTF-8")); - } - return mFormatCountryList; -} - -const QStringList AreaInterface::getCalendarList() -{ - if (mCalendarList.isEmpty()) { - mCalendarList.append(QString("solarlunar")); - QString locale = QLocale::system().name(); - if ("zh_CN" == locale) { - mCalendarList.append(QString("lunar")); - } - } - return mCalendarList; -} - -const QStringList AreaInterface::getFirstDayList() -{ - if (mFirstDayList.isEmpty()) { - mFirstDayList.append("monday"); - mFirstDayList.append("sunday"); - } - return mFirstDayList; -} - -const QStringList AreaInterface::getDateFormatList() -{ - if (mDateFormatList.isEmpty()) { - mDateFormatList.append("cn"); - mDateFormatList.append("en"); - } - return mDateFormatList; -} - -const QStringList AreaInterface::getTimeFormatList() -{ - if (mtimeFormatList.isEmpty()) { - mtimeFormatList.append("12"); - mtimeFormatList.append("24"); - } - return mtimeFormatList; -} - -const QStringList AreaInterface::getShowLanguageList() -{ - if (mShowLanguageList.isEmpty()) { - if (ukccPanelGsettings->keys().contains(SHOW_LANGUAGE_KEY)) { - mShowLanguageList = ukccPanelGsettings->get(SHOW_LANGUAGE_KEY).toStringList(); - } else { - qCritical() << "get SHOW_LANGUAGE_KEY error."; - } - } - return mShowLanguageList; -} - -const QStringList AreaInterface::getLanguageList() -{ - if (mLanguageList.isEmpty()) { - mLanguageList.append("zh_CN"); - mLanguageList.append("en"); - mLanguageList.append("bo_CN"); - } - return mLanguageList; -} - -const QString AreaInterface::getFormatCountry() -{ - if (mFormatCountry.isEmpty()) { - mFormatCountry = accountInterface->property("FormatsLocale").toString(); - } - return mFormatCountry; -} - -const QString AreaInterface::getCalendar() -{ - if (mCalendar.isEmpty()) { - mCalendar = gsettingGet(CALENDAR_KEY); - } - return mCalendar; -} - -const QString AreaInterface::getFirstDay() -{ - if (mFirstDay.isEmpty()) { - mFirstDay = gsettingGet(FIRST_DAY_KEY); - } - return mFirstDay; -} - -const QString AreaInterface::getDateFormat() -{ - if (mDateFormat.isEmpty()) { - mDateFormat = gsettingGet(DATE_FORMATE_KEY); - } - return mDateFormat; -} - -const QString AreaInterface::getTimeFormat() -{ - if (mTimeFormat.isEmpty()) { - mTimeFormat = gsettingGet(TIME_FORMAT_KEY); - } - return mTimeFormat; -} - -const QString AreaInterface::getLanguage() -{ - mLanguage = accountInterface->property("Language").toString(); - return mLanguage; -} - -void AreaInterface::setFormatCountry(const QString &formatCountry) -{ - mFormatCountry = formatCountry; - accountInterface->call("SetFormatsLocale", formatCountry); - Q_EMIT changed("formatCountry"); -} - -void AreaInterface::setCalendar(const QString &calendar) -{ - gsettingSet(CALENDAR_KEY, calendar); -} - -void AreaInterface::setFirstDay(const QString &firstDay) -{ - gsettingSet(FIRST_DAY_KEY, firstDay); -} - -void AreaInterface::setDateFormat(const QString &dateFormat) -{ - gsettingSet(DATE_FORMATE_KEY, dateFormat); -} - -void AreaInterface::setTimeFormat(const QString &timeFormat) -{ - gsettingSet(TIME_FORMAT_KEY, timeFormat); -} - -void AreaInterface::setShowLanguageList(const QStringList &languageList) -{ - if (ukccPanelGsettings->keys().contains(SHOW_LANGUAGE_KEY)) { - ukccPanelGsettings->set(SHOW_LANGUAGE_KEY, languageList); - } else { - qCritical() << "set SHOW_LANGUAGE_KEY error:" << languageList; - } -} - -void AreaInterface::setLanguage(const QString &languageCode) -{ - accountInterface->call("SetLanguage", languageCode); - Q_EMIT changed("language"); -} - -void AreaInterface::reloadInputMethodConfig() -{ - fcitxInterface->call("ReloadConfig"); -} - -void AreaInterface::changeInputMethod(const QString &inputMethod, const bool &add) -{ - QString fileTextString; - QFile configFile(FCITX_CONFIG_FILE); - if (configFile.open(QIODevice::ReadWrite | QIODevice::Text)) { - //把文件所有信息读出来 - QTextStream stream(&configFile); - fileTextString = stream.readAll(); - - if (!fileTextString.contains(inputMethod)) { - return ; - } - QString addString = inputMethod + ":True"; - QString removeString = inputMethod + ":False"; - if (add) { - fileTextString.replace(removeString, addString); - } else { - fileTextString.replace(addString, removeString); - } - stream << fileTextString; - configFile.close(); - reloadInputMethodConfig(); - } -} - -bool AreaInterface::isAddedInputMethod(const QString &inputMethod) -{ - QString fileTextString; - QFile mFile(FCITX_CONFIG_FILE); - if (mFile.open(QIODevice::ReadOnly | QIODevice::Text)) { - QTextStream stream(&mFile); - fileTextString = stream.readAll(); - QString string = inputMethod + ":True"; - if (fileTextString.contains(string)) { - return true; - } else { - return false; - } - } - qCritical()<<"open "<<FCITX_CONFIG_FILE<<" error."; - return false; -} diff -Nru ukui-control-center-5.0.0.0/registeredSession/area/areainterface.h ukui-control-center-5.0.0.0/registeredSession/area/areainterface.h --- ukui-control-center-5.0.0.0/registeredSession/area/areainterface.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/area/areainterface.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,111 +0,0 @@ -#ifndef AREAINTERFACE_H -#define AREAINTERFACE_H - -#include <QObject> -#include <QtDBus> -#include "../universalinterface.h" - -class AreaInterface : public QObject -{ - Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "org.ukui.ukcc.session.Area") - Q_PROPERTY(QStringList formatCountryList READ getFormatCountryList) - Q_PROPERTY(QStringList calendarList READ getCalendarList) - Q_PROPERTY(QStringList firstDayList READ getFirstDayList) - Q_PROPERTY(QStringList dateFormatList READ getDateFormatList) - Q_PROPERTY(QStringList timeFormatList READ getTimeFormatList) - Q_PROPERTY(QStringList languageList READ getLanguageList) - Q_PROPERTY(QStringList showLanguageList READ getShowLanguageList) - Q_PROPERTY(QString formatCountry READ getFormatCountry) - Q_PROPERTY(QString calendar READ getCalendar) - Q_PROPERTY(QString firstDay READ getFirstDay) - Q_PROPERTY(QString dateFormat READ getDateFormat) - Q_PROPERTY(QString timeFormat READ getTimeFormat) - Q_PROPERTY(QString language READ getLanguage) - -public: - AreaInterface(); - ~AreaInterface(); - -protected: - // 对属性的访问函数 - const QStringList getFormatCountryList(); - const QStringList getCalendarList(); - const QStringList getFirstDayList(); - const QStringList getDateFormatList(); - const QStringList getTimeFormatList(); - const QStringList getLanguageList(); - const QStringList getShowLanguageList(); - const QString getFormatCountry(); - const QString getCalendar(); - const QString getFirstDay(); - const QString getDateFormat(); - const QString getTimeFormat(); - const QString getLanguage(); - -public Q_SLOTS: - /** - * @brief 修改输入法 - * - * @param inputMethodName 输入法名称 - * @param add 添加/移除 - */ - void changeInputMethod(const QString &inputMethod, const bool &add); - - /** - * @brief 查询输入法是否已经添加 - * - * @param inputMethodName 输入法名称 - * @return bool 返回输入法是否已经添加 - */ - bool isAddedInputMethod(const QString &inputMethod); - - // 对属性的设置函数 - void setFormatCountry(const QString &formatCountry); - void setCalendar(const QString &calendar); - void setFirstDay(const QString &firstDay); - void setDateFormat(const QString &dateFormat); - void setTimeFormat(const QString &timeFormat); - void setShowLanguageList(const QStringList &languageList); - void setLanguage(const QString &languageCode); - -Q_SIGNALS: - void changed(QString keyName); - -private: - void reloadInputMethodConfig(); - - // 设置和获取gsetting的string类型的键值 - const QString gsettingGet(const QString &key) const; - void gsettingSet(const QString &key, const QString &value); - -private: - const QString SHOW_LANGUAGE_KEY = QString("showlanguage"); - const QString FCITX_CONFIG_FILE = QDir::homePath() + "/.config/fcitx/profile"; - const QString CALENDAR_KEY = QString("calendar"); - const QString FIRST_DAY_KEY = QString("firstday"); - const QString DATE_FORMATE_KEY = QString("date"); - const QString TIME_FORMAT_KEY = QString("hoursystem"); - -private: - QGSettings *ukccPanelGsettings = nullptr; - QDBusInterface *accountInterface = nullptr; - QDBusInterface *fcitxInterface = nullptr; - QGSettings *styleGsettings = nullptr; -private: - QStringList mFormatCountryList = {}; - QStringList mCalendarList = {}; - QStringList mFirstDayList = {}; - QStringList mDateFormatList = {}; - QStringList mtimeFormatList = {}; - QStringList mShowLanguageList = {}; - QStringList mLanguageList = {}; - QString mLanguage = ""; - QString mFormatCountry = ""; - QString mCalendar = ""; - QString mFirstDay = ""; - QString mDateFormat = ""; - QString mTimeFormat = ""; -}; - -#endif // AREAINTERFACE_H diff -Nru ukui-control-center-5.0.0.0/registeredSession/json.cpp ukui-control-center-5.0.0.0/registeredSession/json.cpp --- ukui-control-center-5.0.0.0/registeredSession/json.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/json.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,732 +0,0 @@ -/** - * QtJson - A simple class for parsing JSON data into a QVariant hierarchies and vice-versa. - * Copyright (C) 2011 Eeli Reilin - * - * 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 3 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, see <http://www.gnu.org/licenses/>. - */ - -/** - * \file json.cpp - */ - -#include <QDateTime> -#include <QStringList> -#include "json.h" - -namespace QtJson { - static QString dateFormat, dateTimeFormat; - static bool prettySerialize = false; - - static QString sanitizeString(QString str); - static QByteArray join(const QList<QByteArray> &list, const QByteArray &sep); - static QVariant parseValue(const QString &json, int &index, bool &success); - static QVariant parseObject(const QString &json, int &index, bool &success); - static QVariant parseArray(const QString &json, int &index, bool &success); - static QVariant parseString(const QString &json, int &index, bool &success); - static QVariant parseNumber(const QString &json, int &index); - static int lastIndexOfNumber(const QString &json, int index); - static void eatWhitespace(const QString &json, int &index); - static int lookAhead(const QString &json, int index); - static int nextToken(const QString &json, int &index); - - template<typename T> - QByteArray serializeMap(const T &map, bool &success, int _level = 0) { - QByteArray newline; - QByteArray tabs; - QByteArray tabsFields; - if (prettySerialize && !map.isEmpty()) { - newline = "\n"; - for (int l=1; l<_level; l++) { - tabs += " "; - } - tabsFields = tabs + " "; - } - - QByteArray str = "{" + newline; - QList<QByteArray> pairs; - for (typename T::const_iterator it = map.begin(), itend = map.end(); it != itend; ++it) { - bool otherSuccess = true; - QByteArray serializedValue = serialize(it.value(), otherSuccess, _level); - if (serializedValue.isNull()) { - success = false; - break; - } - pairs << tabsFields + sanitizeString(it.key()).toUtf8() + ":" + (prettySerialize ? " " : "") + serializedValue; - } - - str += join(pairs, "," + newline) + newline; - str += tabs + "}"; - return str; - } - - void insert(QVariant &v, const QString &key, const QVariant &value); - void append(QVariant &v, const QVariant &value); - - template<typename T> - void cloneMap(QVariant &json, const T &map) { - for (typename T::const_iterator it = map.begin(), itend = map.end(); it != itend; ++it) { - insert(json, it.key(), (*it)); - } - } - - template<typename T> - void cloneList(QVariant &json, const T &list) { - for (typename T::const_iterator it = list.begin(), itend = list.end(); it != itend; ++it) { - append(json, (*it)); - } - } - - /** - * parse - */ - QVariant parse(const QString &json) { - bool success = true; - return parse(json, success); - } - - /** - * parse - */ - QVariant parse(const QString &json, bool &success) { - success = true; - - // Return an empty QVariant if the JSON data is either null or empty - if (!json.isNull() || !json.isEmpty()) { - QString data = json; - // We'll start from index 0 - int index = 0; - - // Parse the first value - QVariant value = parseValue(data, index, success); - - // Return the parsed value - return value; - } else { - // Return the empty QVariant - return QVariant(); - } - } - - /** - * clone - */ - QVariant clone(const QVariant &data) { - QVariant v; - - if (data.type() == QVariant::Map) { - cloneMap(v, data.toMap()); - } else if (data.type() == QVariant::Hash) { - cloneMap(v, data.toHash()); - } else if (data.type() == QVariant::List) { - cloneList(v, data.toList()); - } else if (data.type() == QVariant::StringList) { - cloneList(v, data.toStringList()); - } else { - v = QVariant(data); - } - - return v; - } - - /** - * insert value (map case) - */ - void insert(QVariant &v, const QString &key, const QVariant &value) { - if (!v.canConvert<QVariantMap>()) v = QVariantMap(); - QVariantMap *p = (QVariantMap *)v.data(); - p->insert(key, clone(value)); - } - - /** - * append value (list case) - */ - void append(QVariant &v, const QVariant &value) { - if (!v.canConvert<QVariantList>()) v = QVariantList(); - QVariantList *p = (QVariantList *)v.data(); - p->append(value); - } - - QByteArray serialize(const QVariant &data) { - bool success = true; - return serialize(data, success); - } - - QByteArray serialize(const QVariant &data, bool &success, int _level /*= 0*/) { - QByteArray newline; - QByteArray tabs; - QByteArray tabsFields; - if (prettySerialize) { - newline = "\n"; - for (int l=0; l<_level; l++) { - tabs += " "; - } - tabsFields = tabs + " "; - } - - QByteArray str; - success = true; - - if (!data.isValid()) { // invalid or null? - str = "null"; - } else if ((data.type() == QVariant::List) || - (data.type() == QVariant::StringList)) { // variant is a list? - QList<QByteArray> values; - const QVariantList list = data.toList(); - Q_FOREACH(const QVariant& v, list) { - bool otherSuccess = true; - QByteArray serializedValue = serialize(v, otherSuccess, _level+1); - if (serializedValue.isNull()) { - success = false; - break; - } - values << tabsFields + serializedValue; - } - - if (!values.isEmpty()) { - str = "[" + newline + join( values, "," + newline ) + newline + tabs + "]"; - } else { - str = "[]"; - } - } else if (data.type() == QVariant::Hash) { // variant is a hash? - str = serializeMap<>(data.toHash(), success, _level+1); - } else if (data.type() == QVariant::Map) { // variant is a map? - str = serializeMap<>(data.toMap(), success, _level+1); - } else if ((data.type() == QVariant::String) || - (data.type() == QVariant::ByteArray)) {// a string or a byte array? - str = sanitizeString(data.toString()).toUtf8(); - } else if (data.type() == QVariant::Double) { // double? - double value = data.toDouble(&success); - if (success) { - str = QByteArray::number(value, 'g'); - if (!str.contains(".") && ! str.contains("e")) { - str += ".0"; - } - } - } else if (data.type() == QVariant::Bool) { // boolean value? - str = data.toBool() ? "true" : "false"; - } else if (data.type() == QVariant::ULongLong) { // large unsigned number? - str = QByteArray::number(data.value<qulonglong>()); - } else if (data.canConvert<qlonglong>()) { // any signed number? - str = QByteArray::number(data.value<qlonglong>()); - } else if (data.canConvert<long>()) { //TODO: this code is never executed because all smaller types can be converted to qlonglong - str = QString::number(data.value<long>()).toUtf8(); - } else if (data.type() == QVariant::DateTime) { // datetime value? - str = sanitizeString(dateTimeFormat.isEmpty() - ? data.toDateTime().toString() - : data.toDateTime().toString(dateTimeFormat)).toUtf8(); - } else if (data.type() == QVariant::Date) { // date value? - str = sanitizeString(dateTimeFormat.isEmpty() - ? data.toDate().toString() - : data.toDate().toString(dateFormat)).toUtf8(); - } else if (data.canConvert<QString>()) { // can value be converted to string? - // this will catch QUrl, ... (all other types which can be converted to string) - str = sanitizeString(data.toString()).toUtf8(); - } else { - success = false; - } - - if (success) { - return str; - } - return QByteArray(); - } - - QString serializeStr(const QVariant &data) { - return QString::fromUtf8(serialize(data)); - } - - QString serializeStr(const QVariant &data, bool &success) { - return QString::fromUtf8(serialize(data, success)); - } - - - /** - * \enum JsonToken - */ - enum JsonToken { - JsonTokenNone = 0, - JsonTokenCurlyOpen = 1, - JsonTokenCurlyClose = 2, - JsonTokenSquaredOpen = 3, - JsonTokenSquaredClose = 4, - JsonTokenColon = 5, - JsonTokenComma = 6, - JsonTokenString = 7, - JsonTokenNumber = 8, - JsonTokenTrue = 9, - JsonTokenFalse = 10, - JsonTokenNull = 11 - }; - - static QString sanitizeString(QString str) { - str.replace(QLatin1String("\\"), QLatin1String("\\\\")); - str.replace(QLatin1String("\""), QLatin1String("\\\"")); - str.replace(QLatin1String("\b"), QLatin1String("\\b")); - str.replace(QLatin1String("\f"), QLatin1String("\\f")); - str.replace(QLatin1String("\n"), QLatin1String("\\n")); - str.replace(QLatin1String("\r"), QLatin1String("\\r")); - str.replace(QLatin1String("\t"), QLatin1String("\\t")); - return QString(QLatin1String("\"%1\"")).arg(str); - } - - static QByteArray join(const QList<QByteArray> &list, const QByteArray &sep) { - QByteArray res; - Q_FOREACH(const QByteArray &i, list) { - if (!res.isEmpty()) { - res += sep; - } - res += i; - } - return res; - } - - /** - * parseValue - */ - static QVariant parseValue(const QString &json, int &index, bool &success) { - // Determine what kind of data we should parse by - // checking out the upcoming token - switch(lookAhead(json, index)) { - case JsonTokenString: - return parseString(json, index, success); - case JsonTokenNumber: - return parseNumber(json, index); - case JsonTokenCurlyOpen: - return parseObject(json, index, success); - case JsonTokenSquaredOpen: - return parseArray(json, index, success); - case JsonTokenTrue: - nextToken(json, index); - return QVariant(true); - case JsonTokenFalse: - nextToken(json, index); - return QVariant(false); - case JsonTokenNull: - nextToken(json, index); - return QVariant(); - case JsonTokenNone: - break; - } - - // If there were no tokens, flag the failure and return an empty QVariant - success = false; - return QVariant(); - } - - /** - * parseObject - */ - static QVariant parseObject(const QString &json, int &index, bool &success) { - QVariantMap map; - int token; - - // Get rid of the whitespace and increment index - nextToken(json, index); - - // Loop through all of the key/value pairs of the object - bool done = false; - while (!done) { - // Get the upcoming token - token = lookAhead(json, index); - - if (token == JsonTokenNone) { - success = false; - return QVariantMap(); - } else if (token == JsonTokenComma) { - nextToken(json, index); - } else if (token == JsonTokenCurlyClose) { - nextToken(json, index); - return map; - } else { - // Parse the key/value pair's name - QString name = parseString(json, index, success).toString(); - - if (!success) { - return QVariantMap(); - } - - // Get the next token - token = nextToken(json, index); - - // If the next token is not a colon, flag the failure - // return an empty QVariant - if (token != JsonTokenColon) { - success = false; - return QVariant(QVariantMap()); - } - - // Parse the key/value pair's value - QVariant value = parseValue(json, index, success); - - if (!success) { - return QVariantMap(); - } - - // Assign the value to the key in the map - map[name] = value; - } - } - - // Return the map successfully - return QVariant(map); - } - - /** - * parseArray - */ - static QVariant parseArray(const QString &json, int &index, bool &success) { - QVariantList list; - - nextToken(json, index); - - bool done = false; - while(!done) { - int token = lookAhead(json, index); - - if (token == JsonTokenNone) { - success = false; - return QVariantList(); - } else if (token == JsonTokenComma) { - nextToken(json, index); - } else if (token == JsonTokenSquaredClose) { - nextToken(json, index); - break; - } else { - QVariant value = parseValue(json, index, success); - if (!success) { - return QVariantList(); - } - list.push_back(value); - } - } - - return QVariant(list); - } - - /** - * parseString - */ - static QVariant parseString(const QString &json, int &index, bool &success) { - QString s; - QChar c; - - eatWhitespace(json, index); - - c = json[index++]; - - bool complete = false; - while(!complete) { - if (index == json.size()) { - break; - } - - c = json[index++]; - - if (c == '\"') { - complete = true; - break; - } else if (c == '\\') { - if (index == json.size()) { - break; - } - - c = json[index++]; - - if (c == '\"') { - s.append('\"'); - } else if (c == '\\') { - s.append('\\'); - } else if (c == '/') { - s.append('/'); - } else if (c == 'b') { - s.append('\b'); - } else if (c == 'f') { - s.append('\f'); - } else if (c == 'n') { - s.append('\n'); - } else if (c == 'r') { - s.append('\r'); - } else if (c == 't') { - s.append('\t'); - } else if (c == 'u') { - int remainingLength = json.size() - index; - if (remainingLength >= 4) { - QString unicodeStr = json.mid(index, 4); - - int symbol = unicodeStr.toInt(0, 16); - - s.append(QChar(symbol)); - - index += 4; - } else { - break; - } - } - } else { - s.append(c); - } - } - - if (!complete) { - success = false; - return QVariant(); - } - - return QVariant(s); - } - - /** - * parseNumber - */ - static QVariant parseNumber(const QString &json, int &index) { - eatWhitespace(json, index); - - int lastIndex = lastIndexOfNumber(json, index); - int charLength = (lastIndex - index) + 1; - QString numberStr; - - numberStr = json.mid(index, charLength); - - index = lastIndex + 1; - bool ok; - - if (numberStr.contains('.')) { - return QVariant(numberStr.toDouble(NULL)); - } else if (numberStr.startsWith('-')) { - int i = numberStr.toInt(&ok); - if (!ok) { - qlonglong ll = numberStr.toLongLong(&ok); - return ok ? ll : QVariant(numberStr); - } - return i; - } else { - uint u = numberStr.toUInt(&ok); - if (!ok) { - qulonglong ull = numberStr.toULongLong(&ok); - return ok ? ull : QVariant(numberStr); - } - return u; - } - } - - /** - * lastIndexOfNumber - */ - static int lastIndexOfNumber(const QString &json, int index) { - int lastIndex; - - for(lastIndex = index; lastIndex < json.size(); lastIndex++) { - if (QString("0123456789+-.eE").indexOf(json[lastIndex]) == -1) { - break; - } - } - - return lastIndex -1; - } - - /** - * eatWhitespace - */ - static void eatWhitespace(const QString &json, int &index) { - for(; index < json.size(); index++) { - if (QString(" \t\n\r").indexOf(json[index]) == -1) { - break; - } - } - } - - /** - * lookAhead - */ - static int lookAhead(const QString &json, int index) { - int saveIndex = index; - return nextToken(json, saveIndex); - } - - /** - * nextToken - */ - static int nextToken(const QString &json, int &index) { - eatWhitespace(json, index); - - if (index == json.size()) { - return JsonTokenNone; - } - - QChar c = json[index]; - index++; - switch(c.toLatin1()) { - case '{': return JsonTokenCurlyOpen; - case '}': return JsonTokenCurlyClose; - case '[': return JsonTokenSquaredOpen; - case ']': return JsonTokenSquaredClose; - case ',': return JsonTokenComma; - case '"': return JsonTokenString; - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - case '-': return JsonTokenNumber; - case ':': return JsonTokenColon; - } - index--; // ^ WTF? - - int remainingLength = json.size() - index; - - // True - if (remainingLength >= 4) { - if (json[index] == 't' && json[index + 1] == 'r' && - json[index + 2] == 'u' && json[index + 3] == 'e') { - index += 4; - return JsonTokenTrue; - } - } - - // False - if (remainingLength >= 5) { - if (json[index] == 'f' && json[index + 1] == 'a' && - json[index + 2] == 'l' && json[index + 3] == 's' && - json[index + 4] == 'e') { - index += 5; - return JsonTokenFalse; - } - } - - // Null - if (remainingLength >= 4) { - if (json[index] == 'n' && json[index + 1] == 'u' && - json[index + 2] == 'l' && json[index + 3] == 'l') { - index += 4; - return JsonTokenNull; - } - } - - return JsonTokenNone; - } - - void setDateTimeFormat(const QString &format) { - dateTimeFormat = format; - } - - void setDateFormat(const QString &format) { - dateFormat = format; - } - - QString getDateTimeFormat() { - return dateTimeFormat; - } - - QString getDateFormat() { - return dateFormat; - } - - void setPrettySerialize(bool enabled) { - prettySerialize = enabled; - } - - bool isPrettySerialize() { - return prettySerialize; - } - - - - QQueue<BuilderJsonObject *> BuilderJsonObject::created_list; - - BuilderJsonObject::BuilderJsonObject() { - // clean objects previous "created" - while (!BuilderJsonObject::created_list.isEmpty()) { - delete BuilderJsonObject::created_list.dequeue(); - } - } - - BuilderJsonObject::BuilderJsonObject(JsonObject &json) { - BuilderJsonObject(); - - obj = json; - } - - BuilderJsonObject *BuilderJsonObject::set(const QString &key, const QVariant &value) { - obj[key] = value; - - return this; - } - - BuilderJsonObject *BuilderJsonObject::set(const QString &key, BuilderJsonObject *builder) { - return set(key, builder->create()); - } - - BuilderJsonObject *BuilderJsonObject::set(const QString &key, BuilderJsonArray *builder) { - return set(key, builder->create()); - } - - JsonObject BuilderJsonObject::create() { - BuilderJsonObject::created_list.enqueue(this); - - return obj; - } - - - QQueue<BuilderJsonArray *> BuilderJsonArray::created_list; - - BuilderJsonArray::BuilderJsonArray() { - // clean objects previous "created" - while (!BuilderJsonArray::created_list.isEmpty()) { - delete BuilderJsonArray::created_list.dequeue(); - } - } - - BuilderJsonArray::BuilderJsonArray(JsonArray &json) { - BuilderJsonArray(); - - array = json; - } - - BuilderJsonArray *BuilderJsonArray::add(const QVariant &element) { - array.append(element); - - return this; - } - - BuilderJsonArray *BuilderJsonArray::add(BuilderJsonObject *builder) { - return add(builder->create()); - } - - BuilderJsonArray *BuilderJsonArray::add(BuilderJsonArray *builder) { - return add(builder->create()); - } - - JsonArray BuilderJsonArray::create() { - BuilderJsonArray::created_list.enqueue(this); - - return array; - } - - - - - BuilderJsonObject *objectBuilder() { - return new BuilderJsonObject(); - } - - BuilderJsonObject *objectBuilder(JsonObject &json) { - return new BuilderJsonObject(json); - } - - BuilderJsonArray *arrayBuilder() { - return new BuilderJsonArray(); - } - - BuilderJsonArray *arrayBuilder(JsonArray &json) { - return new BuilderJsonArray(json); - } - -} //end namespace diff -Nru ukui-control-center-5.0.0.0/registeredSession/json.h ukui-control-center-5.0.0.0/registeredSession/json.h --- ukui-control-center-5.0.0.0/registeredSession/json.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/json.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,265 +0,0 @@ -/** - * QtJson - A simple class for parsing JSON data into a QVariant hierarchies and vice-versa. - * Copyright (C) 2011 Eeli Reilin - * - * 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 3 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, see <http://www.gnu.org/licenses/>. - */ - -/** - * \file json.h - */ - -#ifndef JSON_H -#define JSON_H - -#include <QVariant> -#include <QString> -#include <QQueue> - - -/** - * \namespace QtJson - * \brief A JSON data parser - * - * Json parses a JSON data into a QVariant hierarchy. - */ -namespace QtJson { - typedef QVariantMap JsonObject; - typedef QVariantList JsonArray; - - /** - * Clone a JSON object (makes a deep copy) - * - * \param data The JSON object - */ - QVariant clone(const QVariant &data); - - /** - * Insert value to JSON object (QVariantMap) - * - * \param v The JSON object - * \param key The key - * \param value The value - */ - void insert(QVariant &v, const QString &key, const QVariant &value); - - /** - * Append value to JSON array (QVariantList) - * - * \param v The JSON array - * \param value The value - */ - void append(QVariant &v, const QVariant &value); - - /** - * Parse a JSON string - * - * \param json The JSON data - */ - QVariant parse(const QString &json); - - /** - * Parse a JSON string - * - * \param json The JSON data - * \param success The success of the parsing - */ - QVariant parse(const QString &json, bool &success); - - /** - * This method generates a textual JSON representation - * - * \param data The JSON data generated by the parser. - * - * \return QByteArray Textual JSON representation in UTF-8 - */ - QByteArray serialize(const QVariant &data); - - /** - * This method generates a textual JSON representation - * - * \param data The JSON data generated by the parser. - * \param success The success of the serialization - * - * \return QByteArray Textual JSON representation in UTF-8 - */ - QByteArray serialize(const QVariant &data, bool &success, int _level = 0); - - /** - * This method generates a textual JSON representation - * - * \param data The JSON data generated by the parser. - * - * \return QString Textual JSON representation - */ - QString serializeStr(const QVariant &data); - - /** - * This method generates a textual JSON representation - * - * \param data The JSON data generated by the parser. - * \param success The success of the serialization - * - * \return QString Textual JSON representation - */ - QString serializeStr(const QVariant &data, bool &success, int _level = 0); - - /** - * This method sets date(time) format to be used for QDateTime::toString - * If QString is empty, Qt::TextDate is used. - * - * \param format The JSON data generated by the parser. - */ - void setDateTimeFormat(const QString& format); - void setDateFormat(const QString& format); - - /** - * This method gets date(time) format to be used for QDateTime::toString - * If QString is empty, Qt::TextDate is used. - */ - QString getDateTimeFormat(); - QString getDateFormat(); - - /** - * @brief setPrettySerialize enable/disabled pretty-print when serialize() a json - * @param enabled - */ - void setPrettySerialize(bool enabled); - - /** - * @brief isPrettySerialize check if is enabled pretty-print when serialize() a json - * @return - */ - bool isPrettySerialize(); - - - - - /** - * QVariant based Json object - */ - class Object : public QVariant { - template<typename T> - Object& insertKey(Object* ptr, const QString& key) { - T* p = (T*)ptr->data(); - if (!p->contains(key)) p->insert(key, QVariant()); - return *reinterpret_cast<Object*>(&p->operator[](key)); - } - template<typename T> - void removeKey(Object *ptr, const QString& key) { - T* p = (T*)ptr->data(); - p->remove(key); - } - public: - Object() : QVariant() {} - Object(const Object& ref) : QVariant(ref) {} - - Object& operator=(const QVariant& rhs) { - /** It maybe more robust when running under Qt versions below 4.7 */ - QObject * obj = qvariant_cast<QObject *>(rhs); - // setValue(rhs); - setValue(obj); - return *this; - } - Object& operator[](const QString& key) { - if (type() == QVariant::Map) - return insertKey<QVariantMap>(this, key); - else if (type() == QVariant::Hash) - return insertKey<QVariantHash>(this, key); - - setValue(QVariantMap()); - - return insertKey<QVariantMap>(this, key); - } - const Object& operator[](const QString& key) const { - return const_cast<Object*>(this)->operator[](key); - } - void remove(const QString& key) { - if (type() == QVariant::Map) - removeKey<QVariantMap>(this, key); - else if (type() == QVariant::Hash) - removeKey<QVariantHash>(this, key); - } - }; - - - class BuilderJsonArray; - - /** - * @brief The BuilderJsonObject class - */ - class BuilderJsonObject { - - public: - BuilderJsonObject(); - BuilderJsonObject(JsonObject &json); - - BuilderJsonObject *set(const QString &key, const QVariant &value); - BuilderJsonObject *set(const QString &key, BuilderJsonObject *builder); - BuilderJsonObject *set(const QString &key, BuilderJsonArray *builder); - JsonObject create(); - - private: - static QQueue<BuilderJsonObject *> created_list; - - JsonObject obj; - }; - - /** - * @brief The BuilderJsonArray class - */ - class BuilderJsonArray { - - public: - BuilderJsonArray(); - BuilderJsonArray(JsonArray &json); - - BuilderJsonArray *add(const QVariant &element); - BuilderJsonArray *add(BuilderJsonObject *builder); - BuilderJsonArray *add(BuilderJsonArray *builder); - JsonArray create(); - - private: - static QQueue<BuilderJsonArray *> created_list; - - JsonArray array; - }; - - - /** - * @brief Create a BuilderJsonObject - * @return - */ - BuilderJsonObject *objectBuilder(); - - /** - * @brief Create a BuilderJsonObject starting from copy of another json - * @return - */ - BuilderJsonObject *objectBuilder(JsonObject &json); - - /** - * @brief Create a BuilderJsonArray - * @return - */ - BuilderJsonArray *arrayBuilder(); - - /** - * @brief Create a BuilderJsonArray starting from copy of another json - * @return - */ - BuilderJsonArray *arrayBuilder(JsonArray &json); -} - -#endif //JSON_H diff -Nru ukui-control-center-5.0.0.0/registeredSession/metadata.json ukui-control-center-5.0.0.0/registeredSession/metadata.json --- ukui-control-center-5.0.0.0/registeredSession/metadata.json 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/metadata.json 2025-02-07 16:27:50.000000000 +0800 @@ -58,13 +58,6 @@ }, { "name":"org.ukui.ukcc.session", - "path":"/Notice", - "interface":"org.ukui.ukcc.session.Notice", - "resident":"false", - "namespace":"default" - }, - { - "name":"org.ukui.ukcc.session", "path":"/Screenlock", "interface":"org.ukui.ukcc.session.Screenlock", "resident":"false", diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/about/aboutinterface.cpp ukui-control-center-5.0.0.0/registeredSession/plugins/about/aboutinterface.cpp --- ukui-control-center-5.0.0.0/registeredSession/plugins/about/aboutinterface.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/about/aboutinterface.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -97,15 +97,22 @@ version = rx.cap(1); } } - } /*else { - version = tr("Kylin Linux Desktop V10 (SP1)"); - }*/ + } } mSystemVersion.clear(); mSystemVersion.append(versionID); mSystemVersion.append(version); } +void AboutInterface::setThemeMode(QString styleName) +{ + if (mStyleGsettings->keys().contains("styleName")) { + mStyleGsettings->set(STYLE_NAME_KEY, styleName); + } else { + qCritical() << "mStyleGsettings not contains the key: " << STYLE_NAME_KEY; + } +} + QString AboutInterface::getThemeMode() { if (mStyleGsettings->keys().contains("styleName")) { @@ -287,12 +294,18 @@ QString AboutInterface::getNtpTime() { + int count = 0; for (QString host : mNtphostNameList) { ipList.clear(); ntpGethostbyname(host.toLatin1().data()); for (QString ip : ipList) { - char *host = ip.toLatin1().data(); - char *result = ntpdate(host); + ++count; + qDebug() << Q_FUNC_INFO << host << "---->" << ip << ":" << count; + if (count >= 5) { + return ""; + } + char *mIp = ip.toLatin1().data(); + char *result = ntpdate(mIp); if (result != NULL) { return QString(result); } @@ -394,7 +407,7 @@ // 设置超时 struct timeval timeout; timeout.tv_sec = 0; - timeout.tv_usec = 300000;//微秒 + timeout.tv_usec = 280000;//微秒 if (setsockopt(s, SOL_SOCKET, SO_RCVTIMEO_NEW, &timeout, sizeof(timeout)) == -1) { perror("setsockopt failed:"); return NULL; diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/about/aboutinterface.h ukui-control-center-5.0.0.0/registeredSession/plugins/about/aboutinterface.h --- ukui-control-center-5.0.0.0/registeredSession/plugins/about/aboutinterface.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/about/aboutinterface.h 2025-02-07 16:27:50.000000000 +0800 @@ -44,6 +44,7 @@ public Q_SLOTS: bool openActivation(); + void setThemeMode(QString styleName); private: QStringList readFile(QString filepath); diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/area/areainterface.cpp ukui-control-center-5.0.0.0/registeredSession/plugins/area/areainterface.cpp --- ukui-control-center-5.0.0.0/registeredSession/plugins/area/areainterface.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/area/areainterface.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -256,51 +256,3 @@ Q_EMIT changed("language"); } } - -void AreaInterface::reloadInputMethodConfig() -{ - fcitxInterface->call("ReloadConfig"); -} - -void AreaInterface::changeInputMethod(const QString &inputMethod, const bool &add) -{ - QString fileTextString; - QFile configFile(FCITX_CONFIG_FILE); - if (configFile.open(QIODevice::ReadWrite | QIODevice::Text)) { - //把文件所有信息读出来 - QTextStream stream(&configFile); - fileTextString = stream.readAll(); - - if (!fileTextString.contains(inputMethod)) { - return ; - } - QString addString = inputMethod + ":True"; - QString removeString = inputMethod + ":False"; - if (add) { - fileTextString.replace(removeString, addString); - } else { - fileTextString.replace(addString, removeString); - } - stream << fileTextString; - configFile.close(); - reloadInputMethodConfig(); - } -} - -bool AreaInterface::isAddedInputMethod(const QString &inputMethod) -{ - QString fileTextString; - QFile mFile(FCITX_CONFIG_FILE); - if (mFile.open(QIODevice::ReadOnly | QIODevice::Text)) { - QTextStream stream(&mFile); - fileTextString = stream.readAll(); - QString string = inputMethod + ":True"; - if (fileTextString.contains(string)) { - return true; - } else { - return false; - } - } - qCritical()<<"open "<<FCITX_CONFIG_FILE<<" error."; - return false; -} diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/area/areainterface.h ukui-control-center-5.0.0.0/registeredSession/plugins/area/areainterface.h --- ukui-control-center-5.0.0.0/registeredSession/plugins/area/areainterface.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/area/areainterface.h 2025-02-07 16:27:50.000000000 +0800 @@ -49,21 +49,6 @@ bool isOpenkylin(); public Q_SLOTS: - /** - * @brief 修改输入法 - * - * @param inputMethodName 输入法名称 - * @param add 添加/移除 - */ - void changeInputMethod(const QString &inputMethod, const bool &add); - - /** - * @brief 查询输入法是否已经添加 - * - * @param inputMethodName 输入法名称 - * @return bool 返回输入法是否已经添加 - */ - bool isAddedInputMethod(const QString &inputMethod); // 对属性的设置函数 void setFormatCountry(const QString &formatCountry); @@ -78,7 +63,6 @@ void changed(QString keyName); private: - void reloadInputMethodConfig(); // 设置和获取gsetting的string类型的键值 QString gsettingGet(const QString &key) const; diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/autoboot/autostartinterface.cpp ukui-control-center-5.0.0.0/registeredSession/plugins/autoboot/autostartinterface.cpp --- ukui-control-center-5.0.0.0/registeredSession/plugins/autoboot/autostartinterface.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/autoboot/autostartinterface.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -223,11 +223,12 @@ return true; } -void AutoStartInterface::saveAppStatus(const QString &filename, bool status) +bool AutoStartInterface::saveAppStatus(const QString &filename, bool status) { QMap<QString, AutoApp>::iterator it = mAllAppMap.find(filename); - if (it == mAllAppMap.end()) - return; + if (it == mAllAppMap.end()) { + return false; + } if (status) { // 开启开机启动 it.value().hidden = false; if (it.value().position == SYSTEMPOS) { // 从~/.config/autostart目录下删除 @@ -246,12 +247,14 @@ it.value().hidden = true; } } + return true; } -void AutoStartInterface::setApplist(const QStringList &list) +bool AutoStartInterface::setApplist(const QStringList &list) { if (mUkccGsettings->keys().contains("autoappList")) mUkccGsettings->set(UKCC_AUTOAPP_KEY, list); + return true; } bool AutoStartInterface::getDisplayStatus(const QString &filename) diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/autoboot/autostartinterface.h ukui-control-center-5.0.0.0/registeredSession/plugins/autoboot/autostartinterface.h --- ukui-control-center-5.0.0.0/registeredSession/plugins/autoboot/autostartinterface.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/autoboot/autostartinterface.h 2025-02-07 16:27:50.000000000 +0800 @@ -49,8 +49,8 @@ bool copyFiletoLocal(const QString &filename); bool setAppHiddenInfo(const QString &filename, bool hidden); bool addAutobootApp(const QString &filename); - void saveAppStatus(const QString &filename, bool status); - void setApplist(const QStringList &list); + bool saveAppStatus(const QString &filename, bool status); + bool setApplist(const QStringList &list); bool getDisplayStatus(const QString &filename); Q_SIGNALS: diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/datetime/datetimeinterface.cpp ukui-control-center-5.0.0.0/registeredSession/plugins/datetime/datetimeinterface.cpp --- ukui-control-center-5.0.0.0/registeredSession/plugins/datetime/datetimeinterface.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/datetime/datetimeinterface.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -23,11 +23,12 @@ } -void DatetimeInterface::timezoneChanged(QString key) +bool DatetimeInterface::timezoneChanged(QString key) { if (key == "timezone") { Q_EMIT changed("timezone"); } + return true; } QStringList DatetimeInterface::getTimezone() @@ -87,16 +88,17 @@ return syncFlag ? QString("automatic") : QString ("manual"); } -void DatetimeInterface::setTimezone(QString timezone) +bool DatetimeInterface::setTimezone(QString timezone) { QString setTimezone = timezone; if (LINK_SHANGHAI_TIMEZONE.contains(timezone)) setTimezone = "Asia/Shanghai"; QDBusMessage retDBus = timeDateInterface->call("SetTimezone", setTimezone, true); if (retDBus.type() == QDBusMessage::ErrorMessage) { - return; + return false; } UniversalInterface::self()->ukccSystemDbus()->call("setShowTimezone", timezone); + return true; } void DatetimeInterface::setTime(qint64 timeData) diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/datetime/datetimeinterface.h ukui-control-center-5.0.0.0/registeredSession/plugins/datetime/datetimeinterface.h --- ukui-control-center-5.0.0.0/registeredSession/plugins/datetime/datetimeinterface.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/datetime/datetimeinterface.h 2025-02-07 16:27:50.000000000 +0800 @@ -25,7 +25,7 @@ QStringList getOtherTimezones(); public Q_SLOTS: - void setTimezone(QString zone); + bool setTimezone(QString zone); void setTime(qint64 timeData); bool setTimeMode(QString mode); bool setNtpServer(QString server); @@ -33,7 +33,7 @@ QStringList timezoneName(QString timezone); private Q_SLOTS: - void timezoneChanged(QString key); + bool timezoneChanged(QString key); private: QDBusInterface *timeDateInterface = nullptr; diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/default/defaultinterface.cpp ukui-control-center-5.0.0.0/registeredSession/plugins/default/defaultinterface.cpp --- ukui-control-center-5.0.0.0/registeredSession/plugins/default/defaultinterface.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/default/defaultinterface.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -125,7 +125,7 @@ return list; } -void DefaultInterface::setDefaultApp(const QString &storageId, const QString &mimeType) +bool DefaultInterface::setDefaultApp(const QString &storageId, const QString &mimeType) { if (mimeType == BROWSERTYPE) { for (const QString str : mBrowserMimeTypeList) @@ -149,6 +149,7 @@ } } } + return true; } void DefaultInterface::saveMimeTypeAssociation(const QString &mime, const QString &storageId) diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/default/defaultinterface.h ukui-control-center-5.0.0.0/registeredSession/plugins/default/defaultinterface.h --- ukui-control-center-5.0.0.0/registeredSession/plugins/default/defaultinterface.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/default/defaultinterface.h 2025-02-07 16:27:50.000000000 +0800 @@ -42,7 +42,7 @@ public Q_SLOTS: QVariantList getDefaultApp(const QString &mimeType); QVariantList getAppList(const QString &mimeType); - void setDefaultApp(const QString &storageId, const QString &mimeType); + bool setDefaultApp(const QString &storageId, const QString &mimeType); void saveMimeTypeAssociation(const QString &mime, const QString &storageId); }; diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/fontinterface.cpp ukui-control-center-5.0.0.0/registeredSession/plugins/fontinterface.cpp --- ukui-control-center-5.0.0.0/registeredSession/plugins/fontinterface.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/fontinterface.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,6 +0,0 @@ -#include "fontinterface.h" - -FontInterface::FontInterface() -{ - -} diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/fontinterface.h ukui-control-center-5.0.0.0/registeredSession/plugins/fontinterface.h --- ukui-control-center-5.0.0.0/registeredSession/plugins/fontinterface.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/fontinterface.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,12 +0,0 @@ -#ifndef FONTINTERFACE_H -#define FONTINTERFACE_H - -#include <QObject> - -class FontInterface -{ -public: - FontInterface(); -}; - -#endif // FONTINTERFACE_H diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/mouse/mouseinterface.cpp ukui-control-center-5.0.0.0/registeredSession/plugins/mouse/mouseinterface.cpp --- ukui-control-center-5.0.0.0/registeredSession/plugins/mouse/mouseinterface.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/mouse/mouseinterface.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -250,6 +250,15 @@ } } +void MouseInterface::setStyleCursorSpeed(const int value) +{ + if (ukuiStyleGsettings->keys().contains(CURSOR_BLINK_KEY)) { + ukuiStyleGsettings->set("cursor-blink-time", value); + } else { + qCritical() << "ukuiStyleGsettings not contains the key: " << CURSOR_BLINK_KEY; + } +} + void MouseInterface::resetKey(QString key) { if (key == "wheelSpeed") { diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/mouse/mouseinterface.h ukui-control-center-5.0.0.0/registeredSession/plugins/mouse/mouseinterface.h --- ukui-control-center-5.0.0.0/registeredSession/plugins/mouse/mouseinterface.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/mouse/mouseinterface.h 2025-02-07 16:27:50.000000000 +0800 @@ -67,9 +67,9 @@ void setPointerSize(const int value); void setCursorBlink(const bool checked); void setCursorSpeed(const int value); + void setStyleCursorSpeed(const int value); void resetKey(QString key); - Q_SIGNALS: void changed(QString keyName); diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/notice/noticeinterface.cpp ukui-control-center-5.0.0.0/registeredSession/plugins/notice/noticeinterface.cpp --- ukui-control-center-5.0.0.0/registeredSession/plugins/notice/noticeinterface.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/notice/noticeinterface.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,288 +0,0 @@ -#include "noticeinterface.h" -#include "universalinterface.h" -#include <QDebug> -#include <QStandardPaths> -#include <QSettings> -#include <KApplicationTrader> -#include <KService> -#include <KSharedConfig> -#include <KConfigGroup> -#include <QFileInfo> - -#define NOTICE_SCHEMA "org.ukui.control-center.notice" -#define ENABLE_NOTICE_KEY "enable-notice" - -#define NOTICE_ORIGIN_SCHEMA "org.ukui.control-center.noticeorigin" -#define NOTICE_ORIGIN_PATH "/org/ukui/control-center/noticeorigin/" -#define MAX_SHORTCUTS 1000 -#define MESSAGES_KEY "messages" -#define VOICE_KEY "voice" -#define SHOW_SCREENLOCK_KEY "show-on-screenlock" -#define SHOW_DETAIL_KEY "show-detail" -#define STYLE_KEY "notification-style" - -#define NOTIFICATION_DEMO_SCHEMA "org.ukui.notification.demo" -#define AUTOSTART_KEY "autostartdisturb" -#define PROJECTIONSCREEN_KEY "projectionscreendisturb" -#define FULLSCREEN_KEY "fullscreendisturb" -#define ALARMCLOCK_KEY "alarmclockdisturb" -#define TIMESTART_KEY "timestart" -#define TIMEEND_KEY "timeend" - -#define AUTOSTARTDIR "/etc/xdg/autostart/" - -NoticeInterface::NoticeInterface():UKUI::ServiceObject(nullptr) -{ - mUkccNoticeGsettings = UniversalInterface::self()->ukccNoticeGsettings(); - mUkuiNoticeGsettings = UniversalInterface::self()->ukuiNoticeGsettings(); - mStyleGsettings = UniversalInterface::self()->ukuiStyleGsettings(); - - mGsettingMap[ENABLE_NOTICE_KEY] = QString("enableNotice"); - mGsettingMap[SHOW_SCREENLOCK_KEY] = QString("showOnScreenlock"); - mGsettingMap[SHOW_DETAIL_KEY] = QString("showDetail"); - mGsettingMap[STYLE_KEY] = QString("notificationStyle"); - - mWhiteList.append("kylin-screenshot.desktop"); - mWhiteList.append("peony.desktop"); - mWhiteList.append("kylin-device-daemon.desktop"); - mWhiteList.append("ukui-power-manager.desktop"); - mWhiteList.append("kylin-system-update.desktop"); - mWhiteList.append("ukui-bluetooth.desktop"); - - if (mUkccNoticeGsettings) - connect(mUkccNoticeGsettings, &QGSettings::changed, [=](const QString &key){ - emit changed(key); - }); - if (mUkuiNoticeGsettings) - connect(mUkuiNoticeGsettings, &QGSettings::changed, [=](const QString &key){ - emit changed(key); - }); - if (mStyleGsettings) - connect(mStyleGsettings, &QGSettings::changed, [=](const QString &key){ - emit changed(key); - }); - - - -} - -bool NoticeInterface::getAutostartDisturb() -{ - if (mUkuiNoticeGsettings->keys().contains(AUTOSTART_KEY)) { - return mUkuiNoticeGsettings->get(AUTOSTART_KEY).toBool(); - } else { - qCritical() << "ukuiNoticeGsettings not contains the key: " << AUTOSTART_KEY; - } - return false; -} - -bool NoticeInterface::getProjectionsScreenDisturb() -{ - if (mUkuiNoticeGsettings->keys().contains(PROJECTIONSCREEN_KEY)) { - return mUkuiNoticeGsettings->get(PROJECTIONSCREEN_KEY).toBool(); - } else { - qCritical() << "ukuiNoticeGsettings not contains the key: " << PROJECTIONSCREEN_KEY; - } - return false; -} - -bool NoticeInterface::getFullScreenDisturb() -{ - if (mUkuiNoticeGsettings->keys().contains(FULLSCREEN_KEY)) { - return mUkuiNoticeGsettings->get(FULLSCREEN_KEY).toBool(); - } else { - qCritical() << "ukuiNoticeGsettings not contains the key: " << FULLSCREEN_KEY; - } - return false; -} - -bool NoticeInterface::getAlarmClockDisturb() -{ - if (mUkuiNoticeGsettings->keys().contains(ALARMCLOCK_KEY)) { - return mUkuiNoticeGsettings->get(ALARMCLOCK_KEY).toBool(); - } else { - qCritical() << "ukuiNoticeGsettings not contains the key: " << ALARMCLOCK_KEY; - } - return false; -} - -QString NoticeInterface::getTimeStart() -{ - if (mUkuiNoticeGsettings->keys().contains(TIMESTART_KEY)) { - return mUkuiNoticeGsettings->get(TIMESTART_KEY).toString(); - } else { - qCritical() << "ukuiNoticeGsettings not contains the key: " << TIMESTART_KEY; - } - return QString(); -} - -QString NoticeInterface::getTimeEnd() -{ - if (mUkuiNoticeGsettings->keys().contains(TIMEEND_KEY)) { - return mUkuiNoticeGsettings->get(TIMEEND_KEY).toString(); - } else { - qCritical() << "ukuiNoticeGsettings not contains the key: " << TIMEEND_KEY; - } - return QString(); -} - -bool NoticeInterface::getNoticeEnable() -{ - if (mUkccNoticeGsettings->keys().contains(mGsettingMap[ENABLE_NOTICE_KEY])) { - return mUkccNoticeGsettings->get(ENABLE_NOTICE_KEY).toBool(); - } else { - qCritical() << "mUkccNoticeGsettings not contains the key: " << mUkccNoticeGsettings; - } - return false; -} - -QList <QVariant> NoticeInterface::getNoticeAppList() -{ - qDBusRegisterMetaType<NoticeApp>(); - QList <QVariant> list; - for (QString desktopName : mWhiteList) { - QFileInfo file(AUTOSTARTDIR + desktopName); - if (file.exists()) { - QString mainSection = QStringLiteral("Desktop Entry"); - KSharedConfig::Ptr sharedConfig = KSharedConfig::openConfig(AUTOSTARTDIR + desktopName, KConfig::NoGlobals); - KConfigGroup cfg(sharedConfig, mainSection); - QString name = cfg.readEntry("Name"); - QString icon = cfg.readEntry("Icon"); - QString fileName = desktopName.left(desktopName.indexOf(QLatin1Char('.'))); - - if (mApplist.contains(name)) - continue; - mApplist.append(name); - NoticeApp app; - app.desktop = fileName; - app.name = name; - app.icon = icon; - getAppInfo(app, fileName); - list.append(QVariant::fromValue(app)); - } - } - - KApplicationTrader::query([=, &list](const KService::Ptr &service) { - if (service->exec().isEmpty() || service->noDisplay()) - return false; - - QString appname, desktopEntryName, icon; - appname = service->name(); - desktopEntryName = service->desktopEntryName(); - icon = service->icon(); - - if (mApplist.contains(appname)) - return false; - - mApplist.append(appname); - NoticeApp app; - app.desktop = desktopEntryName; - app.name = appname; - app.icon = icon; - getAppInfo(app, desktopEntryName); - list.append(QVariant::fromValue(app)); - return true; - }); - mApplist.clear(); - return list; -} - -void NoticeInterface::getAppInfo(NoticeApp &app, const QString &desktop) -{ - const QByteArray id(NOTICE_ORIGIN_SCHEMA); - QString path = QString("%1%2%3").arg(NOTICE_ORIGIN_PATH).arg(desktop).arg("/"); - QGSettings *settings = new QGSettings(id, path.toUtf8().data(), this); - - app.status = settings->get(MESSAGES_KEY).toBool(); - - app.voice = settings->get(VOICE_KEY).toBool(); - app.detail = settings->get(SHOW_DETAIL_KEY).toBool(); - app.show = settings->get(SHOW_SCREENLOCK_KEY).toBool(); - QString style = settings->get(STYLE_KEY).toString(); - app.mode = 0; - if (style == "mutative") { - app.mode = 0; - } else if (style == "always") { - app.mode = 1; - } else if (style == "none") { - app.mode = 2; - } - mNoticeAppsMap[desktop] = settings; -} - -void NoticeInterface::setNoticeDisturb(const QString &key, bool value) -{ - if (mUkuiNoticeGsettings->keys().contains(key)) { - return mUkuiNoticeGsettings->set(key, value); - } else { - qCritical() << "ukuiNoticeGsettings not contains the key: " << key; - } -} - -void NoticeInterface::setNoticeDisturb(const QString &key, const QString &value) -{ - if (mUkuiNoticeGsettings->keys().contains(key)) { - return mUkuiNoticeGsettings->set(key, value); - } else { - qCritical() << "ukuiNoticeGsettings not contains the key: " << key; - } -} - -void NoticeInterface::setUkccNotice(const QString &key, bool value) -{ - if (mUkccNoticeGsettings->keys().contains(mGsettingMap[key]) || mUkccNoticeGsettings->keys().contains(key)) { - return mUkccNoticeGsettings->set(key, value); - } else { - qCritical() << "mUkccNoticeGsettings not contains the key: " << key; - } -} - -void NoticeInterface::setAppInfo(const QString &desktop, const QString &key, bool value) -{ - auto iter = mNoticeAppsMap.find(desktop); - if (iter != mNoticeAppsMap.end()) { - QGSettings *settings = iter.value(); - if (settings) - settings->set(key, value); - } -} - -void NoticeInterface::setAppInfo(const QString &desktop, const QString &key, const QString &value) -{ - auto iter = mNoticeAppsMap.find(desktop); - if (iter != mNoticeAppsMap.end()) { - QGSettings *settings = iter.value(); - if (settings) - settings->set(key, value); - } -} - -const QDBusArgument &operator<<(QDBusArgument &argument, const NoticeApp &app) -{ - argument.beginStructure(); - argument << app.desktop; - argument << app.icon; - argument << app.name; - argument << app.status; - argument << app.voice; - argument << app.detail; - argument << app.show; - argument << app.mode; - argument.endStructure(); - return argument; -} - -const QDBusArgument &operator>>(const QDBusArgument &argument, NoticeApp &app) -{ - argument.beginStructure(); - argument >> app.desktop; - argument >> app.icon; - argument >> app.name; - argument >> app.status; - argument >> app.voice; - argument >> app.detail; - argument >> app.show; - argument >> app.mode; - argument.endStructure(); - return argument; -} diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/notice/noticeinterface.h ukui-control-center-5.0.0.0/registeredSession/plugins/notice/noticeinterface.h --- ukui-control-center-5.0.0.0/registeredSession/plugins/notice/noticeinterface.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/notice/noticeinterface.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,78 +0,0 @@ -#ifndef NOTICEINTERFACE_H -#define NOTICEINTERFACE_H - -#include <ukui-service-interface/serviceobject.h> -#include <QDBusArgument> -#include <QVariant> -#include <QDBusMetaType> -#include <QGSettings> - -struct NoticeApp -{ - QString desktop; - QString name; - QString icon; - bool status; - bool voice; - bool detail; - bool show; - int mode; -}; -const QDBusArgument &operator<<(QDBusArgument &argument, const NoticeApp &app); -const QDBusArgument &operator>>(const QDBusArgument &argument, NoticeApp &app); -Q_DECLARE_METATYPE(NoticeApp) - - -class NoticeInterface : public UKUI::ServiceObject -{ - Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "org.ukui.ukcc.session.Notice") - Q_PROPERTY(bool isAutostartDisturb READ getAutostartDisturb) - Q_PROPERTY(bool isProjectionScreenDisturb READ getProjectionsScreenDisturb) - Q_PROPERTY(bool isFullScreenDisturb READ getFullScreenDisturb) - Q_PROPERTY(bool isAlarmClockDisturb READ getAlarmClockDisturb) - Q_PROPERTY(QString timeStart READ getTimeStart) - Q_PROPERTY(QString timeEnd READ getTimeEnd) - Q_PROPERTY(bool isEnable READ getNoticeEnable) - Q_PROPERTY(QList <QVariant> noticeAppList READ getNoticeAppList) -// Q_PROPERTY(int cursorSpeed READ getCursorSpeed) -public: - NoticeInterface(); - -protected: - bool getAutostartDisturb(); - bool getProjectionsScreenDisturb(); - bool getFullScreenDisturb(); - bool getAlarmClockDisturb(); - QString getTimeStart(); - QString getTimeEnd(); - - bool getNoticeEnable(); - QList <QVariant> getNoticeAppList(); - -private: - void getAppInfo(NoticeApp &app,const QString &desktop); - -public Q_SLOTS: - void setNoticeDisturb(const QString &key, bool value); - void setNoticeDisturb(const QString &key, const QString &value); - void setUkccNotice(const QString &key, bool value); - void setAppInfo(const QString &desktop, const QString &key, bool value); - void setAppInfo(const QString &desktop, const QString &key, const QString &value); - -private: - QGSettings *mUkccNoticeGsettings = nullptr; - QGSettings *mUkuiNoticeGsettings = nullptr; - QGSettings *mStyleGsettings = nullptr; - - QMap <QString, QString> mGsettingMap; - QMap <QString, QGSettings *> mNoticeAppsMap; - - QStringList mWhiteList; - QStringList mApplist; - -Q_SIGNALS: - void changed(const QString &key); -}; - -#endif // NOTICEINTERFACE_H diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/shortcut/shortcutinterface.cpp ukui-control-center-5.0.0.0/registeredSession/plugins/shortcut/shortcutinterface.cpp --- ukui-control-center-5.0.0.0/registeredSession/plugins/shortcut/shortcutinterface.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/shortcut/shortcutinterface.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -18,15 +18,6 @@ ShortcutInterface::ShortcutInterface():UKUI::ServiceObject(nullptr) { - qRegisterMetaType<QStringPair>("QStringPair"); - qDBusRegisterMetaType<QStringPair>(); - qRegisterMetaType<QStringPairList>("QStringPairList"); - qDBusRegisterMetaType<QStringPairList>(); - - qRegisterMetaType<KeyEntry>("KeyEntry"); - qDBusRegisterMetaType<KeyEntry>(); - qRegisterMetaType<KeyEntryList>("KeyEntryList"); - qDBusRegisterMetaType<KeyEntryList>(); getShortcutThread(); } @@ -198,11 +189,18 @@ m_windowShortcutList.append(sq); // qDebug() << Q_FUNC_INFO << "add window shortcut" << sq.key << sq.name; } + + for (KeyEntry ckeyEntry : m_customEntries) { + QStringPair sq; + sq.name = ckeyEntry.nameStr; + sq.key = getShowShortcutString(ckeyEntry.bindingStr); + m_customShortcutList.append(sq); + } } void ShortcutInterface::getShortcutThread() { - GetShortcutWorker* toGetShortcutThread = new GetShortcutWorker(this); - if (nullptr == toGetShortcutThread) { + m_toGetShortcutThread = new GetShortcutWorker(this); + if (nullptr == m_toGetShortcutThread) { qWarning() << Q_FUNC_INFO << "get shortcut worker failed"; return; } @@ -210,7 +208,7 @@ m_shortKeyValue.clear(); m_systemEntries.clear(); m_systemShortcutList.clear(); - connect(toGetShortcutThread, &GetShortcutWorker::generalShortcutGenerate, this, + connect(m_toGetShortcutThread, &GetShortcutWorker::generalShortcutGenerate, this, [=](QString schema, QString key, QString value) { generalShortcutSlot(schema, key, value); }); @@ -218,25 +216,25 @@ m_windowEntries.clear(); m_windowSortEntries.clear(); m_windowShortcutList.clear(); - connect(toGetShortcutThread, &GetShortcutWorker::windowShortcutGenerate, this, + connect(m_toGetShortcutThread, &GetShortcutWorker::windowShortcutGenerate, this, [=](QString name, QString key, QString value) { windowShortcutSlot(name, key, value); }); m_customEntries.clear(); - connect(toGetShortcutThread, &GetShortcutWorker::customShortcutGenerate, this, + connect(m_toGetShortcutThread, &GetShortcutWorker::customShortcutGenerate, this, [=](QString path, QString name, QString binding, QString action) { customShortcutSlot(path, name, binding, action); }); - connect(toGetShortcutThread, &GetShortcutWorker::workerComplete, this, [=]() { + connect(m_toGetShortcutThread, &GetShortcutWorker::workerComplete, this, [=]() { workerCompleteSlot(); }); - connect(toGetShortcutThread, &GetShortcutWorker::finished, this, [=]() { - toGetShortcutThread->deleteLater(); + connect(m_toGetShortcutThread, &GetShortcutWorker::finished, this, [=]() { + m_toGetShortcutThread->deleteLater(); }); - toGetShortcutThread->start(); + m_toGetShortcutThread->start(); } QList<KeyEntry> ShortcutInterface::getSystemShortcutEntry() { @@ -273,8 +271,9 @@ return m_windowShortcutList; } -void ShortcutInterface::updateShortcut() { +bool ShortcutInterface::updateShortcut() { getShortcutThread(); + return true; } void ShortcutInterface::defaultWindowShortcut() { @@ -381,6 +380,16 @@ defaultWindowShortcut(); } +void ShortcutInterface::getThreadStart() +{ + return m_toGetShortcutThread->run(); +} + +QList<QStringPair> ShortcutInterface::getCustomShortcut() +{ + return m_customShortcutList; +} + void ShortcutInterface::setSystemShortcut(const QString &key, const QString &value) { QGSettings generalShort(KEYBINDINGS_DESKTOP_SCHEMA); generalShort.set(key, value); diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/shortcut/shortcutinterface.h ukui-control-center-5.0.0.0/registeredSession/plugins/shortcut/shortcutinterface.h --- ukui-control-center-5.0.0.0/registeredSession/plugins/shortcut/shortcutinterface.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/shortcut/shortcutinterface.h 2025-02-07 16:27:50.000000000 +0800 @@ -16,6 +16,7 @@ public: ShortcutInterface(); ~ShortcutInterface(); + void getThreadStart(); Q_SIGNALS: void changed(QString key); @@ -23,11 +24,12 @@ public Q_SLOTS: QList<QStringPair> getSystemShortcut(); QList<QStringPair> getWindowShortcut(); + QList<QStringPair> getCustomShortcut(); QList<KeyEntry> getSystemShortcutEntry(); QList<KeyEntry> getWindowShortcutEntry(); QList<KeyEntry> getCustomShortcutEntry(); QVariantMap getShortKeyValue(); - void updateShortcut(); + bool updateShortcut(); void setSystemShortcut(const QString &key, const QString &value); void setCustomShortcut(const QString &key, const QString &value); void setWindowShortcut(const QString &key, const QString &oldValue, const QString &value); @@ -57,6 +59,8 @@ QVariantMap m_shortKeyValue; QList<QStringPair> m_systemShortcutList; QList<QStringPair> m_windowShortcutList; + QList<QStringPair> m_customShortcutList; + GetShortcutWorker* m_toGetShortcutThread = nullptr; }; #endif // SHORTCUTINTERFACE_H diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/shortcut/type.cpp ukui-control-center-5.0.0.0/registeredSession/plugins/shortcut/type.cpp --- ukui-control-center-5.0.0.0/registeredSession/plugins/shortcut/type.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/shortcut/type.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,47 +0,0 @@ -#include "type.h" - -const QDBusArgument &operator<<(QDBusArgument &argument, const QStringPair &string) { - argument.beginStructure(); - argument << string.name; - argument << string.key; - argument << string.mediakey; - argument.endStructure(); - return argument; -} - -const QDBusArgument &operator>>(const QDBusArgument &argument, QStringPair &string) { - argument.beginStructure(); - argument >> string.name; - argument >> string.key; - argument >> string.mediakey; - argument.endStructure(); - return argument; -} - -const QDBusArgument &operator<<(QDBusArgument &argument, const KeyEntry &key) { - argument.beginStructure(); - argument << key.gsSchema; - argument << key.keyStr; - argument << key.valueStr; - argument << key.descStr; - argument << key.gsPath; - argument << key.nameStr; - argument << key.bindingStr; - argument << key.actionStr; - argument.endStructure(); - return argument; -} - -const QDBusArgument &operator>>(const QDBusArgument &argument, KeyEntry &key) { - argument.beginStructure(); - argument >> key.gsSchema; - argument >> key.keyStr; - argument >> key.valueStr; - argument >> key.descStr; - argument >> key.gsPath; - argument >> key.nameStr; - argument >> key.bindingStr; - argument >> key.actionStr; - argument.endStructure(); - return argument; -} diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/shortcut/type.h ukui-control-center-5.0.0.0/registeredSession/plugins/shortcut/type.h --- ukui-control-center-5.0.0.0/registeredSession/plugins/shortcut/type.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/shortcut/type.h 2025-02-07 16:27:50.000000000 +0800 @@ -1,9 +1,6 @@ #ifndef TYPE_H #define TYPE_H -#include <QDBusArgument> -#include <QDBusMetaType> - typedef struct _KeyEntry { QString gsSchema; QString keyStr; @@ -13,11 +10,7 @@ QString nameStr; QString bindingStr; QString actionStr; -} KeyEntry; - -const QDBusArgument &operator<<(QDBusArgument &argument, const KeyEntry &key); -const QDBusArgument &operator>>(const QDBusArgument &argument, KeyEntry &key); -Q_DECLARE_METATYPE(KeyEntry) +}KeyEntry; typedef struct { QString name; @@ -25,10 +18,6 @@ QString mediakey; } QStringPair; -const QDBusArgument &operator<<(QDBusArgument &argument, const QStringPair &string); -const QDBusArgument &operator>>(const QDBusArgument &argument, QStringPair &string); -Q_DECLARE_METATYPE(QStringPair) - typedef QList<KeyEntry> KeyEntryList; typedef QList<QStringPair> QStringPairList; diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/vino/vinointerface.cpp ukui-control-center-5.0.0.0/registeredSession/plugins/vino/vinointerface.cpp --- ukui-control-center-5.0.0.0/registeredSession/plugins/vino/vinointerface.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/vino/vinointerface.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -18,7 +18,7 @@ bool VinoInterface::getViewOnly() { - if (mVinoGsettings->keys().contains("viewOnly")) { + if (mVinoGsettings != nullptr && mVinoGsettings->keys().contains("viewOnly")) { return mVinoGsettings->get(kVinoViewOnlyKey).toBool(); } else { qCritical() << "mVinoGsettings not contains the key: " << kVinoViewOnlyKey; @@ -28,7 +28,7 @@ bool VinoInterface::getPromptEnabled() { - if (mVinoGsettings->keys().contains("promptEnabled")) { + if (mVinoGsettings != nullptr && mVinoGsettings->keys().contains("promptEnabled")) { return mVinoGsettings->get(kVinoPromptKey).toBool(); } else { qCritical() << "mVinoGsettings not contains the key: " << kVinoPromptKey; @@ -38,7 +38,7 @@ QString VinoInterface::getMethod() { - if (mVinoGsettings->keys().contains("authenticationMethods")) { + if (mVinoGsettings != nullptr && mVinoGsettings->keys().contains("authenticationMethods")) { return mVinoGsettings->get(kAuthenticationKey).toString(); } else { qCritical() << "mVinoGsettings not contains the key: " << kAuthenticationKey; @@ -48,7 +48,7 @@ QString VinoInterface::getPassword() { - if (mVinoGsettings->keys().contains("vncPassword")) { + if (mVinoGsettings != nullptr && mVinoGsettings->keys().contains("vncPassword")) { return mVinoGsettings->get(kVncPwdKey).toString(); } else { qCritical() << "mVinoGsettings not contains the key: " << kVncPwdKey; @@ -67,7 +67,7 @@ bool VinoInterface::getVinoStatus() { - if (mUkuiVinoGsettings->keys().contains("vinoEnabled")) { + if (mVinoGsettings != nullptr && mUkuiVinoGsettings->keys().contains("vinoEnabled")) { return mUkuiVinoGsettings->get(kVinoEnableKey).toBool(); } else { qCritical() << "mUkuiVinoGsettings not contains the key: " << kVinoEnableKey; @@ -77,7 +77,7 @@ bool VinoInterface::getXrdpStatus() { - if (mUkuiVinoGsettings->keys().contains("xrdpEnabled")) { + if (mVinoGsettings != nullptr && mUkuiVinoGsettings->keys().contains("xrdpEnabled")) { return mUkuiVinoGsettings->get(kXrdpEnableKey).toBool(); } else { qCritical() << "mUkuiVinoGsettings not contains the key: " << kXrdpEnableKey; @@ -87,7 +87,7 @@ bool VinoInterface::getEnableStatus() { - if (mUkuiVinoGsettings->keys().contains("enabled")) { + if (mVinoGsettings != nullptr && mUkuiVinoGsettings->keys().contains("enabled")) { return mUkuiVinoGsettings->get(kEnableKey).toBool(); } else { qCritical() << "mUkuiVinoGsettings not contains the key: " << kEnableKey; @@ -97,13 +97,13 @@ void VinoInterface::setVinoKey(const QString &key, bool value) { - if (mVinoGsettings->keys().contains(mGsettingMap[key])) { + if (mVinoGsettings != nullptr && mVinoGsettings->keys().contains(mGsettingMap[key])) { return mVinoGsettings->set(key, value); } else { qCritical() << "mVinoGsettings not contains the key: " << key; } - if (mUkuiVinoGsettings->keys().contains(mGsettingMap[key])) { + if (mUkuiVinoGsettings != nullptr && mUkuiVinoGsettings->keys().contains(mGsettingMap[key])) { return mUkuiVinoGsettings->set(key, value); } else { qCritical() << "mUkuiVinoGsettings not contains the key: " << key; @@ -112,7 +112,7 @@ void VinoInterface::setVinoKey(const QString &key, QString value) { - if (mVinoGsettings->keys().contains(mGsettingMap[key])) { + if (mVinoGsettings != nullptr && mVinoGsettings->keys().contains(mGsettingMap[key])) { return mVinoGsettings->set(key, value); } else { qCritical() << "ukuiNoticeGsettings not contains the key: " << key; @@ -121,7 +121,7 @@ void VinoInterface::setVinoKey(const QString &key, QByteArray value) { - if (mVinoGsettings->keys().contains(mGsettingMap[key])) { + if (mVinoGsettings != nullptr && mVinoGsettings->keys().contains(mGsettingMap[key])) { return mVinoGsettings->set(key, value); } else { qCritical() << "ukuiNoticeGsettings not contains the key: " << key; diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/vino/vinointerface.h ukui-control-center-5.0.0.0/registeredSession/plugins/vino/vinointerface.h --- ukui-control-center-5.0.0.0/registeredSession/plugins/vino/vinointerface.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/vino/vinointerface.h 2025-02-07 16:27:50.000000000 +0800 @@ -5,8 +5,7 @@ #include <QDBusArgument> #include <QVariant> #include <QDBusMetaType> -#include <QGSettings> -#include "universalinterface.h" +#include "../../universalinterface.h" class VinoInterface : public UKUI::ServiceObject { @@ -40,13 +39,13 @@ void setVinoKey(const QString &key, QByteArray value); private: - const QString kEnableKey = "enabled"; - const QString kXrdpEnableKey = "xrdp-enabled"; - const QString kVinoEnableKey = "vino-enabled"; - const QString kVinoViewOnlyKey = "view-only"; - const QString kVinoPromptKey = "prompt-enabled"; - const QString kAuthenticationKey = "authentication-methods"; - const QString kVncPwdKey = "vnc-password"; + QString kEnableKey = "enabled"; + QString kXrdpEnableKey = "xrdp-enabled"; + QString kVinoEnableKey = "vino-enabled"; + QString kVinoViewOnlyKey = "view-only"; + QString kVinoPromptKey = "prompt-enabled"; + QString kAuthenticationKey = "authentication-methods"; + QString kVncPwdKey = "vnc-password"; QGSettings *mVinoGsettings = nullptr; QGSettings *mUkuiVinoGsettings = nullptr; diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/wallpaperinterface.cpp ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/wallpaperinterface.cpp --- ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/wallpaperinterface.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/wallpaperinterface.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -3,12 +3,12 @@ WallpaperInterface::WallpaperInterface():UKUI::ServiceObject(nullptr) { WorkerObject *workThread = new WorkerObject(this); + workThread->start(); connect(workThread, &WorkerObject::wallpaperReaded, this, [=](QStringList previewFiles, QStringList sourceFiles) { previewWallpaperList = previewFiles; sourceWallpaperList = sourceFiles; }); - workThread->start(); - + connect(workThread, &QThread::finished, workThread, &QThread::deleteLater); mWallpaperMode.clear(); QString filename = UniversalInterface::self()->mateBackgroundGsettings()->get("picture-filename").toString(); if (filename.isEmpty()) { @@ -44,7 +44,8 @@ if (mWallpaperMode == "color") { mWallpaper = UniversalInterface::self()->mateBackgroundGsettings()->get("primary-color").toString(); } else { - mWallpaper = UniversalInterface::self()->accountUserDbus()->property("BackgroundFile").toString(); + mWallpaper = filename; + qDebug() << Q_FUNC_INFO << "picture-filename" << mWallpaper; if (mWallpaper.isEmpty() || !QFile::exists(mWallpaper) || mWallpaper == "/usr/share/backgrounds/ubuntukylin-default-settings.jpg") { mWallpaper = "/usr/share/backgrounds/1-warty-final-ubuntukylin.jpg"; @@ -53,6 +54,7 @@ Q_EMIT changed("wallpaper"); } }); + workThread->wait(); } WallpaperInterface::~WallpaperInterface() diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/workerobject.cpp ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/workerobject.cpp --- ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/workerobject.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/workerobject.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,6 +1,7 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * - * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2019 KylinSoft 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 @@ -110,17 +111,6 @@ if (dir.mkpath(LOCAL_WALLPAPER_PATH)) { qDebug()<<"mkpath:"<<LOCAL_WALLPAPER_PATH<<" success."; - int num = 0; //确保显示顺序与xml中的一致 - //写图片 - for (QString filename : filenameList) { - QPixmap pixmap = QPixmap(filename).scaled(IMAGE_SIZE); - QFile wallpaperFile; - filename.replace("/","-"); - wallpaperFile.setFileName(LOCAL_WALLPAPER_PATH + QString::number(num) + filename); - QFileInfo fileinfo = QFileInfo(filename); - pixmap.save(&wallpaperFile, fileinfo.suffix().toUtf8().data()); - num++; - } //写hash if (hashFile.open(QIODevice::WriteOnly)) { hashFile.write(hashDataWrite); diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/workerobject.h ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/workerobject.h --- ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/workerobject.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/workerobject.h 2025-02-07 16:27:50.000000000 +0800 @@ -21,7 +21,6 @@ #define WORKEROBJECT_H #include <QObject> -#include <QPixmap> #include "xmlhandle.h" #include <QStandardPaths> diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/xmlhandle.cpp ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/xmlhandle.cpp --- ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/xmlhandle.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/xmlhandle.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -245,54 +245,3 @@ file.close(); } - -void XmlHandle::xmlUpdate(QMap<QString, QMap<QString, QString> > wallpaperinfosMap){ - QFile file(localconf); - if (!file.open(QFile::WriteOnly | QFile::Text)){ - qDebug() << "Error Open XML File When Update Local Xml: " << file.errorString(); - return; - } - - if (0 == wallpaperinfosMap.count()){ - qDebug() << "Error QMap Empty"; - return; - } - - QMap<QString, QString> currentheadMap; - currentheadMap = wallpaperinfosMap.find("head").value(); - - QXmlStreamWriter writer; - writer.setDevice(&file); - writer.setAutoFormatting(true); //自动格式化 -// writer.setCodec(headMap.find("encoding")); - writer.writeStartDocument(QString(currentheadMap.find("version").value()), false); - - //DTD - writer.writeDTD(QString::fromLocal8Bit("<!DOCTYPE %1 SYSTEM \"%2\">").arg(currentheadMap.find("doctype").value()).arg(currentheadMap.find("system").value())); - - //BODY - writer.writeStartElement("wallpapers"); - QMap<QString, QMap<QString, QString> >::iterator its = wallpaperinfosMap.begin(); - for (; its != wallpaperinfosMap.end(); its++){ - if (QString(its.key()) == "head") - continue; - - QMap<QString, QString> sourceMap = (QMap<QString, QString>)its.value(); - QMap<QString, QString>::iterator it = sourceMap.begin(); - - writer.writeStartElement("wallpaper"); - writer.writeAttribute("deleted", QString(sourceMap.find("deleted").value())); - - for(; it != sourceMap.end(); it++){ - if (it.key() == "deleted") - continue; - writer.writeTextElement(QString(it.key()), QString(it.value())); - } - - writer.writeEndElement(); - } - writer.writeEndElement(); - writer.writeEndDocument(); - - file.close(); -} diff -Nru ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/xmlhandle.h ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/xmlhandle.h --- ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/xmlhandle.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/plugins/wallpaper/xmlhandle.h 2025-02-07 16:27:50.000000000 +0800 @@ -38,7 +38,6 @@ public: void init(); void xmlreader(QString filename); - void xmlUpdate(QMap<QString, QMap<QString, QString>> wallpaperinfosMap); QMap<QString, QMap<QString, QString> > requireXmlData(); public: diff -Nru ukui-control-center-5.0.0.0/registeredSession/registeredSession.pro ukui-control-center-5.0.0.0/registeredSession/registeredSession.pro --- ukui-control-center-5.0.0.0/registeredSession/registeredSession.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/registeredSession.pro 2025-02-07 16:27:50.000000000 +0800 @@ -45,7 +45,6 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ - json.cpp \ main.cpp \ plugins/about/aboutinterface.cpp \ plugins/area/areainterface.cpp \ @@ -57,12 +56,10 @@ plugins/keyboard/keyboardinterface.cpp \ plugins/mouse/mouseinterface.cpp \ plugins/default/defaultinterface.cpp \ - plugins/notice/noticeinterface.cpp \ plugins/screenlock/screenlockinterface.cpp \ plugins/screensaver/screensaverinterface.cpp \ plugins/shortcut/getshortcutworker.cpp \ plugins/shortcut/shortcutinterface.cpp \ - plugins/shortcut/type.cpp \ plugins/vino/vinointerface.cpp \ plugins/wallpaper/wallpaperinterface.cpp \ plugins/wallpaper/workerobject.cpp \ @@ -77,7 +74,6 @@ HEADERS += \ - json.h \ plugins/about/aboutinterface.h \ plugins/area/areainterface.h \ plugins/autoboot/autostartinterface.h \ @@ -89,7 +85,6 @@ plugins/keyboard/keyboardinterface.h \ plugins/mouse/mouseinterface.h \ plugins/default/defaultinterface.h \ - plugins/notice/noticeinterface.h \ plugins/screenlock/screenlockinterface.h \ plugins/screensaver/screensaverinterface.h \ plugins/shortcut/getshortcutworker.h \ diff -Nru ukui-control-center-5.0.0.0/registeredSession/ukccsessionservice.cpp ukui-control-center-5.0.0.0/registeredSession/ukccsessionservice.cpp --- ukui-control-center-5.0.0.0/registeredSession/ukccsessionservice.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/registeredSession/ukccsessionservice.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -5,7 +5,6 @@ #include "plugins/area/areainterface.h" #include "plugins/default/defaultinterface.h" #include "plugins/autoboot/autostartinterface.h" -#include "plugins/notice/noticeinterface.h" #include "plugins/about/aboutinterface.h" #include "plugins/datetime/datetimeinterface.h" #include "plugins/wallpaper/wallpaperinterface.h" @@ -32,7 +31,6 @@ auto defaultapp = new DefaultInterface; auto keyboard = new KeyBoardInterface; auto mouse = new MouseInterface; - auto notice = new NoticeInterface; auto screenlock = new ScreenlockInterface; auto screensaver = new ScreensaverInterface; auto shortcut = new ShortcutInterface; @@ -40,7 +38,7 @@ auto wallpaper = new WallpaperInterface; auto font = new FontInterface; services << instance << about << area << autoboot << datetime << defaultapp - <<keyboard << mouse << notice << screenlock << screensaver + <<keyboard << mouse << screenlock << screensaver << shortcut << vino << wallpaper << font; return services; } diff -Nru ukui-control-center-5.0.0.0/shell/mainwindow.cpp ukui-control-center-5.0.0.0/shell/mainwindow.cpp --- ukui-control-center-5.0.0.0/shell/mainwindow.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/shell/mainwindow.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * - * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2019 KylinSoft 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 @@ -21,7 +21,6 @@ #include "ui_mainwindow.h" #include "interface/ukcccommon.h" using namespace ukcc; -#include "imageutil.h" #include "ukccabout.h" #include <QLabel> @@ -88,18 +87,16 @@ qApp->installEventFilter(this); qApp->setStyle(new InternalStyle("ukui")); pluginPathList = FunctionSelect::listExistsCustomNoticePath(PLUGINS_PATH); - if (UkccCommon::isOpenkylin()) { - connect(WindowManager::self(),&WindowManager::windowAdded,this,[=](const WindowId& windowId){ - 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); - } - }); - } + connect(WindowManager::self(),&WindowManager::windowAdded,this,[=](const WindowId& windowId){ + 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); + } + }); isLoad = false; loadWidget = false; preInit(); @@ -388,7 +385,7 @@ mTitleIcon->setHidden(true); ui->leftsidebarWidget->setVisible(true); //左上角显示字符/返回按钮 - if (!is_tabletmode) { + if (!m_tabletmode) { backBtn->setVisible(true); } ui->stackedWidget->status = false; @@ -454,13 +451,13 @@ QDBusConnection::sessionBus(),this); if (m_statusSessionDbus->isValid()) { QDBusReply<bool> tabletmode = m_statusSessionDbus->call("get_current_tabletmode"); - is_tabletmode = tabletmode; - mainWindow_statusDbusSlot(is_tabletmode); + m_tabletmode = tabletmode; connect(m_statusSessionDbus, SIGNAL(mode_change_signal(bool)), this, SLOT(mainWindow_statusDbusSlot(bool))); } else { qDebug() << "Create statusmanager Interface Failed When : " << QDBusConnection::systemBus().lastError(); } + mainWindow_statusDbusSlot(m_tabletmode); } void MainWindow::initTileBar() { @@ -549,7 +546,7 @@ void MainWindow::mainWindow_statusDbusSlot(bool tablet_mode) { - is_tabletmode = tablet_mode; + m_tabletmode = tablet_mode; if (tablet_mode) { ui->leftTopWidget->layout()->setContentsMargins(16, 0, 0, 0); @@ -1103,6 +1100,7 @@ void MainWindow::sltMessageReceived(const QString &msg) { qDebug() << Q_FUNC_INFO << "sltMessageReceived" << msg; QString platform = QGuiApplication::platformName(); + qDebug() << Q_FUNC_INFO << "Message received" << msg << "platform" << platform; if(platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) { if (!m_listWinIds.isEmpty()) { WindowManager::activateWindow(m_listWinIds.back()); diff -Nru ukui-control-center-5.0.0.0/shell/mainwindow.h ukui-control-center-5.0.0.0/shell/mainwindow.h --- ukui-control-center-5.0.0.0/shell/mainwindow.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/shell/mainwindow.h 2025-02-07 16:27:50.000000000 +0800 @@ -109,8 +109,7 @@ KNavigationBar *scrollArea = nullptr; QDBusInterface *m_statusSessionDbus; - bool is_tabletmode; - bool isTabletMode = false; + bool m_tabletmode = false; QList<WindowId> m_listWinIds; QMap<QString, QGSettings *> vecGsettins; diff -Nru ukui-control-center-5.0.0.0/shell/modulepagewidget.cpp ukui-control-center-5.0.0.0/shell/modulepagewidget.cpp --- ukui-control-center-5.0.0.0/shell/modulepagewidget.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/shell/modulepagewidget.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -134,6 +134,10 @@ delete(ui->scrollArea->widget()); pluginwidget = plu->pluginUi(); + if (pluginwidget && UkccCommon::isV11()) { + pluginwidget->update(); + qDebug() << Q_FUNC_INFO << "update plugin ui"; + } qInfo()<<"pluginUi(): "<<currentPlugin->name(); pluginwidget->setContentsMargins(24,0,4,40); ui->scrollArea->setWidget(pluginwidget); diff -Nru ukui-control-center-5.0.0.0/shell/res/i18n/bo_CN.ts ukui-control-center-5.0.0.0/shell/res/i18n/bo_CN.ts --- ukui-control-center-5.0.0.0/shell/res/i18n/bo_CN.ts 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/shell/res/i18n/bo_CN.ts 2025-02-07 16:27:50.000000000 +0800 @@ -233,7 +233,7 @@ <context> <name>AboutInterface</name> <message> - <location filename="../../../registeredSession/plugins/about/aboutinterface.cpp" line="226"/> + <location filename="../../../registeredSession/plugins/about/aboutinterface.cpp" line="233"/> <source>avaliable</source> <translation>འགན་འཁྲི་འཁུར་དགོས།</translation> </message> @@ -241,94 +241,97 @@ <context> <name>AboutUi</name> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="31"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="32"/> <source>System Summary</source> <translation>ལམ་ལུགས་ཕྱོགས་བསྡོམས།</translation> + <extra-contents_path>/About/System Summary</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="33"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="35"/> <source>Privacy and agreement</source> <translation>སྒེར་གྱི་གསང་དོན་དང་གྲོས་མཐུན</translation> + <extra-contents_path>/About/Privacy and agreement</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="35"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="37"/> <source>Support</source> <translation>རྒྱབ་སྐྱོར།</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="49"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="376"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="51"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="381"/> <source>Version</source> <translation>པར་གཞི།</translation> <extra-contents_path>/About/version</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="54"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="56"/> <source>Version Number</source> <translation>པར་གཞིའི་ཨང་གྲངས།</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="59"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="61"/> <source>Patch Version</source> <translation>པར་གཞི་ཆུང་ཆུང་།</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="64"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="66"/> <source>Installed Date</source> <translation>སྒྲིག་སྦྱོར་ཚེས་གྲངས།</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="69"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="71"/> <source>Upgrade Date</source> <translation>རྒྱུད་ཁོངས་གསར་སྒྱུར་དུས་ཚོད།</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="75"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="78"/> <source>HostName</source> <translation>གཙོ་སྐྱོང་བྱེད་མཁན་གྱི་མིང</translation> + <extra-contents_path>/About/HostName</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="87"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="378"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="90"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="383"/> <source>Kernel</source> <translation>ནང་སྙིང་།</translation> <extra-contents_path>/About/Kernel</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="92"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="380"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="95"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="385"/> <source>CPU</source> <translation>CPU</translation> <extra-contents_path>/About/CPU</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="97"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="382"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="100"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="387"/> <source>Memory</source> <translation>དྲན་ཤེས་</translation> <extra-contents_path>/About/Memory</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="102"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="105"/> <source>Disk</source> <translation>ཁབ་ལེན་གྱི་ཁབ་ལེན་</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="107"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="384"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="110"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="389"/> <source>Desktop</source> <translation>ཅོག་ཙེའི་སྟེང་གི</translation> <extra-contents_path>/About/Desktop</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="112"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="386"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="115"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="391"/> <source>User</source> <translation>སྤྱོད་མཁན།</translation> <extra-contents_path>/About/User</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="120"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="123"/> <source>Copyright ©%1 %2. All rights reserved.</source> <translation>པར་དབང ©%1 %2.དབང་ཆ་ཡོད་ཚད་སོར་འཇོག་བྱ།.</translation> </message> @@ -341,12 +344,12 @@ <translation type="vanished">པར་དབང © %1 %2.དབང་ཆ་ཡོད་ཚད་སོར་འཇོག་བྱ།.</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="169"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="172"/> <source>openKylin</source> <translation>openkylin</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="166"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="169"/> <source>KylinSoft</source> <translation>བསེ་རུ་མཉེན་པོ།</translation> </message> @@ -355,66 +358,70 @@ <translation type="vanished">པར་དབང ©་2020 བསེ་རུ་མཉེན་པོ།. སོར་ཉར་བྱས་པའི་ཁེ་དབང་ཡོད་ཚད།.</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="232"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="235"/> <source>Wechat code scanning obtains HP professional technical support</source> <translation>འཕྲིན་ཕྲན་ཨང་གྲངས་ལ་ཞིབ་བཤེར་བྱས་ནས་HPཆམ་ལས་ལག་རྩལ་གྱི་རྒྱབ་སྐྱོར་ཐོབ།</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="233"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="236"/> <source>See more about Kylin Tianqi edu platform</source> <translation>See more about ཅིན་ལིན་ཐེན་ཆིའི་eduསྟེ་སྟེགས་བུ།</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="253"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="256"/> <source>Learn more HP user manual>></source> <translation>སྔར་ལས་ལྷག་པའི་སྒོ་ནས་HPབེད་སྤྱོད་བྱེད་མཁན>></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="258"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="261"/> <source>See user manual>></source> <translation>སྤྱོད་མཁན་གྱི་ལག་དེབ་ལ་གཟིགས>></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="336"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="339"/> <source>Send optional diagnostic data</source> <translation>བསལ་འདེམས་ཀྱི་བརྟག་དཔྱད་གཞི་གྲངས་སྐུར་སྐྱེལ་བྱ་དགོས།</translation> + <extra-contents_path>/About/Send optional diagnostic data</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="337"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="340"/> <source>By sending us diagnostic data, improve the system experience and solve your problems faster</source> <translation>ང་ཚོར་ནད་གཞི་བརྟག་དཔྱད་ཀྱི་གཞི་གྲངས་བསྐུར་ནས་མ་ལག་གི་ཉམས་མྱོང་ལེགས་བཅོས་བྱས་ཏེ་ཁྱོད་ཀྱི་གནད་དོན་ཐག་གཅོད</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="359"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="363"/> <source><<Protocol>></source> <translation>《ཚོད་སྤྱོད་འགན་འཁྲི་མེད་པར་བཟོ་བའི་གྲོས་མཐུན་》</translation> + <extra-contents_path>/About/<<Protocol>></extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="360"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="364"/> <source>and</source> <translation>དེ་བཞིན་དེ་བཞིན་</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="361"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="366"/> <source><<Privacy>></source> - <translation>《གསང་བ་དང་གསལ་བསྒྲགས།》</translation> + <translation>《སྤྱོད་མཁན་གྱི་གསང་དོན་གྲོས་མཐུན་》</translation> + <extra-contents_path>/About/<<Privacy>></extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="388"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="393"/> <source>Status</source> <translation>གནས་ཚུལ་གྱི་གནས་</translation> <extra-contents_path>/About/Status</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="390"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="395"/> <source>Active</source> <translation>འཁྲུག་ཆ་དོད་པོ་</translation> <extra-contents_path>/About/Active</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="391"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="397"/> <source>Serial</source> <translation>གོ་རིམ་ལྟར་ན།</translation> + <extra-contents_path>/About/Serial</extra-contents_path> </message> </context> <context> @@ -732,7 +739,6 @@ <message> <source>Current Region</source> <translation type="vanished">མིག་སྔའི་ས་ཁོངས།</translation> - <extra-contents_path>/Area/Current Region</extra-contents_path> </message> <message> <source>Regional Format</source> @@ -751,7 +757,6 @@ <message> <source>Date</source> <translation type="vanished">དུས་ཚོད།</translation> - <extra-contents_path>/Area/Date</extra-contents_path> </message> <message> <source>Time</source> @@ -905,12 +910,12 @@ <message> <location filename="../../../plugins/time-language/area/area.cpp" line="366"/> <source>MMMM dd, yyyy</source> - <translation>ཨིན།</translation> + <translation>yyyyལོ།MMཟླ།ddཉིན།</translation> </message> <message> <location filename="../../../plugins/time-language/area/area.cpp" line="369"/> <source>MMMM d, yy</source> - <translation>ཨིན།</translation> + <translation>yyལོ།Mཟླ།dཉིན།</translation> </message> <message> <location filename="../../../plugins/time-language/area/area.cpp" line="639"/> @@ -1021,38 +1026,38 @@ <location filename="../../../plugins/time-language/area/areaui.cpp" line="45"/> <source>Short Foramt Date</source> <translation>ཁུང་བུ་ཐུང་ཐུང་གི་དུས་ཚོད།</translation> - <extra-contents_path>/Area/Date</extra-contents_path> + <extra-contents_path>/Area/Short Foramt Date</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="46"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="47"/> <source>Long Format Date</source> <translation>ཚད་ལྡན་རྣམ་གཞག་གི་ཚེས་གྲངས།</translation> + <extra-contents_path>/Area/Long Format Date</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="48"/> <source>Date</source> - <translation>དུས་ཚོད།</translation> + <translation type="vanished">དུས་ཚོད།</translation> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="52"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="50"/> <source>Time</source> <translation>དུས་ཚོད།</translation> <extra-contents_path>/Area/Time</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="65"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="63"/> <source>Language Format</source> <translation>སྐད་ཆའི་རྣམ་གཞག</translation> <extra-contents_path>/Area/Language Format</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="76"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="74"/> <source>Language Format Example</source> <translation>སྐད་ཆའི་རྣམ་བཞག་དཔེ་མཚོན།</translation> <extra-contents_path>/Area/Language Format Example</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="105"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="103"/> <source>System Language</source> <translation>མ་ལག་གི་སྐད་ཆ།</translation> <extra-contents_path>/Area/System Language</extra-contents_path> @@ -1738,26 +1743,7 @@ <translation>གཏན་འཁེལ་བྱས་པའི་</translation> </message> <message> - <source>Forgot password</source> - <translation type="vanished">གསང་བ་བརྗེད་སོང་ངམ།</translation> - </message> - <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="172"/> - <source>Verification</source> - <translation>ཚོད་ལྟས་ར་སྤྲོད་</translation> - </message> - <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="206"/> - <source>Password Prompt</source> - <translation>གསང་བའི་གསལ་འདེབས།</translation> - </message> - <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="210"/> - <source>Optional(Recommended)</source> - <translation>འདེམས་བསྐོའི་ཁ་སྐོང་(འོས་སྦྱོར་བྱ་རྒྱུ། )</translation> - </message> - <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="259"/> + <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="216"/> <source>Cancel</source> <translation>ཕྱིར་འཐེན།</translation> </message> @@ -1769,8 +1755,8 @@ <translation>གཏན་འཁེལ་བྱ་དགོས།</translation> </message> <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="300"/> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="595"/> + <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="281"/> + <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="544"/> <source>Inconsistency with pwd</source> <translation>གསང་གྲངས་གསར་པ་དང་མི་འདྲ་།</translation> </message> @@ -1790,12 +1776,7 @@ <translation>བདེན་དཔང་ར་སྤྲོད་བྱེད་མ་ཐུབ་པར་ཡང་བསྐྱར་ནང་འཇུག་བྱེད་དགོས།</translation> </message> <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="468"/> - <source>Your password cannot be included in the password prompt.</source> - <translation>གསང་བའི་གསལ་འདེབས་ནང་དུ་ཁྱོད་ཀྱི་གསང་གྲངས་འདུས་མི་ཐུབ།.</translation> - </message> - <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="554"/> + <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="503"/> <source>Contains illegal characters!</source> <translation>དེའི་ནང་དུ་ཁྲིམས་འགལ་གྱི་མི་སྣ་འདུས་ཡོད།</translation> </message> @@ -2279,6 +2260,11 @@ <translation>མིང་དང་ཚོགས་པ་གཉིས་ལ་བབ་མཚུངས་ཀྱི་མིང་ཡོད།</translation> </message> <message> + <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="468"/> + <source>Your password cannot be included in the password prompt.</source> + <translation>གསང་བའི་གསལ་འདེབས་ནང་དུ་ཁྱོད་ཀྱི་གསང་གྲངས་འདུས་མི་ཐུབ།.</translation> + </message> + <message> <location filename="../../../plugins/account/userinfo/createusernew.cpp" line="735"/> <source>Contains illegal characters!</source> <translation>དེའི་ནང་དུ་ཁྲིམས་འགལ་གྱི་མི་སྣ་འདུས་ཡོད།</translation> @@ -2373,7 +2359,6 @@ <message> <source>Set Date Manually</source> <translation type="vanished">ལག་པས་དུས་ཚོད་གཏན་འཁེལ་བྱ་དགོས།</translation> - <extra-contents_path>/Date/Set Date Manually</extra-contents_path> </message> <message> <source>Sync Time</source> @@ -2473,10 +2458,14 @@ <extra-contents_path>/Date/Sync Time</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="127"/> <source>Set Date Manually</source> - <translation>ལག་པས་དུས་ཚོད་གཏན་འཁེལ་བྱ་དགོས།</translation> - <extra-contents_path>/Date/Set Date Manually</extra-contents_path> + <translation type="vanished">ལག་པས་དུས་ཚོད་གཏན་འཁེལ་བྱ་དགོས།</translation> + </message> + <message> + <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="127"/> + <source>Set Time Manually</source> + <translation>ལག་ཤེས་དུས་ཚོད།</translation> + <extra-contents_path>/Date/Set Time Manually</extra-contents_path> </message> <message> <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="162"/> @@ -2508,12 +2497,12 @@ <message> <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="269"/> <source>MMMM d, yy ddd</source> - <translation type="unfinished"></translation> + <translation>yyལོའི་ཟླ་Mཚེས་dཉིན། ddd</translation> </message> <message> <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="271"/> <source>MMMM dd, yyyy ddd</source> - <translation type="unfinished"></translation> + <translation>yyyyལོའི་ཟླ་MMཚེས་ddཉིན། ddd</translation> </message> <message> <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="302"/> @@ -2622,12 +2611,13 @@ <extra-contents_path>/Defaultapp/Text Editor</extra-contents_path> </message> <message> - <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="34"/> + <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="35"/> <source>Reset default apps to system recommended apps</source> <translation>མ་ལག་གིས་འོས་སྦྱོར་བྱས་པའི་ཉེར་སྤྱོད་གོ་རིམ་ཁྲོད་དུ་ཁ་ཆད་</translation> + <extra-contents_path>/Defaultapp/Reset default apps to system recommended apps</extra-contents_path> </message> <message> - <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="35"/> + <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="36"/> <source>Reset</source> <translation>བསྐྱར་དུ་བཀོད་སྒྲིག་བྱེད་པ</translation> </message> @@ -3232,27 +3222,27 @@ <context> <name>InputPwdDialog</name> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="29"/> - <source>Set</source> - <translation>གཏན་འཁེལ་བྱ་དགོས།</translation> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="39"/> + <source>VNC password</source> + <translation>VNC གསང་གྲངས།</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="46"/> - <source>Set Password</source> - <translation>གསང་གྲངས་གཏན་འཁེལ་བྱ་དགོས</translation> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="57"/> + <source>Password</source> + <translation>གསང་གྲངས།</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="62"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="75"/> <source>Must be 1-8 characters long</source> <translation>ངེས་པར་དུ་ཡི་གེ་1-8ཀྱི་རིང་ཚད་ཡིན་དགོས།</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="79"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="92"/> <source>Cancel</source> <translation>ཕྱིར་འཐེན།</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="83"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="98"/> <source>Confirm</source> <translation>གཏན་འཁེལ་བྱ་དགོས།</translation> </message> @@ -4796,7 +4786,7 @@ <translation type="vanished">ཉིན་མོ།</translation> </message> <message> - <location filename="../../../plugins/account/userinfo/userinfo.cpp" line="75"/> + <location filename="../../../plugins/account/userinfo/userinfo.cpp" line="79"/> <source>User Info</source> <translation>སྤྱོད་མཁན་གྱི་ཆ་འཕྲིན།</translation> </message> @@ -5106,6 +5096,7 @@ <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="86"/> <source>Leave lock (System will be locked when the paired phone gone)</source> <translation>ཟྭ་དང་བྲལ་ནས་(ལག་ཁྱེར་ཁ་པར་མེད་པར་གྱུར་རྗེས་མ་ལག་ལ་སྒོ་བརྒྱབ་ནས་གཏན་ཁེལ་བྱེད་ངེས་ )</translation> + <extra-contents_path>/Screenlock/Leave lock (System will be locked when the paired phone gone)</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="95"/> @@ -5161,16 +5152,19 @@ <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="199"/> <source>Monitor Off</source> <translation>སྒོ་རྒྱག་འཆར་ཆས་</translation> + <extra-contents_path>/Screenlock/Monitor Off</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="201"/> <source>Screensaver</source> <translation>བརྙན་ཡོལ་སྲུང་སྐྱོབ་</translation> + <extra-contents_path>/Screenlock/Screensaver</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="196"/> <source>Related Settings</source> <translation>འབྲེལ་ལྡན་སྒྲིག་འགོད་</translation> + <extra-contents_path>/Screenlock/Related Settings</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="200"/> @@ -5343,7 +5337,7 @@ <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="40"/> <source>Screensaver</source> <translation>བརྙན་ཡོལ་སྲུང་སྐྱོབ་</translation> - <extra-contents_path>/Screenlock/Screensaver</extra-contents_path> + <extra-contents_path>/Screensaver/Screensaver</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="53"/> @@ -5358,93 +5352,100 @@ <extra-contents_path>/Screensaver/Screensaver program</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="86"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="87"/> <source>Screensaver source</source> <translation>བརྙན་ཤེལ་གྱི་འབྱུང་ཁུངས།</translation> + <extra-contents_path>/Screensaver/Screensaver source</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="91"/> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="449"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="92"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="455"/> <source>Select</source> <translation>བདམས་ཐོན་བྱུང་བ།</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="112"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="113"/> <source>Ordinal</source> <translation>སྲོལ་ཡིག</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="113"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="114"/> <source>Random</source> <translation>སྐབས་བསྟུན་རང་བཞིན།</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="119"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="121"/> <source>Random switching</source> <translation>སྐབས་བསྟུན་གྱིས་བརྗེ་རེས་བྱེད་པ</translation> + <extra-contents_path>/Screensaver/Random switching</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="138"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="141"/> <source>Switching time</source> <translation>བརྗེ་རེས་བྱེད་པའི་དུས་ཚོད།</translation> + <extra-contents_path>/Screensaver/Switching time</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="157"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="160"/> <source>Text(up to 30 characters):</source> <translation>ཡི་གེ(ཆེས་མང་ན་ཡི་གེ་30ཡོད་པ་གཤམ་གསལ། )</translation> + <extra-contents_path>/Screensaver/Text(up to 30 characters):</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="179"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="183"/> <source>Text position</source> <translation>ཡི་གེའི་གོ་གནས།</translation> + <extra-contents_path>/Screensaver/Text position</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="187"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="191"/> <source>Centered</source> <translation>ལྟེ་བར་འཛིན་པ།</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="188"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="192"/> <source>Randow(Bubble text)</source> <translation>ལན་ཏུའོ་(ལྦུ་བ་ཅན་གྱི་ཡི་གེ)</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="209"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="214"/> <source>Show rest time</source> <translation>ངལ་གསོའི་དུས་ཚོད་མངོན་པ།</translation> + <extra-contents_path>/Screensaver/Show rest time</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="218"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="224"/> <source>Lock screen when screensaver boot</source> <translation>བརྙན་ཤེལ་གྱི་ལྷམ་ཡུ་རིང་གི་དུས་སུ་བརྙན་ཤེལ་ལ་ཟྭ་རྒྱག</translation> + <extra-contents_path>/Screensaver/Lock screen when screensaver boot</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="407"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="413"/> <source>Wallpaper files(*.jpg *.jpeg *.bmp *.dib *.png *.jfif *.jpe *.gif *.tif *.tiff *.wdp *.svg)</source> <translation>Wallpaper files (*.jpg *.jpeg *.bmp *.dib *.png *.jfif *jpe *.gif *.tif *.tiff *.svg)</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="448"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="454"/> <source>select custom screensaver dir</source> <translation>ཡུལ་སྲོལ་གོམས་གཤིས་ཀྱི་བརྙན་ཤེལ་གྲོན་ཆུང་བྱེད་མཁན་བདམས་པ་</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="450"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="456"/> <source>Position: </source> <translation>གོ་གནས་ནི། </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="451"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="457"/> <source>FileName: </source> <translation>ཡིག་ཆའི་མིང་ནི། </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="452"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="458"/> <source>FileType: </source> <translation>ཡིག་ཆའི་རིགས་དབྱིབས་ནི། </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="453"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="459"/> <source>Cancel</source> <translation>ཕྱིར་འཐེན།</translation> </message> @@ -5452,11 +5453,11 @@ <context> <name>SearchWidget</name> <message> - <location filename="../../searchwidget.cpp" line="80"/> - <location filename="../../searchwidget.cpp" line="81"/> - <location filename="../../searchwidget.cpp" line="88"/> - <location filename="../../searchwidget.cpp" line="90"/> - <location filename="../../searchwidget.cpp" line="95"/> + <location filename="../../searchwidget.cpp" line="83"/> + <location filename="../../searchwidget.cpp" line="84"/> + <location filename="../../searchwidget.cpp" line="91"/> + <location filename="../../searchwidget.cpp" line="93"/> + <location filename="../../searchwidget.cpp" line="98"/> <source>No search results</source> <translation>འཚོལ་ཞིབ་བྱས་འབྲས་མེད་པ།</translation> </message> @@ -5464,131 +5465,74 @@ <context> <name>ShareMain</name> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="240"/> - <source>Warning</source> - <translation>ཐ་ཚིག་སྒྲོག་པ།</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="240"/> - <source>please select an output</source> - <translation>ཁྱེད་ཀྱིས་ཐོན་རྫས་ཤིག་འདེམས་རོགས།</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="302"/> - <source>Input Password</source> - <translation>ནང་འཇུག་གི་གསང་གྲངས།</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="303"/> - <source>Password</source> - <translation>གསང་གྲངས།</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="395"/> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="410"/> - <source>Password length must be less than or equal to 8</source> - <translation>གསང་བའི་རིང་ཚད་ངེས་པར་དུ་8ལས་ཉུང་བའམ་ཡང་ན་8དང་མཚུངས་དགོས།</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="402"/> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="457"/> - <source>Password can not be blank</source> - <translation>གསང་གྲངས་སྟོང་བ་ཡིན་མི་སྲིད།</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="419"/> - <source>Share</source> - <translation>མ་རྐང་འཛིན་ཤོག</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="473"/> - <source>Output</source> - <translation>ཐོན་ཚད།</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="485"/> - <source>Input</source> - <translation>མ་དངུལ་འཇོག་པ།</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="495"/> - <source>Point</source> - <translation>གནད་འགག</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="497"/> - <source>Keyboard</source> - <translation>མཐེབ་གཞོང་།</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="76"/> + <source>Connect to your desktop remotely</source> + <translation>རྒྱང་རིང་འབྲེལ་མཐུད་གློག་ཀླད་འདི་</translation> + <extra-contents_path>/Vino/Connect to your desktop remotely</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="499"/> - <source>Clipboard</source> - <translation>འདྲུད་པང་།</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="81"/> + <source>Allow others to connect to your desktop remotely using RDP</source> + <translation>སྤྱོད་མཁན་གཞན་ལ་སྤྱོད་ཆོག་གི་RDPརྒྱང་རིང་འབྲེལ་མཐུད་གློག་ཀླད་འདི་།</translation> + <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using RDP</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="525"/> - <source>Close</source> - <translation>སྒོ་རྒྱག་པ།</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="88"/> + <source>Allow others to connect to your desktop remotely using VNC</source> + <translation>སྤྱོད་མཁན་གཞན་ལ་སྤྱོད་ཆོག་གི་VNCརྒྱང་རིང་འབྲེལ་མཐུད་གློག་ཀླད་འདི་།</translation> + <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using VNC</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="527"/> - <source>ViewOnly</source> - <translation>ལྟ་ཚུལ་འཛིན་སྟངས།</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="106"/> + <source>Require user to enter this password while using VNC: </source> + <translation>VNCརྒྱང་རིང་འབྲེལ་མཐུད་བྱེད་སྐབས་གསང་གྲངས་འཇོག་དགོས།:</translation> + <extra-contents_path>/Vino/Require user to enter this password while using VNC:</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="535"/> - <source>Client Setting</source> - <translation>ཚོང་འགྲུལ་པ་བཀོད་སྒྲིག</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="112"/> + <source>Edit</source> + <translation>རྩོམ་སྒྲིག</translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="546"/> - <source>Client Number</source> - <translation>ཚོང་འགྲུལ་པའི་ཨང་གྲངས།</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="124"/> + <source>Displays that allow remote access</source> + <translation>རྒྱང་རིང་འཚམས་འདྲི་བྱེད་པའི་བརྡ་སྟོན་ཡོ་བྱད་ལ་ཆོག་མཆན་གནང་བ་རེད།</translation> + <extra-contents_path>/Vino/Displays that allow remote access</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="560"/> - <source>Client IP:</source> - <translation>མངགས་བཅོལ་བྱེད་མཁན་གྱི་ཤེས་བྱ</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="132"/> + <source>The number of remote clients allowed to connect</source> + <translation>འབྲེལ་མཐུད་བྱེད་ཆོག་པའི་ཐག་རིང་ཚོང་ཤག་གི་གྲངས་འབོར།།</translation> + <extra-contents_path>/Vino/The number of remote clients allowed to connect</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="691"/> - <source>退出程序</source> - <translation>退出程序</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="227"/> + <source>Warning</source> + <translation>ཐ་ཚིག་སྒྲོག་པ།</translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="691"/> - <source>确认退出程序!</source> - <translation>确认退出程序!</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="227"/> + <source>please select an output</source> + <translation>ཁྱེད་ཀྱིས་ཐོན་རྫས་ཤིག་འདེམས་རོགས།</translation> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="72"/> <source>Remote Desktop</source> - <translation type="vanished">རྒྱང་རིང་གི་ཅོག་ཙེ།</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="435"/> - <source>Allow others to view your desktop</source> - <translation>མི་གཞན་གྱིས་ཁྱོད་ཀྱི་ཅོག་ཙེའི་སྟེང་གི་ཅོག་ཙེ</translation> + <translation>རྒྱང་རིང་གི་ཅོག་ཙེ།</translation> + <extra-contents_path>/Vino/Remote Desktop</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="94"/> <source>Allow connection to control screen</source> - <translation type="vanished">འབྲེལ་མཐུད་བྱས་ནས་བརྙན་ཤེལ་ཚོད་འཛིན་བྱེད་དུ</translation> + <translation>འབྲེལ་མཐུད་བྱས་ནས་བརྙན་ཤེལ་ཚོད་འཛིན་བྱེད་དུ</translation> <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="446"/> - <source>Security</source> - <translation>བདེ་འཇགས།</translation> - </message> - <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="100"/> <source>You must confirm every visit for this machine</source> - <translation type="vanished">ཁྱེད་ཚོས་ངེས་པར་དུ་འཕྲུལ་ཆས་འདིའི་འཚམས་འདྲི་ཚང་མ་གཏན་འཁེལ</translation> + <translation>ཁྱེད་ཚོས་ངེས་པར་དུ་འཕྲུལ་ཆས་འདིའི་འཚམས་འདྲི་ཚང་མ་གཏན་འཁེལ</translation> <extra-contents_path>/Vino/You must confirm every visit for this machine</extra-contents_path> </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="455"/> - <source>Require user to enter this password: </source> - <translation>སྤྱོད་མཁན་གྱིས་གསང་གྲངས་འདིའི་ནང་དུ་འཇུག་དགོས་པའི་བླང་བྱ་ </translation> - </message> </context> <context> <name>Shortcut</name> @@ -5684,7 +5628,7 @@ <message> <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="366"/> <source>Use</source> - <translation>བཀོལ་སྤྱོད། </translation> + <translation type="vanished">བཀོལ་སྤྱོད། </translation> </message> <message> <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="326"/> @@ -5723,11 +5667,7 @@ <translation>“%1”དེ་དག་ཚང་མ་བརླགས་ “%2”བཟུང་སྤྱོད་བྱས་ན་མུ་མཐུད་དུ་བྱེད་ནུས་དེ་མགྱོགས་མྱུར་ངང་མགྱོགས་མྱུར་ངང་ལག་བསྟར་བྱེད་དུ་འཇུག་རྒྱུ.</translation> </message> <message> - <source>Shortcut "%1" occuied, please change the key combination.</source> - <translation type="vanished">“%1”མ་ལག་ལ་མགྱོགས་མྱུར་གྱི་མཐེབ་བཀྱག་ཉར་ཚགས་བྱས་ཏེ་མཐེབ་བཀྱག་ལྟར་སྡེབ་སྒྲིག་བྱེད་རོགས།</translation> - </message> - <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="1023"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="660"/> <source> or </source> <translation> ཡང་ན་དེ་ལྟར་ </translation> </message> @@ -6554,58 +6494,6 @@ </message> </context> <context> - <name>VinoUi</name> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="15"/> - <source>Remote Desktop</source> - <translation>རྒྱང་རིང་གི་ཅོག་ཙེ།</translation> - </message> - <message> - <source>Allow others to view your desktop</source> - <translation type="vanished">མི་གཞན་གྱིས་ཁྱོད་ཀྱི་ཅོག་ཙེའི་སྟེང་གི་ཅོག་ཙེ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="17"/> - <source>Connect to your desktop remotely</source> - <translation>རྒྱང་རིང་འབྲེལ་མཐུད་རང་གི་ཅོག་ངོས་</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="20"/> - <source>Allow others to connect to your desktop remotely using RDP</source> - <translation>མི་གཞན་ལ་བཀོལ་ཆོག་RDPརྒྱང་རིང་འབྲེལ་མཐུད་རང་གི་ཅོག་ངོས་།</translation> - <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using RDP</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="23"/> - <source>Allow others to connect to your desktop remotely using VNC</source> - <translation>མི་གཞན་ལ་སྤྱོད་ཆོག་VNCརྒྱང་རིང་འབྲེལ་མཐུད་རང་གི་ཅོག་ངོས་།</translation> - <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using VNC</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="26"/> - <source>Allow connection to control screen</source> - <translation>འབྲེལ་མཐུད་བྱས་ནས་བརྙན་ཤེལ་ཚོད་འཛིན་བྱེད་དུ</translation> - <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="28"/> - <source>You must confirm every visit for this machine</source> - <translation>ཁྱེད་ཚོས་ངེས་པར་དུ་འཕྲུལ་ཆས་འདིའི་འཚམས་འདྲི་ཚང་མ་གཏན་འཁེལ</translation> - <extra-contents_path>/Vino/You must confirm every visit for this machine</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="30"/> - <source>Require user to enter this password: </source> - <translation>སྤྱོད་མཁན་གྱིས་གསང་གྲངས་འདིའི་ནང་དུ་འཇུག་དགོས་པའི་བླང་བྱ་ </translation> - <extra-contents_path>/Vino/Require user to enter this password:</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="39"/> - <source>Edit</source> - <translation>རྩོམ་སྒྲིག</translation> - </message> -</context> -<context> <name>Vpn</name> <message> <source>Vpn</source> @@ -6808,7 +6696,6 @@ <message> <source>Night Mode</source> <translation type="vanished">མཚན་མོའི་རྣམ་པ།</translation> - <extra-contents_path>/Display/Night Mode</extra-contents_path> </message> <message> <source>Open</source> @@ -6841,7 +6728,6 @@ <message> <source>Color Temperature</source> <translation type="vanished">ཁ་དོག་གི་དྲོད་ཚད།</translation> - <extra-contents_path>/Display/Color Temperature</extra-contents_path> </message> <message> <source>When turned on, it can reduce blue light to prevent eye, the screen will turn yellow.</source> @@ -7051,7 +6937,6 @@ </message> <message> <location filename="../../../plugins/system/display/widget.cpp" line="1232"/> - <location filename="../../../plugins/system/display/widget.cpp" line="1242"/> <source>(Effective after logout)</source> <translation>(ཐོ་ཁོངས་ནས་སུབ་རྗེས་ནུས་པ་འཐོན་རྒྱུ། )</translation> </message> @@ -7074,16 +6959,13 @@ <message> <location filename="../../../plugins/system/display/widget.cpp" line="2436"/> <location filename="../../../plugins/system/display/widget.cpp" line="2442"/> - <location filename="../../../plugins/system/display_hw/widget.cpp" line="2298"/> - <location filename="../../../plugins/system/display_hw/widget.cpp" line="2305"/> <source>Brightness</source> <translation>འོད་ཆེམ་ཆེམ་དུ་འཕྲོ</translation> <extra-contents_path>/Display/Brightness</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/display/widget.cpp" line="1676"/> - <location filename="../../../plugins/system/display/widget.cpp" line="1985"/> - <location filename="../../../plugins/system/display_hw/widget.cpp" line="1945"/> + <location filename="../../../plugins/system/display/widget.cpp" line="1489"/> + <location filename="../../../plugins/system/display/widget.cpp" line="1789"/> <source>please insure at least one output!</source> <translation>མ་མཐར་ཡང་ཐོན་ཚད་གཅིག་ལ་ཉེན་ཁ་བཟོ་རོགས།</translation> </message> @@ -7101,14 +6983,11 @@ <location filename="../../../plugins/system/display/widget.cpp" line="1676"/> <location filename="../../../plugins/system/display/widget.cpp" line="1683"/> <location filename="../../../plugins/system/display/widget.cpp" line="1985"/> - <location filename="../../../plugins/system/display_hw/widget.cpp" line="1642"/> - <location filename="../../../plugins/system/display_hw/widget.cpp" line="1945"/> <source>Warning</source> <translation>ཐ་ཚིག་སྒྲོག་པ།</translation> </message> <message> <location filename="../../../plugins/system/display/widget.cpp" line="1684"/> - <location filename="../../../plugins/system/display_hw/widget.cpp" line="1653"/> <source>Sorry, your configuration could not be applied. Common reasons are that the overall screen size is too big, or you enabled more displays than supported by your GPU.</source> <translation>དགོངས་པ་མ་ཚོམ། ཁྱེད་ཚོའི་བཀོད་སྒྲིག་བཀོལ་སྤྱོད་བྱེད་ཐབས་མེད། diff -Nru ukui-control-center-5.0.0.0/shell/res/i18n/en_US.ts ukui-control-center-5.0.0.0/shell/res/i18n/en_US.ts --- ukui-control-center-5.0.0.0/shell/res/i18n/en_US.ts 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/shell/res/i18n/en_US.ts 2025-02-07 16:27:50.000000000 +0800 @@ -112,7 +112,7 @@ <context> <name>AboutInterface</name> <message> - <location filename="../../../registeredSession/plugins/about/aboutinterface.cpp" line="226"/> + <location filename="../../../registeredSession/plugins/about/aboutinterface.cpp" line="233"/> <source>avaliable</source> <translation type="unfinished"></translation> </message> @@ -120,168 +120,175 @@ <context> <name>AboutUi</name> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="31"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="32"/> <source>System Summary</source> <translation type="unfinished"></translation> + <extra-contents_path>/About/System Summary</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="33"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="35"/> <source>Privacy and agreement</source> <translation type="unfinished"></translation> + <extra-contents_path>/About/Privacy and agreement</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="35"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="37"/> <source>Support</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="49"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="376"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="51"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="381"/> <source>Version</source> <translation type="unfinished"></translation> <extra-contents_path>/About/version</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="54"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="56"/> <source>Version Number</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="59"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="61"/> <source>Patch Version</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="64"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="66"/> <source>Installed Date</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="69"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="71"/> <source>Upgrade Date</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="75"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="78"/> <source>HostName</source> <translation type="unfinished"></translation> + <extra-contents_path>/About/HostName</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="87"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="378"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="90"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="383"/> <source>Kernel</source> <translation type="unfinished"></translation> <extra-contents_path>/About/Kernel</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="92"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="380"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="95"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="385"/> <source>CPU</source> <translation type="unfinished"></translation> <extra-contents_path>/About/CPU</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="97"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="382"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="100"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="387"/> <source>Memory</source> <translation type="unfinished"></translation> <extra-contents_path>/About/Memory</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="102"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="105"/> <source>Disk</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="107"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="384"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="110"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="389"/> <source>Desktop</source> <translation type="unfinished"></translation> <extra-contents_path>/About/Desktop</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="112"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="386"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="115"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="391"/> <source>User</source> <translation type="unfinished"></translation> <extra-contents_path>/About/User</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="120"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="123"/> <source>Copyright ©%1 %2. All rights reserved.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="169"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="172"/> <source>openKylin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="166"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="169"/> <source>KylinSoft</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="232"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="235"/> <source>Wechat code scanning obtains HP professional technical support</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="233"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="236"/> <source>See more about Kylin Tianqi edu platform</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="253"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="256"/> <source>Learn more HP user manual>></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="258"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="261"/> <source>See user manual>></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="336"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="339"/> <source>Send optional diagnostic data</source> <translation type="unfinished"></translation> + <extra-contents_path>/About/Send optional diagnostic data</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="337"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="340"/> <source>By sending us diagnostic data, improve the system experience and solve your problems faster</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="359"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="363"/> <source><<Protocol>></source> <translation type="unfinished"></translation> + <extra-contents_path>/About/<<Protocol>></extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="360"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="364"/> <source>and</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="361"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="366"/> <source><<Privacy>></source> <translation type="unfinished"></translation> + <extra-contents_path>/About/<<Privacy>></extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="388"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="393"/> <source>Status</source> <translation type="unfinished"></translation> <extra-contents_path>/About/Status</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="390"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="395"/> <source>Active</source> <translation type="unfinished"></translation> <extra-contents_path>/About/Active</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="391"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="397"/> <source>Serial</source> <translation type="unfinished"></translation> + <extra-contents_path>/About/Serial</extra-contents_path> </message> </context> <context> @@ -726,38 +733,34 @@ <location filename="../../../plugins/time-language/area/areaui.cpp" line="45"/> <source>Short Foramt Date</source> <translation type="unfinished"></translation> - <extra-contents_path>/Area/Date</extra-contents_path> + <extra-contents_path>/Area/Short Foramt Date</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="46"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="47"/> <source>Long Format Date</source> <translation type="unfinished"></translation> + <extra-contents_path>/Area/Long Format Date</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="48"/> - <source>Date</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="52"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="50"/> <source>Time</source> <translation type="unfinished"></translation> <extra-contents_path>/Area/Time</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="65"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="63"/> <source>Language Format</source> <translation type="unfinished"></translation> <extra-contents_path>/Area/Language Format</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="76"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="74"/> <source>Language Format Example</source> <translation type="unfinished"></translation> <extra-contents_path>/Area/Language Format Example</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="105"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="103"/> <source>System Language</source> <translation type="unfinished"></translation> <extra-contents_path>/Area/System Language</extra-contents_path> @@ -1088,29 +1091,14 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="172"/> - <source>Verification</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="206"/> - <source>Password Prompt</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="210"/> - <source>Optional(Recommended)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="259"/> + <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="216"/> <source>Cancel</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="263"/> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="382"/> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="456"/> + <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="220"/> + <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="305"/> + <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="371"/> <source>Confirm</source> <translation type="unfinished"></translation> </message> @@ -1136,12 +1124,7 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="468"/> - <source>Your password cannot be included in the password prompt.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="554"/> + <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="503"/> <source>Contains illegal characters!</source> <translation type="unfinished"></translation> </message> @@ -1518,9 +1501,9 @@ </message> <message> <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="127"/> - <source>Set Date Manually</source> + <source>Set Time Manually</source> <translation type="unfinished"></translation> - <extra-contents_path>/Date/Set Date Manually</extra-contents_path> + <extra-contents_path>/Date/Set Time Manually</extra-contents_path> </message> <message> <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="162"/> @@ -1634,12 +1617,13 @@ <extra-contents_path>/Defaultapp/Text Editor</extra-contents_path> </message> <message> - <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="34"/> + <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="35"/> <source>Reset default apps to system recommended apps</source> <translation type="unfinished"></translation> + <extra-contents_path>/Defaultapp/Reset default apps to system recommended apps</extra-contents_path> </message> <message> - <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="35"/> + <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="36"/> <source>Reset</source> <translation type="unfinished"></translation> </message> @@ -2108,27 +2092,27 @@ <context> <name>InputPwdDialog</name> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="29"/> - <source>Set</source> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="39"/> + <source>VNC password</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="46"/> - <source>Set Password</source> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="57"/> + <source>Password</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="62"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="75"/> <source>Must be 1-8 characters long</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="79"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="92"/> <source>Cancel</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="83"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="98"/> <source>Confirm</source> <translation type="unfinished"></translation> </message> @@ -2756,7 +2740,7 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/account/userinfo/userinfo.cpp" line="75"/> + <location filename="../../../plugins/account/userinfo/userinfo.cpp" line="79"/> <source>User Info</source> <translation type="unfinished"></translation> </message> @@ -2898,6 +2882,7 @@ <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="86"/> <source>Leave lock (System will be locked when the paired phone gone)</source> <translation type="unfinished"></translation> + <extra-contents_path>/Screenlock/Leave lock (System will be locked when the paired phone gone)</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="95"/> @@ -2953,16 +2938,19 @@ <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="199"/> <source>Monitor Off</source> <translation type="unfinished"></translation> + <extra-contents_path>/Screenlock/Monitor Off</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="201"/> <source>Screensaver</source> <translation type="unfinished"></translation> + <extra-contents_path>/Screenlock/Screensaver</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="196"/> <source>Related Settings</source> <translation type="unfinished"></translation> + <extra-contents_path>/Screenlock/Related Settings</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="200"/> @@ -3041,7 +3029,7 @@ <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="40"/> <source>Screensaver</source> <translation type="unfinished"></translation> - <extra-contents_path>/Screenlock/Screensaver</extra-contents_path> + <extra-contents_path>/Screensaver/Screensaver</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="53"/> @@ -3056,93 +3044,100 @@ <extra-contents_path>/Screensaver/Screensaver program</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="86"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="87"/> <source>Screensaver source</source> <translation type="unfinished"></translation> + <extra-contents_path>/Screensaver/Screensaver source</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="91"/> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="449"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="92"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="455"/> <source>Select</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="112"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="113"/> <source>Ordinal</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="113"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="114"/> <source>Random</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="119"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="121"/> <source>Random switching</source> <translation type="unfinished"></translation> + <extra-contents_path>/Screensaver/Random switching</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="138"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="141"/> <source>Switching time</source> <translation type="unfinished"></translation> + <extra-contents_path>/Screensaver/Switching time</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="157"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="160"/> <source>Text(up to 30 characters):</source> <translation type="unfinished"></translation> + <extra-contents_path>/Screensaver/Text(up to 30 characters):</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="179"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="183"/> <source>Text position</source> <translation type="unfinished"></translation> + <extra-contents_path>/Screensaver/Text position</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="187"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="191"/> <source>Centered</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="188"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="192"/> <source>Randow(Bubble text)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="209"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="214"/> <source>Show rest time</source> <translation type="unfinished"></translation> + <extra-contents_path>/Screensaver/Show rest time</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="218"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="224"/> <source>Lock screen when screensaver boot</source> <translation type="unfinished"></translation> + <extra-contents_path>/Screensaver/Lock screen when screensaver boot</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="407"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="413"/> <source>Wallpaper files(*.jpg *.jpeg *.bmp *.dib *.png *.jfif *.jpe *.gif *.tif *.tiff *.wdp *.svg)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="448"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="454"/> <source>select custom screensaver dir</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="450"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="456"/> <source>Position: </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="451"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="457"/> <source>FileName: </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="452"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="458"/> <source>FileType: </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="453"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="459"/> <source>Cancel</source> <translation type="unfinished"></translation> </message> @@ -3150,11 +3145,11 @@ <context> <name>SearchWidget</name> <message> - <location filename="../../searchwidget.cpp" line="80"/> - <location filename="../../searchwidget.cpp" line="81"/> - <location filename="../../searchwidget.cpp" line="88"/> - <location filename="../../searchwidget.cpp" line="90"/> - <location filename="../../searchwidget.cpp" line="95"/> + <location filename="../../searchwidget.cpp" line="83"/> + <location filename="../../searchwidget.cpp" line="84"/> + <location filename="../../searchwidget.cpp" line="91"/> + <location filename="../../searchwidget.cpp" line="93"/> + <location filename="../../searchwidget.cpp" line="98"/> <source>No search results</source> <translation type="unfinished"></translation> </message> @@ -3162,115 +3157,72 @@ <context> <name>ShareMain</name> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="240"/> - <source>Warning</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="240"/> - <source>please select an output</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="302"/> - <source>Input Password</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="303"/> - <source>Password</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="395"/> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="410"/> - <source>Password length must be less than or equal to 8</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="402"/> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="457"/> - <source>Password can not be blank</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="419"/> - <source>Share</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="435"/> - <source>Allow others to view your desktop</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="446"/> - <source>Security</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="455"/> - <source>Require user to enter this password: </source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="473"/> - <source>Output</source> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="72"/> + <source>Remote Desktop</source> <translation type="unfinished"></translation> + <extra-contents_path>/Vino/Remote Desktop</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="485"/> - <source>Input</source> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="76"/> + <source>Connect to your desktop remotely</source> <translation type="unfinished"></translation> + <extra-contents_path>/Vino/Connect to your desktop remotely</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="495"/> - <source>Point</source> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="81"/> + <source>Allow others to connect to your desktop remotely using RDP</source> <translation type="unfinished"></translation> + <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using RDP</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="497"/> - <source>Keyboard</source> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="88"/> + <source>Allow others to connect to your desktop remotely using VNC</source> <translation type="unfinished"></translation> + <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using VNC</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="499"/> - <source>Clipboard</source> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="94"/> + <source>Allow connection to control screen</source> <translation type="unfinished"></translation> + <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="525"/> - <source>Close</source> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="100"/> + <source>You must confirm every visit for this machine</source> <translation type="unfinished"></translation> + <extra-contents_path>/Vino/You must confirm every visit for this machine</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="527"/> - <source>ViewOnly</source> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="106"/> + <source>Require user to enter this password while using VNC: </source> <translation type="unfinished"></translation> + <extra-contents_path>/Vino/Require user to enter this password while using VNC:</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="535"/> - <source>Client Setting</source> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="112"/> + <source>Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="546"/> - <source>Client Number</source> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="124"/> + <source>Displays that allow remote access</source> <translation type="unfinished"></translation> + <extra-contents_path>/Vino/Displays that allow remote access</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="560"/> - <source>Client IP:</source> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="132"/> + <source>The number of remote clients allowed to connect</source> <translation type="unfinished"></translation> + <extra-contents_path>/Vino/The number of remote clients allowed to connect</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="691"/> - <source>退出程序</source> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="227"/> + <source>Warning</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="691"/> - <source>确认退出程序!</source> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="227"/> + <source>please select an output</source> <translation type="unfinished"></translation> </message> </context> @@ -3344,7 +3296,6 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="442"/> <source>Shortcut "%1" occuied, please change the key combination</source> <translation type="unfinished"></translation> </message> @@ -4007,54 +3958,6 @@ <translation type="unfinished"></translation> </message> </context> -<context> - <name>VinoUi</name> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="15"/> - <source>Remote Desktop</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="17"/> - <source>Connect to your desktop remotely</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="20"/> - <source>Allow others to connect to your desktop remotely using RDP</source> - <translation type="unfinished"></translation> - <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using RDP</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="23"/> - <source>Allow others to connect to your desktop remotely using VNC</source> - <translation type="unfinished"></translation> - <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using VNC</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="26"/> - <source>Allow connection to control screen</source> - <translation type="unfinished"></translation> - <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="28"/> - <source>You must confirm every visit for this machine</source> - <translation type="unfinished"></translation> - <extra-contents_path>/Vino/You must confirm every visit for this machine</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="30"/> - <source>Require user to enter this password: </source> - <translation type="unfinished"></translation> - <extra-contents_path>/Vino/Require user to enter this password:</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="39"/> - <source>Edit</source> - <translation type="unfinished"></translation> - </message> -</context> <context> <name>Wallpaper</name> <message> diff -Nru ukui-control-center-5.0.0.0/shell/res/i18n/kk.ts ukui-control-center-5.0.0.0/shell/res/i18n/kk.ts --- ukui-control-center-5.0.0.0/shell/res/i18n/kk.ts 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/shell/res/i18n/kk.ts 2025-02-07 16:27:50.000000000 +0800 @@ -321,166 +321,170 @@ <context> <name>AboutUi</name> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="31"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="32"/> <source>System Summary</source> <translation>سەستيما قىسقاشا تۇسىندىرمەسى</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="33"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="35"/> <source>Privacy and agreement</source> <translation>قۇپيالىق ۋا كەلىسىم</translation> + <extra-contents_path>/About/Privacy and agreement</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="35"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="37"/> <source>Support</source> <translation>قولداۋ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="49"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="376"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="51"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="381"/> <source>Version</source> <translation>باسىلىم مى</translation> <extra-contents_path>/About/version</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="54"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="56"/> <source>Version Number</source> <translation>باسىلىم نومەرى</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="59"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="61"/> <source>Patch Version</source> <translation>سەستيما يامىقىنىڭ باسىلىم نومەرى</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="64"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="66"/> <source>Installed Date</source> <translation>قاشالانعان ۋاقىتى</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="69"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="71"/> <source>Upgrade Date</source> <translation>سەستيما جاڭالانعان ۋاقىت</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="75"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="78"/> <source>HostName</source> <translation>كومپيۋتەر مى</translation> + <extra-contents_path>/About/HostName</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="87"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="378"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="90"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="383"/> <source>Kernel</source> <translation>ٸشكٸ يادرو</translation> <extra-contents_path>/About/Kernel</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="92"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="380"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="95"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="385"/> <source>CPU</source> <translation>ورتالىعى بٸرجاقتٸلٸ ەتۋ قىلعىش</translation> <extra-contents_path>/About/CPU</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="97"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="382"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="100"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="387"/> <source>Memory</source> <translation>ٸشكٸ ساقتاعىش</translation> <extra-contents_path>/About/Memory</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="102"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="105"/> <source>Disk</source> <translation>ەرەكشە ديسكا ديسكا</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="107"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="384"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="110"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="389"/> <source>Desktop</source> <translation>ئۈستەلئۈستى</translation> <extra-contents_path>/About/Desktop</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="112"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="386"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="115"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="391"/> <source>User</source> <translation>الارمان مى</translation> <extra-contents_path>/About/User</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="120"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="123"/> <source>Copyright ©%1 %2. All rights reserved.</source> <translation>اۆتورلىق ۇقىعى ©%1 %2. بارلىق ۇقىقتار قورعادى.</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="169"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="172"/> <source>openKylin</source> <translation>Kylin جۇمساق دەتالىن اشۋ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="166"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="169"/> <source>KylinSoft</source> <translation>جۇمساق دەتالى Kylin</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="232"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="235"/> <source>Wechat code scanning obtains HP professional technical support</source> <translation>ئۈندىدار بەلگىنى كەسكىندەپ، HP كاسىپتىك تەحىنيكا قولدۋعا يە بولۋ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="233"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="236"/> <source>See more about Kylin Tianqi edu platform</source> <translation>تيەنچى وقۋ-اعارتۋ مىنبەسىنىڭ الٸدە كوپ حاباردٸ كورۋ Kylin</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="253"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="256"/> <source>Learn more HP user manual>></source> <translation>ابونتتار قولدانباسىن الٸدە كوپ تۇسنىس HP</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="258"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="261"/> <source>See user manual>></source> <translation>ابونتتار قولدانباسىن كورۋ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="336"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="339"/> <source>Send optional diagnostic data</source> <translation>تالدانبالٸ دىياگنوز ساندىق مالىمەتتى جولداۋ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="337"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="340"/> <source>By sending us diagnostic data, improve the system experience and solve your problems faster</source> <translation>دىياگنوز ساندىق مالىمەتتى بٸزگە جولداساڭىز، سەستاماعا بولعان تەسىراتىىڭىزنى اسرالاسىز ونىڭ ۇستىنە ماسەلەنى الٸدە تەز شەشىم ەتۋ ورىنداي الاسىز</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="359"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="363"/> <source><<Protocol>></source> <translation>«سىناپ ٸستەتۋدە جاۋاپكەرلكتەن كەشىرەم ەتۋ كەلىسىمى»</translation> + <extra-contents_path>/About/<<Protocol>></extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="360"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="364"/> <source>and</source> <translation>ۋا</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="361"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="366"/> <source><<Privacy>></source> <translation>«ابونتتار قۇپيالىق كەلىسىمى»</translation> + <extra-contents_path>/About/<<Privacy>></extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="388"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="393"/> <source>Status</source> <translation>كۇيى</translation> <extra-contents_path>/About/Status</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="390"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="395"/> <source>Active</source> <translation>اكتيۆتەندٸرۋ</translation> <extra-contents_path>/About/Active</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="391"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="396"/> <source>Serial</source> <translation>تارتىپ نومەرى</translation> </message> @@ -720,7 +724,7 @@ <message> <location filename="../../../plugins/devices/shortcut/addshortcutdialog.cpp" line="224"/> <source>Desktop files(*.desktop)</source> - <translation>桌面文件(*.desktop)</translation> + <translation>Жұмыс үстелі файлдары(*.desktop)</translation> </message> <message> <location filename="../../../plugins/devices/shortcut/addshortcutdialog.cpp" line="265"/> @@ -1361,23 +1365,22 @@ <extra-contents_path>/Area/Date</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="46"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="47"/> <source>Long Format Date</source> <translation>چيسىلا ۇزىن پىشىنى</translation> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="48"/> <source>Date</source> <translation>ۋاقىت ۋا چيسىلا</translation> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="52"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="50"/> <source>Time</source> <translation>ۋاقىت</translation> <extra-contents_path>/Area/Time</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="65"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="63"/> <source>Language Format</source> <translation>ٴتٸل پىشىنى</translation> <extra-contents_path>/Area/Language Format</extra-contents_path> @@ -1412,7 +1415,7 @@ <message> <location filename="../../../plugins/application/autoboot/autoboot.cpp" line="293"/> <source>Desktop files(*.desktop)</source> - <translation>桌面文件(*.desktop)</translation> + <translation>Жұмыс үстелі файлдары(*.desktop)</translation> </message> <message> <location filename="../../../plugins/application/autoboot/autoboot.cpp" line="301"/> @@ -3991,12 +3994,17 @@ <extra-contents_path>/Date/Sync Time</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="127"/> <source>Set Date Manually</source> <translation>چيسىلانى قولدا بەلگٸلەۋ</translation> <extra-contents_path>/Date/Set Date Manually</extra-contents_path> </message> <message> + <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="127"/> + <source>Set Time Manually</source> + <translation type="unfinished"></translation> + <extra-contents_path>/Date/Set Time Manually</extra-contents_path> + </message> + <message> <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="162"/> <source>Server Address</source> <translation>قىزىمەت وتەۋ اسبابى ٵدىرىسى</translation> @@ -4146,12 +4154,13 @@ <extra-contents_path>/Defaultapp/Text Editor</extra-contents_path> </message> <message> - <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="34"/> + <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="35"/> <source>Reset default apps to system recommended apps</source> <translation>الدىن بەلگٸلەنگەن جيۋنى سەستيما ۇسٸنٸس بەرۋ العان جيۋ ورىنداپ قاتە بەلگٸلەۋ</translation> + <extra-contents_path>/Defaultapp/Reset default apps to system recommended apps</extra-contents_path> </message> <message> - <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="35"/> + <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="36"/> <source>Reset</source> <translation>قاتە تەڭشەۋ</translation> </message> @@ -5509,33 +5518,30 @@ <translation>قۇپيا نومەر بەلگٸلەۋ</translation> </message> <message> - <source>Password can not be blank</source> - <translation type="vanished">密码不能为空</translation> - </message> - <message> <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="79"/> <source>Cancel</source> <translation>كۇشىنەن قالدىرۋ</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="29"/> - <source>Set</source> - <translation>سەستيما تەڭگەرگٸش</translation> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="39"/> + <source>VNC password</source> + <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="62"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="57"/> + <source>Password</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="75"/> <source>Must be 1-8 characters long</source> <translation>ۇزٸندٸعٸ ٴسوزسٸز 8-1 ٴارىپ-بەلگى بولۋ</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="83"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="98"/> <source>Confirm</source> <translation>تۇراقتاندىرۋ</translation> </message> - <message> - <source>less than or equal to 8</source> - <translation type="vanished">密码长度需要小于等于8</translation> - </message> </context> <context> <name>ItemList</name> @@ -6577,10 +6583,10 @@ <translation type="vanished">设置</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="443"/> - <location filename="../../mainwindow.cpp" line="461"/> - <location filename="../../mainwindow.cpp" line="596"/> - <location filename="../../mainwindow.cpp" line="954"/> + <location filename="../../mainwindow.cpp" line="441"/> + <location filename="../../mainwindow.cpp" line="459"/> + <location filename="../../mainwindow.cpp" line="591"/> + <location filename="../../mainwindow.cpp" line="949"/> <source>Settings</source> <translation>تەڭشەۋلەر</translation> </message> @@ -6589,7 +6595,7 @@ <translation type="vanished">Негізгі мәзір</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="482"/> + <location filename="../../mainwindow.cpp" line="480"/> <source>Minimize</source> <translation>ەڭ كشكەنە بەينە</translation> </message> @@ -6598,7 +6604,7 @@ <translation type="vanished">最大化/正常</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="154"/> + <location filename="../../mainwindow.cpp" line="152"/> <source>Warnning</source> <translation>ەسكەرتۋ</translation> </message> @@ -6607,8 +6613,8 @@ <translation type="vanished">Қалыпты</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="175"/> - <location filename="../../mainwindow.cpp" line="483"/> + <location filename="../../mainwindow.cpp" line="173"/> + <location filename="../../mainwindow.cpp" line="481"/> <source>Maximize</source> <translation>ۇلكەيتۋ</translation> </message> @@ -6617,47 +6623,36 @@ <translation type="obsolete">开始菜单</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="172"/> + <location filename="../../mainwindow.cpp" line="170"/> <source>Restore</source> <translation>قالپىنا كەلتىرىلگەن</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="455"/> + <location filename="../../mainwindow.cpp" line="453"/> <source>Back home</source> <translation>باس بەتٸنە قايتۋ</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="481"/> + <location filename="../../mainwindow.cpp" line="479"/> <source>Option</source> <translation>تالداۋ</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="484"/> + <location filename="../../mainwindow.cpp" line="482"/> <source>Close</source> <translation>تاقاۋ</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="584"/> <source>Help</source> - <translation>جاردەم</translation> - </message> - <message> - <location filename="../../mainwindow.cpp" line="586"/> - <source>About</source> - <translation>جونٸندە</translation> - </message> - <message> - <location filename="../../mainwindow.cpp" line="588"/> - <source>Exit</source> - <translation>شەگىنۋ</translation> + <translation type="vanished">جاردەم</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="597"/> + <location filename="../../mainwindow.cpp" line="592"/> <source>Version: </source> <translation>باسىلىمى: </translation> </message> <message> - <location filename="../../mainwindow.cpp" line="736"/> + <location filename="../../mainwindow.cpp" line="731"/> <source>Specified</source> <translation>بەكىتىلگەن قىستىرما دەتال</translation> </message> @@ -6666,13 +6661,13 @@ <translation type="vanished">控制面板</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="1086"/> + <location filename="../../mainwindow.cpp" line="1082"/> <source>Warning</source> <translation>ەسكەرتۋ</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="154"/> - <location filename="../../mainwindow.cpp" line="1086"/> + <location filename="../../mainwindow.cpp" line="152"/> + <location filename="../../mainwindow.cpp" line="1082"/> <source>This function has been controlled</source> <translation>نۇ رولٸ مەڭگەرۋ قىلىندى</translation> </message> @@ -7344,65 +7339,17 @@ <source>Show message on screenlock</source> <translation type="vanished">ەكٸران قۇلۇپىدا حابار كورسەتۋ</translation> </message> - <message> - <source>Show noticfication on screenlock</source> - <translation type="vanished">ەكٸران قۇلۇپىدا دېققىتنى كورسەتۋ</translation> - </message> - <message> - <source>Notification Style</source> - <translation type="vanished">ۇقتٸرۋ پىشىنى</translation> - </message> - <message> - <source>Banner: Appears in the upper right corner of the screen, and disappears automatically</source> - <translation type="vanished">لوزۇنكا: ەكٸراننڭ وڭ جاق ٷستٸنكٸ بۇرٸشٸندا كورىنەدى، وزدٸگٸنەن جوعالىپ كەتەدى</translation> - </message> - <message> - <source>Tip:It will be kept on the screen until it is closed</source> - <translation type="vanished">ەسكەرتپەۋ: ئۆچۈرۈلگەنگە دەيىن ەكراندا ساقتالادى</translation> - </message> - <message> - <source>None:Notifications will not be displayed on the screen, but will go to the notification center</source> - <translation type="vanished">جوق: ۇقتٸرۋ ەكراندا كورىنبەيدى، ٴبىراق ۇقتٸرۋ ورتالىعىنا كىرەدى</translation> - </message> </context> <context> <name>NoticeUi</name> <message> - <source>Notice Settings</source> - <translation type="vanished">ۇقتٸرۋ</translation> - </message> - <message> <source>NotFaze Mode</source> <translation type="vanished">اۋرە ورىنداماستىق فورماسى</translation> </message> <message> - <source>(Notification banners, prompts will be hidden, and notification sounds will be muted)</source> - <translation type="vanished">(ۇقتٸرۋ لوزۇنكىسى، ەسكەرتپەسٸ جاسىرىلعان بولادٸ، ۇقتٸرۋ داۋىسى ۇنسىز بولادٸ)</translation> - </message> - <message> - <source>Get notifications from the app</source> - <translation type="vanished">ئەپتىن كەل ۇقتٸرۋعا يە بولۋ</translation> - </message> - <message> - <source>Automatically turn on</source> - <translation type="vanished">اۆتوماتتى ٸشٸۋ</translation> - </message> - <message> <source>to</source> <translation type="vanished">عا</translation> </message> - <message> - <source>Automatically turn on when multiple screens are connected</source> - <translation type="vanished">كوپ ەكٸران جالعانعاندا اۆتوماتتى ٸشٸۋ</translation> - </message> - <message> - <source>Automatically open in full screen mode</source> - <translation type="vanished">پۇتٸن ەكٸران كۇيىندە اۆتوماتتى ٸشٸۋ</translation> - </message> - <message> - <source>Allow automatic alarm reminders in Do Not Disturb mode</source> - <translation type="vanished">اۋرە ورىنداماستىق نۇسقاسندا قوڭغىراقلىق ساعات ەسكەرتۋگە رۇحسات ەتۋ</translation> - </message> </context> <context> <name>NumbersButtonIntel</name> @@ -9320,7 +9267,7 @@ <translation>ٶز تەڭشە قولايلى كىنوپكا</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="463"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="472"/> <source>Edit Shortcut</source> <translation>قولايلى كىنوپكا تالداۋجاساۋ</translation> </message> @@ -10159,78 +10106,79 @@ <extra-contents_path>/Screenlock/Show picture of screenlock on screenlogin</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="43"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="44"/> <source>Leave lock (System will be locked when the paired phone gone)</source> - <translation>(ارەكەتتەنگىش قۇلىپ (سايكەسكەن كوك تىس يانفونى ايىرىلعان كەزدە، سەستيما ەكٸرانٸ اۆتوماتتى قۇلىپلاش</translation> + <translation>قۇلىبىن قالدىرىپ قويۋ (بٸر جۇپ تەلەفون جوعالىپ كەتكەندە سەستيما قۇلىپتالادى)</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="44"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="45"/> <source>Specified device</source> <translation>بەكىتىلگەن اسباب</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="45"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="46"/> <source>No paired phone. Please turn to 'Bluetooth' to pair.</source> <translation>.سايكەسكەن تەلەفون جوق، كوك چىشقا الماسىپ تەلەفوننى جالعاۋلٸ</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="65"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="66"/> <source>Screenlock</source> <translation>ەكٸرانٸ قۇلپىلاۋ</translation> <extra-contents_path>/Screenlock/Screenlock</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="95"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="96"/> <source>Local Pictures</source> <translation>وزىندە بار راسىم</translation> <extra-contents_path>/Screenlock/Local Pictures</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="97"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="98"/> <source>Online Pictures</source> <translation>تورداعٸ راسىم</translation> <extra-contents_path>/Screenlock/Online Pictures</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="99"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="100"/> <source>Reset To Default</source> <translation>الدىن بەكىتىلگەن قالىپقا قايتۋ</translation> <extra-contents_path>/Screenlock/Reset To Default</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="111"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="112"/> <source>Bluetooth</source> <translation>كوك تىس تەڭگەرگٸش</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="116"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="117"/> <source>No bluetooth adapter detected, can not use Leave Lock.</source> <translation>.كوك تىس ۇيلەستىرۋ بايقالمادٸ، ارەكەتتەنگىش قۇلىپ قابٸلەتتٸ ٸستەتكەلٸ بولمايدى</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="134"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="136"/> <source>Monitor Off</source> - <translation>كورسەتكىشتى اتىسۋ</translation> + <translation>قاداعالاۋ ٴوشىرۋ</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="135"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="138"/> <source>Screensaver</source> <translation>ەكٸران قورعاۋ</translation> + <extra-contents_path>/Screenlock/Screensaver</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="137"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="141"/> <source>Related Settings</source> - <translation>قاتىستى تەڭشە</translation> + <translation>قاتىناستىق تەڭشەۋلەر</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="143"/> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="144"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="147"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="148"/> <source>Set</source> <translation>سەستيما تەڭگەرگٸش</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="159"/> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="526"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="163"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="530"/> <source>Please select device</source> <translation>بەكىتىلگەن اسبابٸن تالدا</translation> </message> @@ -10452,7 +10400,7 @@ <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="40"/> <source>Screensaver</source> <translation>ەكٸران قورعاۋ</translation> - <extra-contents_path>/Screenlock/Screensaver</extra-contents_path> + <extra-contents_path>/Screensaver/Screensaver</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="53"/> @@ -10467,93 +10415,96 @@ <extra-contents_path>/Screensaver/Screensaver program</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="86"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="87"/> <source>Screensaver source</source> - <translation>ەكٸران قورعاۋ قاينارى</translation> + <translation>ەكٸران بەتى قاينارى</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="91"/> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="449"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="92"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="455"/> <source>Select</source> <translation>تالداۋ</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="112"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="113"/> <source>Ordinal</source> <translation>تارتىپ بويىنشا</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="113"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="114"/> <source>Random</source> <translation>ەركىن</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="119"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="121"/> <source>Random switching</source> <translation>قالاعانىڭىزشا سايكەستىرۋ</translation> + <extra-contents_path>/Screensaver/Random switching</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="138"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="141"/> <source>Switching time</source> - <translation>سايكەستىرۋ قتىمى</translation> + <translation>سايكەستىرۋ ۋاقىتى</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="157"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="160"/> <source>Text(up to 30 characters):</source> - <translation>:(ەكٸران قورعاۋ تەكىسى (ەڭ كوپ بولعاندا 30 ٴارىپ:</translation> + <translation>تەكىسىت(ەڭ كوپ بولعاندا 30 ٴارىپ):</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="179"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="183"/> <source>Text position</source> <translation>تەكىسىت ورنى</translation> + <extra-contents_path>/Screensaver/Text position</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="187"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="191"/> <source>Centered</source> <translation>ورتادا تۇرۋ</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="188"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="192"/> <source>Randow(Bubble text)</source> <translation>ەركىن (كوبىكشە تەكىسىت)</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="209"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="214"/> <source>Show rest time</source> <translation>دەمالٸس الۋ ۋاقىتىن كورسەتۋ</translation> + <extra-contents_path>/Screensaver/Show rest time</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="218"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="224"/> <source>Lock screen when screensaver boot</source> - <translation>ەكٸران قورعاۋدى قوزعالتقاندىق ەكٸراننى بەكٸتۋ</translation> + <translation>ەكٸرانٸ كوز بەك سارالاۋعا ەكٸرانٸ قۇلپىلاۋ</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="407"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="413"/> <source>Wallpaper files(*.jpg *.jpeg *.bmp *.dib *.png *.jfif *.jpe *.gif *.tif *.tiff *.wdp *.svg)</source> <translation>(*.jpg *.jpeg *.bmp *.dib *.png *.jfif *.jpe *.gif *.tif *.tiff *.wdp *.svg)تام قاعازى حۇجاتتارى</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="448"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="454"/> <source>select custom screensaver dir</source> <translation>ٶز تەڭشە ەكٸران قورعاۋ جولىن تالداۋ</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="450"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="456"/> <source>Position: </source> <translation>ورنى: </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="451"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="457"/> <source>FileName: </source> <translation>حۇجات مى: </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="452"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="458"/> <source>FileType: </source> <translation>FileType: </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="453"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="459"/> <source>Cancel</source> <translation>كۇشىنەن قالدىرۋ</translation> </message> @@ -10668,11 +10619,11 @@ <translation type="obsolete">触控板</translation> </message> <message> - <location filename="../../searchwidget.cpp" line="80"/> - <location filename="../../searchwidget.cpp" line="81"/> - <location filename="../../searchwidget.cpp" line="88"/> - <location filename="../../searchwidget.cpp" line="90"/> - <location filename="../../searchwidget.cpp" line="95"/> + <location filename="../../searchwidget.cpp" line="83"/> + <location filename="../../searchwidget.cpp" line="84"/> + <location filename="../../searchwidget.cpp" line="91"/> + <location filename="../../searchwidget.cpp" line="93"/> + <location filename="../../searchwidget.cpp" line="98"/> <source>No search results</source> <translation>ٸزدەۋ ناتيجەسى جوق</translation> </message> @@ -10796,198 +10747,74 @@ <context> <name>ShareMain</name> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="240"/> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="227"/> <source>Warning</source> <translation>Ескерту</translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="240"/> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="227"/> <source>please select an output</source> <translation>шығысты таңдауыңызды сұраймыз</translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="302"/> - <source>Input Password</source> - <translation>Құпиясөзді енгізу</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="303"/> - <source>Password</source> - <translation>Пароль</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="419"/> - <source>Share</source> - <translation>Ортақ пайдалану</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="473"/> - <source>Output</source> - <translation>Шығыс</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="485"/> - <source>Input</source> - <translation>Енгізу</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="495"/> - <source>Point</source> - <translation>Нүкте</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="497"/> - <source>Keyboard</source> - <translation>Пернетақта</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="499"/> - <source>Clipboard</source> - <translation>Аралық сақтағыш</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="525"/> - <source>Close</source> - <translation>Жабу</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="527"/> - <source>ViewOnly</source> - <translation>ViewOnly</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="535"/> - <source>Client Setting</source> - <translation>Клиент параметрі</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="72"/> + <source>Remote Desktop</source> + <translation>Қашықтағы үстел</translation> + <extra-contents_path>/Vino/Remote Desktop</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="546"/> - <source>Client Number</source> - <translation>Клиент нөмірі</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="76"/> + <source>Connect to your desktop remotely</source> + <translation type="unfinished">ۇستەل ۇستىڭىزگە جىراقتان اۋلاۋ</translation> + <extra-contents_path>/Vino/Connect to your desktop remotely</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="560"/> - <source>Client IP:</source> - <translation>Клиент IP:</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="81"/> + <source>Allow others to connect to your desktop remotely using RDP</source> + <translation type="unfinished">RDP ارقىلى باسقالاردٸڭ ۇستەل ۇستىڭىزگە جىراقتان جالعاۋىنا جول قويۋ</translation> + <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using RDP</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="691"/> - <source>退出程序</source> - <translation>退出程序</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="88"/> + <source>Allow others to connect to your desktop remotely using VNC</source> + <translation type="unfinished">VNC ارقىلى باسقالاردٸڭ ۇستەل ۇستىڭىزگە جىراقتان جالعاۋىنا جول قويۋ</translation> + <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using VNC</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="691"/> - <source>确认退出程序!</source> - <translation>确认退出程序!</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="106"/> + <source>Require user to enter this password while using VNC: </source> + <translation type="unfinished"></translation> + <extra-contents_path>/Vino/Require user to enter this password while using VNC:</extra-contents_path> </message> <message> - <source>Remote Desktop</source> - <translation type="vanished">Қашықтағы үстел</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="112"/> + <source>Edit</source> + <translation type="unfinished">Өңдеу</translation> </message> <message> - <source>Edit</source> - <translation type="obsolete">Өңдеу</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="124"/> + <source>Displays that allow remote access</source> + <translation type="unfinished"></translation> + <extra-contents_path>/Vino/Displays that allow remote access</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="435"/> - <source>Allow others to view your desktop</source> - <translation>Басқаларға жұмыс үстелін көруге рұқсат беру</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="132"/> + <source>The number of remote clients allowed to connect</source> + <translation type="unfinished"></translation> + <extra-contents_path>/Vino/The number of remote clients allowed to connect</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="94"/> <source>Allow connection to control screen</source> - <translation type="vanished">Қосылымды басқару экранына рұқсат ету</translation> + <translation>Қосылымды басқару экранына рұқсат ету</translation> <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="446"/> - <source>Security</source> - <translation>Қауіпсіздік</translation> - </message> - <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="100"/> <source>You must confirm every visit for this machine</source> - <translation type="vanished">Осы машинаға әрбір келуді растау керек</translation> + <translation>Осы машинаға әрбір келуді растау керек</translation> <extra-contents_path>/Vino/You must confirm every visit for this machine</extra-contents_path> </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="455"/> - <source>Require user to enter this password: </source> - <translation>Пайдаланушыдан осы құпия сөзді енгізуді талап ету: </translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="402"/> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="457"/> - <source>Password can not be blank</source> - <translation>Құпия сөз бос бола алмайды</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="395"/> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="410"/> - <source>Password length must be less than or equal to 8</source> - <translation>Парольдің ұзындығы 8-ден кем немесе оған тең болуы тиіс</translation> - </message> - <message> - <source>Password length is greater than 8</source> - <translation type="vanished">密码长度大于8</translation> - </message> -</context> -<context> - <name>ShareMainHw</name> - <message> - <source>please select an output</source> - <translation type="obsolete">шығысты таңдауыңызды сұраймыз</translation> - </message> - <message> - <source>Input Password</source> - <translation type="obsolete">Құпиясөзді енгізу</translation> - </message> - <message> - <source>Share</source> - <translation type="obsolete">Ортақ пайдалану</translation> - </message> - <message> - <source>Allow others to view your desktop</source> - <translation type="obsolete">Басқаларға жұмыс үстелін көруге рұқсат беру</translation> - </message> - <message> - <source>Security</source> - <translation type="obsolete">Қауіпсіздік</translation> - </message> - <message> - <source>Require user to enter this password: </source> - <translation type="obsolete">Пайдаланушыдан осы құпия сөзді енгізуді талап ету: </translation> - </message> - <message> - <source>Point</source> - <translation type="obsolete">Нүкте</translation> - </message> - <message> - <source>Clipboard</source> - <translation type="obsolete">Аралық сақтағыш</translation> - </message> - <message> - <source>ViewOnly</source> - <translation type="obsolete">ViewOnly</translation> - </message> - <message> - <source>Client Setting</source> - <translation type="obsolete">Клиент параметрі</translation> - </message> - <message> - <source>Client Number</source> - <translation type="obsolete">Клиент нөмірі</translation> - </message> - <message> - <source>Client IP:</source> - <translation type="obsolete">Клиент IP:</translation> - </message> - <message> - <source>退出程序</source> - <translation type="obsolete">退出程序</translation> - </message> - <message> - <source>确认退出程序!</source> - <translation type="obsolete">确认退出程序!</translation> - </message> </context> <context> <name>Shortcut</name> @@ -11075,53 +10902,65 @@ <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="81"/> <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="98"/> <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="102"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="171"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="260"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="180"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="269"/> <source>Null</source> <translation>جوق</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="221"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="353"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="230"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="362"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="605"/> <source>Cancel</source> <translation>كۇشىنەن قالدىرۋ</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="222"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="354"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="231"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="363"/> <source>Use</source> <translation>ٸستەتۋ</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="223"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="355"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="232"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="364"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="607"/> <source>Shortcut key conflict, use it?</source> <translation>؟قولايلى كىنوپكا گرۋپپاسى سوقتٸعٸسٸپ قالدى، نۇ گرۋپپانى پايدالاناسزبا</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="224"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="356"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="233"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="365"/> <source>%1 occuied, using this combination will invalidate %2</source> <translation>%1 ئىگىلىۋېلىندى، نۇ گرۋپپانى ٸستەتٸڭٸز “%2” نىڭ كىنوپكا گرۋپپاسى بولمايدى</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="247"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="386"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="256"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="395"/> <source>Shortcut "%1" occuied, please change the key combination</source> <translation>قولايلى كىنوپكانىڭ “%1” نى سەستيما ئىگىلىۋالدى، كىنوپكا گرۋپپاسىن الماستٸر</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="438"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="447"/> <source>Edit</source> <translation>تالداۋجاساۋ</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="439"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="448"/> <source>Delete</source> <translation>ٴوشىرۋ</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="598"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="606"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="608"/> + <source>"%1" occuied, using this combination will invalidate "%2".</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="648"/> <source> or </source> <translation> ياكي </translation> </message> @@ -12930,54 +12769,6 @@ </message> </context> <context> - <name>VinoUi</name> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="15"/> - <source>Remote Desktop</source> - <translation>جىراقتان باسقارىلاتىن ۇستەل بەتى</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="17"/> - <source>Connect to your desktop remotely</source> - <translation>باسقالاردٸڭ سىزدىڭ ۇستەل بەتىڭىزدى جىراقتان باشقۇرىشىغا قوسىلۋ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="20"/> - <source>Allow others to connect to your desktop remotely using RDP</source> - <translation>باسقالاردٸڭ RDP ارقىلى سىزدىڭ ۇستەل بەتىڭىزدى جىراقتان باشقۇرىشىغا قوسىلۋ</translation> - <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using RDP</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="23"/> - <source>Allow others to connect to your desktop remotely using VNC</source> - <translation>باسقالاردٸڭ VNC ارقىلى سىزدىڭ ۇستەل بەتىڭىزدى جىراقتان باشقۇرىشىغا قوسىلۋ</translation> - <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using VNC</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="26"/> - <source>Allow connection to control screen</source> - <translation>باسقالاردٸڭ سىزدىڭ ۇستەل بەتىڭىزدى جىراقتان باشقۇرىشىغا ونىڭ ۇستىنە ەكٸرانٸ كونتىرول قىلۋىنا قوسىلۋ</translation> - <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="28"/> - <source>You must confirm every visit for this machine</source> - <translation>ٴسىز ٴسوزسٸز ٵر بٸر ساپارىن جەزملەشتۈرۈشىڭىز كەرەك</translation> - <extra-contents_path>/Vino/You must confirm every visit for this machine</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="30"/> - <source>Require user to enter this password: </source> - <translation>ىستەتۋشىدەن قۇپيا نومەر كىرگىزۋدى تالاپ ەتۋ: </translation> - <extra-contents_path>/Vino/Require user to enter this password:</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="39"/> - <source>Edit</source> - <translation>تالداۋجاساۋ</translation> - </message> -</context> -<context> <name>Vpn</name> <message> <source>Add Vpn Connect</source> diff -Nru ukui-control-center-5.0.0.0/shell/res/i18n/ky.ts ukui-control-center-5.0.0.0/shell/res/i18n/ky.ts --- ukui-control-center-5.0.0.0/shell/res/i18n/ky.ts 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/shell/res/i18n/ky.ts 2025-02-07 16:27:50.000000000 +0800 @@ -321,166 +321,170 @@ <context> <name>AboutUi</name> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="31"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="32"/> <source>System Summary</source> - <translation>ساامالىق قىسقاچا تۉشۉندۉرۉلۉسۉ</translation> + <translation>ساامالىق قورتۇندۇ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="33"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="35"/> <source>Privacy and agreement</source> <translation>سىرلۇۇ جانا گەلىشىم</translation> + <extra-contents_path>/About/Privacy and agreement</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="35"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="37"/> <source>Support</source> <translation>قولدوش ، دەم بەرىش</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="49"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="376"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="51"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="381"/> <source>Version</source> <translation>باسما ناامى</translation> <extra-contents_path>/About/version</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="54"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="56"/> <source>Version Number</source> <translation>باسما نومۇرۇ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="59"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="61"/> <source>Patch Version</source> <translation>ساامالىق يامىقىنىڭ باسما نومۇرۇ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="64"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="66"/> <source>Installed Date</source> <translation>ورنوتۇلعان ۇباقتى</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="69"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="71"/> <source>Upgrade Date</source> <translation>ساامالىق جاڭىرتىلعان ۇباقىت</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="75"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="78"/> <source>HostName</source> <translation>كومپىيۇتەر ناامى</translation> + <extra-contents_path>/About/HostName</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="87"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="378"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="90"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="383"/> <source>Kernel</source> <translation>ىچكى يادىرو</translation> <extra-contents_path>/About/Kernel</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="92"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="380"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="95"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="385"/> <source>CPU</source> <translation>بوربورۇ بىر تاراپ جاساعىچ</translation> <extra-contents_path>/About/CPU</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="97"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="382"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="100"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="387"/> <source>Memory</source> <translation>ىچكى ساقتاعىچ</translation> <extra-contents_path>/About/Memory</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="102"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="105"/> <source>Disk</source> <translation>قاتۇۇ دىسكا</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="107"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="384"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="110"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="389"/> <source>Desktop</source> <translation>ئۈستەلئۈستى</translation> <extra-contents_path>/About/Desktop</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="112"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="386"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="115"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="391"/> <source>User</source> <translation>كەرەكتۅۅچۉ ناامى</translation> <extra-contents_path>/About/User</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="120"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="123"/> <source>Copyright ©%1 %2. All rights reserved.</source> <translation>Автордук укук ©%1 %2 КайлинСофт. Бардык укуктар корголгон.</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="169"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="172"/> <source>openKylin</source> <translation>Kylin جۇمشاق تەتىگىن اچۇۇ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="166"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="169"/> <source>KylinSoft</source> <translation>جۇمشاق تەتىگى Kylin</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="232"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="235"/> <source>Wechat code scanning obtains HP professional technical support</source> <translation>ئۈندىدار قۇپۇيا نومۇرۇن سىكاننېرلاپ، HP كەسپىي تەحنىكا قولدوشۇنا ەە بولۇۇ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="233"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="236"/> <source>See more about Kylin Tianqi edu platform</source> <translation>تيەنچى اعارتۇۇ سۇپاسىنىن داعى ەلە كۅپ ۇچۇردۇ كۅرۉۉ Kylin</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="253"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="256"/> <source>Learn more HP user manual>></source> <translation>ابونتتار قولدونموسۇن داعى ەلە كۅپ تۉشۅنۉۉ HP</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="258"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="261"/> <source>See user manual>></source> <translation>ابونتتار قولدونموسۇن كۅرۉۉ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="336"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="339"/> <source>Send optional diagnostic data</source> - <translation>تاندالىشچان دىياگنوز ساندۇۇ مالىماتتى جولدوو</translation> + <translation>ۅز ەركىنچە دىياگنوز ساندۇۇ بايانداماسى جولدوو</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="337"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="340"/> <source>By sending us diagnostic data, improve the system experience and solve your problems faster</source> <translation>دىياگنوز ساندۇۇ مالىماتتى بىزگە جىبەرسەڭىز، ساامالىقا بولعون تەسىراتىىڭىزنى ئاشۇرالايسىز داعى ماسەلەنى داعى ەلە تەز بىر تاراپ قىلۇۇ قىلا الاسىز</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="359"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="363"/> <source><<Protocol>></source> <translation>«سىناپ ىشتەتىلۉۉدۅ جاۋابكارلىقتىن كەچۈرۈم جاسوو ،اتقارۇۇ كەلىشىمى»</translation> + <extra-contents_path>/About/<<Protocol>></extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="360"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="364"/> <source>and</source> <translation>جانا</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="361"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="366"/> <source><<Privacy>></source> <translation>«ابونتتار سىرلۇۇ كەلىشىمى»</translation> + <extra-contents_path>/About/<<Privacy>></extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="388"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="393"/> <source>Status</source> <translation>ابالى</translation> <extra-contents_path>/About/Status</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="390"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="395"/> <source>Active</source> <translation>اكتىپتەشىرۉۉ</translation> <extra-contents_path>/About/Active</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="391"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="396"/> <source>Serial</source> <translation>تارتىپ نومۇرۇ</translation> </message> @@ -720,7 +724,7 @@ <message> <location filename="../../../plugins/devices/shortcut/addshortcutdialog.cpp" line="224"/> <source>Desktop files(*.desktop)</source> - <translation>桌面文件(*.desktop)</translation> + <translation>Иш столунун файлдары(*.desktop)</translation> </message> <message> <location filename="../../../plugins/devices/shortcut/addshortcutdialog.cpp" line="265"/> @@ -1361,23 +1365,18 @@ <extra-contents_path>/Area/Date</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="46"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="47"/> <source>Long Format Date</source> - <translation>چىسلا ۇزۇن كەبەتەسى ، تۇرپاتى</translation> + <translation>ۇزۇن فورمات ۇباقتى</translation> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="48"/> - <source>Date</source> - <translation>ۇباقىت جانا چىسلا</translation> - </message> - <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="52"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="50"/> <source>Time</source> <translation>ۇباقىت</translation> <extra-contents_path>/Area/Time</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="65"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="63"/> <source>Language Format</source> <translation>تىل كەبەتەسى ، تۇرپاتى</translation> <extra-contents_path>/Area/Language Format</extra-contents_path> @@ -1412,7 +1411,7 @@ <message> <location filename="../../../plugins/application/autoboot/autoboot.cpp" line="293"/> <source>Desktop files(*.desktop)</source> - <translation>桌面文件(*.desktop)</translation> + <translation>Иш столунун файлдары(*.desktop)</translation> </message> <message> <location filename="../../../plugins/application/autoboot/autoboot.cpp" line="301"/> @@ -3991,12 +3990,17 @@ <extra-contents_path>/Date/Sync Time</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="127"/> <source>Set Date Manually</source> <translation>چىسلانى قولدو بەلگىلۅۅ</translation> <extra-contents_path>/Date/Set Date Manually</extra-contents_path> </message> <message> + <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="127"/> + <source>Set Time Manually</source> + <translation type="unfinished"></translation> + <extra-contents_path>/Date/Set Time Manually</extra-contents_path> + </message> + <message> <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="162"/> <source>Server Address</source> <translation>مۇلازىمەتىر دايىن وردۇ</translation> @@ -4146,12 +4150,12 @@ <extra-contents_path>/Defaultapp/Text Editor</extra-contents_path> </message> <message> - <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="34"/> + <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="35"/> <source>Reset default apps to system recommended apps</source> <translation>الدىن بەلگىلەنگەن ئەپنى ساامالىق كەڭەش جاساعان ئەپ جاساپ قايرا بەلگىلۅۅ</translation> </message> <message> - <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="35"/> + <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="36"/> <source>Reset</source> <translation>قايرا تەڭشۅۅ</translation> </message> @@ -5513,29 +5517,30 @@ <translation type="vanished">密码不能为空</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="79"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="92"/> <source>Cancel</source> <translation>ارعادان قالتىرىش</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="29"/> - <source>Set</source> - <translation>ساامالىق تەڭشەگى</translation> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="39"/> + <source>VNC password</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="57"/> + <source>Password</source> + <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="62"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="75"/> <source>Must be 1-8 characters long</source> <translation>ۇزۇندۇعۇ سۅزسۉز 8-1 تامعا-بەلگە بولۇش</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="83"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="98"/> <source>Confirm</source> <translation>بەكىتۉۉ</translation> </message> - <message> - <source>less than or equal to 8</source> - <translation type="vanished">密码长度需要小于等于8</translation> - </message> </context> <context> <name>ItemList</name> @@ -6577,10 +6582,10 @@ <translation type="vanished">设置</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="443"/> - <location filename="../../mainwindow.cpp" line="461"/> - <location filename="../../mainwindow.cpp" line="596"/> - <location filename="../../mainwindow.cpp" line="954"/> + <location filename="../../mainwindow.cpp" line="441"/> + <location filename="../../mainwindow.cpp" line="459"/> + <location filename="../../mainwindow.cpp" line="591"/> + <location filename="../../mainwindow.cpp" line="949"/> <source>Settings</source> <translation>تەڭشەكتەر</translation> </message> @@ -6589,7 +6594,7 @@ <translation type="vanished">Негизги меню</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="482"/> + <location filename="../../mainwindow.cpp" line="480"/> <source>Minimize</source> <translation>ەڭ كىچىك ابالى</translation> </message> @@ -6598,7 +6603,7 @@ <translation type="vanished">最大化/正常</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="154"/> + <location filename="../../mainwindow.cpp" line="152"/> <source>Warnning</source> <translation>ەسكەرتۉۉ</translation> </message> @@ -6607,8 +6612,8 @@ <translation type="vanished">Нормалдуу</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="175"/> - <location filename="../../mainwindow.cpp" line="483"/> + <location filename="../../mainwindow.cpp" line="173"/> + <location filename="../../mainwindow.cpp" line="481"/> <source>Maximize</source> <translation>چوڭويتۇش</translation> </message> @@ -6617,47 +6622,44 @@ <translation type="obsolete">开始菜单</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="172"/> + <location filename="../../mainwindow.cpp" line="170"/> <source>Restore</source> <translation>العاچىنا كەلتىرۉۉ</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="455"/> + <location filename="../../mainwindow.cpp" line="453"/> <source>Back home</source> <translation>باش بەتكە قايتۇۇ</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="481"/> + <location filename="../../mainwindow.cpp" line="479"/> <source>Option</source> <translation>تانداش</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="484"/> + <location filename="../../mainwindow.cpp" line="482"/> <source>Close</source> <translation>بەكىتىش</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="584"/> <source>Help</source> - <translation>جەرلىك</translation> + <translation type="vanished">جەرلىك</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="586"/> <source>About</source> - <translation>جۅنۉندۅ</translation> + <translation type="vanished">جۅنۉندۅ</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="588"/> <source>Exit</source> <translation>جانىش ، قايتىش</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="597"/> + <location filename="../../mainwindow.cpp" line="592"/> <source>Version: </source> <translation>باسماسى : </translation> </message> <message> - <location filename="../../mainwindow.cpp" line="736"/> + <location filename="../../mainwindow.cpp" line="731"/> <source>Specified</source> <translation>بەكىتىلگەن قىستىرما تەتىك</translation> </message> @@ -6666,13 +6668,13 @@ <translation type="vanished">控制面板</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="1086"/> + <location filename="../../mainwindow.cpp" line="1082"/> <source>Warning</source> <translation>ەسكەرتۉۉ</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="154"/> - <location filename="../../mainwindow.cpp" line="1086"/> + <location filename="../../mainwindow.cpp" line="152"/> + <location filename="../../mainwindow.cpp" line="1082"/> <source>This function has been controlled</source> <translation>بۇل قۇربات ، جۅندۅم تىزگىندۅۅ اتقارىلدى</translation> </message> @@ -7335,74 +7337,15 @@ </message> </context> <context> - <name>NoticeMenu</name> - <message> - <source>Beep sound when notified</source> - <translation type="vanished">ۇقتۇرعان ۇچۇرداقى ەسكەرتمە دووش</translation> - </message> - <message> - <source>Show message on screenlock</source> - <translation type="vanished">ەكىران قۇلۇپتوو بەتىندە ۇقتۇرۇۇ مازمۇنۇن كۅرسۅتۉۉ</translation> - </message> - <message> - <source>Show noticfication on screenlock</source> - <translation type="vanished">ەكىران قۇلۇپتوو بەتىندە ۇقتۇرۇشتۇ كۅرسۅتۉۉ</translation> - </message> - <message> - <source>Notification Style</source> - <translation type="vanished">ۇقتۇرۇۇ كەبەتەسى ، تۇرپاتى</translation> - </message> - <message> - <source>Banner: Appears in the upper right corner of the screen, and disappears automatically</source> - <translation type="vanished">لوزۇنكا: ەكراندىن وڭ تاراپ ۉستۉنكۉ بۇرچۇندا كۅرۉنۅت، ۅزدۉگۉنۅن جوعولۇپ كەتەت</translation> - </message> - <message> - <source>Tip:It will be kept on the screen until it is closed</source> - <translation type="vanished">ەسكەرتۉۉ: ئۆچۈرۈلگەنگە عاچا ەكىراندا ساقتالات</translation> - </message> - <message> - <source>None:Notifications will not be displayed on the screen, but will go to the notification center</source> - <translation type="vanished">جوق: ۇقتۇرۇۇ ەكىراندا كۅرۉنبۅيت، بىروق ۇقتۇرۇۇ بوربورۇنا كىرەت</translation> - </message> -</context> -<context> <name>NoticeUi</name> <message> - <source>Notice Settings</source> - <translation type="vanished">ۇقتۇرۇۇ</translation> - </message> - <message> <source>NotFaze Mode</source> <translation type="vanished">ئاۋارە قىلبوو ۉلگۉسۉ</translation> </message> <message> - <source>(Notification banners, prompts will be hidden, and notification sounds will be muted)</source> - <translation type="vanished">(ۇقتۇرۇۇ لوزۇنكىسى، ەسكەرتمەسى جاشىرىنعان بولوت ، ۇقتۇرۇۇ وبونۇ ئۈنسىز بولوت )</translation> - </message> - <message> - <source>Get notifications from the app</source> - <translation type="vanished">ئەپتىن گەلگەن ۇقتۇرۇۇعا ەە بولۇۇ</translation> - </message> - <message> - <source>Automatically turn on</source> - <translation type="vanished">اپتوماتتىك اچۇۇ</translation> - </message> - <message> <source>to</source> <translation type="vanished">عا</translation> </message> - <message> - <source>Automatically turn on when multiple screens are connected</source> - <translation type="vanished">كۅپ ەكىران ۇلانعاندا اپتوماتتىك اچۇۇ</translation> - </message> - <message> - <source>Automatically open in full screen mode</source> - <translation type="vanished">پۉتۉن ەكىران ابالىندا اپتوماتتىك اچۇۇ</translation> - </message> - <message> - <source>Allow automatic alarm reminders in Do Not Disturb mode</source> - <translation type="vanished">ئاۋارە قىلبوو ۅرنۅگۉندۅ قوڭغىراقلىق ساات ەسكەرتۉۉگۅ ۇرۇقسات جاسوو ،اتقارۇۇ</translation> - </message> </context> <context> <name>NumbersButtonIntel</name> @@ -9320,7 +9263,7 @@ <translation>ۅز تەڭشەك ىڭعايلۇۇ كۇنۇپكا</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="463"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="472"/> <source>Edit Shortcut</source> <translation>ىڭعايلۇۇ كۇنۇپكا تۅپتۅش</translation> </message> @@ -10159,78 +10102,79 @@ <extra-contents_path>/Screenlock/Show picture of screenlock on screenlogin</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="43"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="44"/> <source>Leave lock (System will be locked when the paired phone gone)</source> - <translation>(اراكەتچان قۇلپ (شايكەشكەن كۅك تىش يانفونى ايرىلعان ۇچۇردا ، ساامالىق ەكراندى اپتوماتتىك قۇلپلاش</translation> + <translation>قۇلۇپنى قالتىرىپ قويۇش (بىر جۇپ ەسەپتەمەك جوعولۇپ كەتكەندە ساامالىق قۇلۇپلىنىدۇ)</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="44"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="45"/> <source>Specified device</source> <translation>بەكىتىلگەن شايمان</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="45"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="46"/> <source>No paired phone. Please turn to 'Bluetooth' to pair.</source> <translation>.شايكەشكەن ەسەپتەمەك جوق، كۅك چىشقا ئالمىشىپ ەسەپتەمەك نى ۇلاڭ</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="65"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="66"/> <source>Screenlock</source> <translation>ەكراندى قۇلۇپتوو</translation> <extra-contents_path>/Screenlock/Screenlock</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="95"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="96"/> <source>Local Pictures</source> <translation>ئۆزىدە بار سۉرۅت</translation> <extra-contents_path>/Screenlock/Local Pictures</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="97"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="98"/> <source>Online Pictures</source> <translation>توردوعۇ سۉرۅت</translation> <extra-contents_path>/Screenlock/Online Pictures</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="99"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="100"/> <source>Reset To Default</source> <translation>الدىن بەكىتىلگەن ابالعا قايتۇۇ</translation> <extra-contents_path>/Screenlock/Reset To Default</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="111"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="112"/> <source>Bluetooth</source> <translation>كۅك تىش تەڭشەگى</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="116"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="117"/> <source>No bluetooth adapter detected, can not use Leave Lock.</source> <translation>.كۅك تىش شايكەشتىرگىچ بايقالبادى، اراكەتچان قۇلپ قۇرباتىن ىشتەتكەلى بولبويت</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="134"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="136"/> <source>Monitor Off</source> - <translation>كۅرسۅتكۉچتۉ بەكىتىش</translation> + <translation>كۉزۅتكۉچتۉ ۅچۉرۉۉ</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="135"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="138"/> <source>Screensaver</source> <translation>ەكىران قورعوو</translation> + <extra-contents_path>/Screenlock/Screensaver</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="137"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="141"/> <source>Related Settings</source> - <translation>بايلانىشتۇۇ تەڭشەك</translation> + <translation>بايلانىشتۇۇ تەڭشەكتەر</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="143"/> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="144"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="147"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="148"/> <source>Set</source> <translation>ساامالىق تەڭشەگى</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="159"/> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="526"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="163"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="530"/> <source>Please select device</source> <translation>بەكىتىلگەن اسپاپتى تانداڭ</translation> </message> @@ -10452,7 +10396,7 @@ <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="40"/> <source>Screensaver</source> <translation>ەكىران قورعوو</translation> - <extra-contents_path>/Screenlock/Screensaver</extra-contents_path> + <extra-contents_path>/Screensaver/Screensaver</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="53"/> @@ -10467,93 +10411,96 @@ <extra-contents_path>/Screensaver/Screensaver program</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="86"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="87"/> <source>Screensaver source</source> - <translation>ەكىران قورعوو قاينارى</translation> + <translation>ەكىران بەتى قاينارى</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="91"/> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="449"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="92"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="455"/> <source>Select</source> <translation>تانداش</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="112"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="113"/> <source>Ordinal</source> <translation>تارتىپ بويۇنچا</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="113"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="114"/> <source>Random</source> <translation>ۅز ەركىنچە</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="119"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="121"/> <source>Random switching</source> <translation>قاالاعانچا الماشتىرۇۇ</translation> + <extra-contents_path>/Screensaver/Random switching</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="138"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="141"/> <source>Switching time</source> - <translation>الماشتىرۇۇ قاتىمى</translation> + <translation>الماشتىرۇۇ ۇباقتى</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="157"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="160"/> <source>Text(up to 30 characters):</source> - <translation>:(ەكىران قورعوو تەكىستتى (ەڭ كۅپ بولعوندو 30 تامعا:</translation> + <translation>تەكىست(ەڭ كۅپ بولعوندو 30 تامعا):</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="179"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="183"/> <source>Text position</source> <translation>تەكىست وردۇ</translation> + <extra-contents_path>/Screensaver/Text position</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="187"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="191"/> <source>Centered</source> <translation>ورتودو تۇرۇش</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="188"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="192"/> <source>Randow(Bubble text)</source> <translation>ۅز ەركىنچە (كۆپۈكچە تەكىست)</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="209"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="214"/> <source>Show rest time</source> <translation>ەس الۇۇ الۇۇ ۇباقتىن كۅرسۅتۉۉ</translation> + <extra-contents_path>/Screensaver/Show rest time</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="218"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="224"/> <source>Lock screen when screensaver boot</source> - <translation>ەكىران قورعوونۇ قوزعولتقوندو ەكىراننى بەكىتۉۉ</translation> + <translation>ەكراندى كۅزۅنۅك جابۇۇدا ەكراندى قۇلۇپتوو</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="407"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="413"/> <source>Wallpaper files(*.jpg *.jpeg *.bmp *.dib *.png *.jfif *.jpe *.gif *.tif *.tiff *.wdp *.svg)</source> <translation>(*.jpg *.jpeg *.bmp *.dib *.png *.jfif *.jpe *.gif *.tif *.tiff *.wdp *.svg)تام قاعازى ۅجۅتتۅرۉ</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="448"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="454"/> <source>select custom screensaver dir</source> <translation>ۅز تەڭشەك ەكىران قورعوو جولۇن تانداش</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="450"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="456"/> <source>Position: </source> <translation>وردۇ: </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="451"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="457"/> <source>FileName: </source> <translation>ۅجۅت ناامى : </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="452"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="458"/> <source>FileType: </source> <translation>FileType: </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="453"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="459"/> <source>Cancel</source> <translation>ارعادان قالتىرىش</translation> </message> @@ -10668,11 +10615,11 @@ <translation type="obsolete">触控板</translation> </message> <message> - <location filename="../../searchwidget.cpp" line="80"/> - <location filename="../../searchwidget.cpp" line="81"/> - <location filename="../../searchwidget.cpp" line="88"/> - <location filename="../../searchwidget.cpp" line="90"/> - <location filename="../../searchwidget.cpp" line="95"/> + <location filename="../../searchwidget.cpp" line="83"/> + <location filename="../../searchwidget.cpp" line="84"/> + <location filename="../../searchwidget.cpp" line="91"/> + <location filename="../../searchwidget.cpp" line="93"/> + <location filename="../../searchwidget.cpp" line="98"/> <source>No search results</source> <translation>ىزدۅۅ ناتىيجاسى جوق</translation> </message> @@ -10796,198 +10743,74 @@ <context> <name>ShareMain</name> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="240"/> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="227"/> <source>Warning</source> <translation>Эскертүү</translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="240"/> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="227"/> <source>please select an output</source> <translation>чыгууну тандаңыз</translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="302"/> - <source>Input Password</source> - <translation>Сырсөз киргизүү</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="303"/> - <source>Password</source> - <translation>Сырсөз</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="419"/> - <source>Share</source> - <translation>Үлүшү</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="473"/> - <source>Output</source> - <translation>Чыгаруу</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="485"/> - <source>Input</source> - <translation>Киргизүү</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="495"/> - <source>Point</source> - <translation>Пойнт</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="497"/> - <source>Keyboard</source> - <translation>Алиптергич</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="499"/> - <source>Clipboard</source> - <translation>Клипборд</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="525"/> - <source>Close</source> - <translation>Жабуу</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="527"/> - <source>ViewOnly</source> - <translation>ViewOnly</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="535"/> - <source>Client Setting</source> - <translation>Кардарларды орнотуу</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="72"/> + <source>Remote Desktop</source> + <translation>Алыскы иш столу</translation> + <extra-contents_path>/Vino/Remote Desktop</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="546"/> - <source>Client Number</source> - <translation>Кардарлардын номери</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="76"/> + <source>Connect to your desktop remotely</source> + <translation type="unfinished">شىرە ئۈستىڭىزگە ىرااقتان ۇلوو</translation> + <extra-contents_path>/Vino/Connect to your desktop remotely</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="560"/> - <source>Client IP:</source> - <translation>Кардар ИП:</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="81"/> + <source>Allow others to connect to your desktop remotely using RDP</source> + <translation type="unfinished">RDP ارقىلۇۇ باشقالاردىن شىرە ئۈستىڭىزگە ىرااقتان ۇلاشىنا جول قويۇش</translation> + <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using RDP</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="691"/> - <source>退出程序</source> - <translation>退出程序</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="88"/> + <source>Allow others to connect to your desktop remotely using VNC</source> + <translation type="unfinished">VNC ارقىلۇۇ باشقالاردىن شىرە ئۈستىڭىزگە ىرااقتان ۇلاشىنا جول قويۇش</translation> + <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using VNC</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="691"/> - <source>确认退出程序!</source> - <translation>确认退出程序!</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="106"/> + <source>Require user to enter this password while using VNC: </source> + <translation type="unfinished"></translation> + <extra-contents_path>/Vino/Require user to enter this password while using VNC:</extra-contents_path> </message> <message> - <source>Remote Desktop</source> - <translation type="vanished">Алыскы иш столу</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="112"/> + <source>Edit</source> + <translation type="unfinished">Оңдоо</translation> </message> <message> - <source>Edit</source> - <translation type="obsolete">Оңдоо</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="124"/> + <source>Displays that allow remote access</source> + <translation type="unfinished"></translation> + <extra-contents_path>/Vino/Displays that allow remote access</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="435"/> - <source>Allow others to view your desktop</source> - <translation>Башкаларга иш столуңузду көрүүгө мүмкүнчүлүк бергиле</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="132"/> + <source>The number of remote clients allowed to connect</source> + <translation type="unfinished"></translation> + <extra-contents_path>/Vino/The number of remote clients allowed to connect</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="94"/> <source>Allow connection to control screen</source> - <translation type="vanished">Экранды башкаруу үчүн туташуу мүмкүндүк берет</translation> + <translation>Экранды башкаруу үчүн туташуу мүмкүндүк берет</translation> <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="446"/> - <source>Security</source> - <translation>Коопсуздук</translation> - </message> - <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="100"/> <source>You must confirm every visit for this machine</source> - <translation type="vanished">Сиз бул машина үчүн ар бир иш сапарын ырасташы керек</translation> + <translation>Сиз бул машина үчүн ар бир иш сапарын ырасташы керек</translation> <extra-contents_path>/Vino/You must confirm every visit for this machine</extra-contents_path> </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="455"/> - <source>Require user to enter this password: </source> - <translation>Колдонуучудан бул сырсөздү киргизүүнү талап кылуу: </translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="402"/> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="457"/> - <source>Password can not be blank</source> - <translation>Сырсөз бош болушу мүмкүн эмес</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="395"/> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="410"/> - <source>Password length must be less than or equal to 8</source> - <translation>Сырсөз узундугу 8ден аз же бирдей болушу керек</translation> - </message> - <message> - <source>Password length is greater than 8</source> - <translation type="vanished">密码长度大于8</translation> - </message> -</context> -<context> - <name>ShareMainHw</name> - <message> - <source>please select an output</source> - <translation type="obsolete">чыгууну тандаңыз</translation> - </message> - <message> - <source>Input Password</source> - <translation type="obsolete">Сырсөз киргизүү</translation> - </message> - <message> - <source>Share</source> - <translation type="obsolete">Үлүшү</translation> - </message> - <message> - <source>Allow others to view your desktop</source> - <translation type="obsolete">Башкаларга иш столуңузду көрүүгө мүмкүнчүлүк бергиле</translation> - </message> - <message> - <source>Security</source> - <translation type="obsolete">Коопсуздук</translation> - </message> - <message> - <source>Require user to enter this password: </source> - <translation type="obsolete">Колдонуучудан бул сырсөздү киргизүүнү талап кылуу: </translation> - </message> - <message> - <source>Point</source> - <translation type="obsolete">Пойнт</translation> - </message> - <message> - <source>Clipboard</source> - <translation type="obsolete">Клипборд</translation> - </message> - <message> - <source>ViewOnly</source> - <translation type="obsolete">ViewOnly</translation> - </message> - <message> - <source>Client Setting</source> - <translation type="obsolete">Кардарларды орнотуу</translation> - </message> - <message> - <source>Client Number</source> - <translation type="obsolete">Кардарлардын номери</translation> - </message> - <message> - <source>Client IP:</source> - <translation type="obsolete">Кардар ИП:</translation> - </message> - <message> - <source>退出程序</source> - <translation type="obsolete">退出程序</translation> - </message> - <message> - <source>确认退出程序!</source> - <translation type="obsolete">确认退出程序!</translation> - </message> </context> <context> <name>Shortcut</name> @@ -11075,53 +10898,65 @@ <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="81"/> <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="98"/> <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="102"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="171"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="260"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="180"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="269"/> <source>Null</source> <translation>جوق</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="221"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="353"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="230"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="362"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="605"/> <source>Cancel</source> <translation>ارعادان قالتىرىش</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="222"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="354"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="231"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="363"/> <source>Use</source> <translation>ىشتەتىش</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="223"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="355"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="232"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="364"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="607"/> <source>Shortcut key conflict, use it?</source> <translation>؟ىڭعايلۇۇ كۇنۇپكا گۇرۇپپاسى توقۇنۇشۇپ قالدى، بۇل گۇرۇپپانى ىشتەتەسىزبى</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="224"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="356"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="233"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="365"/> <source>%1 occuied, using this combination will invalidate %2</source> <translation>%1 ئىگىلىۋېلىندى، بۇل گۇرۇپپانى ىشتەتسەڭىز “%2” نىڭ كۇنۇپكا گۇرۇپپاسى بولبويت</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="247"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="386"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="256"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="395"/> <source>Shortcut "%1" occuied, please change the key combination</source> <translation>ىڭعايلۇۇ كۇنۇپكا نىن “%1” نى ساامالىق ئىگىلىۋالدى، كۇنۇپكا توبۇن الماشتىرىڭ</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="438"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="447"/> <source>Edit</source> <translation>تۅپتۅش</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="439"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="448"/> <source>Delete</source> <translation>ۅچۉرۉۉ</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="598"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="606"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="608"/> + <source>"%1" occuied, using this combination will invalidate "%2".</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="648"/> <source> or </source> <translation> كۅرۉنۉشتۅرۉ </translation> </message> @@ -12930,54 +12765,6 @@ </message> </context> <context> - <name>VinoUi</name> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="15"/> - <source>Remote Desktop</source> - <translation>ىرااقتان باشقارىلاتۇرعان شىرە بەتى</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="17"/> - <source>Connect to your desktop remotely</source> - <translation>باشقالاردىن سىزدىن شىرە بەتىڭىزدى ىرااقتان باشقۇرىشىغا قوشۇلۇۇ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="20"/> - <source>Allow others to connect to your desktop remotely using RDP</source> - <translation>باشقالاردىن RDP ارقىلۇۇ سىزدىن شىرە بەتىڭىزدى ىرااقتان باشقۇرىشىغا قوشۇلۇۇ</translation> - <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using RDP</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="23"/> - <source>Allow others to connect to your desktop remotely using VNC</source> - <translation>باشقالاردىن VNC ارقىلۇۇ سىزدىن شىرە بەتىڭىزدى ىرااقتان باشقۇرىشىغا قوشۇلۇۇ</translation> - <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using VNC</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="26"/> - <source>Allow connection to control screen</source> - <translation>باشقالاردىن سىزدىن شىرە بەتىڭىزدى ىرااقتان باشقۇرىشىغا داعى ەكراندى كونتىرول قىلۇۇعا قوشۇلۇۇ</translation> - <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="28"/> - <source>You must confirm every visit for this machine</source> - <translation>سىز سۅزسۉز ار بىر بىر زىياراتتى جەزملەشتۈرۈشىڭىز كەرەك</translation> - <extra-contents_path>/Vino/You must confirm every visit for this machine</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="30"/> - <source>Require user to enter this password: </source> - <translation>ىشتەتۉۉچۉدۅن جاشىرۇۇن نومۇر كىرگىزۉۉنۉ تالاپ جاسوو ،اتقارۇۇ : </translation> - <extra-contents_path>/Vino/Require user to enter this password:</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="39"/> - <source>Edit</source> - <translation>تۅپتۅش</translation> - </message> -</context> -<context> <name>Vpn</name> <message> <source>Add Vpn Connect</source> diff -Nru ukui-control-center-5.0.0.0/shell/res/i18n/mn.ts ukui-control-center-5.0.0.0/shell/res/i18n/mn.ts --- ukui-control-center-5.0.0.0/shell/res/i18n/mn.ts 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/shell/res/i18n/mn.ts 2025-02-07 16:27:50.000000000 +0800 @@ -321,7 +321,7 @@ <context> <name>AboutInterface</name> <message> - <location filename="../../../registeredSession/plugins/about/aboutinterface.cpp" line="226"/> + <location filename="../../../registeredSession/plugins/about/aboutinterface.cpp" line="233"/> <source>avaliable</source> <translation>ᠬᠡᠷᠡᠭᠯᠡᠵᠤ ᠪᠣᠯᠬᠤ</translation> </message> @@ -329,94 +329,97 @@ <context> <name>AboutUi</name> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="31"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="32"/> <source>System Summary</source> <translation>ᠰᠢᠰᠲ᠋ᠧᠮ ᠤ᠋ᠨ ᠳᠤᠢᠮᠤ</translation> + <extra-contents_path>/About/System Summary</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="33"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="35"/> <source>Privacy and agreement</source> <translation>ᠨᠢᠭᠤᠴᠠ ᠬᠢᠬᠡᠳ ᠭᠡᠷᠡ</translation> + <extra-contents_path>/About/Privacy and agreement</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="35"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="37"/> <source>Support</source> <translation>ᠳᠡᠮᠵᠢᠬᠦ / ᠳᠤᠰᠠᠯᠠᠬᠤ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="49"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="376"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="51"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="381"/> <source>Version</source> <translation>ᠬᠡᠪᠯᠡᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡᠢᠳᠦᠯ</translation> <extra-contents_path>/About/version</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="54"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="56"/> <source>Version Number</source> <translation>ᠬᠡᠪᠯᠡᠯ ᠤ᠋ᠨ ᠳ᠋ᠤᠭᠠᠷ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="59"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="61"/> <source>Patch Version</source> <translation>ᠰᠢᠰᠲ᠋ᠧᠮ ᠤ᠋ᠨ ᠨᠦᠬᠦᠬᠡᠰᠦ ᠵᠢᠨ ᠬᠡᠪᠯᠡᠯ ᠤ᠋ᠨ ᠨᠤᠮᠸᠷ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="64"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="66"/> <source>Installed Date</source> <translation>ᠰᠠᠭᠤᠯᠭᠠᠭᠰᠠᠨ ᠡᠳᠦᠷ ᠬᠤᠭᠤᠴᠠᠭᠠ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="69"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="71"/> <source>Upgrade Date</source> <translation>ᠰᠢᠰᠲ᠋ᠧᠮ ᠰᠢᠨᠡᠳᠬᠡᠬᠦ ᠴᠠᠭ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="75"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="78"/> <source>HostName</source> <translation>ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷ ᠤ᠋ᠨ ᠨᠡᠷᠡ</translation> + <extra-contents_path>/About/HostName</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="87"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="378"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="90"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="383"/> <source>Kernel</source> <translation>ᠳᠤᠳᠤᠭᠠᠳᠤ ᠴᠦᠮᠡ</translation> <extra-contents_path>/About/Kernel</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="92"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="380"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="95"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="385"/> <source>CPU</source> <translation>CPU</translation> <extra-contents_path>/About/CPU</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="97"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="382"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="100"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="387"/> <source>Memory</source> <translation>ᠳᠤᠳᠤᠭᠠᠳᠤ ᠬᠠᠳᠠᠭᠠᠯᠠᠭᠤᠷ</translation> <extra-contents_path>/About/Memory</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="102"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="105"/> <source>Disk</source> <translation>ᠳ᠋ᠢᠰᠺ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="107"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="384"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="110"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="389"/> <source>Desktop</source> <translation>ᠰᠢᠷᠡᠭᠡᠨ ᠨᠢᠭᠤᠷ</translation> <extra-contents_path>/About/Desktop</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="112"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="386"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="115"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="391"/> <source>User</source> <translation>ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ ᠵᠢᠨ ᠨᠡᠷᠡ</translation> <extra-contents_path>/About/User</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="120"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="123"/> <source>Copyright ©%1 %2. All rights reserved.</source> <translation>ᠬᠡᠪᠯᠡᠯ ᠦᠨ ᠡᠷᠬᠡ ᠶᠢᠨ ᠥᠮᠴᠢᠯᠡᠯ ᠦᠨ ©%1 %2 ᠬᠢ ᠡᠴᠡ ᠃ ᠥᠮᠴᠢᠯᠡᠬᠦ ᠡᠷᠬᠡ ᠶᠢ ᠦᠯᠡᠳᠡᠭᠡᠨᠡ ᠃</translation> </message> @@ -425,12 +428,12 @@ <translation type="vanished">ᠬᠡᠪᠯᠡᠯ ᠦᠨ ᠡᠷᠬᠡ ᠶᠢᠨ ᠥᠮᠴᠢᠯᠡᠯ ᠦᠨ © ᠬᠢ ᠡᠴᠡ 1% 2 ᠃ ᠥᠮᠴᠢᠯᠡᠬᠦ ᠡᠷᠬᠡ ᠶᠢ ᠦᠯᠡᠳᠡᠭᠡᠨᠡ ᠃</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="169"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="172"/> <source>openKylin</source> <translation>ᠾᠧ ᠯᠢᠨ ᠢ ᠨᠡᠭᠡᠭᠡ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="166"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="169"/> <source>KylinSoft</source> <translation>ᠵᠢᠢ ᠯᠢᠨ ᠵᠥᠭᠡᠯᠡᠨ ᠲᠣᠨᠣᠭ</translation> </message> @@ -439,66 +442,70 @@ <translation type="vanished">ᠬᠡᠪᠯᠡᠯ ᠦᠨ ᠡᠷᠬᠡ ᠶᠢᠨ ᠥᠮᠴᠢᠯᠡᠯ ᠦᠨ © ᠬᠢ ᠡᠴᠡ %1 ᠃ ᠥᠮᠴᠢᠯᠡᠬᠦ ᠡᠷᠬᠡ ᠶᠢ ᠦᠯᠡᠳᠡᠭᠡᠨᠡ ᠃</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="232"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="235"/> <source>Wechat code scanning obtains HP professional technical support</source> <translation>ᠸᠢᠴᠠᠲ ᠵᠢᠡᠷ ᠰᠢᠷᠪᠢᠵᠤ HP ᠳᠤᠰᠬᠠᠢ ᠮᠡᠷᠭᠡᠵᠢᠯ ᠤ᠋ᠨ ᠳᠡᠮᠵᠢᠯᠭᠡ ᠬᠦᠷᠳᠡᠬᠦ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="233"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="236"/> <source>See more about Kylin Tianqi edu platform</source> <translation>ᠴᠢ ᠯᠢᠨ ᠲᠢᠶᠠᠨ ᠴᠢ ᠰᠤᠷᠭᠠᠨ ᠬᠥᠮᠦᠵᠢᠯ ᠤ᠋ᠨ ᠳᠠᠪᠴᠠᠩ ᠡᠴᠡ ᠨᠡᠩ ᠣᠯᠠᠨ ᠰᠤᠷᠠᠭ ᠵᠠᠩᠬᠢ ᠵᠢ ᠣᠯᠵᠤ ᠦᠵᠡᠬᠦ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="253"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="256"/> <source>Learn more HP user manual>></source> <translation>ᠨᠡᠩ ᠣᠯᠠᠨ HP ᠢ᠋/ ᠵᠢ ᠤᠢᠯᠠᠭᠠᠬᠤ ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ ᠵᠢᠨ ᠭᠠᠷ ᠤ᠋ᠨ ᠠᠪᠤᠯᠭᠠ>></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="258"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="261"/> <source>See user manual>></source> <translation>ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ ᠵᠢᠨ ᠭᠠᠷ ᠤ᠋ᠨ ᠠᠪᠤᠯᠭᠠ ᠵᠢ ᠪᠠᠢᠴᠠᠭᠠᠵᠤ ᠦᠵᠡᠬᠦ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="336"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="339"/> <source>Send optional diagnostic data</source> <translation>ᠰᠣᠩᠭᠣᠵᠤ ᠪᠣᠯᠬᠤ ᠤᠨᠤᠰᠢᠯᠠᠭᠠᠨ ᠤ᠋ ᠳ᠋ᠠᠢᠲ᠋ᠠ ᠵᠢ ᠢᠯᠡᠬᠡᠬᠦ</translation> + <extra-contents_path>/About/Send optional diagnostic data</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="337"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="340"/> <source>By sending us diagnostic data, improve the system experience and solve your problems faster</source> <translation>ᠪᠢᠳᠡᠨ ᠳ᠋ᠤ᠌ ᠣᠨᠣᠰᠢᠯᠠᠬᠤ ᠳ᠋ᠠᠢᠲ᠋ᠠ ᠢᠯᠡᠬᠡᠬᠦ ᠪᠡᠷ ᠳᠠᠮᠵᠢᠭᠤᠯᠤᠨ ᠰᠢᠰᠲ᠋ᠧᠮ ᠤ᠋ᠨ ᠮᠡᠳᠡᠷᠡᠮᠵᠢ ᠵᠢ ᠳᠡᠭᠡᠭᠰᠢᠯᠡᠬᠦᠯᠵᠤ᠂ ᠲᠠᠨ ᠤ᠋ ᠠᠰᠠᠭᠤᠳᠠᠯ ᠢ᠋ ᠨᠡᠩ ᠳᠦᠷᠭᠡᠨ ᠰᠢᠢᠳᠪᠦᠷᠢᠯᠡᠵᠤ ᠪᠣᠯᠤᠨᠠ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="359"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="363"/> <source><<Protocol>></source> <translation><< ᠳᠤᠷᠰᠢᠨ ᠬᠡᠷᠡᠭᠯᠡᠬᠦ ᠬᠠᠷᠢᠭᠤᠴᠠᠯᠭᠠ ᠡᠴᠡ ᠬᠡᠯᠳᠦᠷᠢᠬᠦᠯᠬᠦ ᠭᠡᠷᠡ >></translation> + <extra-contents_path>/About/<<Protocol>></extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="360"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="364"/> <source>and</source> <translation>ᠪᠤᠯᠤᠨ</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="361"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="366"/> <source><<Privacy>></source> - <translation><<ᠨᠢᠭᠤᠴᠠ ᠪᠠ ᠢᠯᠡᠷᠬᠡᠶᠢᠯᠡᠯᠲᠡ>></translation> + <translation><< ᠬᠡᠷᠡᠭᠡᠯᠡᠭᠴᠢ ᠵᠢᠨ ᠨᠢᠭᠤᠴᠠ ᠵᠢ ᠬᠠᠮᠠᠭᠠᠯᠠᠬᠤ ᠭᠡᠷᠡ>></translation> + <extra-contents_path>/About/<<Privacy>></extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="388"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="393"/> <source>Status</source> <translation>ᠰᠢᠰᠲ᠋ᠧᠮ ᠤ᠋ᠨ ᠪᠠᠢᠳᠠᠯ</translation> <extra-contents_path>/About/Status</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="390"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="395"/> <source>Active</source> <translation>ᠨᠢᠭᠡᠨᠳᠡ ᠡᠬᠢᠯᠡᠬᠦᠯᠪᠡ</translation> <extra-contents_path>/About/Active</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="391"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="397"/> <source>Serial</source> <translation>ᠴᠤᠪᠤᠷᠠᠯ ᠤ᠋ᠨ ᠨᠤᠮᠸᠷ</translation> + <extra-contents_path>/About/Serial</extra-contents_path> </message> </context> <context> @@ -1432,38 +1439,38 @@ <location filename="../../../plugins/time-language/area/areaui.cpp" line="45"/> <source>Short Foramt Date</source> <translation>ᠣᠬᠣᠷ ᠨᠦᠬᠡ ᠶᠢᠨ ᠡᠳᠦᠷ ᠬᠤᠭᠤᠴᠠᠭᠠ</translation> - <extra-contents_path>/Area/Date</extra-contents_path> + <extra-contents_path>/Area/Short Foramt Date</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="46"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="47"/> <source>Long Format Date</source> <translation>ᠡᠳᠦᠷ ᠬᠤᠭᠤᠴᠠᠭᠠᠨᠤ᠋ ᠤᠷᠲᠤ ᠬᠡᠯᠪᠡᠷᠢ</translation> + <extra-contents_path>/Area/Long Format Date</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="48"/> <source>Date</source> - <translation>ᠴᠠᠭ ᠬᠤᠭᠤᠴᠠᠭᠠ ᠪᠠ ᠡᠳᠦᠷ ᠰᠠᠷᠠ</translation> + <translation type="vanished">ᠴᠠᠭ ᠬᠤᠭᠤᠴᠠᠭᠠ ᠪᠠ ᠡᠳᠦᠷ ᠰᠠᠷᠠ</translation> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="52"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="50"/> <source>Time</source> <translation>ᠤᠷᠳᠤᠳᠬᠠᠬᠤ</translation> <extra-contents_path>/Area/Time</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="65"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="63"/> <source>Language Format</source> <translation>ᠦᠭᠡ ᠬᠡᠯᠡᠨ ᠤ᠋ ᠬᠡᠯᠪᠡᠷᠢ</translation> <extra-contents_path>/Area/Language Format</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="76"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="74"/> <source>Language Format Example</source> <translation>ᠬᠡᠯᠡᠨᠦ᠌ ᠬᠡᠯᠪᠡᠷᠢᠶ᠋ᠢᠨ ᠵᠢᠱ᠌ᠢᠶᠡ</translation> <extra-contents_path>/Area/Language Format Example</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="105"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="103"/> <source>System Language</source> <translation>ᠰᠢᠰᠲ᠋ᠧᠮ ᠤ᠋ᠨ ᠦᠭᠡ ᠬᠡᠯᠡ</translation> <extra-contents_path>/Area/System Language</extra-contents_path> @@ -1655,6 +1662,10 @@ <source>Backup and Restore</source> <translation>ᠨᠥᠭᠡᠴᠡ ᠵᠢ ᠡᠬᠡᠬᠦᠯᠬᠦ</translation> </message> + <message> + <source>System Recovery</source> + <translation type="obsolete">系统还原</translation> + </message> </context> <context> <name>BindPhoneDialog</name> @@ -2222,6 +2233,18 @@ </message> </context> <context> + <name>ChangeFaceIntelDialog</name> + <message> + <source>Change User Face</source> + <translation type="obsolete">更改用户头像</translation> + <extra-contents_path>/UserinfoIntel/Change User Face</extra-contents_path> + </message> + <message> + <source>The avatar is larger than 2M, please choose again</source> + <translation type="obsolete">警告,头像大于2M请重新选择</translation> + </message> +</context> +<context> <name>ChangeFeatureName</name> <message> <source>Change Username</source> @@ -2292,6 +2315,24 @@ </message> </context> <context> + <name>ChangeGroupIntelDialog</name> + <message> + <source>User Group Settings</source> + <translation type="obsolete">用户组设置</translation> + </message> + <message> + <source>User groups available in the system</source> + <translation type="obsolete">系统中可用的用户组</translation> + </message> +</context> +<context> + <name>ChangePhoneIntelDialog</name> + <message> + <source>Phone number already in used!</source> + <translation type="obsolete">手机号码已被使用!</translation> + </message> +</context> +<context> <name>ChangeProjectionName</name> <message> <source>Name is too long, change another one.</source> @@ -2406,6 +2447,37 @@ </message> </context> <context> + <name>ChangePwdIntelDialog</name> + <message> + <source>Change Pwd</source> + <translation type="obsolete">更改密码</translation> + </message> + <message> + <source>General Pwd</source> + <translation type="obsolete">通用密码</translation> + </message> + <message> + <source>New Password</source> + <translation type="obsolete">新密码</translation> + </message> + <message> + <source>New Password Identify</source> + <translation type="obsolete">新密码确认</translation> + </message> + <message> + <source>Password length needs to more than %1 character!</source> + <translation type="obsolete">密码长度至少大于%1个字符!</translation> + </message> + <message> + <source>Password length needs to less than %1 character!</source> + <translation type="obsolete">密码长度需要小于%1个字符!</translation> + </message> + <message> + <source>Password cannot be made up entirely by Numbers!</source> + <translation type="obsolete">密码复杂度过低!</translation> + </message> +</context> +<context> <name>ChangeTypeDialog</name> <message> <source>Make sure that there is at least one administrator on the computer</source> @@ -2449,6 +2521,25 @@ </message> </context> <context> + <name>ChangeTypeIntelDialog</name> + <message> + <source>Change Account Type</source> + <translation type="obsolete">更改用户类型</translation> + </message> + <message> + <source>Standard users can use most software, but cannot install software and change system settings</source> + <translation type="obsolete">标准帐户可以使用大多数软件,但是不能安装软件和更改系统配置</translation> + </message> + <message> + <source>Administrators can make any changes they need</source> + <translation type="obsolete">管理员帐户可以更改任何系统配置,包括安装软件和升级软件</translation> + </message> + <message> + <source>Make sure that there is at least one administrator on the computer</source> + <translation type="obsolete">请确保该计算机上至少有一个管理员用户</translation> + </message> +</context> +<context> <name>ChangeUserLogo</name> <message> <source>System Logos</source> @@ -2674,29 +2765,14 @@ <translation>ᠨᠢᠭᠤᠴᠠ ᠺᠣᠳ᠋ᠢ᠋ ᠪᠠᠳᠤᠯᠠᠬᠤ</translation> </message> <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="172"/> - <source>Verification</source> - <translation>ᠭᠡᠷᠡᠴᠢᠯᠡᠬᠦ ᠃</translation> - </message> - <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="206"/> - <source>Password Prompt</source> - <translation>ᠨᠢᠭᠤᠴᠠ ᠨᠣᠮᠧᠷ ᠤᠨ ᠰᠠᠨᠠᠭᠤᠯᠤᠮᠵᠢ ᠃</translation> - </message> - <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="210"/> - <source>Optional(Recommended)</source> - <translation>ᠰᠣᠩᠭᠣᠬᠤ ( ᠲᠠᠨᠢᠯᠴᠠᠭᠤᠯᠬᠤ )</translation> - </message> - <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="259"/> + <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="216"/> <source>Cancel</source> <translation>ᠦᠬᠡᠢᠰᠬᠡᠬᠦ</translation> </message> <message> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="263"/> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="382"/> - <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="456"/> + <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="220"/> + <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="305"/> + <location filename="../../../plugins/account/userinfo/changeuserpwd.cpp" line="371"/> <source>Confirm</source> <translation>ᠪᠠᠳᠤᠯᠠᠬᠤ</translation> </message> @@ -2850,6 +2926,21 @@ </message> </context> <context> + <name>ChangeValidIntelDialog</name> + <message> + <source>Password Validity Setting</source> + <translation type="obsolete">密码有效期设置</translation> + </message> + <message> + <source>Current passwd validity:</source> + <translation type="obsolete">当前密码有效期至:</translation> + </message> + <message> + <source>Adjust date to:</source> + <translation type="obsolete">调整有效期至:</translation> + </message> +</context> +<context> <name>ChangtimeDialog</name> <message> <source>day</source> @@ -2980,6 +3071,25 @@ </message> </context> <context> + <name>CreateGroupIntelDialog</name> + <message> + <source>Add New Group</source> + <translation type="obsolete">ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ ᠵᠢᠨ ᠪᠦᠯᠦᠭ ᠨᠡᠮᠡᠬᠦ</translation> + </message> + <message> + <source>Group Name</source> + <translation type="obsolete">组名</translation> + </message> + <message> + <source>Group Id</source> + <translation type="obsolete">组ID</translation> + </message> + <message> + <source>Group Members</source> + <translation type="obsolete">组成员</translation> + </message> +</context> +<context> <name>CreateUserDialog</name> <message> <source>UserName</source> @@ -3132,6 +3242,61 @@ </message> </context> <context> + <name>CreateUserIntelDialog</name> + <message> + <source>Add New Account</source> + <translation type="obsolete">添加新用户</translation> + </message> + <message> + <source>Account Type</source> + <translation type="obsolete">用户类型</translation> + </message> + <message> + <source>Administrators can make any changes they need</source> + <translation type="obsolete">管理员帐户可以更改任何系统配置,包括安装软件和升级软件</translation> + </message> + <message> + <source>Password Identify</source> + <translation type="obsolete">密码确认</translation> + </message> + <message> + <source>Password length needs to more than %1 character!</source> + <translation type="obsolete">密码长度至少大于%1个字符!</translation> + </message> + <message> + <source>Password length needs to less than %1 character!</source> + <translation type="obsolete">密码长度需要小于%1个字符!</translation> + </message> + <message> + <source>The user name cannot be empty</source> + <translation type="obsolete">用户名不能为空</translation> + </message> + <message> + <source>The first character must be lowercase letters!</source> + <translation type="obsolete">首字符必须为小写字符!</translation> + </message> + <message> + <source>User name can not contain capital letters!</source> + <translation type="obsolete">用户名不能包含大写字符!</translation> + </message> + <message> + <source>The user name is already in use, please use a different one.</source> + <translation type="obsolete">用户名已存在,请换用其他用户名。</translation> + </message> + <message> + <source>User name length need to less than %1 letters!</source> + <translation type="obsolete">用户名长度需要小于%1个字符!</translation> + </message> + <message> + <source>The user name can only be composed of letters, numbers and underline!</source> + <translation type="obsolete">用户名只能由字母、数字以及下划线组成!</translation> + </message> + <message> + <source>The username is configured, please change the username</source> + <translation type="obsolete">用户配置已存在,请更换用户名</translation> + </message> +</context> +<context> <name>CreateUserNew</name> <message> <location filename="../../../plugins/account/userinfo/createusernew.cpp" line="54"/> @@ -3487,7 +3652,6 @@ <message> <source>Current Date</source> <translation type="vanished">ᠣᠳᠣᠬᠠᠨ ᠤ᠋ ᠴᠠᠭ ᠬᠤᠭᠤᠴᠠᠭᠠ</translation> - <extra-contents_path>/Date/Current Date</extra-contents_path> </message> <message> <source>Other Timezone</source> @@ -3547,7 +3711,6 @@ <message> <source>Network</source> <translation type="obsolete">网络</translation> - <extra-contents_path>/Date/Network</extra-contents_path> </message> <message> <source>Set Time</source> @@ -3557,7 +3720,6 @@ <message> <source>Set Date Manually</source> <translation type="vanished">ᠠᠦ᠋ᠲ᠋ᠣ᠋ ᠪᠤᠰᠤ ᠪᠡᠷ ᠡᠳᠦᠷ ᠰᠠᠷᠠ ᠵᠢ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠬᠤ</translation> - <extra-contents_path>/Date/Set Date Manually</extra-contents_path> </message> <message> <source>Default</source> @@ -3661,12 +3823,17 @@ <extra-contents_path>/Date/Sync Time</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="127"/> <source>Set Date Manually</source> - <translation>ᠠᠦ᠋ᠲ᠋ᠣ᠋ ᠪᠤᠰᠤ ᠪᠡᠷ ᠡᠳᠦᠷ ᠰᠠᠷᠠ ᠵᠢ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠬᠤ</translation> + <translation type="vanished">ᠠᠦ᠋ᠲ᠋ᠣ᠋ ᠪᠤᠰᠤ ᠪᠡᠷ ᠡᠳᠦᠷ ᠰᠠᠷᠠ ᠵᠢ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠬᠤ</translation> <extra-contents_path>/Date/Set Date Manually</extra-contents_path> </message> <message> + <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="127"/> + <source>Set Time Manually</source> + <translation>ᠠᠦ᠋ᠲ᠋ᠣ᠋ ᠪᠤᠰᠤ ᠪᠡᠷ ᠴᠠᠭ ᠬᠤᠭᠤᠴᠠᠭᠠ ᠵᠢ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠬᠤ</translation> + <extra-contents_path>/Date/Set Time Manually</extra-contents_path> + </message> + <message> <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="162"/> <source>Server Address</source> <translation>ᠦᠢᠯᠡᠴᠢᠯᠡᠬᠦᠷ ᠤ᠋ᠨ ᠬᠠᠶᠢᠭ</translation> @@ -3784,7 +3951,7 @@ <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="17"/> <source>DefaultAppWindow</source> <comment>Select Default Application</comment> - <translation>Select Default Application</translation> + <translation>ᠳᠤᠪ ᠳᠤᠭᠤᠢ ᠪᠠᠷ ᠬᠡᠷᠡᠭᠯᠡᠳᠡᠭ</translation> <extra-contents_path>/Defaultapp/Select Default Application</extra-contents_path> </message> <message> @@ -3824,12 +3991,13 @@ <extra-contents_path>/Defaultapp/Text Editor</extra-contents_path> </message> <message> - <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="34"/> + <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="35"/> <source>Reset default apps to system recommended apps</source> <translation>ᠠᠶᠠᠳᠠᠯ ᠬᠡᠷᠡᠭᠯᠡᠭᠡ ᠵᠢ ᠰᠢᠰᠲ᠋ᠧᠮ ᠤ᠋ᠨ ᠳᠠᠨᠢᠯᠴᠠᠭᠤᠯᠬᠤ ᠬᠡᠷᠡᠭᠯᠡᠭᠡ ᠪᠣᠯᠭᠠᠵᠤ ᠳᠠᠬᠢᠨ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠬᠤ</translation> + <extra-contents_path>/Defaultapp/Reset default apps to system recommended apps</extra-contents_path> </message> <message> - <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="35"/> + <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="36"/> <source>Reset</source> <translation>ᠳᠠᠬᠢᠨ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠬᠤ</translation> </message> @@ -3944,6 +4112,17 @@ </message> </context> <context> + <name>DelGroupIntelDialog</name> + <message> + <source>RemoveFile</source> + <translation type="obsolete">删除文件</translation> + </message> + <message> + <source>Remind</source> + <translation type="obsolete">提醒</translation> + </message> +</context> +<context> <name>DelUserDialog</name> <message> <source>Delete the user, belonging to the user's desktop, @@ -5200,38 +5379,30 @@ <context> <name>InputPwdDialog</name> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="46"/> - <source>Set Password</source> - <translation>ᠨᠢᠭᠤᠴᠠ ᠺᠤᠳ᠋ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠬᠤ</translation> - </message> - <message> - <source>Password can not be blank</source> - <translation type="vanished">密码不能为空</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="79"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="92"/> <source>Cancel</source> <translation>ᠦᠬᠡᠢᠰᠬᠡᠬᠦ</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="29"/> - <source>Set</source> - <translation>ᠰᠢᠰᠲ᠋ᠧᠮᠦ᠋ᠨ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠭᠠ</translation> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="39"/> + <source>VNC password</source> + <translation>VNC ᠨᠢᠭᠤᠴᠠ ᠺᠣᠳ᠋</translation> + </message> + <message> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="57"/> + <source>Password</source> + <translation>ᠨᠢᠭᠤᠴᠠ ᠺᠣᠳ᠋</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="62"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="75"/> <source>Must be 1-8 characters long</source> <translation>ᠤᠷᠳᠤ ᠨᠢ ᠡᠷᠬᠡᠪᠰᠢ 1-8 ᠦᠰᠦᠭ ᠳᠡᠮᠳᠡᠭ ᠪᠠᠢᠬᠤ ᠬᠡᠷᠡᠭᠳᠡᠢ</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="83"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="98"/> <source>Confirm</source> <translation>ᠪᠠᠳᠤᠯᠠᠬᠤ</translation> </message> - <message> - <source>less than or equal to 8</source> - <translation type="vanished">密码长度需要小于等于8</translation> - </message> </context> <context> <name>ItemList</name> @@ -6378,6 +6549,31 @@ </message> </context> <context> + <name>MessageBox</name> + <message> + <source>Form</source> + <translation type="obsolete">ᠹᠣᠣᠮ</translation> + </message> + <message> + <source>Reboot Now</source> + <translation type="obsolete">ᠳᠠᠷᠤᠢ ᠳᠠᠬᠢᠨ ᠡᠬᠢᠯᠡᠬᠦᠯᠬᠦ</translation> + </message> +</context> +<context> + <name>MessageBoxDialog</name> + <message> + <source>Message</source> + <translation type="obsolete">信息</translation> + </message> +</context> +<context> + <name>MessageBoxPower</name> + <message> + <source>System Recovery</source> + <translation type="obsolete">系统还原</translation> + </message> +</context> +<context> <name>MobileHotspot</name> <message> <source>MobileHotspot</source> @@ -9197,7 +9393,7 @@ <translation type="vanished">远程桌面</translation> </message> <message> - <location filename="../../../plugins/account/userinfo/userinfo.cpp" line="75"/> + <location filename="../../../plugins/account/userinfo/userinfo.cpp" line="79"/> <source>User Info</source> <translation>ᠳᠠᠩᠰᠠᠨ ᠤ᠋ ᠰᠤᠷᠠᠭ ᠵᠠᠩᠬᠢ</translation> </message> @@ -9942,6 +10138,7 @@ <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="86"/> <source>Leave lock (System will be locked when the paired phone gone)</source> <translation>ᠣᠨᠢᠰᠤᠯᠠᠯ ᠠᠴᠠ ᠰᠠᠯᠬᠤ ( ᠭᠠᠷ ᠤᠲᠠᠰᠤ ᠠᠷᠢᠯᠤᠭᠰᠠᠨ ᠤ ᠳᠠᠷᠠᠭᠠᠬᠢ ᠰᠢᠰᠲ᠋ᠧᠮ ᠢ ᠲᠣᠭᠲᠠᠭᠠᠨᠠ )</translation> + <extra-contents_path>/Screenlock/Leave lock (System will be locked when the paired phone gone)</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="95"/> @@ -9997,16 +10194,19 @@ <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="199"/> <source>Monitor Off</source> <translation>ᠦᠵᠡᠬᠦᠷ ᠢ᠋ ᠬᠠᠭᠠᠬᠤ</translation> + <extra-contents_path>/Screenlock/Monitor Off</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="201"/> <source>Screensaver</source> <translation>ᠳᠡᠯᠭᠡᠴᠡ ᠬᠠᠮᠠᠭᠠᠯᠠᠬᠤ</translation> + <extra-contents_path>/Screenlock/Screensaver</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="196"/> <source>Related Settings</source> <translation>ᠬᠠᠮᠢᠶᠠ ᠪᠦᠬᠦᠢ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠭᠠ</translation> + <extra-contents_path>/Screenlock/Related Settings</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="200"/> @@ -10239,7 +10439,7 @@ <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="40"/> <source>Screensaver</source> <translation>ᠳᠡᠯᠭᠡᠴᠡ ᠬᠠᠮᠠᠭᠠᠯᠠᠬᠤ</translation> - <extra-contents_path>/Screenlock/Screensaver</extra-contents_path> + <extra-contents_path>/Screensaver/Screensaver</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="53"/> @@ -10254,93 +10454,100 @@ <extra-contents_path>/Screensaver/Screensaver program</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="86"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="87"/> <source>Screensaver source</source> <translation>ᠳᠡᠯᠭᠡᠴᠡ ᠬᠠᠮᠠᠭᠠᠯᠠᠬᠤ ᠢᠷᠡᠯᠳᠡ</translation> + <extra-contents_path>/Screensaver/Screensaver source</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="91"/> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="449"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="92"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="455"/> <source>Select</source> <translation>ᠰᠣᠩᠭᠣᠬᠤ</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="112"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="113"/> <source>Ordinal</source> <translation>ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠵᠢᠡᠷ</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="113"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="114"/> <source>Random</source> <translation>ᠳᠠᠰᠢᠷᠠᠮ</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="119"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="121"/> <source>Random switching</source> <translation>ᠳᠠᠰᠢᠷᠠᠮ ᠵᠢᠡᠷ ᠰᠣᠯᠢᠬᠤ</translation> + <extra-contents_path>/Screensaver/Random switching</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="138"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="141"/> <source>Switching time</source> <translation>ᠳᠠᠪᠳᠠᠮᠵᠢ ᠵᠢ ᠰᠣᠯᠢᠬᠤ</translation> + <extra-contents_path>/Screensaver/Switching time</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="157"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="160"/> <source>Text(up to 30 characters):</source> <translation>ᠳᠡᠯᠭᠡᠴᠡ ᠬᠠᠮᠠᠭᠠᠯᠠᠬᠤ ᠲᠸᠺᠰᠲ ( ᠬᠠᠮᠤᠭ ᠤ᠋ᠨ ᠣᠯᠠᠨ ᠳ᠋ᠤ᠌ ᠪᠡᠨ 30 ᠦᠰᠦᠭ):</translation> + <extra-contents_path>/Screensaver/Text(up to 30 characters):</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="179"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="183"/> <source>Text position</source> <translation>ᠲᠸᠺᠰᠲ ᠤ᠋ᠨ ᠪᠠᠢᠷᠢ</translation> + <extra-contents_path>/Screensaver/Text position</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="187"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="191"/> <source>Centered</source> <translation>ᠳᠦᠪᠯᠡᠷᠡᠬᠦᠯᠬᠦ</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="188"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="192"/> <source>Randow(Bubble text)</source> <translation>ᠳᠠᠰᠢᠷᠠᠮ ( ᠬᠦᠬᠡᠰᠦ ᠲᠸᠺᠰᠲ)</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="209"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="214"/> <source>Show rest time</source> <translation>ᠠᠮᠠᠷᠠᠬᠤ ᠴᠠᠭ ᠢ᠋ ᠢᠯᠡᠷᠡᠬᠦᠯᠬᠦ</translation> + <extra-contents_path>/Screensaver/Show rest time</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="218"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="224"/> <source>Lock screen when screensaver boot</source> <translation>ᠳᠡᠯᠭᠡᠴᠡᠨ ᠤ᠋ ᠬᠠᠮᠠᠭᠠᠯᠠᠯᠳᠠ ᠵᠢ ᠡᠬᠢᠯᠡᠬᠦᠯᠬᠦ ᠦᠶᠡ ᠳ᠋ᠤ᠌ ᠳᠡᠯᠭᠡᠴᠡ ᠵᠢ ᠣᠨᠢᠰᠤᠯᠠᠬᠤ</translation> + <extra-contents_path>/Screensaver/Lock screen when screensaver boot</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="407"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="413"/> <source>Wallpaper files(*.jpg *.jpeg *.bmp *.dib *.png *.jfif *.jpe *.gif *.tif *.tiff *.wdp *.svg)</source> <translation>ᠬᠠᠨᠠᠨ ᠵᠢᠷᠤᠭ ᠤ᠋ᠨ ᠹᠠᠢᠯ (*.jpg *.jpeg *.bmp *.dib *.png *.jfif *.jpe *.gif *.tif *.tiff *.wdp *.svg)</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="448"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="454"/> <source>select custom screensaver dir</source> <translation>ᠦᠪᠡᠷᠳᠡᠭᠡᠨ ᠳᠤᠭᠳᠠᠭᠠᠬᠤ ᠳᠡᠯᠭᠡᠴᠡᠨ ᠤ᠋ ᠬᠠᠮᠠᠭᠠᠯᠠᠯᠳᠠ ᠵᠢᠨ ᠵᠢᠮ ᠢ᠋ ᠰᠣᠩᠭᠣᠬᠤ</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="450"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="456"/> <source>Position: </source> <translation>ᠪᠠᠢᠷᠢ: </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="451"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="457"/> <source>FileName: </source> <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡ: </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="452"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="458"/> <source>FileType: </source> <translation>ᠹᠠᠢᠯ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ: </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="453"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="459"/> <source>Cancel</source> <translation>ᠦᠬᠡᠢᠰᠬᠡᠬᠦ</translation> </message> @@ -10455,11 +10662,11 @@ <translation type="obsolete">触控板</translation> </message> <message> - <location filename="../../searchwidget.cpp" line="80"/> - <location filename="../../searchwidget.cpp" line="81"/> - <location filename="../../searchwidget.cpp" line="88"/> - <location filename="../../searchwidget.cpp" line="90"/> - <location filename="../../searchwidget.cpp" line="95"/> + <location filename="../../searchwidget.cpp" line="83"/> + <location filename="../../searchwidget.cpp" line="84"/> + <location filename="../../searchwidget.cpp" line="91"/> + <location filename="../../searchwidget.cpp" line="93"/> + <location filename="../../searchwidget.cpp" line="98"/> <source>No search results</source> <translation>ᠬᠠᠢᠯᠳᠠ ᠵᠢᠨ ᠦᠷᠡ ᠳ᠋ᠦᠩ ᠥᠬᠡᠢ</translation> </message> @@ -10583,242 +10790,74 @@ <context> <name>ShareMain</name> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="240"/> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="227"/> <source>Warning</source> <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠬᠦ</translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="240"/> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="227"/> <source>please select an output</source> <translation>ᠭᠠᠷᠭᠠᠬᠤ ᠳᠦᠬᠦᠬᠡᠷᠦᠮᠵᠢ ᠵᠢ ᠰᠣᠩᠭᠣᠬᠤ</translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="302"/> - <source>Input Password</source> - <translation>ᠨᠢᠭᠤᠴᠠ ᠺᠣᠳ᠋ ᠣᠷᠣᠭᠤᠯᠬᠤ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="303"/> - <source>Password</source> - <translation>密码</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="419"/> - <source>Share</source> - <translation>ᠬᠤᠪᠢᠶᠠᠯᠴᠠᠬᠤ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="473"/> - <source>Output</source> - <translation>ᠭᠠᠷᠭᠠᠬᠤ ᠃</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="485"/> - <source>Input</source> - <translation>ᠤᠷᠤᠭᠤᠯᠬᠤ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="495"/> - <source>Point</source> - <translation>ᠬᠤᠯᠤᠭᠠᠨᠴᠢᠷ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="497"/> - <source>Keyboard</source> - <translation>ᠳᠠᠷᠤᠭᠤᠯ ᠤ᠋ᠨ ᠳᠠᠪᠠᠭ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="499"/> - <source>Clipboard</source> - <translation>ᠬᠠᠢᠴᠢᠯᠠᠬᠤ ᠬᠠᠪᠳᠠᠰᠤ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="525"/> - <source>Close</source> - <translation>ᠪᠤᠴᠠᠵᠤ ᠭᠠᠷᠬᠤ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="527"/> - <source>ViewOnly</source> - <translation>ᠵᠥᠪᠬᠡᠨ ᠪᠠᠢᠴᠠᠭᠠᠨ ᠦᠵᠡᠬᠦ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="535"/> - <source>Client Setting</source> - <translation>ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ ᠵᠢᠨ ᠦᠵᠦᠬᠦᠷ ᠤ᠋ᠨ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠭᠠ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="546"/> - <source>Client Number</source> - <translation>ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ ᠵᠢᠨ ᠦᠵᠦᠬᠦᠷ ᠤ᠋ᠨ ᠲᠣᠭᠠ ᠬᠡᠮᠵᠢᠶᠡ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="560"/> - <source>Client IP:</source> - <translation>ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ ᠵᠢᠨ ᠦᠵᠦᠬᠦᠷ ᠤ᠋ᠨ IP ᠬᠠᠶᠢᠭ:</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="691"/> - <source>退出程序</source> - <translation>ᠫᠷᠣᠭ᠌ᠷᠠᠮ ᠡᠴᠡ ᠪᠤᠴᠠᠵᠤ ᠭᠠᠷᠬᠤ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="691"/> - <source>确认退出程序!</source> - <translation>ᠫᠷᠣᠭ᠌ᠷᠠᠮ ᠡᠴᠡ ᠪᠤᠴᠠᠵᠤ ᠭᠠᠷᠬᠤ ᠵᠢ ᠪᠠᠳᠤᠯᠠᠬᠤ!</translation> - </message> - <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="72"/> <source>Remote Desktop</source> - <translation type="vanished">ᠠᠯᠤᠰ ᠰᠢᠷᠡᠭᠡᠨ ᠨᠢᠭᠤᠷ</translation> + <translation>ᠠᠯᠤᠰ ᠰᠢᠷᠡᠭᠡᠨ ᠨᠢᠭᠤᠷ</translation> + <extra-contents_path>/Vino/Remote Desktop</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="76"/> <source>Connect to your desktop remotely</source> - <translation type="vanished">ᠲᠤᠰ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷᠲᠡᠢ ᠠᠯᠤᠰᠠ᠋ᠴᠠ ᠬᠣᠯᠪᠣᠬᠤ</translation> + <translation>ᠲᠤᠰ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷᠲᠡᠢ ᠠᠯᠤᠰᠠ᠋ᠴᠠ ᠬᠣᠯᠪᠣᠬᠤ</translation> <extra-contents_path>/Vino/Connect to your desktop remotely</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="81"/> <source>Allow others to connect to your desktop remotely using RDP</source> - <translation type="vanished">ᠪᠤᠰᠤᠳ ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ RDP ᠠᠯᠤᠰ ᠡᠴᠡ ᠲᠤᠰ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷᠲᠡᠢ ᠬᠣᠯᠪᠣᠬᠤᠶ᠋ᠢ ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠬᠦ</translation> + <translation>ᠪᠤᠰᠤᠳ ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ RDP ᠠᠯᠤᠰ ᠡᠴᠡ ᠲᠤᠰ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷᠲᠡᠢ ᠬᠣᠯᠪᠣᠬᠤᠶ᠋ᠢ ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠬᠦ</translation> <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using RDP</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="88"/> <source>Allow others to connect to your desktop remotely using VNC</source> - <translation type="vanished">ᠪᠤᠰᠤᠳ ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ VNC ᠠᠯᠤᠰ ᠡᠴᠡ ᠲᠤᠰ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷᠲᠡᠢ ᠬᠣᠯᠪᠣᠬᠤᠶ᠋ᠢ ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠨᠡ</translation> + <translation>ᠪᠤᠰᠤᠳ ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ VNC ᠠᠯᠤᠰ ᠡᠴᠡ ᠲᠤᠰ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷᠲᠡᠢ ᠬᠣᠯᠪᠣᠬᠤᠶ᠋ᠢ ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠨᠡ</translation> <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using VNC</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="106"/> <source>Require user to enter this password while using VNC: </source> - <translation type="vanished">VNC ᠠᠯᠤᠰ ᠴᠦᠷᠬᠡᠯᠡᠭᠡᠶ᠋ᠢ ᠬᠡᠷᠡᠭᠯᠡᠬᠦ ᠦᠶᠡᠰ ᠨᠢᠭᠤᠴᠠ ᠺᠣᠳ᠋ ᠣᠷᠣᠭᠤᠯᠬᠤ ᠴᠢᠬᠤᠯᠠᠲᠠᠢ: </translation> + <translation>VNC ᠠᠯᠤᠰ ᠴᠦᠷᠬᠡᠯᠡᠭᠡᠶ᠋ᠢ ᠬᠡᠷᠡᠭᠯᠡᠬᠦ ᠦᠶᠡᠰ ᠨᠢᠭᠤᠴᠠ ᠺᠣᠳ᠋ ᠣᠷᠣᠭᠤᠯᠬᠤ ᠴᠢᠬᠤᠯᠠᠲᠠᠢ: </translation> <extra-contents_path>/Vino/Require user to enter this password while using VNC:</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="112"/> <source>Edit</source> - <translation type="vanished">ᠨᠠᠢᠷᠠᠭᠤᠯᠬᠤ</translation> + <translation>ᠨᠠᠢᠷᠠᠭᠤᠯᠬᠤ</translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="435"/> - <source>Allow others to view your desktop</source> - <translation>ᠪᠤᠰᠤᠳ ᠬᠥᠮᠦᠨ ᠠᠯᠤᠰ ᠡᠴᠡ ᠲᠠᠨ ᠰᠢᠷᠡᠭᠡᠨ ᠨᠢᠭᠤᠷ ᠲᠤ᠌ ᠴᠥᠷᠬᠡᠯᠡᠬᠦ ᠵᠢ ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠬᠦ</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="124"/> + <source>Displays that allow remote access</source> + <translation>ᠠᠯᠤᠰ ᠠᠴᠠ ᠠᠶᠢᠯᠴᠢᠯᠠᠬᠤ ᠳᠡᠯᠭᠡᠴᠡ ᠶᠢ ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠨᠡ</translation> + <extra-contents_path>/Vino/Displays that allow remote access</extra-contents_path> </message> <message> - <source>Allow connection to control screen</source> - <translation type="vanished">ᠪᠤᠰᠤᠳ ᠬᠥᠮᠦᠨ ᠠᠯᠤᠰ ᠡᠴᠡ ᠲᠠᠨ ᠤ᠋ ᠰᠢᠷᠡᠭᠡᠨ ᠨᠢᠭᠤᠷ ᠲᠤ᠌ ᠴᠦᠷᠬᠡᠯᠡᠵᠤ᠂ ᠲᠠᠨ ᠤ᠋ ᠳᠡᠯᠭᠡᠴᠡ ᠵᠢ ᠡᠵᠡᠮᠳᠡᠬᠦ ᠵᠢ ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠬᠦ</translation> - <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="132"/> + <source>The number of remote clients allowed to connect</source> + <translation>ᠬᠣᠯᠪᠣᠭᠰᠠᠨ ᠠᠯᠤᠰ ᠠᠴᠠ ᠵᠣᠴᠢᠨ ᠡᠷᠦᠬᠡ ᠶᠢᠨ ᠲᠣᠭᠠ ᠬᠡᠮᠵᠢᠶᠡ ᠶᠢ ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠨᠡ</translation> + <extra-contents_path>/Vino/The number of remote clients allowed to connect</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="446"/> - <source>Security</source> - <translation>ᠠᠶᠤᠯᠬᠦᠢ ᠴᠢᠨᠠᠷ</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="94"/> + <source>Allow connection to control screen</source> + <translation>ᠪᠤᠰᠤᠳ ᠬᠥᠮᠦᠨ ᠠᠯᠤᠰ ᠡᠴᠡ ᠲᠠᠨ ᠤ᠋ ᠰᠢᠷᠡᠭᠡᠨ ᠨᠢᠭᠤᠷ ᠲᠤ᠌ ᠴᠦᠷᠬᠡᠯᠡᠵᠤ᠂ ᠲᠠᠨ ᠤ᠋ ᠳᠡᠯᠭᠡᠴᠡ ᠵᠢ ᠡᠵᠡᠮᠳᠡᠬᠦ ᠵᠢ ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠬᠦ</translation> + <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="100"/> <source>You must confirm every visit for this machine</source> - <translation type="vanished">ᠲᠠ ᠡᠷᠬᠡᠪᠰᠢ ᠲᠤᠰ ᠮᠠᠰᠢᠨ ᠤ᠋ ᠤᠳᠠᠭᠠ ᠪᠦᠷᠢ ᠠᠢᠯᠴᠢᠯᠠᠬᠤ ᠵᠢ ᠪᠠᠳᠤᠯᠠᠬᠤ ᠬᠡᠷᠡᠭᠳᠡᠢ</translation> + <translation>ᠲᠠ ᠡᠷᠬᠡᠪᠰᠢ ᠲᠤᠰ ᠮᠠᠰᠢᠨ ᠤ᠋ ᠤᠳᠠᠭᠠ ᠪᠦᠷᠢ ᠠᠢᠯᠴᠢᠯᠠᠬᠤ ᠵᠢ ᠪᠠᠳᠤᠯᠠᠬᠤ ᠬᠡᠷᠡᠭᠳᠡᠢ</translation> <extra-contents_path>/Vino/You must confirm every visit for this machine</extra-contents_path> </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="455"/> - <source>Require user to enter this password: </source> - <translation>ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ ᠲᠤᠰ ᠨᠢᠭᠤᠴᠠ ᠺᠣᠳ᠋ ᠢ᠋ ᠣᠷᠣᠭᠤᠯᠬᠤ ᠬᠡᠷᠡᠭᠳᠡᠢ: </translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="402"/> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="457"/> - <source>Password can not be blank</source> - <translation>ᠨᠢᠭᠤᠴᠠ ᠺᠣᠳ᠋ ᠬᠣᠭᠣᠰᠣᠨ ᠪᠠᠢᠵᠤ ᠪᠣᠯᠬᠤ ᠦᠭᠡᠢ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="395"/> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="410"/> - <source>Password length must be less than or equal to 8</source> - <translation>ᠨᠢᠭᠤᠴᠠ ᠺᠣᠳ᠋ ᠤ᠋ᠨ ᠤᠷᠳᠤ 8 ᠡᠴᠡ ᠪᠠᠭᠠ ᠪᠠᠢᠬᠤ ᠬᠡᠷᠡᠭᠳᠡᠢ</translation> - </message> - <message> - <source>Password length is greater than 8</source> - <translation type="vanished">密码长度大于8</translation> - </message> -</context> -<context> - <name>ShareMainHw</name> - <message> - <source>Warning</source> - <translation type="vanished">ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠬᠦ</translation> - </message> - <message> - <source>please select an output</source> - <translation type="vanished">ᠨᠢᠭᠡᠨ ᠭᠠᠷᠭᠠᠬᠤ ᠲᠥᠬᠥᠭᠡᠷᠦᠮᠵᠢ ᠰᠣᠩᠭᠣᠭᠠᠷᠠᠢ</translation> - </message> - <message> - <source>Input Password</source> - <translation type="vanished">ᠨᠢᠭᠤᠴᠠ ᠺᠣᠳ᠋ ᠣᠷᠣᠭᠤᠯᠬᠤ</translation> - </message> - <message> - <source>Password</source> - <translation type="vanished">ᠨᠢᠭᠤᠴᠠ ᠺᠣᠳ᠋</translation> - </message> - <message> - <source>Share</source> - <translation type="vanished">ᠬᠠᠮᠲᠤᠪᠠᠷ ᠡᠳ᠋ᠯᠡᠬᠦ</translation> - </message> - <message> - <source>Allow others to view your desktop</source> - <translation type="vanished">ᠪᠤᠰᠤᠳ ᠬᠥᠮᠦᠨ ᠲᠠᠨᠤ᠋ ᠰᠢᠷᠡᠭᠡᠨ ᠨᠢᠭᠤᠷ ᠲᠤ᠌ ᠠᠯᠤᠰᠠ᠋ᠴᠠ ᠴᠦᠷᠬᠡᠯᠡᠬᠦᠶ᠋ᠢ ᠵᠦᠪᠰᠢᠶᠡᠷᠡᠬᠦ</translation> - </message> - <message> - <source>Security</source> - <translation type="vanished">ᠠᠶᠤᠯᠭᠦᠢ</translation> - </message> - <message> - <source>Require user to enter this password: </source> - <translation type="vanished">ᠲᠤᠰ ᠨᠢᠭᠤᠴᠠ ᠺᠣᠳ᠋ᠢ᠋ ᠣᠷᠣᠭᠤᠯᠬᠤᠶ᠋ᠢ ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢᠪᠡᠷ ᠱᠠᠭᠠᠷᠳᠠᠬᠤ: </translation> - </message> - <message> - <source>Output</source> - <translation type="vanished">ᠭᠠᠷᠭᠠᠬᠤ</translation> - </message> - <message> - <source>Input</source> - <translation type="vanished">ᠣᠷᠣᠭᠤᠯᠬᠤ</translation> - </message> - <message> - <source>Point</source> - <translation type="vanished">ᠮᠠᠦ᠋ᠰ</translation> - </message> - <message> - <source>Keyboard</source> - <translation type="vanished">ᠳᠠᠷᠤᠭᠤᠯ ᠤ᠋ᠨ ᠲᠠᠪᠠᠭ</translation> - </message> - <message> - <source>Clipboard</source> - <translation type="vanished">ᠬᠠᠢᠴᠢᠯᠠᠮᠠᠯ ᠬᠠᠪᠲᠠᠰᠤ</translation> - </message> - <message> - <source>Close</source> - <translation type="vanished">ᠬᠠᠭᠠᠬᠤ</translation> - </message> - <message> - <source>ViewOnly</source> - <translation type="vanished">ᠵᠥᠪᠬᠡᠨ ᠪᠠᠢᠴᠠᠭᠠᠨ ᠦᠵᠡᠬᠦ</translation> - </message> - <message> - <source>Client Setting</source> - <translation type="vanished">ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢᠶ᠋ᠢᠨ ᠦᠵᠦᠭᠦᠷᠦ᠋ᠨ ᠪᠠᠢᠷᠢᠯᠠᠭᠤᠯᠤᠯᠲᠠ</translation> - </message> - <message> - <source>Client Number</source> - <translation type="vanished">ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢᠶ᠋ᠢᠨ ᠦᠵᠦᠭᠦᠷᠦ᠋ᠨ ᠲᠣᠭᠠ</translation> - </message> - <message> - <source>Client IP:</source> - <translation type="vanished">ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢᠶ᠋ᠢᠨ ᠦᠵᠦᠭᠦᠷᠦ᠋ᠨ IP ᠬᠠᠶᠢᠭ :</translation> - </message> - <message> - <source>退出程序</source> - <translation type="vanished">ᠪᠤᠴᠠᠬᠤ ᠫᠷᠤᠭ᠌ᠷᠠᠮ</translation> - </message> - <message> - <source>确认退出程序!</source> - <translation type="vanished">ᠪᠤᠴᠠᠬᠤ ᠫᠷᠤᠭ᠌ᠷᠠᠮᠢ᠋ ᠪᠠᠳᠤᠯᠠᠬᠤ !</translation> - </message> </context> <context> <name>Shortcut</name> @@ -10959,7 +10998,7 @@ <message> <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="366"/> <source>Use</source> - <translation>ᠬᠡᠷᠡᠭᠯᠡᠬᠦ</translation> + <translation type="vanished">ᠬᠡᠷᠡᠭᠯᠡᠬᠦ</translation> </message> <message> <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="326"/> @@ -10998,11 +11037,7 @@ <translation>“%1” ᠨᠢᠭᠡᠨᠲᠡ ᠬᠥᠨᠵᠢᠯᠡ ᠳᠡᠢ᠌ᠯ“ %2”ᠡᠵᠡᠯᠡᠨ ᠬᠡᠷᠡᠭᠯᠡᠪᠡᠯ ᠂ ᠦᠷᠭᠦᠯᠵᠢᠯᠡᠨ ᠲᠤᠰ ᠴᠢᠳᠠᠮᠵᠢ ᠶᠢ ᠲᠦᠷᠭᠡᠨ ᠳᠠᠷᠤᠭᠤᠯ ᠦᠭᠡᠢ ᠪᠣᠯᠭᠠᠨ.</translation> </message> <message> - <source>Shortcut "%1" occuied, please change the key combination.</source> - <translation type="vanished">“%1”ᠰᠢᠰᠲ᠋ᠧᠮ ᠦᠨ ᠲᠦᠷᠭᠡᠨ ᠳᠠᠷᠤᠭᠤᠯ ᠦᠯᠡᠳᠡᠭᠡᠬᠦ ᠶᠢᠨ ᠲᠥᠯᠥᠭᠡ ᠳᠠᠷᠤᠭᠤᠯ ᠤᠨ ᠨᠡᠶᠢᠯᠡᠯ ᠢ ᠥᠭᠡᠷᠡᠴᠢᠯᠡᠬᠦ ᠪᠣᠯᠪᠠᠤ</translation> - </message> - <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="1023"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="660"/> <source> or </source> <translation> ᠡᠰᠡᠬᠦᠯᠡ </translation> </message> @@ -12452,26 +12487,6 @@ <translation type="vanished">更改账户类型需要注销后生效,是否注销?</translation> </message> <message> - <source>Forgot password</source> - <translation type="vanished">ᠨᠢᠭᠤᠴᠠ ᠨᠣᠮᠧᠷ ᠢᠶᠠᠨ ᠮᠠᠷᠲᠠ</translation> - </message> - <message> - <source>Confirm</source> - <translation type="vanished">ᠬᠠᠰᠤᠬᠤ</translation> - </message> - <message> - <source>Answer the security questions to reset password</source> - <translation type="vanished">ᠠᠮᠤᠷ ᠲᠦᠪᠰᠢᠨ ᠦ ᠠᠰᠠᠭᠤᠳᠠᠯ ᠢ ᠬᠠᠷᠢᠭᠤᠯᠬᠤ ᠨᠢᠭᠤᠴᠠ ᠨᠣᠮᠧᠷ ᠢ ᠳᠠᠬᠢᠨ ᠲᠣᠬᠢᠷᠠᠭᠤᠯᠤᠨᠠ</translation> - </message> - <message> - <source>One or more answers are incorrect</source> - <translation type="vanished">ᠨᠢᠭᠡ ᠪᠤᠶᠤ ᠣᠯᠠᠨ ᠬᠠᠷᠢᠭᠤᠯᠲᠠ ᠪᠤᠷᠤᠭᠤ</translation> - </message> - <message> - <source>Reset password</source> - <translation type="vanished">ᠨᠢᠭᠤᠴᠠ ᠺᠣᠳ᠋ᠢ᠋ ᠳᠠᠬᠢᠨ ᠲᠣᠬᠢᠷᠠᠭᠤᠯᠬᠤ</translation> - </message> - <message> <location filename="../../../plugins/account/userinfo/userinfo.cpp" line="1014"/> <source>The account type of “%1” has been modified, will take effect after logout, whether to logout?</source> <translation>“%1” ᠳᠠᠩᠰᠠᠨ ᠤ᠋ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ ᠨᠢᠭᠡᠨᠳᠡ ᠵᠠᠰᠠᠭᠳᠠᠪᠠ᠂ ᠰᠢᠰᠲ᠋ᠧᠮ ᠢ᠋ ᠳᠠᠩᠰᠠᠨ ᠡᠴᠡ ᠬᠠᠰᠤᠭᠰᠠᠨ ᠤ᠋ ᠳᠠᠷᠠᠭᠠ ᠬᠦᠴᠦᠨ ᠲᠠᠢ ᠪᠣᠯᠤᠨᠠ᠂ ᠰᠢᠰᠲ᠋ᠧᠮ ᠢ᠋ ᠳᠠᠩᠰᠠᠨ ᠡᠴᠡ ᠬᠠᠰᠤᠬᠤ ᠤᠤ ?</translation> @@ -12809,54 +12824,6 @@ </message> </context> <context> - <name>VinoUi</name> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="15"/> - <source>Remote Desktop</source> - <translation>ᠠᠯᠤᠰ ᠰᠢᠷᠡᠭᠡᠨ ᠨᠢᠭᠤᠷ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="17"/> - <source>Connect to your desktop remotely</source> - <translation>ᠲᠤᠰ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷᠲᠡᠢ ᠠᠯᠤᠰᠠ᠋ᠴᠠ ᠬᠣᠯᠪᠣᠬᠤ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="20"/> - <source>Allow others to connect to your desktop remotely using RDP</source> - <translation>ᠪᠤᠰᠤᠳ ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ RDP ᠠᠯᠤᠰ ᠡᠴᠡ ᠲᠤᠰ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷᠲᠡᠢ ᠬᠣᠯᠪᠣᠬᠤᠶ᠋ᠢ ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠬᠦ</translation> - <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using RDP</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="23"/> - <source>Allow others to connect to your desktop remotely using VNC</source> - <translation>ᠪᠤᠰᠤᠳ ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ VNC ᠠᠯᠤᠰ ᠡᠴᠡ ᠲᠤᠰ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷᠲᠡᠢ ᠬᠣᠯᠪᠣᠬᠤᠶ᠋ᠢ ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠨᠡ</translation> - <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using VNC</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="26"/> - <source>Allow connection to control screen</source> - <translation>ᠪᠤᠰᠤᠳ ᠬᠥᠮᠦᠨ ᠠᠯᠤᠰ ᠡᠴᠡ ᠲᠠᠨ ᠤ᠋ ᠰᠢᠷᠡᠭᠡᠨ ᠨᠢᠭᠤᠷ ᠲᠤ᠌ ᠴᠦᠷᠬᠡᠯᠡᠵᠤ᠂ ᠲᠠᠨ ᠤ᠋ ᠳᠡᠯᠭᠡᠴᠡ ᠵᠢ ᠡᠵᠡᠮᠳᠡᠬᠦ ᠵᠢ ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠬᠦ</translation> - <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="28"/> - <source>You must confirm every visit for this machine</source> - <translation>ᠲᠠ ᠡᠷᠬᠡᠪᠰᠢ ᠲᠤᠰ ᠮᠠᠰᠢᠨ ᠤ᠋ ᠤᠳᠠᠭᠠ ᠪᠦᠷᠢ ᠠᠢᠯᠴᠢᠯᠠᠬᠤ ᠵᠢ ᠪᠠᠳᠤᠯᠠᠬᠤ ᠬᠡᠷᠡᠭᠳᠡᠢ</translation> - <extra-contents_path>/Vino/You must confirm every visit for this machine</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="30"/> - <source>Require user to enter this password: </source> - <translation>ᠲᠤᠰ ᠨᠢᠭᠤᠴᠠ ᠺᠣᠳ᠋ᠢ᠋ ᠣᠷᠣᠭᠤᠯᠬᠤᠶ᠋ᠢ ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢᠪᠡᠷ ᠱᠠᠭᠠᠷᠳᠠᠬᠤ ᠄ </translation> - <extra-contents_path>/Vino/Require user to enter this password:</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="39"/> - <source>Edit</source> - <translation>ᠨᠠᠢᠷᠠᠭᠤᠯᠬᠤ</translation> - </message> -</context> -<context> <name>Vpn</name> <message> <source>Add Vpn Connect</source> @@ -13112,7 +13079,6 @@ <message> <source>Night Mode</source> <translation type="vanished">ᠦᠩᠭᠡ ᠵᠢᠨ ᠳᠤᠯᠠᠭᠠᠴᠠ</translation> - <extra-contents_path>/Display/Night Mode</extra-contents_path> </message> <message> <source>Open</source> @@ -13135,7 +13101,6 @@ <message> <source>Color Temperature</source> <translation type="vanished">ᠳᠡᠯᠭᠡᠴᠡᠨ ᠤ᠋ ᠦᠩᠭᠡ ᠵᠢᠨ ᠳᠤᠯᠠᠭᠠᠴᠠ</translation> - <extra-contents_path>/Display/Color Temperature</extra-contents_path> </message> <message> <location filename="../../../plugins/system/display/widget.cpp" line="315"/> @@ -13152,7 +13117,6 @@ <translation type="vanished">ᠳᠠᠷᠠᠭᠠ ᠨᠢ ᠳᠡᠯᠭᠡᠴᠡᠨᠦ᠌ ᠥᠩᠭᠡᠶ᠋ᠢᠨ ᠳᠤᠯᠠᠭᠠᠨᠢ᠋ ᠲᠤᠶᠠᠭᠠᠨᠳ᠋ᠤ᠌ ᠵᠣᠬᠢᠴᠠᠭᠤᠯᠤᠭᠠᠳ ᠳᠡᠯᠭᠡᠴᠡᠶ᠋ᠢᠨ ᠴᠡᠩᠬᠡᠷ ᠭᠡᠷᠡᠯᠢ᠋ ᠪᠠᠭᠤᠷᠠᠭᠤᠯᠤᠭᠠᠷᠠᠢ.</translation> </message> <message> - <location filename="../../../plugins/system/display/widget.cpp" line="309"/> <source>Color Temperature And Eye Care</source> <translation>ᠬᠠᠷᠠ ᠨᠢᠳᠦ</translation> <extra-contents_path>/Display/Color Temperature And Eye Care</extra-contents_path> @@ -13515,7 +13479,6 @@ <message> <location filename="../../../plugins/system/display/widget.cpp" line="1676"/> <location filename="../../../plugins/system/display/widget.cpp" line="1985"/> - <location filename="../../../plugins/system/display_hw/widget.cpp" line="1945"/> <source>please insure at least one output!</source> <translation>ᠠᠳᠠᠭ ᠲᠤ᠌ ᠪᠡᠨ ᠨᠢᠭᠡ ᠳᠡᠯᠭᠡᠴᠡ ᠨᠡᠬᠡᠬᠡᠭᠰᠡᠨ ᠪᠠᠢᠬᠤ ᠵᠢ ᠪᠠᠳᠤᠯᠠᠭᠠᠷᠠᠢ !</translation> </message> @@ -13523,8 +13486,6 @@ <location filename="../../../plugins/system/display/widget.cpp" line="1676"/> <location filename="../../../plugins/system/display/widget.cpp" line="1683"/> <location filename="../../../plugins/system/display/widget.cpp" line="1985"/> - <location filename="../../../plugins/system/display_hw/widget.cpp" line="1642"/> - <location filename="../../../plugins/system/display_hw/widget.cpp" line="1945"/> <source>Warning</source> <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠬᠦ</translation> </message> @@ -13547,7 +13508,6 @@ </message> <message> <location filename="../../../plugins/system/display/widget.cpp" line="1684"/> - <location filename="../../../plugins/system/display_hw/widget.cpp" line="1653"/> <source>Sorry, your configuration could not be applied. Common reasons are that the overall screen size is too big, or you enabled more displays than supported by your GPU.</source> <translation>ᠠᠭᠤᠴᠢᠯᠠᠭᠠᠷᠠᠢ᠂ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠭᠠ ᠵᠢ ᠬᠡᠷᠡᠭᠯᠡᠵᠤ ᠪᠣᠯᠬᠤ ᠥᠬᠡᠢ.</translation> diff -Nru ukui-control-center-5.0.0.0/shell/res/i18n/ug.ts ukui-control-center-5.0.0.0/shell/res/i18n/ug.ts --- ukui-control-center-5.0.0.0/shell/res/i18n/ug.ts 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/shell/res/i18n/ug.ts 2025-02-07 16:27:50.000000000 +0800 @@ -321,104 +321,107 @@ <context> <name>AboutUi</name> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="31"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="32"/> <source>System Summary</source> <translation>سىستېما خۇلاسە</translation> + <extra-contents_path>/About/System Summary</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="33"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="35"/> <source>Privacy and agreement</source> <translation>مەخپىيەتلىك ۋە كېلىشىم</translation> + <extra-contents_path>/About/Privacy and agreement</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="35"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="37"/> <source>Support</source> <translation>قوللاش</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="49"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="376"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="51"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="381"/> <source>Version</source> <translation>نەشرى</translation> <extra-contents_path>/About/version</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="54"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="56"/> <source>Version Number</source> <translation>نەشر نومۇرى</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="59"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="61"/> <source>Patch Version</source> <translation>سىستېما يامىقىنىڭ نەشر نومۇرى</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="64"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="66"/> <source>Installed Date</source> <translation>قاچىلانغان ۋاقتى</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="69"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="71"/> <source>Upgrade Date</source> <translation>يېڭىلاش ۋاقتى</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="75"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="78"/> <source>HostName</source> <translation>كومپيۇتېر نامى</translation> + <extra-contents_path>/About/HostName</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="87"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="378"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="90"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="383"/> <source>Kernel</source> <translation>Kernel</translation> <extra-contents_path>/About/Kernel</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="92"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="380"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="95"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="385"/> <source>CPU</source> <translation>CPU</translation> <extra-contents_path>/About/CPU</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="97"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="382"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="100"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="387"/> <source>Memory</source> <translation>ئىچكى ساقلىغۇچ</translation> <extra-contents_path>/About/Memory</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="102"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="105"/> <source>Disk</source> <translation>دىسكاز</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="107"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="384"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="110"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="389"/> <source>Desktop</source> <translation>ئۈستەلئۈستى</translation> <extra-contents_path>/About/Desktop</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="112"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="386"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="115"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="391"/> <source>User</source> <translation>ئىشلەتكۈچى</translation> <extra-contents_path>/About/User</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="120"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="123"/> <source>Copyright ©%1 %2. All rights reserved.</source> <translation>نەشر ھوقۇقى©%1 %2. بارلىق ھوقۇق ماقامى.</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="169"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="172"/> <source>openKylin</source> <translation>openKylin</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="166"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="169"/> <source>KylinSoft</source> <translation>KylinSoft</translation> </message> @@ -427,64 +430,67 @@ <translation type="vanished">Copyright ©2022 ٪ 1. بارلىق ھوقۇق ماقامى.</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="232"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="235"/> <source>Wechat code scanning obtains HP professional technical support</source> <translation>ئۈندىدار كودىنى سىكاننېرلاش HP كەسپىي تېخنىكا جەھەتتىن قوللاشقا ئېرىشتى</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="233"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="236"/> <source>See more about Kylin Tianqi edu platform</source> <translation>Kylin Tianqi edu سۇپىسى ھەققىدە تەپسىلى مەلۇمات</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="253"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="256"/> <source>Learn more HP user manual>></source> <translation>HP ئىشلەتكۈچى قوللانمىسىنى تېخىمۇ كۆپ بىلىۋېلىڭ>></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="258"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="261"/> <source>See user manual>></source> <translation>قوللانما قوللانمىسىغا قاراڭ>></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="336"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="339"/> <source>Send optional diagnostic data</source> <translation>ئىختىيارىي دىياگنوز سانلىق مەلۇماتى يوللاش</translation> + <extra-contents_path>/About/Send optional diagnostic data</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="337"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="340"/> <source>By sending us diagnostic data, improve the system experience and solve your problems faster</source> <translation>دىياگنوز سانلىق مەلۇماتىنى بىزگە يوللاش ئارقىلىق، سىستېما تەجرىبىسىنى يۇقىرى كۆتۈرۈپ، مەسىلىلەرنى تېخىمۇ تېز ھەل قىلىش</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="359"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="363"/> <source><<Protocol>></source> <translation>«سىناپ ئىشلىتىشتە جاۋابكارلىقتىن كەچۈرۈم قىلىش كېلىشىمى»</translation> + <extra-contents_path>/About/<<Protocol>></extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="360"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="364"/> <source>and</source> <translation>ۋە</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="361"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="366"/> <source><<Privacy>></source> <translation>«ئابونتلار مەخپىيەتلىك كېلىشىمى»</translation> + <extra-contents_path>/About/<<Privacy>></extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="388"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="393"/> <source>Status</source> <translation>ھالەت</translation> <extra-contents_path>/About/Status</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="390"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="395"/> <source>Active</source> <translation>ئاكتىپ</translation> <extra-contents_path>/About/Active</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="391"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="396"/> <source>Serial</source> <translation>قاتار</translation> </message> @@ -724,7 +730,7 @@ <message> <location filename="../../../plugins/devices/shortcut/addshortcutdialog.cpp" line="224"/> <source>Desktop files(*.desktop)</source> - <translation>桌面文件(*.desktop)</translation> + <translation>ئۈستەل يۈزى ھۆججەتلىرى(*.desktop)</translation> </message> <message> <location filename="../../../plugins/devices/shortcut/addshortcutdialog.cpp" line="265"/> @@ -1362,26 +1368,26 @@ <location filename="../../../plugins/time-language/area/areaui.cpp" line="45"/> <source>Short Foramt Date</source> <translation>قىسقا Foramt ۋاقتى</translation> - <extra-contents_path>/Area/Date</extra-contents_path> + <extra-contents_path>/Area/Short Foramt Date</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="46"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="47"/> <source>Long Format Date</source> <translation>ئۇزۇن فورمات ۋاقتى</translation> + <extra-contents_path>/Area/Long Format Date</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="48"/> <source>Date</source> - <translation>چېسلا</translation> + <translation type="vanished">چېسلا</translation> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="52"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="50"/> <source>Time</source> <translation>ۋاقتىدا</translation> <extra-contents_path>/Area/Time</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="65"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="63"/> <source>Language Format</source> <translation>تىل شەكلى</translation> <extra-contents_path>/Area/Language Format</extra-contents_path> @@ -1416,7 +1422,7 @@ <message> <location filename="../../../plugins/application/autoboot/autoboot.cpp" line="293"/> <source>Desktop files(*.desktop)</source> - <translation>桌面文件(*.desktop)</translation> + <translation>ئۈستەل يۈزى ھۆججەتلىرى(*.desktop)</translation> </message> <message> <location filename="../../../plugins/application/autoboot/autoboot.cpp" line="301"/> @@ -3983,12 +3989,17 @@ <extra-contents_path>/Date/Sync Time</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="127"/> <source>Set Date Manually</source> - <translation>ۋاقتىنى قولدا بەلگىلەش</translation> + <translation type="vanished">ۋاقتىنى قولدا بەلگىلەش</translation> <extra-contents_path>/Date/Set Date Manually</extra-contents_path> </message> <message> + <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="127"/> + <source>Set Time Manually</source> + <translation type="unfinished"></translation> + <extra-contents_path>/Date/Set Time Manually</extra-contents_path> + </message> + <message> <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="162"/> <source>Server Address</source> <translation>مۇلازىمىتېر ئادرېسى</translation> @@ -4138,9 +4149,10 @@ <extra-contents_path>/Defaultapp/Text Editor</extra-contents_path> </message> <message> - <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="34"/> + <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="35"/> <source>Reset default apps to system recommended apps</source> <translation>سىستېما تەۋسىيە قىلىنغان ئەپلەرگە كۆڭۈلدىكى ئەپلەرنى قايتا بېكىتىش</translation> + <extra-contents_path>/Defaultapp/Reset default apps to system recommended apps</extra-contents_path> </message> <message> <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="35"/> @@ -5496,38 +5508,30 @@ <context> <name>InputPwdDialog</name> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="46"/> - <source>Set Password</source> - <translation>پارول بەلگىلەش</translation> - </message> - <message> - <source>Password can not be blank</source> - <translation type="vanished">密码不能为空</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="79"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="92"/> <source>Cancel</source> <translation>ئەمەلدىن قالدۇرۇش</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="29"/> - <source>Set</source> - <translation>بەلگىلەش</translation> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="39"/> + <source>VNC password</source> + <translation type="unfinished"></translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="62"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="57"/> + <source>Password</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="75"/> <source>Must be 1-8 characters long</source> <translation>چوقۇم ئۇزۇنلۇقى 1-8 ھەرپ</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="83"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="98"/> <source>Confirm</source> <translation>جەزىملەشتۈرۈش</translation> </message> - <message> - <source>less than or equal to 8</source> - <translation type="vanished">密码长度需要小于等于8</translation> - </message> </context> <context> <name>ItemList</name> @@ -6569,10 +6573,10 @@ <translation type="vanished">设置</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="443"/> - <location filename="../../mainwindow.cpp" line="461"/> - <location filename="../../mainwindow.cpp" line="596"/> - <location filename="../../mainwindow.cpp" line="954"/> + <location filename="../../mainwindow.cpp" line="441"/> + <location filename="../../mainwindow.cpp" line="459"/> + <location filename="../../mainwindow.cpp" line="591"/> + <location filename="../../mainwindow.cpp" line="949"/> <source>Settings</source> <translation>تەڭشەكلەر</translation> </message> @@ -6581,7 +6585,7 @@ <translation type="vanished">ئاساسلىق تىزىملىك</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="482"/> + <location filename="../../mainwindow.cpp" line="480"/> <source>Minimize</source> <translation>كىچىكلىتىش</translation> </message> @@ -6590,7 +6594,7 @@ <translation type="vanished">最大化/正常</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="154"/> + <location filename="../../mainwindow.cpp" line="152"/> <source>Warnning</source> <translation>ئاگاھلاندۇرۇش</translation> </message> @@ -6599,8 +6603,8 @@ <translation type="vanished">نورمال</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="175"/> - <location filename="../../mainwindow.cpp" line="483"/> + <location filename="../../mainwindow.cpp" line="173"/> + <location filename="../../mainwindow.cpp" line="481"/> <source>Maximize</source> <translation>ئەڭ چوڭ چەككە</translation> </message> @@ -6609,47 +6613,44 @@ <translation type="obsolete">开始菜单</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="172"/> + <location filename="../../mainwindow.cpp" line="170"/> <source>Restore</source> <translation>ئەسلىگە كەلتۈرۈش</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="455"/> + <location filename="../../mainwindow.cpp" line="453"/> <source>Back home</source> <translation>يۇرتىغا قايتىش</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="481"/> + <location filename="../../mainwindow.cpp" line="479"/> <source>Option</source> <translation>تاللانما</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="484"/> + <location filename="../../mainwindow.cpp" line="482"/> <source>Close</source> <translation>ياپ</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="584"/> <source>Help</source> - <translation>ياردەم</translation> + <translation type="vanished">ياردەم</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="586"/> <source>About</source> - <translation>ھەققىدە</translation> + <translation type="vanished">ھەققىدە</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="588"/> <source>Exit</source> - <translation>چىقىش ئېغىزى</translation> + <translation type="vanished">چىقىش ئېغىزى</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="597"/> + <location filename="../../mainwindow.cpp" line="592"/> <source>Version: </source> <translation>نەشرى: </translation> </message> <message> - <location filename="../../mainwindow.cpp" line="736"/> + <location filename="../../mainwindow.cpp" line="731"/> <source>Specified</source> <translation>بەلگىلەنگەن</translation> </message> @@ -6658,13 +6659,13 @@ <translation type="vanished">控制面板</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="1086"/> + <location filename="../../mainwindow.cpp" line="1082"/> <source>Warning</source> <translation>دىققەت</translation> </message> <message> - <location filename="../../mainwindow.cpp" line="154"/> - <location filename="../../mainwindow.cpp" line="1086"/> + <location filename="../../mainwindow.cpp" line="152"/> + <location filename="../../mainwindow.cpp" line="1082"/> <source>This function has been controlled</source> <translation>بۇ فۇنكسىيە كونترول قىلىندى</translation> </message> @@ -7337,10 +7338,6 @@ <translation type="vanished">ئېكران قۇلۇپىدا ئۇچۇر كۆرسىتىش</translation> </message> <message> - <source>Show noticfication on screenlock</source> - <translation type="vanished">ئېكران قۇلۇپىدا دېققىتنى كۆرسىتىش</translation> - </message> - <message> <source>Notification Style</source> <translation type="vanished">ئۇقتۇرۇش ئۇسلۇبى</translation> </message> @@ -7368,22 +7365,10 @@ <translation type="vanished">ئاۋارە قىلماسلىق ئەندىزىسى</translation> </message> <message> - <source>(Notification banners, prompts will be hidden, and notification sounds will be muted)</source> - <translation type="vanished">(ئۇقتۇرۇش بايرىقى، ئەسكەرتمە يوشۇرۇنىدۇ، ئۇقتۇرۇش ئاۋازلىرى ئاۋازسىزلىنىدۇ)</translation> - </message> - <message> <source>Get notifications from the app</source> <translation type="vanished">ئەپتىن ئۇقتۇرۇش ئېلىش</translation> </message> <message> - <source>Automatically turn on</source> - <translation type="vanished">ئاپتۇماتىك ئېچىلىدۇ</translation> - </message> - <message> - <source>to</source> - <translation type="vanished">تو</translation> - </message> - <message> <source>Automatically turn on when multiple screens are connected</source> <translation type="vanished">كۆپ ئېكران ئۇلانغاندا ئاپتوماتىك ئېچىلىدۇ</translation> </message> @@ -9312,7 +9297,7 @@ <translation>قىسقا يولنى تەڭشەش</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="463"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="472"/> <source>Edit Shortcut</source> <translation>قىسقارتىلما يولنى تەھرىرلەش</translation> </message> @@ -10151,78 +10136,82 @@ <extra-contents_path>/Screenlock/Show picture of screenlock on screenlogin</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="43"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="44"/> <source>Leave lock (System will be locked when the paired phone gone)</source> <translation>قۇلۇپنى قالدۇرۇپ قويۇش (بىر جۈپ يانفون يوقاپ كەتكەندە سىستېما قۇلۇپلىنىدۇ)</translation> + <extra-contents_path>/Screenlock/Leave lock (System will be locked when the paired phone gone)</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="44"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="45"/> <source>Specified device</source> <translation>بەلگىلەنگەن ئۈسكۈنە</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="45"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="46"/> <source>No paired phone. Please turn to 'Bluetooth' to pair.</source> <translation>جۈپ تىلفۇن يوق 'كۆكچىش' نى قوشۇۋېلىپ قوشۇڭ.</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="65"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="66"/> <source>Screenlock</source> <translation>ئېكران قۇلۇپى</translation> <extra-contents_path>/Screenlock/Screenlock</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="95"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="96"/> <source>Local Pictures</source> <translation>يەرلىك رەسىملەر</translation> <extra-contents_path>/Screenlock/Local Pictures</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="97"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="98"/> <source>Online Pictures</source> <translation>توردىكى رەسىملەر</translation> <extra-contents_path>/Screenlock/Online Pictures</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="99"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="100"/> <source>Reset To Default</source> <translation>سۈكۈتكە قايتاي</translation> <extra-contents_path>/Screenlock/Reset To Default</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="111"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="112"/> <source>Bluetooth</source> <translation>كۆكچىش</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="116"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="117"/> <source>No bluetooth adapter detected, can not use Leave Lock.</source> <translation>كۆكچىش ماسلاشتۇرغۇچ بايقالمىدى، Leave Lock نى ئىشلەتكىلى بولمايدۇ.</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="134"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="136"/> <source>Monitor Off</source> <translation>كۆزەتكۈچنى ئۆچۈرۈش</translation> + <extra-contents_path>/Screenlock/Monitor Off</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="135"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="138"/> <source>Screensaver</source> - <translation>ئېكران كۆرگەزمىچى</translation> + <translation>ئېكران قوغداش</translation> + <extra-contents_path>/Screenlock/Screensaver</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="137"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="141"/> <source>Related Settings</source> <translation>مۇناسىۋەتلىك تەڭشەكلەر</translation> + <extra-contents_path>/Screenlock/Related Settings</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="143"/> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="144"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="147"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="148"/> <source>Set</source> <translation>بەلگىلەش</translation> </message> <message> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="159"/> - <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="526"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="163"/> + <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="530"/> <source>Please select device</source> <translation>ئۈسكۈنىنى تاللاڭ</translation> </message> @@ -10459,93 +10448,100 @@ <extra-contents_path>/Screensaver/Screensaver program</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="86"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="87"/> <source>Screensaver source</source> <translation>ئېكران يۈزى مەنبەسى</translation> + <extra-contents_path>/Screensaver/Screensaver source</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="91"/> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="449"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="92"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="455"/> <source>Select</source> <translation>تاللاش</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="112"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="113"/> <source>Ordinal</source> <translation>ئوردىدا</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="113"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="114"/> <source>Random</source> <translation>ئىختىيارىي</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="119"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="121"/> <source>Random switching</source> <translation>خالىغانچە ئالماشتۇرۇش</translation> + <extra-contents_path>/Screensaver/Random switching</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="138"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="141"/> <source>Switching time</source> <translation>ئالماشتۇرۇش ۋاقتى</translation> + <extra-contents_path>/Screensaver/Switching time</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="157"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="160"/> <source>Text(up to 30 characters):</source> <translation>تېكىست(ئەڭ كۆپ بولغاندا 30 ھەرپ):</translation> + <extra-contents_path>/Screensaver/Text(up to 30 characters):</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="179"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="183"/> <source>Text position</source> <translation>تېكىست ئورنى</translation> + <extra-contents_path>/Screensaver/Text position</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="187"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="191"/> <source>Centered</source> <translation>مەركەز قىلىنغان</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="188"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="192"/> <source>Randow(Bubble text)</source> <translation>رانۋېر (كۆپۈكچە تېكىست)</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="209"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="214"/> <source>Show rest time</source> <translation>ئارام ئېلىش ۋاقتىنى كۆرسىتىش</translation> + <extra-contents_path>/Screensaver/Show rest time</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="218"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="224"/> <source>Lock screen when screensaver boot</source> <translation>ئېكراننى كۆزنەك تاقاشتا ئېكراننى قۇلۇپلاش</translation> + <extra-contents_path>/Screensaver/Lock screen when screensaver boot</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="407"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="413"/> <source>Wallpaper files(*.jpg *.jpeg *.bmp *.dib *.png *.jfif *.jpe *.gif *.tif *.tiff *.wdp *.svg)</source> <translation>تام قەغىزى ھۆججەتلىرى(*.jpg *.jpeg *.bmp *.dib *.png *.jfif *.jpe *.gif *.tif *.tiff *.wdp *.svg)</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="448"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="454"/> <source>select custom screensaver dir</source> <translation>خاس ئېكران كۆرگۈچ dir نى تاللاش</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="450"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="456"/> <source>Position: </source> <translation>ئورنى: </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="451"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="457"/> <source>FileName: </source> <translation>ھۆججەت نامى: </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="452"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="458"/> <source>FileType: </source> <translation>:ھۆججەت تۈرى </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="453"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="459"/> <source>Cancel</source> <translation>ئەمەلدىن قالدۇرۇش</translation> </message> @@ -10660,11 +10656,11 @@ <translation type="obsolete">触控板</translation> </message> <message> - <location filename="../../searchwidget.cpp" line="80"/> - <location filename="../../searchwidget.cpp" line="81"/> - <location filename="../../searchwidget.cpp" line="88"/> - <location filename="../../searchwidget.cpp" line="90"/> - <location filename="../../searchwidget.cpp" line="95"/> + <location filename="../../searchwidget.cpp" line="83"/> + <location filename="../../searchwidget.cpp" line="84"/> + <location filename="../../searchwidget.cpp" line="91"/> + <location filename="../../searchwidget.cpp" line="93"/> + <location filename="../../searchwidget.cpp" line="98"/> <source>No search results</source> <translation>ئىزدەش نەتىجىسى يوق</translation> </message> @@ -10788,198 +10784,74 @@ <context> <name>ShareMain</name> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="240"/> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="227"/> <source>Warning</source> <translation>دىققەت</translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="240"/> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="227"/> <source>please select an output</source> <translation>چىقىرىشنى تاللاڭ</translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="302"/> - <source>Input Password</source> - <translation>ئىم كىرگۈزۈش</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="303"/> - <source>Password</source> - <translation>ئىم</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="419"/> - <source>Share</source> - <translation>تەڭ بەھرىمان بولۇش</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="473"/> - <source>Output</source> - <translation>چىقىرىش</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="485"/> - <source>Input</source> - <translation>كىرگۈزۈش</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="495"/> - <source>Point</source> - <translation>نۇقتا</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="497"/> - <source>Keyboard</source> - <translation>كۇنۇپكا تاختىسى</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="499"/> - <source>Clipboard</source> - <translation>قىسقۇچ تاختىسى</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="525"/> - <source>Close</source> - <translation>ياپ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="527"/> - <source>ViewOnly</source> - <translation>كۆرۈش ئايرىم-ئايرىم ھالدا</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="535"/> - <source>Client Setting</source> - <translation>خېرىدار تەڭشىكى</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="72"/> + <source>Remote Desktop</source> + <translation>يىراق ئۈستەلئۈستى</translation> + <extra-contents_path>/Vino/Remote Desktop</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="546"/> - <source>Client Number</source> - <translation>خېرىدار نومۇرى</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="76"/> + <source>Connect to your desktop remotely</source> + <translation type="unfinished">ئۈستەل ئۈستىڭىزگە يىراقتىن ئۇلاش</translation> + <extra-contents_path>/Vino/Connect to your desktop remotely</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="560"/> - <source>Client IP:</source> - <translation>خېرىدار IP:</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="81"/> + <source>Allow others to connect to your desktop remotely using RDP</source> + <translation type="unfinished">RDP ئارقىلىق باشقىلارنىڭ ئۈستەل ئۈستىڭىزگە يىراقتىن ئۇلىشىغا يول قويۇش</translation> + <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using RDP</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="691"/> - <source>退出程序</source> - <translation>退出程序</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="88"/> + <source>Allow others to connect to your desktop remotely using VNC</source> + <translation type="unfinished">VNC ئارقىلىق باشقىلارنىڭ ئۈستەل ئۈستىڭىزگە يىراقتىن ئۇلىشىغا يول قويۇش</translation> + <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using VNC</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="691"/> - <source>确认退出程序!</source> - <translation>确认退出程序!</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="106"/> + <source>Require user to enter this password while using VNC: </source> + <translation type="unfinished"></translation> + <extra-contents_path>/Vino/Require user to enter this password while using VNC:</extra-contents_path> </message> <message> - <source>Remote Desktop</source> - <translation type="vanished">يىراق ئۈستەلئۈستى</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="112"/> + <source>Edit</source> + <translation type="unfinished">تەھرىرلەش</translation> </message> <message> - <source>Edit</source> - <translation type="obsolete">تەھرىرلەش</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="124"/> + <source>Displays that allow remote access</source> + <translation type="unfinished"></translation> + <extra-contents_path>/Vino/Displays that allow remote access</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="435"/> - <source>Allow others to view your desktop</source> - <translation>باشقىلارنىڭ ئۈستەلئۈستىڭىزنى كۆرۈشىگە يول قويۇش</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="132"/> + <source>The number of remote clients allowed to connect</source> + <translation type="unfinished"></translation> + <extra-contents_path>/Vino/The number of remote clients allowed to connect</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="94"/> <source>Allow connection to control screen</source> - <translation type="vanished">ئۇلاش ئارقىلىق ئېكراننى كونتىرول قىلىش</translation> + <translation>ئۇلاش ئارقىلىق ئېكراننى كونتىرول قىلىش</translation> <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="446"/> - <source>Security</source> - <translation>بىخەتەرلىك</translation> - </message> - <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="100"/> <source>You must confirm every visit for this machine</source> - <translation type="vanished">سىز چوقۇم بۇ ماشىنىنىڭ ھەر بىر زىيارەتنى جەزملەشتۈرۈشىڭىز كېرەك.</translation> + <translation>سىز چوقۇم بۇ ماشىنىنىڭ ھەر بىر زىيارەتنى جەزملەشتۈرۈشىڭىز كېرەك.</translation> <extra-contents_path>/Vino/You must confirm every visit for this machine</extra-contents_path> </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="455"/> - <source>Require user to enter this password: </source> - <translation>ئىشلەتكۈچىدىن بۇ مەخپىي شىفىرنى كىرگۈزۈشنى تەلەپ قىلىش: </translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="402"/> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="457"/> - <source>Password can not be blank</source> - <translation>پارولنى بوش قويغىلى بولمايدۇ</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="395"/> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="410"/> - <source>Password length must be less than or equal to 8</source> - <translation>مەخپىي نومۇرنىڭ ئۇزۇنلۇقى چوقۇم 8 دىن تۆۋەن ياكى تەڭ بولۇشى كېرەك</translation> - </message> - <message> - <source>Password length is greater than 8</source> - <translation type="vanished">密码长度大于8</translation> - </message> -</context> -<context> - <name>ShareMainHw</name> - <message> - <source>please select an output</source> - <translation type="obsolete">چىقىرىشنى تاللاڭ</translation> - </message> - <message> - <source>Input Password</source> - <translation type="obsolete">ئىم كىرگۈزۈش</translation> - </message> - <message> - <source>Share</source> - <translation type="obsolete">تەڭ بەھرىمان بولۇش</translation> - </message> - <message> - <source>Allow others to view your desktop</source> - <translation type="obsolete">باشقىلارنىڭ ئۈستەلئۈستىڭىزنى كۆرۈشىگە يول قويۇش</translation> - </message> - <message> - <source>Security</source> - <translation type="obsolete">بىخەتەرلىك</translation> - </message> - <message> - <source>Require user to enter this password: </source> - <translation type="obsolete">ئىشلەتكۈچىدىن بۇ مەخپىي شىفىرنى كىرگۈزۈشنى تەلەپ قىلىش: </translation> - </message> - <message> - <source>Point</source> - <translation type="obsolete">نۇقتا</translation> - </message> - <message> - <source>Clipboard</source> - <translation type="obsolete">قىسقۇچ تاختىسى</translation> - </message> - <message> - <source>ViewOnly</source> - <translation type="obsolete">كۆرۈش ئايرىم-ئايرىم ھالدا</translation> - </message> - <message> - <source>Client Setting</source> - <translation type="obsolete">خېرىدار تەڭشىكى</translation> - </message> - <message> - <source>Client Number</source> - <translation type="obsolete">خېرىدار نومۇرى</translation> - </message> - <message> - <source>Client IP:</source> - <translation type="obsolete">خېرىدار IP:</translation> - </message> - <message> - <source>退出程序</source> - <translation type="obsolete">退出程序</translation> - </message> - <message> - <source>确认退出程序!</source> - <translation type="obsolete">确认退出程序!</translation> - </message> </context> <context> <name>Shortcut</name> @@ -11067,53 +10939,65 @@ <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="81"/> <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="98"/> <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="102"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="171"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="260"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="180"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="269"/> <source>Null</source> <translation>يوق</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="221"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="353"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="230"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="362"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="605"/> <source>Cancel</source> <translation>ئەمەلدىن قالدۇرۇش</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="222"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="354"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="231"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="363"/> <source>Use</source> <translation>ئىشلىتىش</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="223"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="355"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="232"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="364"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="607"/> <source>Shortcut key conflict, use it?</source> <translation>قىسقا يول ئاچقۇچ توقۇنۇشى، ئىشلىتەمسىز؟</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="224"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="356"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="233"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="365"/> <source>%1 occuied, using this combination will invalidate %2</source> <translation>٪1 قوشۇلدى، بۇ بىرىكمە ئارقىلىق ٪2 ئىناۋەتسىز بولىدۇ</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="247"/> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="386"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="256"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="395"/> <source>Shortcut "%1" occuied, please change the key combination</source> <translation>قىسقا يول «٪1» نى ئۆزگەرتىڭ، كونۇپكا بىرىكمىسىنى ئالماشتۇرۇڭ</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="438"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="447"/> <source>Edit</source> <translation>تەھرىرلەش</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="439"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="448"/> <source>Delete</source> <translation>ئۆچۈر</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="598"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="606"/> + <source>Continue</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="608"/> + <source>"%1" occuied, using this combination will invalidate "%2".</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="648"/> <source> or </source> <translation> ياكى </translation> </message> @@ -12922,54 +12806,6 @@ </message> </context> <context> - <name>VinoUi</name> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="15"/> - <source>Remote Desktop</source> - <translation>يىراق ئۈستەلئۈستى</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="17"/> - <source>Connect to your desktop remotely</source> - <translation>ئۈستەلئۈستىڭىزگە يىراقتىن ئۇلاش</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="20"/> - <source>Allow others to connect to your desktop remotely using RDP</source> - <translation>RDP ئارقىلىق باشقىلارنىڭ ئۈستەلئۈستىڭىزگە يىراقتىن ئۇلىشىغا يول قويۇش</translation> - <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using RDP</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="23"/> - <source>Allow others to connect to your desktop remotely using VNC</source> - <translation>VNC ئارقىلىق باشقىلارنىڭ ئۈستەلئۈستىڭىزگە يىراقتىن ئۇلىشىغا يول قويۇش</translation> - <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using VNC</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="26"/> - <source>Allow connection to control screen</source> - <translation>ئۇلاش ئارقىلىق ئېكراننى كونتىرول قىلىش</translation> - <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="28"/> - <source>You must confirm every visit for this machine</source> - <translation>سىز چوقۇم بۇ ماشىنىنىڭ ھەر بىر زىيارەتنى جەزملەشتۈرۈشىڭىز كېرەك.</translation> - <extra-contents_path>/Vino/You must confirm every visit for this machine</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="30"/> - <source>Require user to enter this password: </source> - <translation>ئىشلەتكۈچىدىن بۇ مەخپىي شىفىرنى كىرگۈزۈشنى تەلەپ قىلىش: </translation> - <extra-contents_path>/Vino/Require user to enter this password:</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="39"/> - <source>Edit</source> - <translation>تەھرىرلەش</translation> - </message> -</context> -<context> <name>Vpn</name> <message> <source>Add Vpn Connect</source> diff -Nru ukui-control-center-5.0.0.0/shell/res/i18n/zh_CN.ts ukui-control-center-5.0.0.0/shell/res/i18n/zh_CN.ts --- ukui-control-center-5.0.0.0/shell/res/i18n/zh_CN.ts 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/shell/res/i18n/zh_CN.ts 2025-02-07 16:27:50.000000000 +0800 @@ -341,7 +341,7 @@ <context> <name>AboutInterface</name> <message> - <location filename="../../../registeredSession/plugins/about/aboutinterface.cpp" line="226"/> + <location filename="../../../registeredSession/plugins/about/aboutinterface.cpp" line="233"/> <source>avaliable</source> <translation>可用</translation> </message> @@ -349,94 +349,97 @@ <context> <name>AboutUi</name> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="31"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="32"/> <source>System Summary</source> <translation>系统概述</translation> + <extra-contents_path>/About/System Summary</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="33"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="35"/> <source>Privacy and agreement</source> <translation>隐私和协议</translation> + <extra-contents_path>/About/Privacy and agreement</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="35"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="37"/> <source>Support</source> <translation>支持</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="49"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="376"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="51"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="381"/> <source>Version</source> <translation>版本名称</translation> <extra-contents_path>/About/version</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="54"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="56"/> <source>Version Number</source> <translation>版本号</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="59"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="61"/> <source>Patch Version</source> <translation>系统补丁版本号</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="64"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="66"/> <source>Installed Date</source> <translation>安装日期</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="69"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="71"/> <source>Upgrade Date</source> <translation>系统更新时间</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="75"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="78"/> <source>HostName</source> <translation>计算机名</translation> + <extra-contents_path>/About/HostName</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="87"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="378"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="90"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="383"/> <source>Kernel</source> <translation>内核</translation> <extra-contents_path>/About/Kernel</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="92"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="380"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="95"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="385"/> <source>CPU</source> <translation>CPU</translation> <extra-contents_path>/About/CPU</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="97"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="382"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="100"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="387"/> <source>Memory</source> <translation>内存</translation> <extra-contents_path>/About/Memory</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="102"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="105"/> <source>Disk</source> <translation>硬盘</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="107"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="384"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="110"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="389"/> <source>Desktop</source> <translation>桌面</translation> <extra-contents_path>/About/Desktop</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="112"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="386"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="115"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="391"/> <source>User</source> <translation>用户名</translation> <extra-contents_path>/About/User</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="120"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="123"/> <source>Copyright ©%1 %2. All rights reserved.</source> <translation>版权所有 © %1 %2. 保留所有权利。</translation> </message> @@ -449,12 +452,12 @@ <translation type="vanished">版权所有 © %1 %2. 保留所有权利。</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="169"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="172"/> <source>openKylin</source> <translation>openKylin</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="166"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="169"/> <source>KylinSoft</source> <translation>麒麟软件</translation> </message> @@ -463,66 +466,70 @@ <translation type="vanished">版权所有 © 2020 麒麟软件 保留所有权利。</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="232"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="235"/> <source>Wechat code scanning obtains HP professional technical support</source> <translation>微信扫码获得HP专业技术支持</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="233"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="236"/> <source>See more about Kylin Tianqi edu platform</source> <translation>查看麒麟天启教育平台更多信息</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="253"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="256"/> <source>Learn more HP user manual>></source> <translation>了解更多 Hp用户手册>></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="258"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="261"/> <source>See user manual>></source> <translation>查看用户手册</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="336"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="339"/> <source>Send optional diagnostic data</source> <translation>发送可选诊断数据</translation> + <extra-contents_path>/About/Send optional diagnostic data</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="337"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="340"/> <source>By sending us diagnostic data, improve the system experience and solve your problems faster</source> <translation>通过向我们发送诊断数据,提升系统体验以及更快的解决你的问题</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="359"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="363"/> <source><<Protocol>></source> <translation>《试用免责协议》</translation> + <extra-contents_path>/About/<<Protocol>></extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="360"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="364"/> <source>and</source> <translation>和</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="361"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="366"/> <source><<Privacy>></source> - <translation>《隐私与声明》</translation> + <translation>《用户隐私协议》</translation> + <extra-contents_path>/About/<<Privacy>></extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="388"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="393"/> <source>Status</source> <translation>系统状态</translation> <extra-contents_path>/About/Status</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="390"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="395"/> <source>Active</source> <translation>激活</translation> <extra-contents_path>/About/Active</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="391"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="397"/> <source>Serial</source> <translation>序列号</translation> + <extra-contents_path>/About/Serial</extra-contents_path> </message> </context> <context> @@ -1044,7 +1051,6 @@ <message> <source>Current Region</source> <translation type="vanished">显示日期、时间和货币格式的区域</translation> - <extra-contents_path>/Area/Current Region</extra-contents_path> </message> <message> <source>First Day Of The Week</source> @@ -1063,7 +1069,6 @@ <message> <source>Date</source> <translation type="vanished">日期</translation> - <extra-contents_path>/Area/Date</extra-contents_path> </message> <message> <source>Time</source> @@ -1449,41 +1454,41 @@ <extra-contents_path>/Area/First Day Of Week</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="46"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="47"/> <source>Long Format Date</source> <translation>日期长格式</translation> + <extra-contents_path>/Area/Long Format Date</extra-contents_path> </message> <message> <location filename="../../../plugins/time-language/area/areaui.cpp" line="45"/> <source>Short Foramt Date</source> <translation>日期短格式</translation> - <extra-contents_path>/Area/Date</extra-contents_path> + <extra-contents_path>/Area/Short Foramt Date</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="48"/> <source>Date</source> <translation>时间日期</translation> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="52"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="50"/> <source>Time</source> <translation>时间</translation> <extra-contents_path>/Area/Time</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="65"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="63"/> <source>Language Format</source> <translation>语言格式</translation> <extra-contents_path>/Area/Language Format</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="76"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="74"/> <source>Language Format Example</source> <translation>语言格式示例</translation> <extra-contents_path>/Area/Language Format Example</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="105"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="103"/> <source>System Language</source> <translation>系统语言</translation> <extra-contents_path>/Area/System Language</extra-contents_path> @@ -3914,7 +3919,6 @@ <message> <source>Current Date</source> <translation type="vanished">当前时间</translation> - <extra-contents_path>/Date/Current Date</extra-contents_path> </message> <message> <source>Other Timezone</source> @@ -3974,7 +3978,6 @@ <message> <source>Network</source> <translation type="obsolete">网络</translation> - <extra-contents_path>/Date/Network</extra-contents_path> </message> <message> <source>Set Time</source> @@ -3984,7 +3987,6 @@ <message> <source>Set Date Manually</source> <translation type="vanished">手动设置日期</translation> - <extra-contents_path>/Date/Set Date Manually</extra-contents_path> </message> <message> <source>Default</source> @@ -4072,10 +4074,14 @@ <extra-contents_path>/Date/Sync Time</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="127"/> <source>Set Date Manually</source> - <translation>手动设置日期</translation> - <extra-contents_path>/Date/Set Date Manually</extra-contents_path> + <translation type="vanished">手动设置日期</translation> + </message> + <message> + <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="127"/> + <source>Set Time Manually</source> + <translation>手动设置时间</translation> + <extra-contents_path>/Date/Set Time Manually</extra-contents_path> </message> <message> <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="162"/> @@ -4229,12 +4235,13 @@ <extra-contents_path>/Defaultapp/Text Editor</extra-contents_path> </message> <message> - <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="34"/> + <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="35"/> <source>Reset default apps to system recommended apps</source> <translation>将默认应用重置为系统推荐应用</translation> + <extra-contents_path>/Defaultapp/Reset default apps to system recommended apps</extra-contents_path> </message> <message> - <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="35"/> + <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="36"/> <source>Reset</source> <translation>重置</translation> </message> @@ -5693,31 +5700,39 @@ <context> <name>InputPwdDialog</name> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="46"/> <source>Set Password</source> - <translation>设置密码</translation> + <translation type="vanished">设置密码</translation> </message> <message> <source>Password can not be blank</source> <translation type="vanished">密码不能为空</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="79"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="92"/> <source>Cancel</source> <translation>取消</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="29"/> <source>Set</source> - <translation>系统设置</translation> + <translation type="vanished">系统设置</translation> + </message> + <message> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="39"/> + <source>VNC password</source> + <translation>VNC 密码</translation> + </message> + <message> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="57"/> + <source>Password</source> + <translation>密码</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="62"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="75"/> <source>Must be 1-8 characters long</source> <translation>长度必须为1-8个字符</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="83"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="98"/> <source>Confirm</source> <translation>确定</translation> </message> @@ -9798,7 +9813,7 @@ <translation type="vanished">远程桌面</translation> </message> <message> - <location filename="../../../plugins/account/userinfo/userinfo.cpp" line="75"/> + <location filename="../../../plugins/account/userinfo/userinfo.cpp" line="79"/> <source>User Info</source> <translation>账户信息</translation> </message> @@ -10506,6 +10521,7 @@ <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="86"/> <source>Leave lock (System will be locked when the paired phone gone)</source> <translation>动态锁 (系统将在已配对的蓝牙手机离开时自动锁定屏幕)</translation> + <extra-contents_path>/Screenlock/Leave lock (System will be locked when the paired phone gone)</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="95"/> @@ -10561,16 +10577,19 @@ <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="199"/> <source>Monitor Off</source> <translation>关闭显示器</translation> + <extra-contents_path>/Screenlock/Monitor Off</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="201"/> <source>Screensaver</source> <translation>屏幕保护</translation> + <extra-contents_path>/Screenlock/Screensaver</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="196"/> <source>Related Settings</source> <translation>相关设置</translation> + <extra-contents_path>/Screenlock/Related Settings</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="200"/> @@ -10803,7 +10822,7 @@ <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="40"/> <source>Screensaver</source> <translation>屏保</translation> - <extra-contents_path>/Screenlock/Screensaver</extra-contents_path> + <extra-contents_path>/Screensaver/Screensaver</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="53"/> @@ -10818,93 +10837,100 @@ <extra-contents_path>/Screensaver/Screensaver program</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="86"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="87"/> <source>Screensaver source</source> <translation>屏保来源</translation> + <extra-contents_path>/Screensaver/Screensaver source</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="91"/> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="449"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="92"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="455"/> <source>Select</source> <translation>选择</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="112"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="113"/> <source>Ordinal</source> <translation>按顺序</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="113"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="114"/> <source>Random</source> <translation>随机</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="119"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="121"/> <source>Random switching</source> <translation>随机切换</translation> + <extra-contents_path>/Screensaver/Random switching</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="138"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="141"/> <source>Switching time</source> <translation>切换频率</translation> + <extra-contents_path>/Screensaver/Switching time</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="157"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="160"/> <source>Text(up to 30 characters):</source> <translation>屏保文本(最多 30 个字):</translation> + <extra-contents_path>/Screensaver/Text(up to 30 characters):</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="179"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="183"/> <source>Text position</source> <translation>文本位置</translation> + <extra-contents_path>/Screensaver/Text position</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="187"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="191"/> <source>Centered</source> <translation>居中</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="188"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="192"/> <source>Randow(Bubble text)</source> <translation>随机(气泡文本)</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="209"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="214"/> <source>Show rest time</source> <translation>显示休息时间</translation> + <extra-contents_path>/Screensaver/Show rest time</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="218"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="224"/> <source>Lock screen when screensaver boot</source> <translation>激活屏保时锁定屏幕</translation> + <extra-contents_path>/Screensaver/Lock screen when screensaver boot</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="407"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="413"/> <source>Wallpaper files(*.jpg *.jpeg *.bmp *.dib *.png *.jfif *.jpe *.gif *.tif *.tiff *.wdp *.svg)</source> <translation>壁纸文件(*.jpg *.jpeg *.bmp *.dib *.png *.jfif *.jpe *.gif *.tif *.tiff *.wdp *.svg)</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="448"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="454"/> <source>select custom screensaver dir</source> <translation>选择自定义屏保路径</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="450"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="456"/> <source>Position: </source> <translation>位置: </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="451"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="457"/> <source>FileName: </source> <translation>文件名: </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="452"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="458"/> <source>FileType: </source> <translation>文件类型: </translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="453"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="459"/> <source>Cancel</source> <translation>取消</translation> </message> @@ -11019,11 +11045,11 @@ <translation type="obsolete">触控板</translation> </message> <message> - <location filename="../../searchwidget.cpp" line="80"/> - <location filename="../../searchwidget.cpp" line="81"/> - <location filename="../../searchwidget.cpp" line="88"/> - <location filename="../../searchwidget.cpp" line="90"/> - <location filename="../../searchwidget.cpp" line="95"/> + <location filename="../../searchwidget.cpp" line="83"/> + <location filename="../../searchwidget.cpp" line="84"/> + <location filename="../../searchwidget.cpp" line="91"/> + <location filename="../../searchwidget.cpp" line="93"/> + <location filename="../../searchwidget.cpp" line="98"/> <source>No search results</source> <translation>无搜索结果</translation> </message> @@ -11147,135 +11173,74 @@ <context> <name>ShareMain</name> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="240"/> - <source>Warning</source> - <translation>警告</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="240"/> - <source>please select an output</source> - <translation>请选择一个输出设备</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="302"/> - <source>Input Password</source> - <translation>输入密码</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="303"/> - <source>Password</source> - <translation>密码</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="419"/> - <source>Share</source> - <translation>共享</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="473"/> - <source>Output</source> - <translation>输出</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="485"/> - <source>Input</source> - <translation>输入</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="495"/> - <source>Point</source> - <translation>鼠标</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="497"/> - <source>Keyboard</source> - <translation>键盘</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="76"/> + <source>Connect to your desktop remotely</source> + <translation>远程连接这台电脑</translation> + <extra-contents_path>/Vino/Connect to your desktop remotely</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="499"/> - <source>Clipboard</source> - <translation>剪切板</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="81"/> + <source>Allow others to connect to your desktop remotely using RDP</source> + <translation>允许其他用户使用RDP远程连接这台电脑</translation> + <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using RDP</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="525"/> - <source>Close</source> - <translation>关闭</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="88"/> + <source>Allow others to connect to your desktop remotely using VNC</source> + <translation>允许其他用户使用VNC远程连接这台电脑</translation> + <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using VNC</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="527"/> - <source>ViewOnly</source> - <translation>仅查看</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="106"/> + <source>Require user to enter this password while using VNC: </source> + <translation>使用 VNC 远程连接时需要输入密码:</translation> + <extra-contents_path>/Vino/Require user to enter this password while using VNC:</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="535"/> - <source>Client Setting</source> - <translation>客户端配置</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="112"/> + <source>Edit</source> + <translation>编辑</translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="546"/> - <source>Client Number</source> - <translation>客户端数量</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="124"/> + <source>Displays that allow remote access</source> + <translation>允许远程访问的显示器</translation> + <extra-contents_path>/Vino/Displays that allow remote access</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="560"/> - <source>Client IP:</source> - <translation>客户端IP地址:</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="132"/> + <source>The number of remote clients allowed to connect</source> + <translation>允许连接的远程客户端数量</translation> + <extra-contents_path>/Vino/The number of remote clients allowed to connect</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="691"/> - <source>退出程序</source> - <translation type="unfinished"></translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="227"/> + <source>Warning</source> + <translation>警告</translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="691"/> - <source>确认退出程序!</source> - <translation type="unfinished"></translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="227"/> + <source>please select an output</source> + <translation>请选择一个输出设备</translation> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="72"/> <source>Remote Desktop</source> - <translation type="vanished">远程桌面</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="435"/> - <source>Allow others to view your desktop</source> - <translation>允许其他人远程连接您的桌面</translation> + <translation>远程桌面</translation> + <extra-contents_path>/Vino/Remote Desktop</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="94"/> <source>Allow connection to control screen</source> - <translation type="vanished">允许其他人远程连接您的桌面并控制您的屏幕</translation> + <translation>允许其他人远程连接您的桌面并控制您的屏幕</translation> <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="446"/> - <source>Security</source> - <translation>安全</translation> - </message> - <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="100"/> <source>You must confirm every visit for this machine</source> - <translation type="vanished">您必须为本机机器确认每次访问</translation> + <translation>您必须为本机机器确认每次访问</translation> <extra-contents_path>/Vino/You must confirm every visit for this machine</extra-contents_path> </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="455"/> - <source>Require user to enter this password: </source> - <translation>要求用户输入此密码: </translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="402"/> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="457"/> - <source>Password can not be blank</source> - <translation>密码不能为空</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="395"/> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="410"/> - <source>Password length must be less than or equal to 8</source> - <translation>密码长度需小于等于8</translation> - </message> - <message> - <source>Password length is greater than 8</source> - <translation type="vanished">密码长度大于8</translation> - </message> </context> <context> <name>Shortcut</name> @@ -11399,7 +11364,7 @@ <message> <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="366"/> <source>Use</source> - <translation>使用</translation> + <translation type="vanished">使用</translation> </message> <message> <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="326"/> @@ -11413,7 +11378,6 @@ <translation>%1已被占用,使用该组合会使“%2”无按键组合</translation> </message> <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="442"/> <source>Shortcut "%1" occuied, please change the key combination</source> <translation>快捷键“%1”已被系统占用,请更改按键组合</translation> </message> @@ -11438,11 +11402,7 @@ <translation>“%1”已被“ %2”占用,继续将使该功能无快捷键。</translation> </message> <message> - <source>Shortcut "%1" occuied, please change the key combination.</source> - <translation type="vanished">“%1”为系统保留快捷键,请更改按键组合。</translation> - </message> - <message> - <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="1023"/> + <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="660"/> <source> or </source> <translation> 或 </translation> </message> @@ -13048,7 +13008,6 @@ </message> <message> <location filename="../../../plugins/account/userinfo/userinfo.ui" line="331"/> - <location filename="../../../plugins/account/userinfo/userinfo.cpp" line="206"/> <source>Type</source> <translation>账户类型</translation> <extra-contents_path>/Userinfo/Type</extra-contents_path> @@ -13217,58 +13176,6 @@ </message> </context> <context> - <name>VinoUi</name> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="15"/> - <source>Remote Desktop</source> - <translation>远程桌面</translation> - </message> - <message> - <source>Allow others to view your desktop</source> - <translation type="vanished">允许其他人远程连接您的桌面</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="17"/> - <source>Connect to your desktop remotely</source> - <translation>远程连接你的桌面</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="20"/> - <source>Allow others to connect to your desktop remotely using RDP</source> - <translation>允许其他人使用RDP远程连接你的桌面</translation> - <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using RDP</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="23"/> - <source>Allow others to connect to your desktop remotely using VNC</source> - <translation>允许其他人使用VNC远程连接你的桌面</translation> - <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using VNC</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="26"/> - <source>Allow connection to control screen</source> - <translation>允许其他人远程连接您的桌面并控制您的屏幕</translation> - <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="28"/> - <source>You must confirm every visit for this machine</source> - <translation>您必须为本机机器确认每次访问</translation> - <extra-contents_path>/Vino/You must confirm every visit for this machine</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="30"/> - <source>Require user to enter this password: </source> - <translation>要求用户输入此密码: </translation> - <extra-contents_path>/Vino/Require user to enter this password:</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="39"/> - <source>Edit</source> - <translation>编辑</translation> - </message> -</context> -<context> <name>Vpn</name> <message> <source>Add Vpn Connect</source> @@ -13504,7 +13411,6 @@ <message> <source>Night Mode</source> <translation type="vanished">色温</translation> - <extra-contents_path>/Display/Night Mode</extra-contents_path> </message> <message> <source>Open</source> @@ -13537,7 +13443,6 @@ <message> <source>Color Temperature</source> <translation type="vanished">色温</translation> - <extra-contents_path>/Display/Color Temperature</extra-contents_path> </message> <message> <source>When turned on, it can reduce blue light to prevent eye, the screen will turn yellow.</source> diff -Nru ukui-control-center-5.0.0.0/shell/res/i18n/zh_HK.ts ukui-control-center-5.0.0.0/shell/res/i18n/zh_HK.ts --- ukui-control-center-5.0.0.0/shell/res/i18n/zh_HK.ts 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/shell/res/i18n/zh_HK.ts 2025-02-07 16:27:50.000000000 +0800 @@ -334,7 +334,7 @@ <context> <name>AboutInterface</name> <message> - <location filename="../../../registeredSession/plugins/about/aboutinterface.cpp" line="226"/> + <location filename="../../../registeredSession/plugins/about/aboutinterface.cpp" line="233"/> <source>avaliable</source> <translation>可用</translation> </message> @@ -342,94 +342,97 @@ <context> <name>AboutUi</name> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="31"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="32"/> <source>System Summary</source> <translation>系統概述</translation> + <extra-contents_path>/About/System Summary</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="33"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="35"/> <source>Privacy and agreement</source> <translation>隱私和協定</translation> + <extra-contents_path>/About/Privacy and agreement</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="35"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="37"/> <source>Support</source> <translation>支援</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="49"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="376"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="51"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="381"/> <source>Version</source> <translation>版本名稱</translation> <extra-contents_path>/About/version</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="54"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="56"/> <source>Version Number</source> <translation>版本號</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="59"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="61"/> <source>Patch Version</source> <translation>系統補丁版本號</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="64"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="66"/> <source>Installed Date</source> <translation>安裝日期</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="69"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="71"/> <source>Upgrade Date</source> <translation>系統更新時間</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="75"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="78"/> <source>HostName</source> <translation>計算機名</translation> + <extra-contents_path>/About/HostName</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="87"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="378"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="90"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="383"/> <source>Kernel</source> <translation>內核</translation> <extra-contents_path>/About/Kernel</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="92"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="380"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="95"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="385"/> <source>CPU</source> <translation>CPU</translation> <extra-contents_path>/About/CPU</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="97"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="382"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="100"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="387"/> <source>Memory</source> <translation>記憶體</translation> <extra-contents_path>/About/Memory</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="102"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="105"/> <source>Disk</source> <translation>硬碟</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="107"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="384"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="110"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="389"/> <source>Desktop</source> <translation>桌面</translation> <extra-contents_path>/About/Desktop</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="112"/> - <location filename="../../../plugins/system/about/aboutui.cpp" line="386"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="115"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="391"/> <source>User</source> <translation>使用者名</translation> <extra-contents_path>/About/User</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="120"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="123"/> <source>Copyright ©%1 %2. All rights reserved.</source> <translation>版權所有 © %1 %2. 保留所有權利.</translation> </message> @@ -438,12 +441,12 @@ <translation type="vanished">版權所有 © %1 %2. 麒麟軟件 保留所有權利.</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="169"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="172"/> <source>openKylin</source> <translation>開放麒麟</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="166"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="169"/> <source>KylinSoft</source> <translation>麒麟軟件</translation> </message> @@ -452,66 +455,70 @@ <translation type="vanished">版權所有 ©2022 %1 保留所有權利.</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="232"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="235"/> <source>Wechat code scanning obtains HP professional technical support</source> <translation>微信掃碼獲得HP專業技術支援</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="233"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="236"/> <source>See more about Kylin Tianqi edu platform</source> <translation>查看麒麟天啟教育平臺更多資訊</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="253"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="256"/> <source>Learn more HP user manual>></source> <translation>瞭解更多 Hp用戶手冊>></translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="258"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="261"/> <source>See user manual>></source> <translation>查看使用者手冊</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="336"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="339"/> <source>Send optional diagnostic data</source> <translation>發送可選診斷數據</translation> + <extra-contents_path>/About/Send optional diagnostic data</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="337"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="340"/> <source>By sending us diagnostic data, improve the system experience and solve your problems faster</source> <translation>通過向我們發送診斷數據,提升系統體驗以及更快的解決你的問題</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="359"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="363"/> <source><<Protocol>></source> <translation>《試用免責協定》</translation> + <extra-contents_path>/About/<<Protocol>></extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="360"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="364"/> <source>and</source> <translation>和</translation> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="361"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="366"/> <source><<Privacy>></source> - <translation>《隱私與聲明》</translation> + <translation>《用戶隱私協定》</translation> + <extra-contents_path>/About/<<Privacy>></extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="388"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="393"/> <source>Status</source> <translation>狀態</translation> <extra-contents_path>/About/Status</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="390"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="395"/> <source>Active</source> <translation>啟動</translation> <extra-contents_path>/About/Active</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/about/aboutui.cpp" line="391"/> + <location filename="../../../plugins/system/about/aboutui.cpp" line="397"/> <source>Serial</source> <translation>序列號</translation> + <extra-contents_path>/About/Serial</extra-contents_path> </message> </context> <context> @@ -1488,38 +1495,38 @@ <location filename="../../../plugins/time-language/area/areaui.cpp" line="45"/> <source>Short Foramt Date</source> <translation>短日期格式</translation> - <extra-contents_path>/Area/Date</extra-contents_path> + <extra-contents_path>/Area/Short Foramt Date</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="46"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="47"/> <source>Long Format Date</source> <translation>日期長格式</translation> + <extra-contents_path>/Area/Long Format Date</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="48"/> <source>Date</source> - <translation>日期</translation> + <translation type="vanished">日期</translation> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="52"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="50"/> <source>Time</source> <translation>時間</translation> <extra-contents_path>/Area/Time</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="65"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="63"/> <source>Language Format</source> <translation>語言格式</translation> <extra-contents_path>/Area/Language Format</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="76"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="74"/> <source>Language Format Example</source> <translation>語言格式示例</translation> <extra-contents_path>/Area/Language Format Example</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/area/areaui.cpp" line="105"/> + <location filename="../../../plugins/time-language/area/areaui.cpp" line="103"/> <source>System Language</source> <translation>系統語言</translation> <extra-contents_path>/Area/System Language</extra-contents_path> @@ -3963,7 +3970,6 @@ <message> <source>Current Date</source> <translation type="vanished">當前時間</translation> - <extra-contents_path>/Date/Current Date</extra-contents_path> </message> <message> <source>Other Timezone</source> @@ -4127,10 +4133,14 @@ <extra-contents_path>/Date/Sync Time</extra-contents_path> </message> <message> - <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="127"/> <source>Set Date Manually</source> - <translation>手動設置日期</translation> - <extra-contents_path>/Date/Set Date Manually</extra-contents_path> + <translation type="vanished">手動設置日期</translation> + </message> + <message> + <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="127"/> + <source>Set Time Manually</source> + <translation>手動設置時間</translation> + <extra-contents_path>/Date/Set Time Manually</extra-contents_path> </message> <message> <location filename="../../../plugins/time-language/datetime/datetimeui.cpp" line="162"/> @@ -4291,12 +4301,13 @@ <extra-contents_path>/Defaultapp/Text Editor</extra-contents_path> </message> <message> - <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="34"/> + <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="35"/> <source>Reset default apps to system recommended apps</source> <translation>將預設應用重置為系統推薦應用</translation> + <extra-contents_path>/Defaultapp/Reset default apps to system recommended apps</extra-contents_path> </message> <message> - <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="35"/> + <location filename="../../../plugins/application/defaultapp/defaultappui.cpp" line="36"/> <source>Reset</source> <translation>重置</translation> </message> @@ -5755,46 +5766,30 @@ <context> <name>InputPwdDialog</name> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="46"/> - <source>Set Password</source> - <translation>設置密碼</translation> - </message> - <message> - <source>Password can not be blank</source> - <translation type="vanished">密码不能为空</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="79"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="92"/> <source>Cancel</source> <translation>取消</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="29"/> - <source>Set</source> - <translation>系統設置</translation> - </message> - <message> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="39"/> <source>VNC password</source> - <translation type="vanished">VNC 密碼</translation> + <translation>VNC 密碼</translation> </message> <message> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="57"/> <source>Password</source> - <translation type="vanished">密碼</translation> + <translation>密碼</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="62"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="75"/> <source>Must be 1-8 characters long</source> <translation>長度必須為1-8個字元</translation> </message> <message> - <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="83"/> + <location filename="../../../plugins/system/vino/inputpwddialog.cpp" line="98"/> <source>Confirm</source> <translation>確定</translation> </message> - <message> - <source>less than or equal to 8</source> - <translation type="vanished">密码长度需要小于等于8</translation> - </message> </context> <context> <name>ItemList</name> @@ -9906,7 +9901,7 @@ <translation type="vanished">远程桌面</translation> </message> <message> - <location filename="../../../plugins/account/userinfo/userinfo.cpp" line="75"/> + <location filename="../../../plugins/account/userinfo/userinfo.cpp" line="79"/> <source>User Info</source> <translation>帳戶資訊</translation> </message> @@ -10635,6 +10630,7 @@ <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="86"/> <source>Leave lock (System will be locked when the paired phone gone)</source> <translation>動態鎖(系統將在已配對的藍牙手機離開時自動鎖定屏幕)</translation> + <extra-contents_path>/Screenlock/Leave lock (System will be locked when the paired phone gone)</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="95"/> @@ -10690,16 +10686,19 @@ <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="199"/> <source>Monitor Off</source> <translation>關閉顯示器</translation> + <extra-contents_path>/Screenlock/Monitor Off</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="201"/> <source>Screensaver</source> <translation>屏保</translation> + <extra-contents_path>/Screenlock/Screensaver</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="196"/> <source>Related Settings</source> <translation>相關設置</translation> + <extra-contents_path>/Screenlock/Related Settings</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screenlock/screenlockui.cpp" line="200"/> @@ -10939,7 +10938,7 @@ <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="40"/> <source>Screensaver</source> <translation>屏保</translation> - <extra-contents_path>/Screenlock/Screensaver</extra-contents_path> + <extra-contents_path>/Screensaver/Screensaver</extra-contents_path> </message> <message> <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="53"/> @@ -10954,93 +10953,100 @@ <extra-contents_path>/Screensaver/Screensaver program</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="86"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="87"/> <source>Screensaver source</source> <translation>屏保來源</translation> + <extra-contents_path>/Screensaver/Screensaver source</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="91"/> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="449"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="92"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="455"/> <source>Select</source> <translation>選擇</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="112"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="113"/> <source>Ordinal</source> <translation>按順序</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="113"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="114"/> <source>Random</source> <translation>隨機</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="119"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="121"/> <source>Random switching</source> <translation>隨機切換</translation> + <extra-contents_path>/Screensaver/Random switching</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="138"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="141"/> <source>Switching time</source> <translation>切換頻率</translation> + <extra-contents_path>/Screensaver/Switching time</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="157"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="160"/> <source>Text(up to 30 characters):</source> <translation>屏保文本(最多 30 個字):</translation> + <extra-contents_path>/Screensaver/Text(up to 30 characters):</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="179"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="183"/> <source>Text position</source> <translation>文本位置</translation> + <extra-contents_path>/Screensaver/Text position</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="187"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="191"/> <source>Centered</source> <translation>居中</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="188"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="192"/> <source>Randow(Bubble text)</source> <translation>隨機(氣泡文字)</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="209"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="214"/> <source>Show rest time</source> <translation>顯示休息時間</translation> + <extra-contents_path>/Screensaver/Show rest time</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="218"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="224"/> <source>Lock screen when screensaver boot</source> <translation>開啓屏保時鎖定屏幕</translation> + <extra-contents_path>/Screensaver/Lock screen when screensaver boot</extra-contents_path> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="407"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="413"/> <source>Wallpaper files(*.jpg *.jpeg *.bmp *.dib *.png *.jfif *.jpe *.gif *.tif *.tiff *.wdp *.svg)</source> <translation>壁紙檔(*.jpg *.jpeg *.bmp *.dib *.png *.jfif *.jpe *.gif *.tif *.tiff *.wdp *.svg)</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="448"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="454"/> <source>select custom screensaver dir</source> <translation>選擇自訂屏保路徑</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="450"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="456"/> <source>Position: </source> <translation>位置:</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="451"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="457"/> <source>FileName: </source> <translation>文件名:</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="452"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="458"/> <source>FileType: </source> <translation>文件類型:</translation> </message> <message> - <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="453"/> + <location filename="../../../plugins/personalized/screensaver/screensaverui.cpp" line="459"/> <source>Cancel</source> <translation>取消</translation> </message> @@ -11159,11 +11165,11 @@ <translation type="vanished">无搜索结果</translation> </message> <message> - <location filename="../../searchwidget.cpp" line="80"/> - <location filename="../../searchwidget.cpp" line="81"/> - <location filename="../../searchwidget.cpp" line="88"/> - <location filename="../../searchwidget.cpp" line="90"/> - <location filename="../../searchwidget.cpp" line="95"/> + <location filename="../../searchwidget.cpp" line="83"/> + <location filename="../../searchwidget.cpp" line="84"/> + <location filename="../../searchwidget.cpp" line="91"/> + <location filename="../../searchwidget.cpp" line="93"/> + <location filename="../../searchwidget.cpp" line="98"/> <source>No search results</source> <translation>無搜尋結果</translation> </message> @@ -11292,230 +11298,69 @@ <translation>警告</translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="240"/> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="227"/> <source>please select an output</source> <translation>請選擇輸出設備</translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="302"/> - <source>Input Password</source> - <translation>輸入密碼</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="303"/> - <source>Password</source> - <translation>密碼</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="419"/> - <source>Share</source> - <translation>共用</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="473"/> - <source>Output</source> - <translation>輸出</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="485"/> - <source>Input</source> - <translation>輸入</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="495"/> - <source>Point</source> - <translation>滑鼠</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="497"/> - <source>Keyboard</source> - <translation>鍵盤</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="499"/> - <source>Clipboard</source> - <translation>剪切板</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="525"/> - <source>Close</source> - <translation>關閉</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="527"/> - <source>ViewOnly</source> - <translation>僅查看</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="535"/> - <source>Client Setting</source> - <translation>用戶端配置</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="546"/> - <source>Client Number</source> - <translation>客戶端數量</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="560"/> - <source>Client IP:</source> - <translation>用戶端IP位址:</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="691"/> - <source>退出程序</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="691"/> - <source>确认退出程序!</source> - <translation type="unfinished"></translation> - </message> - <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="72"/> <source>Remote Desktop</source> - <translation type="vanished">遠端桌面</translation> + <translation>遠端桌面</translation> <extra-contents_path>/Vino/Remote Desktop</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="76"/> <source>Connect to your desktop remotely</source> - <translation type="vanished">遠端連接這台電腦</translation> + <translation>遠端連接這台電腦</translation> <extra-contents_path>/Vino/Connect to your desktop remotely</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="81"/> <source>Allow others to connect to your desktop remotely using RDP</source> - <translation type="vanished">允許其他使用者使用 RDP 遠端連接這台電腦</translation> + <translation>允許其他使用者使用 RDP 遠端連接這台電腦</translation> <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using RDP</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="88"/> <source>Allow others to connect to your desktop remotely using VNC</source> - <translation type="vanished">允許其他使用者使用 VNC 遠端連接這台電腦</translation> + <translation>允許其他使用者使用 VNC 遠端連接這台電腦</translation> <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using VNC</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="106"/> <source>Require user to enter this password while using VNC: </source> - <translation type="vanished">使用 VNC 遠端連線時需要輸入密碼: </translation> + <translation>使用 VNC 遠端連線時需要輸入密碼: </translation> <extra-contents_path>/Vino/Require user to enter this password while using VNC:</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="112"/> <source>Edit</source> - <translation type="vanished">編輯</translation> + <translation>編輯</translation> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="435"/> - <source>Allow others to view your desktop</source> - <translation>允許其他人遠端連接您的桌面</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="124"/> + <source>Displays that allow remote access</source> + <translation>允許遠端存取的顯示器</translation> + <extra-contents_path>/Vino/Displays that allow remote access</extra-contents_path> </message> <message> - <source>Allow connection to control screen</source> - <translation type="vanished">允許其他使用者控制這台電腦的螢幕</translation> - <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="132"/> + <source>The number of remote clients allowed to connect</source> + <translation>允許連接的遠端客戶端數量</translation> + <extra-contents_path>/Vino/The number of remote clients allowed to connect</extra-contents_path> </message> <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="446"/> - <source>Security</source> - <translation>安全</translation> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="94"/> + <source>Allow connection to control screen</source> + <translation>允許其他使用者控制這台電腦的螢幕</translation> + <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> </message> <message> + <location filename="../../../plugins/system/vino/sharemain.cpp" line="100"/> <source>You must confirm every visit for this machine</source> - <translation type="vanished">每次訪問這台電腦時需要確認</translation> + <translation>每次訪問這台電腦時需要確認</translation> <extra-contents_path>/Vino/You must confirm every visit for this machine</extra-contents_path> </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="455"/> - <source>Require user to enter this password: </source> - <translation>要求使用者輸入此密碼: </translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="402"/> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="457"/> - <source>Password can not be blank</source> - <translation>密码不能为空</translation> - </message> - <message> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="395"/> - <location filename="../../../plugins/system/vino_hw/sharemain.cpp" line="410"/> - <source>Password length must be less than or equal to 8</source> - <translation>密码长度需小于等于8</translation> - </message> - <message> - <source>Password length is greater than 8</source> - <translation type="vanished">密码长度大于8</translation> - </message> -</context> -<context> - <name>ShareMainHw</name> - <message> - <source>Warning</source> - <translation type="vanished">警告</translation> - </message> - <message> - <source>please select an output</source> - <translation type="vanished">請選擇輸出設備</translation> - </message> - <message> - <source>Input Password</source> - <translation type="vanished">輸入密碼</translation> - </message> - <message> - <source>Password</source> - <translation type="vanished">密碼</translation> - </message> - <message> - <source>Share</source> - <translation type="vanished">共用</translation> - </message> - <message> - <source>Allow others to view your desktop</source> - <translation type="vanished">允許其他人遠端連接您的桌面</translation> - </message> - <message> - <source>Security</source> - <translation type="vanished">安全</translation> - </message> - <message> - <source>Require user to enter this password: </source> - <translation type="vanished">要求使用者輸入此密碼: </translation> - </message> - <message> - <source>Edit</source> - <translation type="vanished">編輯</translation> - </message> - <message> - <source>Output</source> - <translation type="vanished">輸出</translation> - </message> - <message> - <source>Input</source> - <translation type="vanished">輸入</translation> - </message> - <message> - <source>Point</source> - <translation type="obsolete">滑鼠</translation> - </message> - <message> - <source>Clipboard</source> - <translation type="vanished">剪切板</translation> - </message> - <message> - <source>Close</source> - <translation type="vanished">關閉</translation> - </message> - <message> - <source>ViewOnly</source> - <translation type="vanished">僅查看</translation> - </message> - <message> - <source>Client Setting</source> - <translation type="vanished">用戶端配置</translation> - </message> - <message> - <source>Client Number</source> - <translation type="vanished">客戶端數量</translation> - </message> - <message> - <source>Client IP:</source> - <translation type="vanished">用戶端IP位址:</translation> - </message> </context> <context> <name>Shortcut</name> @@ -11660,7 +11505,7 @@ <message> <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="366"/> <source>Use</source> - <translation>使用</translation> + <translation type="vanished">使用</translation> </message> <message> <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="326"/> @@ -11699,10 +11544,6 @@ <translation>“%1”已被“ %2”佔用,繼續將使該功能無快捷鍵。</translation> </message> <message> - <source>Shortcut "%1" occuied, please change the key combination.</source> - <translation type="vanished">“%1”為系統保留快捷鍵,請更改按鍵組合。</translation> - </message> - <message> <location filename="../../../plugins/devices/shortcut/shortcutui.cpp" line="1023"/> <source> or </source> <translation> 或 </translation> @@ -13478,54 +13319,6 @@ </message> </context> <context> - <name>VinoUi</name> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="15"/> - <source>Remote Desktop</source> - <translation>遠端桌面</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="17"/> - <source>Connect to your desktop remotely</source> - <translation>遠端連接這台電腦</translation> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="20"/> - <source>Allow others to connect to your desktop remotely using RDP</source> - <translation>允許其他使用者使用 RDP 遠端連接這台電腦</translation> - <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using RDP</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="23"/> - <source>Allow others to connect to your desktop remotely using VNC</source> - <translation>允許其他使用者使用 VNC 遠端連接這台電腦</translation> - <extra-contents_path>/Vino/Allow others to connect to your desktop remotely using VNC</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="26"/> - <source>Allow connection to control screen</source> - <translation>允許其他使用者控制這台電腦的螢幕</translation> - <extra-contents_path>/Vino/Allow connection to control screen</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="28"/> - <source>You must confirm every visit for this machine</source> - <translation>每次訪問這台電腦時需要確認</translation> - <extra-contents_path>/Vino/You must confirm every visit for this machine</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="30"/> - <source>Require user to enter this password: </source> - <translation>要求使用者輸入此密碼: </translation> - <extra-contents_path>/Vino/Require user to enter this password:</extra-contents_path> - </message> - <message> - <location filename="../../../plugins/system/vino/vinoui.cpp" line="39"/> - <source>Edit</source> - <translation>編輯</translation> - </message> -</context> -<context> <name>Vpn</name> <message> <source>Add Vpn Connect</source> @@ -13784,7 +13577,6 @@ <message> <source>Night Mode</source> <translation type="vanished">色溫</translation> - <extra-contents_path>/Display/Night Mode</extra-contents_path> </message> <message> <source>Open</source> @@ -13811,7 +13603,6 @@ <message> <source>Color Temperature</source> <translation type="vanished">螢幕色溫</translation> - <extra-contents_path>/Display/Color Temperature</extra-contents_path> </message> <message> <source>Eye Mode</source> @@ -13877,7 +13668,6 @@ <translation>螢幕%1已修改,是否保存? <br/><font style= 'color:#626c6e'>系統將在14秒后恢復配置</font></translation> </message> <message> - <location filename="../../../plugins/system/display/widget.cpp" line="992"/> <source>The screen %1 has been modified, whether to save it ? <br/><font style= 'color:#626c6e'>the settings will be restore after %2 seconds</font></source> <translation>螢幕%1已修改,是否保存? <br/><font style= 'color:#626c6e'>系統將在%2秒后恢復配置</font></translation> </message> diff -Nru ukui-control-center-5.0.0.0/shell/searchwidget.cpp ukui-control-center-5.0.0.0/shell/searchwidget.cpp --- ukui-control-center-5.0.0.0/shell/searchwidget.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/shell/searchwidget.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -18,7 +18,7 @@ #include <glib.h> } -const QStringList filterPathList = {"/About/Status", "/About/Active"}; +const QStringList filterPathList = {"/About/Status", "/About/Active", "/About/<<Protocol>>", "/About/Serial"}; const QStringList yangtzeFilterPathList = {"/Shortcut/Add", "/Shortcut/Customize Shortcut", "/Display/Color Temperature And Eye Care", "/Display/Eye protection mode", @@ -29,6 +29,12 @@ const QStringList tabletFilterPathList = {"/Display/Color Temperature And Eye Care", "/Display/Eye protection mode"}; +const QStringList g_nWaylandVinoFilterPathList = {"/Vino/The number of remote clients allowed to connect", + "/Vino/Displays that allow remote access"}; + +const QStringList g_waylandVinoFilterPathList = {"Vino/Connect to your desktop remotely", "/Vino/Allow connection to control screen", + "/Vino/You must confirm every visit for this machine"}; + SearchWidget::SearchWidget(QWidget *parent) : KSearchLineEdit(parent) , m_xmlExplain("") @@ -48,9 +54,6 @@ m_completer->setCaseSensitivity(Qt::CaseInsensitive);//这个属性可设置进行匹配时的大小写敏感性 m_completer->setCompletionRole(Qt::UserRole); //设置ItemDataRole m_completer->setWrapAround(false); - if (!UkccCommon::isOpenkylinNile()) { - m_completer->popup()->setWindowFlags(Qt::ToolTip); - } qRegisterMetaType<QStringPair>("QStringPair"); qDBusRegisterMetaType<QStringPair>(); qRegisterMetaType<QStringPairList>("QStringPairList"); @@ -297,12 +300,22 @@ continue; } + // 非 Wayland 搜索词过滤 + if (!UkccCommon::isWayland() && g_nWaylandVinoFilterPathList.contains(m_searchBoxStruct.fullPagePath)) { + continue; + } + + // Wayland 远程桌面搜索词过滤 + if (UkccCommon::isWayland() && g_waylandVinoFilterPathList.contains(m_searchBoxStruct.fullPagePath)) { + continue; + } + // xc 平板 过滤掉的搜索项 if (!UkccCommon::isOpenkylinNile() && !UkccCommon::isOpenkylin() && tabletFilterPathList.contains(m_searchBoxStruct.fullPagePath)) { continue; } - if (filterPathList.contains(m_searchBoxStruct.fullPagePath)) { + if (!UkccCommon::isV11() && filterPathList.contains(m_searchBoxStruct.fullPagePath)) { continue; } @@ -437,18 +450,6 @@ clearSearchData(); } -void SearchWidget::removeRepeatItems() -{ - for (int index = 0 ; index < m_model->rowCount() ; index++) { - QString text = m_model->item(index)->text(); - if (m_repeatlist.contains(text)) { - m_model->removeRow(index); - index--; - } - m_repeatlist.append(text); - } -} - void SearchWidget::appendShortcutSearch() { QDBusReply<QStringPairList> systemEntryReply = m_shortcutInterface->call("getSystemShortcut"); if (systemEntryReply.isValid()) { @@ -627,7 +628,7 @@ for (auto datas : m_TxtList) { for (int i = 0; i < datas.count(); i++) { - if( data.translateContent == datas){ + if (data.translateContent == datas){ return; } } @@ -752,7 +753,6 @@ loadxml(); //记录搜索项总数 count = m_model->rowCount(); - removeRepeatItems(); } //save all modules moduleInteface name and actual moduleName @@ -767,7 +767,6 @@ if (!translation.isEmpty()) { m_xmlFilePath.insert(translation); } - } void SearchWidget::onCompleterActivated(QString value) { diff -Nru ukui-control-center-5.0.0.0/shell/searchwidget.h ukui-control-center-5.0.0.0/shell/searchwidget.h --- ukui-control-center-5.0.0.0/shell/searchwidget.h 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/shell/searchwidget.h 2025-02-07 16:27:50.000000000 +0800 @@ -76,7 +76,6 @@ SearchBoxStruct *data = nullptr); void appendShortcutSearch(); void addShortcutSearch(); - void removeRepeatItems(); private: QStandardItemModel *m_model; @@ -96,7 +95,6 @@ QList<QString> m_TxtList; QStringList mExcludeList; - QStringList m_repeatlist; int count; QVariantMap searchMap; bool m_shortcutInterfaceValid = true; diff -Nru ukui-control-center-5.0.0.0/shell/shell.pro ukui-control-center-5.0.0.0/shell/shell.pro --- ukui-control-center-5.0.0.0/shell/shell.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/shell/shell.pro 2025-02-07 16:27:50.000000000 +0800 @@ -19,7 +19,6 @@ include(../env.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/Label/label.pri) include($$PROJECT_ROOTDIR/libukcc/widgets/FlowLayout/flowlayout.pri) -include($$PROJECT_ROOTDIR/libukcc/widgets/ImageUtil/imageutil.pri) include($$PROJECT_ROOTDIR/libukcc/interface.pri) DEFINES += PLUGIN_INSTALL_DIRS='\\"$${PLUGIN_INSTALL_DIRS}\\"' diff -Nru ukui-control-center-5.0.0.0/tests/auto_test.sh ukui-control-center-5.0.0.0/tests/auto_test.sh --- ukui-control-center-5.0.0.0/tests/auto_test.sh 1970-01-01 08:00:00.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/auto_test.sh 2025-02-07 16:27:50.000000000 +0800 @@ -0,0 +1,56 @@ +#!/bin/bash + +# 设置退出脚本当命令失败时 (非零退出状态) +#set -e + +# 函数:运行单元测试 +run_unit_tests() { + local pattern="unit_test_*" + + # 遍历所有匹配模式的目录 + for dir in $pattern; do + if [ -d "$dir" ] && [ -x "$dir/$(basename "$dir")" ]; then + echo "Running tests in $dir..." + # 执行单元测试 + (cd "$dir" && "./$(basename "$dir")") + # 收集代码覆盖率数据 + echo "Collecting coverage data..." + (cd "$dir" && (find ./ -name '*.o' | xargs gcov --preserve-paths)) + else + echo "Skipping non-existent or non-executable directory: $dir, $dir/$(basename "$dir")" + fi + done +} + +# 上传 result.zip 到平台 +URL=$1 +upload_result() { + echo "current pwd : $(pwd)" + # 收集覆盖率信息 + lcov -d . -c -o r.info + + # 删除不需要的文件或路径 + lcov -r r.info "$(pwd)/unit_test_*" "$(pwd)/../registeredSession/universalinterface.cpp" "/usr/include/*" "/opt/*" -o coverage.info + + # 生成html覆盖率报告 + genhtml "$(pwd)/coverage.info" -o result + + # 打包 + zip -r result.zip result + # 上传平台 + curl --insecure -X POST -F "file=@/$(pwd)/result.zip" -F "package=ukui-control-center" -F "username=hesisheng" $URL + echo "all parameter : $@" +} + +# 编译项目 +echo "Compiling the project..." +qmake && make + +# 运行各个单元测试 +echo "Running unit tests..." +run_unit_tests + +# 上传到平台 +#upload_result + +echo "All tests have been run successfully, and coverage data has been collected." diff -Nru ukui-control-center-5.0.0.0/tests/tests.pro ukui-control-center-5.0.0.0/tests/tests.pro --- ukui-control-center-5.0.0.0/tests/tests.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/tests.pro 2025-02-07 16:27:50.000000000 +0800 @@ -2,16 +2,17 @@ SUBDIRS = unit_test_keyboard \ unit_test_mouse \ - unit_test_about \ - unit_test_autoboot \ - unit_test_datetime \ - unit_test_default \ - unit_test_area \ - unit_test_screenlock \ - unit_test_screensaver \ - unit_test_shortcut \ - unit_test_wallpaper \ + unit_test_about \ + unit_test_autoboot \ + unit_test_datetime \ + unit_test_default \ + unit_test_area \ + unit_test_screenlock \ + unit_test_screensaver \ + unit_test_shortcut \ + unit_test_wallpaper \ unit_test_font \ + unit_test_vino \ # 打桩工具 diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_about/main.cpp ukui-control-center-5.0.0.0/tests/unit_test_about/main.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_about/main.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_about/main.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,9 +1,7 @@ #include <gtest/gtest.h> -#include <QGuiApplication> int main(int argc, char **argv) { - QGuiApplication a(argc, argv); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_about/unit_test_about.cpp ukui-control-center-5.0.0.0/tests/unit_test_about/unit_test_about.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_about/unit_test_about.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_about/unit_test_about.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,10 +1,6 @@ #include <gtest/gtest.h> #include <gtest/gtest-death-test.h> -#include <QDBusReply> #include "../../registeredSession/plugins/about/aboutinterface.h" -#include "stubext.h" - -using namespace stub_ext; class AboutInterfaceTest : public testing::Test { @@ -12,38 +8,80 @@ static void SetUpTestSuite() { m_pAboutInterface = new AboutInterface(); - m_pAboutDbus = new QDBusInterface("org.ukui.ukcc.session", - "/About", - "org.ukui.ukcc.session.About", - QDBusConnection::sessionBus()); } static void TearDownTestSuite() { - if (m_pAboutInterface) { + if (m_pAboutInterface) { delete m_pAboutInterface; m_pAboutInterface = nullptr; - } - if (m_pAboutInterface) { - delete m_pAboutInterface; - m_pAboutInterface = nullptr; - } + } } static AboutInterface *m_pAboutInterface; - static QDBusInterface* m_pAboutDbus; }; AboutInterface *AboutInterfaceTest::m_pAboutInterface = nullptr; -QDBusInterface *AboutInterfaceTest::m_pAboutDbus = nullptr; -TEST_F(AboutInterfaceTest, openActivation) +TEST_F(AboutInterfaceTest, versionInfo) { - if (!m_pAboutDbus || !m_pAboutDbus->isValid()) { - return; - } - QDBusReply<bool> ret = m_pAboutDbus->call("openActivation"); - if (ret.isValid()) { - ASSERT_EQ(ret.value(), true); + QStringList list = m_pAboutInterface->property("versionInfo").toStringList(); + ASSERT_EQ(list.size(), 2); +} + +TEST_F(AboutInterfaceTest, themeMode) +{ + std::string currentValue = m_pAboutInterface->getThemeMode().toStdString(); + m_pAboutInterface->setThemeMode("ukui-light"); + ASSERT_STREQ("ukui-light", m_pAboutInterface->getThemeMode().toStdString().c_str()); + m_pAboutInterface->setThemeMode(currentValue.c_str()); +} + +TEST_F(AboutInterfaceTest, buildList) +{ + m_pAboutInterface->getBuildList(); + QStringList buildList = m_pAboutInterface->getBuild(); + ASSERT_EQ(buildList.size(), 2); +} + +TEST_F(AboutInterfaceTest, desktopEnv) +{ + m_pAboutInterface->getDesktopEnvStr(); + std::string desktopEnv = m_pAboutInterface->getDesktopEnv().toStdString(); + ASSERT_STREQ(desktopEnv.c_str(), "UKUI"); +} + +TEST_F(AboutInterfaceTest, memory) +{ + std::string memory = m_pAboutInterface->getTotalMemory().toStdString(); + ASSERT_STRNE(memory.c_str(), ""); +} + +TEST_F(AboutInterfaceTest, blockInfo) +{ + m_pAboutInterface->getBlockInfoStr(); + QString blockInfo = m_pAboutInterface->getBlockInfo(); + ASSERT_GT(blockInfo.split("\n").size(), 0); +} + +TEST_F(AboutInterfaceTest, diskInfo) +{ + QString diskInfo = m_pAboutInterface->getDiskInfo(); + ASSERT_GT(diskInfo.split("\n").size(), 0); +} + +TEST_F(AboutInterfaceTest, upgradeDate) +{ + QString upgradeDate = m_pAboutInterface->getUpgradeDate(); + if (upgradeDate.isEmpty()) { + ASSERT_STREQ(upgradeDate.toStdString().c_str(), ""); + } else { + ASSERT_STRNE(upgradeDate.toStdString().c_str(), ""); } } + +TEST_F(AboutInterfaceTest, ntpTime) +{ + QString upgradeDate = m_pAboutInterface->getNtpTime(); + ASSERT_STRNE(upgradeDate.toStdString().c_str(), ""); +} diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_about/unit_test_about.pro ukui-control-center-5.0.0.0/tests/unit_test_about/unit_test_about.pro --- ukui-control-center-5.0.0.0/tests/unit_test_about/unit_test_about.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_about/unit_test_about.pro 2025-02-07 16:27:50.000000000 +0800 @@ -4,6 +4,7 @@ # #------------------------------------------------- QT += core dbus KService KCoreAddons KXmlGui KGlobalAccel x11extras +QT -= gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets concurrent sql xml TEMPLATE = app diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_area/main.cpp ukui-control-center-5.0.0.0/tests/unit_test_area/main.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_area/main.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_area/main.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,10 +1,7 @@ #include <gtest/gtest.h> -#include <QGuiApplication> - int main(int argc, char **argv) { - QGuiApplication a(argc, argv); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_area/unit_test_area.cpp ukui-control-center-5.0.0.0/tests/unit_test_area/unit_test_area.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_area/unit_test_area.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_area/unit_test_area.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,117 +1,125 @@ #include <gtest/gtest.h> #include <gtest/gtest-death-test.h> -#include <QDBusReply> #include <QStringList> #include "../../registeredSession/plugins/area/areainterface.h" -#include "stubext.h" - -using namespace stub_ext; class AreaInterfaceTest : public testing::Test { protected: static void SetUpTestSuite() { - m_pAreaDbus = new QDBusInterface("org.ukui.ukcc.session", - "/Area", - "org.ukui.ukcc.session.Area", - QDBusConnection::sessionBus()); + m_pAreaInterface = new AreaInterface(); } static void TearDownTestSuite() { - if (m_pAreaDbus) { - delete m_pAreaDbus; - m_pAreaDbus = nullptr; - } + if (m_pAreaInterface) { + delete m_pAreaInterface; + m_pAreaInterface = nullptr; + } } - static QDBusInterface* m_pAreaDbus; + static AreaInterface* m_pAreaInterface; }; -QDBusInterface *AreaInterfaceTest::m_pAreaDbus = nullptr; +AreaInterface *AreaInterfaceTest::m_pAreaInterface = nullptr; -TEST_F(AreaInterfaceTest, setFormatCountry) +TEST_F(AreaInterfaceTest, formatCountry) { - if (!m_pAreaDbus || !m_pAreaDbus->isValid()) { - return; - } - std::string oldValue = m_pAreaDbus->property("formatCountry").toStringList().at(0).toStdString(); - m_pAreaDbus->call("setFormatCountry", "zh_CN.UTF-8"); - std::string newValue = m_pAreaDbus->property("formatCountry").toStringList().at(0).toStdString(); + std::string oldValue = m_pAreaInterface->getFormatCountry().toStdString(); + m_pAreaInterface->setFormatCountry("zh_CN.UTF-8"); + std::string newValue = m_pAreaInterface->getFormatCountry().toStdString(); ASSERT_STREQ(newValue.c_str(), "zh_CN.UTF-8"); - m_pAreaDbus->call("setFormatCountry", oldValue.c_str()); + m_pAreaInterface->setFormatCountry(oldValue.c_str()); } -TEST_F(AreaInterfaceTest, setCalendar) +TEST_F(AreaInterfaceTest, formatCountryList) { - if (!m_pAreaDbus || !m_pAreaDbus->isValid()) { - return; - } - std::string oldValue = m_pAreaDbus->property("calendar").toString().toStdString(); - m_pAreaDbus->call("setCalendar", "lunar"); - std::string newValue = m_pAreaDbus->property("calendar").toString().toStdString(); + std::string value = m_pAreaInterface->getFormatCountryList().at(0).toStdString(); + ASSERT_STREQ(value.c_str(), "en_US.UTF-8"); +} + +TEST_F(AreaInterfaceTest, calendar) +{ + std::string oldValue = m_pAreaInterface->getCalendar().toStdString(); + m_pAreaInterface->setCalendar("lunar"); + std::string newValue = m_pAreaInterface->getCalendar().toStdString(); ASSERT_STREQ(newValue.c_str(), "lunar"); - m_pAreaDbus->call("setCalendar", oldValue.c_str()); + m_pAreaInterface->setCalendar(oldValue.c_str()); } -TEST_F(AreaInterfaceTest, setFirstDay) +TEST_F(AreaInterfaceTest, calendarList) { - if (!m_pAreaDbus || !m_pAreaDbus->isValid()) { - return; - } - std::string oldValue = m_pAreaDbus->property("firstDay").toString().toStdString(); - m_pAreaDbus->call("setFirstDay", "monday"); - std::string newValue = m_pAreaDbus->property("firstDay").toString().toStdString(); + std::string value = m_pAreaInterface->getCalendarList().at(0).toStdString(); + ASSERT_STREQ(value.c_str(), "solarlunar"); +} + +TEST_F(AreaInterfaceTest, firstDayList) +{ + std::string value = m_pAreaInterface->getFirstDayList().at(0).toStdString(); + ASSERT_STREQ(value.c_str(), "monday"); +} + +TEST_F(AreaInterfaceTest, firstDay) +{ + std::string oldValue = m_pAreaInterface->getFirstDay().toStdString(); + m_pAreaInterface->setFirstDay("monday"); + std::string newValue = m_pAreaInterface->getFirstDay().toStdString(); ASSERT_STREQ(newValue.c_str(), "monday"); - m_pAreaDbus->call("setFirstDay", oldValue.c_str()); + m_pAreaInterface->setFirstDay(oldValue.c_str()); } -TEST_F(AreaInterfaceTest, setDateFormat) +TEST_F(AreaInterfaceTest, dateFormat) { - if (!m_pAreaDbus || !m_pAreaDbus->isValid()) { - return; - } - std::string oldValue = m_pAreaDbus->property("dateFormat").toString().toStdString(); - m_pAreaDbus->call("setDateFormat", "cn"); - std::string newValue = m_pAreaDbus->property("dateFormat").toString().toStdString(); + std::string oldValue = m_pAreaInterface->getDateFormat().toStdString(); + m_pAreaInterface->setDateFormat("cn"); + std::string newValue = m_pAreaInterface->getDateFormat().toStdString(); ASSERT_STREQ(newValue.c_str(), "cn"); - m_pAreaDbus->call("setDateFormat", oldValue.c_str()); + m_pAreaInterface->setDateFormat(oldValue.c_str()); } -TEST_F(AreaInterfaceTest, setTimeFormat) +TEST_F(AreaInterfaceTest, dateFormatList) { - if (!m_pAreaDbus || !m_pAreaDbus->isValid()) { - return; - } - std::string oldValue = m_pAreaDbus->property("timeFormat").toString().toStdString(); - m_pAreaDbus->call("setTimeFormat", "24"); - std::string newValue = m_pAreaDbus->property("timeFormat").toString().toStdString(); + std::string value = m_pAreaInterface->getDateFormatList().at(0).toStdString(); + ASSERT_STREQ(value.c_str(), "cn"); +} + +TEST_F(AreaInterfaceTest, timeFormat) +{ + std::string oldValue = m_pAreaInterface->getTimeFormat().toStdString(); + m_pAreaInterface->setTimeFormat("24"); + std::string newValue = m_pAreaInterface->getTimeFormat().toStdString(); ASSERT_STREQ(newValue.c_str(), "24"); - m_pAreaDbus->call("setTimeFormat", oldValue.c_str()); + m_pAreaInterface->setTimeFormat(oldValue.c_str()); } -TEST_F(AreaInterfaceTest, setLanguage) +TEST_F(AreaInterfaceTest, timeFormatList) { - if (!m_pAreaDbus || !m_pAreaDbus->isValid()) { - return; - } - std::string oldValue = m_pAreaDbus->property("language").toString().toStdString(); - m_pAreaDbus->call("setLanguage", "zh_CN"); - std::string newValue = m_pAreaDbus->property("language").toString().toStdString(); + std::string value = m_pAreaInterface->getTimeFormatList().at(0).toStdString(); + ASSERT_STREQ(value.c_str(), "12"); +} + +TEST_F(AreaInterfaceTest, language) +{ + std::string oldValue = m_pAreaInterface->getLanguage().toStdString(); + m_pAreaInterface->setLanguage("zh_CN"); + std::string newValue = m_pAreaInterface->getLanguage().toStdString(); ASSERT_STREQ(newValue.c_str(), "zh_CN"); - m_pAreaDbus->call("setLanguage", oldValue.c_str()); + m_pAreaInterface->setLanguage(oldValue.c_str()); } -TEST_F(AreaInterfaceTest, setShowLanguageList) +TEST_F(AreaInterfaceTest, showLanguageList) { - if (!m_pAreaDbus || !m_pAreaDbus->isValid()) { - return; - } - QStringList oldValue = m_pAreaDbus->property("showLanguageList").toStringList(); + QStringList oldValue = m_pAreaInterface->getShowLanguageList(); QStringList languageList = {"zh_CN", "en"}; - m_pAreaDbus->call("setShowLanguageList", languageList); - std::string newValue = m_pAreaDbus->property("showLanguageList").toStringList().at(0).toStdString(); + m_pAreaInterface->setShowLanguageList(languageList); + std::string newValue = m_pAreaInterface->getShowLanguageList().at(0).toStdString(); ASSERT_STREQ(newValue.c_str(), "zh_CN"); - m_pAreaDbus->call("setShowLanguageList", oldValue); + m_pAreaInterface->setShowLanguageList(oldValue); +} + +TEST_F(AreaInterfaceTest, languageList) +{ + std::string value = m_pAreaInterface->getLanguageList().at(0).toStdString(); + ASSERT_STREQ(value.c_str(), "zh_CN"); } diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_area/unit_test_area.pro ukui-control-center-5.0.0.0/tests/unit_test_area/unit_test_area.pro --- ukui-control-center-5.0.0.0/tests/unit_test_area/unit_test_area.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_area/unit_test_area.pro 2025-02-07 16:27:50.000000000 +0800 @@ -6,6 +6,7 @@ QT += dbus xml #greaterThan(QT_MAJOR_VERSION, 4): QT += widgets concurrent sql xml +QT -= gui TEMPLATE = app TARGET = unit_test_area diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_autoboot/main.cpp ukui-control-center-5.0.0.0/tests/unit_test_autoboot/main.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_autoboot/main.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_autoboot/main.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,10 +1,8 @@ #include <gtest/gtest.h> -#include <QGuiApplication> int main(int argc, char **argv) { - QGuiApplication a(argc, argv); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_autoboot/unit_test_autoboot.cpp ukui-control-center-5.0.0.0/tests/unit_test_autoboot/unit_test_autoboot.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_autoboot/unit_test_autoboot.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_autoboot/unit_test_autoboot.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -2,90 +2,102 @@ #include <gtest/gtest-death-test.h> #include <QDBusReply> #include <QStringList> -#include <QDBusInterface> #include "../../registeredSession/plugins/autoboot/autostartinterface.h" -#include "stubext.h" - -using namespace stub_ext; class AutobootInterfaceTest : public testing::Test { protected: static void SetUpTestSuite() { - m_pAutobootDbus = new QDBusInterface("org.ukui.ukcc.session", - "/Autoboot", "org.ukui.ukcc.session.Autoboot", - QDBusConnection::sessionBus()); + m_pAutoStartInterface = new AutoStartInterface(); } static void TearDownTestSuite() { - if (m_pAutobootDbus) { - delete m_pAutobootDbus; - m_pAutobootDbus = nullptr; - } + if (m_pAutoStartInterface) { + delete m_pAutoStartInterface; + m_pAutoStartInterface = nullptr; + } } - static QDBusInterface* m_pAutobootDbus; + static AutoStartInterface* m_pAutoStartInterface; }; -QDBusInterface *AutobootInterfaceTest::m_pAutobootDbus = nullptr; +AutoStartInterface *AutobootInterfaceTest::m_pAutoStartInterface = nullptr; TEST_F(AutobootInterfaceTest, addAutobootApp) { - if (!m_pAutobootDbus || !m_pAutobootDbus->isValid()) { - return; - } - QDBusReply<bool> ret = m_pAutobootDbus->call("addAutobootApp", "/usr/share/applications/kylin-video.desktop"); - ASSERT_EQ(ret.isValid(), true); + bool ret = m_pAutoStartInterface->addAutobootApp("/usr/share/applications/kylin-video.desktop"); + ASSERT_EQ(ret, true); +} + +TEST_F(AutobootInterfaceTest, getAppInfo) +{ + AutoApp ret = m_pAutoStartInterface->getAppInfo("/usr/share/applications/kylin-video.desktop"); + ASSERT_STREQ(ret.bname.toStdString().c_str(), "kylin-video.desktop"); } TEST_F(AutobootInterfaceTest, setAppHiddenInfo) { - if (!m_pAutobootDbus || !m_pAutobootDbus->isValid()) { - return; - } - QDBusReply<bool> ret = m_pAutobootDbus->call("setAppHiddenInfo", "kylin-video.desktop", true); - ASSERT_EQ(ret.isValid(), true); + bool ret = m_pAutoStartInterface->setAppHiddenInfo("kylin-video.desktop", true); + ASSERT_EQ(ret, true); } TEST_F(AutobootInterfaceTest, saveAppStatus) { - if (!m_pAutobootDbus || !m_pAutobootDbus->isValid()) { - return; - } - QDBusReply<void> ret = m_pAutobootDbus->call("saveAppStatus", "/usr/share/applications/kylin-video.desktop", false); - ASSERT_EQ(ret.isValid(), true); + bool ret = m_pAutoStartInterface->saveAppStatus("/usr/share/applications/kylin-video.desktop", false); + ASSERT_EQ(ret, false); } TEST_F(AutobootInterfaceTest, setApplist) { - if (!m_pAutobootDbus || !m_pAutobootDbus->isValid()) { - return; - } - QStringList oldValue = m_pAutobootDbus->property("appList").toStringList(); + QStringList oldValue = m_pAutoStartInterface->getAppList(); QStringList strList = {"kylin-weather.desktop", "sogouImeService.desktop", "kylin-video.desktop"}; - QDBusReply<void> ret = m_pAutobootDbus->call("setApplist", strList); - ASSERT_EQ(ret.isValid(), true); - QStringList newValue = m_pAutobootDbus->property("appList").toStringList(); + bool ret = m_pAutoStartInterface->setApplist(strList); + ASSERT_EQ(ret, true); + QStringList newValue = m_pAutoStartInterface->getAppList(); ASSERT_STREQ(newValue.at(0).toStdString().c_str(), "kylin-weather.desktop"); - m_pAutobootDbus->call("setApplist", oldValue); + m_pAutoStartInterface->setApplist(oldValue); } TEST_F(AutobootInterfaceTest, getDisplayStatus) { - if (!m_pAutobootDbus || !m_pAutobootDbus->isValid()) { - return; - } - QDBusReply<bool> ret = m_pAutobootDbus->call("getDisplayStatus", "/usr/share/applications/kylin-video.desktop"); - ASSERT_EQ(ret.value(), false); + bool ret = m_pAutoStartInterface->getDisplayStatus("/usr/share/applications/kylin-video.desktop"); + ASSERT_EQ(ret, false); } TEST_F(AutobootInterfaceTest, deleteLocalFile) { - if (!m_pAutobootDbus || !m_pAutobootDbus->isValid()) { - return; - } - QDBusReply<bool> ret = m_pAutobootDbus->call("deleteLocalFile", "kylin-video.desktop"); - ASSERT_EQ(ret.value(), true); + bool ret = m_pAutoStartInterface->deleteLocalFile("kylin-video.desktop"); + ASSERT_EQ(ret, true); +} + +TEST_F(AutobootInterfaceTest, deleteLocalFileFalse) +{ + bool ret = m_pAutoStartInterface->deleteLocalFile(""); + ASSERT_EQ(ret, false); +} + +TEST_F(AutobootInterfaceTest, getAllAppMap) +{ + QMap<QString, AutoApp> ret = m_pAutoStartInterface->getAllAppMap(); + ASSERT_GT(ret.size(), 1); +} + +TEST_F(AutobootInterfaceTest, getServiceMap) +{ + QMap<QString, AutoApp> ret = m_pAutoStartInterface->getServiceMap(); + ASSERT_GT(ret.size(), 0); +} + +TEST_F(AutobootInterfaceTest, getLocalAppMap) +{ + QMap<QString, AutoApp> ret = m_pAutoStartInterface->getLocalAppMap(); + ASSERT_GE(ret.size(), 0); +} + +TEST_F(AutobootInterfaceTest, getStatusMap) +{ + QMap<QString, QVariant> ret = m_pAutoStartInterface->getStatusMap(); + ASSERT_GE(ret.size(), 0); } diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_autoboot/unit_test_autoboot.pro ukui-control-center-5.0.0.0/tests/unit_test_autoboot/unit_test_autoboot.pro --- ukui-control-center-5.0.0.0/tests/unit_test_autoboot/unit_test_autoboot.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_autoboot/unit_test_autoboot.pro 2025-02-07 16:27:50.000000000 +0800 @@ -6,6 +6,7 @@ QT += dbus xml KService KCoreAddons KXmlGui KGlobalAccel #greaterThan(QT_MAJOR_VERSION, 4): QT += widgets concurrent sql xml +QT -= gui TEMPLATE = app TARGET = unit_test_autoboot diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_datetime/main.cpp ukui-control-center-5.0.0.0/tests/unit_test_datetime/main.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_datetime/main.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_datetime/main.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,10 +1,7 @@ #include <gtest/gtest.h> -#include <QGuiApplication> - int main(int argc, char **argv) { - QGuiApplication a(argc, argv); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_datetime/unit_test_datetime.cpp ukui-control-center-5.0.0.0/tests/unit_test_datetime/unit_test_datetime.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_datetime/unit_test_datetime.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_datetime/unit_test_datetime.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,93 +1,99 @@ #include <gtest/gtest.h> #include <gtest/gtest-death-test.h> -#include <QDBusReply> -#include <QStringList> #include "../../registeredSession/plugins/datetime/datetimeinterface.h" -#include "stubext.h" - -using namespace stub_ext; class DatetimeInterfaceTest : public testing::Test { protected: static void SetUpTestSuite() { - m_pDatetimeDbus = new QDBusInterface("org.ukui.ukcc.session", - "/Datetime", - "org.ukui.ukcc.session.Datetime", - QDBusConnection::sessionBus()); + m_pDatetimeInterface = new DatetimeInterface(); } static void TearDownTestSuite() { - if (m_pDatetimeDbus) { - delete m_pDatetimeDbus; - m_pDatetimeDbus = nullptr; - } + if (m_pDatetimeInterface) { + delete m_pDatetimeInterface; + m_pDatetimeInterface = nullptr; + } } - static QDBusInterface* m_pDatetimeDbus; + static DatetimeInterface* m_pDatetimeInterface; }; -QDBusInterface *DatetimeInterfaceTest::m_pDatetimeDbus = nullptr; +DatetimeInterface *DatetimeInterfaceTest::m_pDatetimeInterface = nullptr; TEST_F(DatetimeInterfaceTest, setTimezone) { - if (!m_pDatetimeDbus || !m_pDatetimeDbus->isValid()) { - return; - } - std::string oldValue = m_pDatetimeDbus->property("timezone").toStringList().at(0).toStdString(); - m_pDatetimeDbus->call("setTimezone", "Asia/Shanghai"); - std::string newValue = m_pDatetimeDbus->property("timezone").toStringList().at(0).toStdString(); + std::string oldValue = m_pDatetimeInterface->getTimezone().at(0).toStdString(); + bool ret = m_pDatetimeInterface->setTimezone("Asia/Shanghai"); + ASSERT_EQ(ret, true); + std::string newValue = m_pDatetimeInterface->getTimezone().at(0).toStdString(); ASSERT_STREQ(newValue.c_str(), "Asia/Shanghai"); - m_pDatetimeDbus->call("setTimeZone", oldValue.c_str()); + ret = m_pDatetimeInterface->setTimezone(oldValue.c_str()); + ASSERT_EQ(ret, true); } -TEST_F(DatetimeInterfaceTest, setTimeMode) +// 会弹授权窗口 +//TEST_F(DatetimeInterfaceTest, setTimeMode) +//{ +// std::string oldValue = m_pDatetimeInterface->getTimeMode().toStdString(); +// m_pDatetimeInterface->setTimeMode("automatic"); +// std::string newValue = m_pDatetimeInterface->getTimeMode().toStdString(); +// ASSERT_STREQ(newValue.c_str(), "automatic"); +// m_pDatetimeInterface->setTimeMode(oldValue.c_str()); +//} + +// 会弹授权窗口 +//TEST_F(DatetimeInterfaceTest, setNtpServer) +//{ +// std::string oldValue = m_pDatetimeInterface->getNtpServer().toStdString(); +// m_pDatetimeInterface->setNtpServer(""); +// std::string newValue = m_pDatetimeInterface->getNtpServer().toStdString(); +// ASSERT_STREQ(newValue.c_str(), ""); +// m_pDatetimeInterface->setNtpServer(oldValue.c_str()); +//} + +TEST_F(DatetimeInterfaceTest, setOtherTimezones) { - if (!m_pDatetimeDbus || !m_pDatetimeDbus->isValid()) { - return; - } - std::string oldValue = m_pDatetimeDbus->property("timeMode").toString().toStdString(); - m_pDatetimeDbus->call("setTimeMode", "automatic"); - std::string newValue = m_pDatetimeDbus->property("timeMode").toString().toStdString(); - ASSERT_STREQ(newValue.c_str(), "automatic"); - m_pDatetimeDbus->call("setTimeMode", oldValue.c_str()); + QStringList oldValue = m_pDatetimeInterface->getOtherTimezones(); + QStringList otherTimezone = {"Asia/Urumqi"}; + m_pDatetimeInterface->setOtherTimezones(otherTimezone); + QStringList newValue = m_pDatetimeInterface->getOtherTimezones(); + ASSERT_STREQ(newValue.at(0).toStdString().c_str(), "Asia/Urumqi"); + m_pDatetimeInterface->setOtherTimezones(oldValue); } -TEST_F(DatetimeInterfaceTest, setNtpServer) +TEST_F(DatetimeInterfaceTest, timezoneName) { - if (!m_pDatetimeDbus || !m_pDatetimeDbus->isValid()) { - return; - } - std::string oldValue = m_pDatetimeDbus->property("ntpServer").toString().toStdString(); - m_pDatetimeDbus->call("setNtpServer", ""); - std::string newValue = m_pDatetimeDbus->property("ntpServer").toString().toStdString(); - ASSERT_STREQ(newValue.c_str(), ""); - m_pDatetimeDbus->call("setNtpServer", oldValue.c_str()); + QStringList ret = m_pDatetimeInterface->timezoneName("Asia/Urumqi"); + ASSERT_STREQ(ret.at(0).toStdString().c_str(), "Asia/Urumqi"); } -TEST_F(DatetimeInterfaceTest, setOtherTimezones) +TEST_F(DatetimeInterfaceTest, getNtpServers) { - if (!m_pDatetimeDbus || !m_pDatetimeDbus->isValid()) { - return; - } - QStringList oldValue = m_pDatetimeDbus->property("otherTimezones").toStringList(); - QStringList otherTimezone = {"Asia/Urumqi"}; - m_pDatetimeDbus->call("setOtherTimezones", otherTimezone); - QStringList newValue = m_pDatetimeDbus->property("otherTimezones").toStringList(); - ASSERT_STREQ(newValue.at(0).toStdString().c_str(), "Asia/Urumqi"); - m_pDatetimeDbus->call("setOtherTimezones", oldValue); + QStringList ret = m_pDatetimeInterface->getNtpServers(); + ASSERT_STREQ(ret.at(0).toStdString().c_str(), "pool.ntp.org"); } -TEST_F(DatetimeInterfaceTest, timezoneName) +TEST_F(DatetimeInterfaceTest, timezoneChanged) { - if (!m_pDatetimeDbus || !m_pDatetimeDbus->isValid()) { - return; - } - QDBusReply<QStringList> ret = m_pDatetimeDbus->call("timezoneName", "Asia/Urumqi"); - if (ret.isValid()) { - std::string timezoneName = ret.value().at(0).toStdString(); - ASSERT_STREQ(timezoneName.c_str(), "Asia/Urumqi"); - } + bool ret = m_pDatetimeInterface->timezoneChanged("timezone"); + ASSERT_EQ(ret, true); +} + +TEST_F(DatetimeInterfaceTest, getTimeMode) +{ + QString ret = m_pDatetimeInterface->getTimeMode(); + if (ret == "automatic") { + ASSERT_STREQ(ret.toStdString().c_str(), "automatic"); + } else { + ASSERT_STREQ(ret.toStdString().c_str(), "manual"); + } +} + +TEST_F(DatetimeInterfaceTest, getNtpServer) +{ + QString ret = m_pDatetimeInterface->getNtpServer(); + ASSERT_GE(ret.size(), 0); } diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_datetime/unit_test_datetime.pro ukui-control-center-5.0.0.0/tests/unit_test_datetime/unit_test_datetime.pro --- ukui-control-center-5.0.0.0/tests/unit_test_datetime/unit_test_datetime.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_datetime/unit_test_datetime.pro 2025-02-07 16:27:50.000000000 +0800 @@ -4,6 +4,7 @@ # #------------------------------------------------- QT += dbus xml +QT -= gui #greaterThan(QT_MAJOR_VERSION, 4): QT += widgets concurrent sql xml TEMPLATE = app diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_default/main.cpp ukui-control-center-5.0.0.0/tests/unit_test_default/main.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_default/main.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_default/main.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,10 +1,7 @@ #include <gtest/gtest.h> -#include <QGuiApplication> - int main(int argc, char **argv) { - QGuiApplication a(argc, argv); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_default/unit_test_default.cpp ukui-control-center-5.0.0.0/tests/unit_test_default/unit_test_default.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_default/unit_test_default.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_default/unit_test_default.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,59 +1,48 @@ #include <gtest/gtest.h> #include <gtest/gtest-death-test.h> -#include <QDBusReply> -#include <QStringList> -#include <QDBusInterface> #include "../../registeredSession/plugins/default/defaultinterface.h" -#include "stubext.h" - -using namespace stub_ext; class DefaultInterfaceTest : public testing::Test { protected: static void SetUpTestSuite() { - m_pDefaultDbus = new QDBusInterface("org.ukui.ukcc.session", - "/Default", "org.ukui.ukcc.session.Default", - QDBusConnection::sessionBus()); + m_pDefaultInterface = new DefaultInterface(); } static void TearDownTestSuite() { - if (m_pDefaultDbus) { - delete m_pDefaultDbus; - m_pDefaultDbus = nullptr; - } + if (m_pDefaultInterface) { + delete m_pDefaultInterface; + m_pDefaultInterface = nullptr; + } } - static QDBusInterface* m_pDefaultDbus; + static DefaultInterface* m_pDefaultInterface; }; -QDBusInterface *DefaultInterfaceTest::m_pDefaultDbus = nullptr; +DefaultInterface *DefaultInterfaceTest::m_pDefaultInterface = nullptr; -TEST_F(DefaultInterfaceTest, getDefaultAppSize) +TEST_F(DefaultInterfaceTest, getDefaultApp) { - if (!m_pDefaultDbus || !m_pDefaultDbus->isValid()) { - return; - } - QDBusReply<QVariantList> ret = m_pDefaultDbus->call("getDefaultApp", "x-scheme-handler/http"); - ASSERT_GT(ret.value().size(), 0); + QVariantList ret = m_pDefaultInterface->getDefaultApp("x-scheme-handler/http"); + ASSERT_GT(ret.size(), 0); } -TEST_F(DefaultInterfaceTest, getAppListSize) +TEST_F(DefaultInterfaceTest, getAppList) { - if (!m_pDefaultDbus || !m_pDefaultDbus->isValid()) { - return; - } - QDBusReply<QVariantList> ret = m_pDefaultDbus->call("getAppList", "x-scheme-handler/http"); - ASSERT_GT(ret.value().size(), 0); + QVariantList ret = m_pDefaultInterface->getAppList("x-scheme-handler/http"); + ASSERT_GT(ret.size(), 0); } TEST_F(DefaultInterfaceTest, setDefaultApp) { - if (!m_pDefaultDbus || !m_pDefaultDbus->isValid()) { - return; - } - QDBusReply<void> ret = m_pDefaultDbus->call("setDefaultApp", "kylin-music.desktop", "audio/x-vorbis+ogg"); - ASSERT_EQ(ret.isValid(), true); + bool ret = m_pDefaultInterface->setDefaultApp("kylin-music.desktop", "audio/x-vorbis+ogg"); + ASSERT_EQ(ret, true); +} + +TEST_F(DefaultInterfaceTest, getSystemDefaultAppList) +{ + QMap<QString, QVariant> ret = m_pDefaultInterface->getSystemDefaultAppList(); + ASSERT_GT(ret.size(), 0); } diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_default/unit_test_default.pro ukui-control-center-5.0.0.0/tests/unit_test_default/unit_test_default.pro --- ukui-control-center-5.0.0.0/tests/unit_test_default/unit_test_default.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_default/unit_test_default.pro 2025-02-07 16:27:50.000000000 +0800 @@ -6,6 +6,7 @@ QT += dbus xml KService KCoreAddons KXmlGui KGlobalAccel #greaterThan(QT_MAJOR_VERSION, 4): QT += widgets concurrent sql xml +QT -= gui TEMPLATE = app TARGET = unit_test_default diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_keyboard/main.cpp ukui-control-center-5.0.0.0/tests/unit_test_keyboard/main.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_keyboard/main.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_keyboard/main.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,10 +1,7 @@ #include <gtest/gtest.h> -#include <QGuiApplication> - int main(int argc, char **argv) { - QGuiApplication a(argc, argv); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_keyboard/unit_test_keyboard.pro ukui-control-center-5.0.0.0/tests/unit_test_keyboard/unit_test_keyboard.pro --- ukui-control-center-5.0.0.0/tests/unit_test_keyboard/unit_test_keyboard.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_keyboard/unit_test_keyboard.pro 2025-02-07 16:27:50.000000000 +0800 @@ -4,6 +4,7 @@ # #------------------------------------------------- QT += dbus +QT -= gui #greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TEMPLATE = app diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_mouse/main.cpp ukui-control-center-5.0.0.0/tests/unit_test_mouse/main.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_mouse/main.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_mouse/main.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,9 +1,7 @@ #include <gtest/gtest.h> -#include <QGuiApplication> int main(int argc, char **argv) { - QGuiApplication a(argc, argv); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_mouse/unit_test_mouse.pro ukui-control-center-5.0.0.0/tests/unit_test_mouse/unit_test_mouse.pro --- ukui-control-center-5.0.0.0/tests/unit_test_mouse/unit_test_mouse.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_mouse/unit_test_mouse.pro 2025-02-07 16:27:50.000000000 +0800 @@ -4,7 +4,7 @@ # #------------------------------------------------- QT += dbus - +QT -= gui #greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TEMPLATE = app @@ -19,7 +19,7 @@ INCLUDEPATH += $$PROJECT_ROOTDIR LIBS += -lgtest_main -lpthread -LIBS += -L$$[QT_INSTALL_LIBS] -lXi -lgsettings-qt -lgtest -lgcov +LIBS += -L$$[QT_INSTALL_LIBS] -lgsettings-qt -lgtest -lgcov #OBJECTS_DIR = ./obj/ #MOC_DIR = ./moc/ diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_screenlock/main.cpp ukui-control-center-5.0.0.0/tests/unit_test_screenlock/main.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_screenlock/main.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_screenlock/main.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,10 +1,7 @@ #include <gtest/gtest.h> -#include <QGuiApplication> - int main(int argc, char **argv) { - QGuiApplication a(argc, argv); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_screenlock/unit_test_screenlock.cpp ukui-control-center-5.0.0.0/tests/unit_test_screenlock/unit_test_screenlock.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_screenlock/unit_test_screenlock.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_screenlock/unit_test_screenlock.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,10 +1,7 @@ #include <gtest/gtest.h> #include <gtest/gtest-death-test.h> -#include <QDBusReply> #include "../../registeredSession/plugins/screenlock/screenlockinterface.h" -#include "stubext.h" -using namespace stub_ext; class ScreenlockInterfaceTest : public testing::Test { @@ -12,61 +9,65 @@ static void SetUpTestSuite() { m_pScreenlockInterface = new ScreenlockInterface(); - m_pScreenlockDbus = new QDBusInterface("org.ukui.ukcc.session", - "/Screenlock", - "org.ukui.ukcc.session.Screenlock", - QDBusConnection::sessionBus()); } static void TearDownTestSuite() { - if (m_pScreenlockDbus) { - delete m_pScreenlockDbus; - m_pScreenlockDbus = nullptr; + if (m_pScreenlockInterface) { + delete m_pScreenlockInterface; + m_pScreenlockInterface = nullptr; } } static ScreenlockInterface *m_pScreenlockInterface; - static QDBusInterface* m_pScreenlockDbus; }; ScreenlockInterface *ScreenlockInterfaceTest::m_pScreenlockInterface = nullptr; -QDBusInterface *ScreenlockInterfaceTest::m_pScreenlockDbus = nullptr; TEST_F(ScreenlockInterfaceTest, setShowOnLogin) { - if (!m_pScreenlockDbus || !m_pScreenlockDbus->isValid()) { - return; - } - bool oldValue = m_pScreenlockDbus->property("showOnLogin").toBool(); - m_pScreenlockDbus->call("setShowOnLogin", false); - bool newValue = m_pScreenlockDbus->property("showOnLogin").toBool(); + bool oldValue = m_pScreenlockInterface->property("showOnLogin").toBool(); + m_pScreenlockInterface->setShowOnLogin(false); + bool newValue = m_pScreenlockInterface->property("showOnLogin").toBool(); ASSERT_EQ(newValue, false); - m_pScreenlockDbus->call("setShowOnLogin", oldValue); + m_pScreenlockInterface->setShowOnLogin(oldValue); } TEST_F(ScreenlockInterfaceTest, setWallpaper) { - if (!m_pScreenlockDbus || !m_pScreenlockDbus->isValid()) { - return; - } QGSettings gset("org.ukui.screensaver"); std::string oldValue = gset.get("background").toString().toStdString(); - m_pScreenlockDbus->call("setWallpaper", "/usr/share/backgrounds/city.jpg"); + m_pScreenlockInterface->setWallpaper("/usr/share/backgrounds/city.jpg"); std::string newValue = gset.get("background").toString().toStdString(); ASSERT_STREQ(newValue.c_str(), "/usr/share/backgrounds/city.jpg"); - m_pScreenlockDbus->call("setWallpaper", oldValue.c_str()); + m_pScreenlockInterface->setWallpaper(oldValue.c_str()); } TEST_F(ScreenlockInterfaceTest, resetDefault) { - if (!m_pScreenlockDbus || !m_pScreenlockDbus->isValid()) { - return; - } QGSettings gset("org.ukui.screensaver"); std::string oldValue = gset.get("background").toString().toStdString(); - m_pScreenlockDbus->call("resetDefault"); + m_pScreenlockInterface->resetDefault(); std::string newValue = gset.get("background").toString().toStdString(); - ASSERT_STREQ(newValue.c_str(), "/usr/share/backgrounds/1-warty-final-ubuntukylin.jpg"); - m_pScreenlockDbus->call("setWallpaper", oldValue.c_str()); + ASSERT_STREQ(newValue.c_str(), "/usr/share/backgrounds/1-openkylin.jpg"); + m_pScreenlockInterface->setWallpaper(oldValue.c_str()); +} + + +TEST_F(ScreenlockInterfaceTest, getPreviewWallpapers) +{ + int size = m_pScreenlockInterface->getPreviewWallpapers().size(); + ASSERT_GE(size, 0); +} + +TEST_F(ScreenlockInterfaceTest, getSourceWallpapers) +{ + int size = m_pScreenlockInterface->getSourceWallpapers().size(); + ASSERT_GE(size, 0); +} + +TEST_F(ScreenlockInterfaceTest, getWallpaper) +{ + int size = m_pScreenlockInterface->getWallpaper().size(); + ASSERT_GE(size, 0); } diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_screenlock/unit_test_screenlock.pro ukui-control-center-5.0.0.0/tests/unit_test_screenlock/unit_test_screenlock.pro --- ukui-control-center-5.0.0.0/tests/unit_test_screenlock/unit_test_screenlock.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_screenlock/unit_test_screenlock.pro 2025-02-07 16:27:50.000000000 +0800 @@ -4,6 +4,7 @@ # #------------------------------------------------- QT += dbus xml +QT -= gui #greaterThan(QT_MAJOR_VERSION, 4): QT += widgets concurrent sql xml TEMPLATE = app diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_screensaver/main.cpp ukui-control-center-5.0.0.0/tests/unit_test_screensaver/main.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_screensaver/main.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_screensaver/main.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,10 +1,7 @@ #include <gtest/gtest.h> -#include <QGuiApplication> - int main(int argc, char **argv) { - QGuiApplication a(argc, argv); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_screensaver/unit_test_screensaver.cpp ukui-control-center-5.0.0.0/tests/unit_test_screensaver/unit_test_screensaver.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_screensaver/unit_test_screensaver.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_screensaver/unit_test_screensaver.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,154 +1,116 @@ #include <gtest/gtest.h> #include <gtest/gtest-death-test.h> -#include <QDBusReply> #include "../../registeredSession/plugins/screensaver/screensaverinterface.h" -#include "stubext.h" - -using namespace stub_ext; class ScreensaverInterfaceTest : public testing::Test { protected: static void SetUpTestSuite() { - m_pScreensaverDbus = new QDBusInterface("org.ukui.ukcc.session", - "/Screensaver", - "org.ukui.ukcc.session.Screensaver", - QDBusConnection::sessionBus()); + m_pScreenSaverInterface = new ScreensaverInterface(); } static void TearDownTestSuite() { - if (m_pScreensaverDbus) { - delete m_pScreensaverDbus; - m_pScreensaverDbus = nullptr; - } + if (m_pScreenSaverInterface) { + delete m_pScreenSaverInterface; + m_pScreenSaverInterface = nullptr; + } } - static QDBusInterface* m_pScreensaverDbus; + static ScreensaverInterface* m_pScreenSaverInterface; }; -QDBusInterface *ScreensaverInterfaceTest::m_pScreensaverDbus = nullptr; +ScreensaverInterface *ScreensaverInterfaceTest::m_pScreenSaverInterface = nullptr; TEST_F(ScreensaverInterfaceTest, setPreentryTime) { - if (!m_pScreensaverDbus || !m_pScreensaverDbus->isValid()) { - return; - } - int oldValue = m_pScreensaverDbus->property("preentryTime").toInt(); - m_pScreensaverDbus->call("setPreentryTime", 10); - int newValue = m_pScreensaverDbus->property("preentryTime").toInt(); + int oldValue = m_pScreenSaverInterface->property("preentryTime").toInt(); + m_pScreenSaverInterface->setPreentryTime(10); + int newValue = m_pScreenSaverInterface->property("preentryTime").toInt(); ASSERT_EQ(newValue, 10); - m_pScreensaverDbus->call("setPreentryTime", oldValue); + m_pScreenSaverInterface->setPreentryTime(oldValue); } TEST_F(ScreensaverInterfaceTest, setScreensaverType) { - if (!m_pScreensaverDbus || !m_pScreensaverDbus->isValid()) { - return; - } - QGSettings gset("org.ukui.screensaver"); - std::string oldValue = m_pScreensaverDbus->property("screensaverType").toString().toStdString(); - m_pScreensaverDbus->call("setScreensaverType", "ukui"); - std::string newValue = m_pScreensaverDbus->property("screensaverType").toString().toStdString(); + QGSettings gsetting("org.ukui.screensaver"); + std::string oldValue = m_pScreenSaverInterface->property("screensaverType").toString().toStdString(); + m_pScreenSaverInterface->setScreensaverType("ukui"); + std::string newValue = gsetting.get("mode").toString().toStdString(); - ASSERT_STREQ(newValue.c_str(), "ukui"); - m_pScreensaverDbus->call("setScreensaverType", oldValue.c_str()); + ASSERT_STREQ(newValue.c_str(), "default-ukui"); + m_pScreenSaverInterface->setScreensaverType(oldValue.c_str()); } TEST_F(ScreensaverInterfaceTest, setShowBreakTimeUkuiCustom) { - if (!m_pScreensaverDbus || !m_pScreensaverDbus->isValid()) { - return; - } - bool oldValue = m_pScreensaverDbus->property("showBreakTimeCustom").toBool(); - m_pScreensaverDbus->call("getShowBreakTimeCustom", true); - bool newValue = m_pScreensaverDbus->property("showBreakTimeCustom").toBool(); + bool oldValue = m_pScreenSaverInterface->property("showBreakTimeCustom").toBool(); + m_pScreenSaverInterface->setShowBreakTimeCustom(true); + bool newValue = m_pScreenSaverInterface->property("showBreakTimeCustom").toBool(); ASSERT_EQ(newValue, true); - m_pScreensaverDbus->call("getShowBreakTimeCustom", oldValue); + m_pScreenSaverInterface->setShowBreakTimeCustom(oldValue); } TEST_F(ScreensaverInterfaceTest, setShowBreakTimeUkui) { - if (!m_pScreensaverDbus || !m_pScreensaverDbus->isValid()) { - return; - } - bool oldValue = m_pScreensaverDbus->property("showBreakTimeUkui").toBool(); - m_pScreensaverDbus->call("setShowBreakTimeUkui", false); - bool newValue = m_pScreensaverDbus->property("showBreakTimeUkui").toBool(); + bool oldValue = m_pScreenSaverInterface->property("showBreakTimeUkui").toBool(); + m_pScreenSaverInterface->setShowBreakTimeUkui(false); + bool newValue = m_pScreenSaverInterface->property("showBreakTimeUkui").toBool(); ASSERT_EQ(newValue, false); - m_pScreensaverDbus->call("setShowBreakTimeUkui", oldValue); + m_pScreenSaverInterface->setShowBreakTimeUkui(oldValue); } TEST_F(ScreensaverInterfaceTest, setScreenLockEnabled) { - if (!m_pScreensaverDbus || !m_pScreensaverDbus->isValid()) { - return; - } - bool oldValue = m_pScreensaverDbus->property("screenLockEnabled").toBool(); - m_pScreensaverDbus->call("setScreenLockEnabled", false); - bool newValue = m_pScreensaverDbus->property("screenLockEnabled").toBool(); + bool oldValue = m_pScreenSaverInterface->property("screenLockEnabled").toBool(); + m_pScreenSaverInterface->setScreenLockEnabled(false); + bool newValue = m_pScreenSaverInterface->property("screenLockEnabled").toBool(); ASSERT_EQ(newValue, false); - m_pScreensaverDbus->call("setScreenLockEnabled", oldValue); + m_pScreenSaverInterface->setScreenLockEnabled(oldValue); } TEST_F(ScreensaverInterfaceTest, setCustomPath) { - if (!m_pScreensaverDbus || !m_pScreensaverDbus->isValid()) { - return; - } - std::string oldValue = m_pScreensaverDbus->property("customPath").toString().toStdString(); - m_pScreensaverDbus->call("setCustomPath", "/test/path"); - std::string newValue = m_pScreensaverDbus->property("customPath").toString().toStdString(); + std::string oldValue = m_pScreenSaverInterface->property("customPath").toString().toStdString(); + m_pScreenSaverInterface->setCustomPath("/test/path"); + std::string newValue = m_pScreenSaverInterface->property("customPath").toString().toStdString(); ASSERT_STREQ(newValue.c_str(), "/test/path"); - m_pScreensaverDbus->call("setCustomPath", oldValue.c_str()); + m_pScreenSaverInterface->setCustomPath(oldValue.c_str()); } TEST_F(ScreensaverInterfaceTest, setSwitchRandom) { - if (!m_pScreensaverDbus || !m_pScreensaverDbus->isValid()) { - return; - } - bool oldValue = m_pScreensaverDbus->property("switchRandom").toBool(); - m_pScreensaverDbus->call("setSwitchRandom", false); - bool newValue = m_pScreensaverDbus->property("switchRandom").toBool(); + bool oldValue = m_pScreenSaverInterface->property("switchRandom").toBool(); + m_pScreenSaverInterface->setSwitchRandom(false); + bool newValue = m_pScreenSaverInterface->property("switchRandom").toBool(); ASSERT_EQ(newValue, false); - m_pScreensaverDbus->call("setSwitchRandom", oldValue); + m_pScreenSaverInterface->setSwitchRandom(oldValue); } TEST_F(ScreensaverInterfaceTest, setCycleTime) { - if (!m_pScreensaverDbus || !m_pScreensaverDbus->isValid()) { - return; - } - int oldValue = m_pScreensaverDbus->property("cycleTime").toInt(); - m_pScreensaverDbus->call("setCycleTime", 60); - int newValue = m_pScreensaverDbus->property("cycleTime").toInt(); + int oldValue = m_pScreenSaverInterface->property("cycleTime").toInt(); + m_pScreenSaverInterface->setCycleTime(60); + int newValue = m_pScreenSaverInterface->property("cycleTime").toInt(); ASSERT_EQ(newValue, 60); - m_pScreensaverDbus->call("setCycleTime", oldValue); + m_pScreenSaverInterface->setCycleTime(oldValue); } - TEST_F(ScreensaverInterfaceTest, setCustomText) { - if (!m_pScreensaverDbus || !m_pScreensaverDbus->isValid()) { - return; - } - std::string oldValue = m_pScreensaverDbus->property("customText").toString().toStdString(); - m_pScreensaverDbus->call("setCustomText", "test custom text"); - std::string newValue = m_pScreensaverDbus->property("customText").toString().toStdString(); + std::string oldValue = m_pScreenSaverInterface->property("customText").toString().toStdString(); + m_pScreenSaverInterface->setCustomText("test custom text"); + std::string newValue = m_pScreenSaverInterface->property("customText").toString().toStdString(); ASSERT_STREQ(newValue.c_str(), "test custom text"); - m_pScreensaverDbus->call("setCustomText", oldValue.c_str()); + m_pScreenSaverInterface->setCustomText(oldValue.c_str()); } TEST_F(ScreensaverInterfaceTest, setCustomTextCentered) { - if (!m_pScreensaverDbus || !m_pScreensaverDbus->isValid()) { - return; - } - bool oldValue = m_pScreensaverDbus->property("customTextCentered").toBool(); - m_pScreensaverDbus->call("setCustomTextCentered", false); - bool newValue = m_pScreensaverDbus->property("customTextCentered").toBool(); + bool oldValue = m_pScreenSaverInterface->property("customTextCentered").toBool(); + m_pScreenSaverInterface->setCustomTextCentered(false); + bool newValue = m_pScreenSaverInterface->property("customTextCentered").toBool(); ASSERT_EQ(newValue, false); - m_pScreensaverDbus->call("setCustomTextCentered", oldValue); + m_pScreenSaverInterface->setCustomTextCentered(oldValue); } diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_screensaver/unit_test_screensaver.pro ukui-control-center-5.0.0.0/tests/unit_test_screensaver/unit_test_screensaver.pro --- ukui-control-center-5.0.0.0/tests/unit_test_screensaver/unit_test_screensaver.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_screensaver/unit_test_screensaver.pro 2025-02-07 16:27:50.000000000 +0800 @@ -4,6 +4,7 @@ # #------------------------------------------------- QT += dbus xml +QT -= gui #greaterThan(QT_MAJOR_VERSION, 4): QT += widgets concurrent sql xml TEMPLATE = app diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_shortcut/main.cpp ukui-control-center-5.0.0.0/tests/unit_test_shortcut/main.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_shortcut/main.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_shortcut/main.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,10 +1,7 @@ #include <gtest/gtest.h> -#include <QGuiApplication> - int main(int argc, char **argv) { - QGuiApplication a(argc, argv); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_shortcut/unit_test_shortcut.cpp ukui-control-center-5.0.0.0/tests/unit_test_shortcut/unit_test_shortcut.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_shortcut/unit_test_shortcut.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_shortcut/unit_test_shortcut.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,11 +1,6 @@ #include <gtest/gtest.h> #include <gtest/gtest-death-test.h> -#include <QDBusReply> #include "../../registeredSession/plugins/shortcut/shortcutinterface.h" -#include "../../registeredSession/plugins/shortcut/type.h" -#include "stubext.h" - -using namespace stub_ext; class ShortcutInterfaceTest : public testing::Test { @@ -13,62 +8,62 @@ static void SetUpTestSuite() { m_pShortcutInterface = new ShortcutInterface(); - m_pShortcutDbus = new QDBusInterface("org.ukui.ukcc.session", - "/Shortcut", - "org.ukui.ukcc.session.Shortcut", - QDBusConnection::sessionBus()); + m_pShortcutInterface->getThreadStart(); } static void TearDownTestSuite() { - if (m_pShortcutInterface) { - delete m_pShortcutInterface; - m_pShortcutInterface = nullptr; - } - if (m_pShortcutInterface) { - delete m_pShortcutInterface; - m_pShortcutInterface = nullptr; - } } static ShortcutInterface *m_pShortcutInterface; - static QDBusInterface* m_pShortcutDbus; }; ShortcutInterface *ShortcutInterfaceTest::m_pShortcutInterface = nullptr; -QDBusInterface *ShortcutInterfaceTest::m_pShortcutDbus = nullptr; -TEST_F(ShortcutInterfaceTest, getSystemShortcutSize) +TEST_F(ShortcutInterfaceTest, getSystemShortcut) { - if (!m_pShortcutDbus || !m_pShortcutDbus->isValid()) { - return; - } - QDBusReply<QStringPairList> ret = m_pShortcutDbus->call("getSystemShortcut"); - ASSERT_TRUE(ret.isValid()); - QStringPairList pairList = ret.value(); + QStringPairList pairList = m_pShortcutInterface->getSystemShortcut(); ASSERT_GE(pairList.size(), 15); } -TEST_F(ShortcutInterfaceTest, getCustomShortcutSize) +TEST_F(ShortcutInterfaceTest, getCustomShortcut) { - if (!m_pShortcutDbus || !m_pShortcutDbus->isValid()) { - return; - } - QDBusReply<QStringPairList> ret = m_pShortcutDbus->call("getSystemShortcut"); - ASSERT_TRUE(ret.isValid()); - QStringPairList pairList = ret.value(); + QStringPairList pairList = m_pShortcutInterface->getCustomShortcut(); + ASSERT_GE(pairList.size(), 0); +} + +TEST_F(ShortcutInterfaceTest, getSystemShortcutEntry) +{ + QList<KeyEntry> pairList = m_pShortcutInterface->getSystemShortcutEntry(); + ASSERT_GE(pairList.size(), 15); +} + +TEST_F(ShortcutInterfaceTest, getCustomShortcutEntry) +{ + QList<KeyEntry> pairList = m_pShortcutInterface->getCustomShortcutEntry(); ASSERT_GE(pairList.size(), 0); } +TEST_F(ShortcutInterfaceTest, getShowShortcutString) +{ + QString shortKey = "Meta+A"; + m_pShortcutInterface->updateShortcut(); + QString newShortKey = m_pShortcutInterface->getShowShortcutString(shortKey); + ASSERT_GE(newShortKey.toStdString().c_str(), "Win+A"); +} + +TEST_F(ShortcutInterfaceTest, updateShortcut) +{ + bool ret = m_pShortcutInterface->updateShortcut(); + ASSERT_EQ(ret, true); +} + TEST_F(ShortcutInterfaceTest, setSystemShortcut) { - if (!m_pShortcutDbus || !m_pShortcutDbus->isValid()) { - return; - } QGSettings generalShort("org.ukui.SettingsDaemon.plugins.media-keys"); std::string oldValue = generalShort.get("kylin-display-switch").toString().toStdString(); - m_pShortcutDbus->call("setSystemShortcut","kylin-display-switch","<Win>V"); + m_pShortcutInterface->setSystemShortcut("kylin-display-switch", "<Win>V"); std::string newValue = generalShort.get("kylin-display-switch").toString().toStdString(); ASSERT_STREQ(newValue.c_str(), "<Win>V"); diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_shortcut/unit_test_shortcut.pro ukui-control-center-5.0.0.0/tests/unit_test_shortcut/unit_test_shortcut.pro --- ukui-control-center-5.0.0.0/tests/unit_test_shortcut/unit_test_shortcut.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_shortcut/unit_test_shortcut.pro 2025-02-07 16:27:50.000000000 +0800 @@ -4,6 +4,7 @@ # #------------------------------------------------- QT += dbus +QT -= gui #greaterThan(QT_MAJOR_VERSION, 4): QT += widgets concurrent sql xml TEMPLATE = app @@ -37,13 +38,9 @@ SOURCES += ../../registeredSession/plugins/shortcut/shortcutinterface.cpp \ ../../registeredSession/plugins/shortcut/getshortcutworker.cpp \ - ../../registeredSession/plugins/shortcut/type.cpp \ - ../../registeredSession/universalinterface.cpp \ unit_test_shortcut.cpp \ main.cpp HEADERS += ../../registeredSession/plugins/shortcut/shortcutinterface.h \ ../../registeredSession/plugins/shortcut/getshortcutworker.h \ ../../registeredSession/plugins/shortcut/type.h \ - ../../registeredSession/universalinterface.h - diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_vino/main.cpp ukui-control-center-5.0.0.0/tests/unit_test_vino/main.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_vino/main.cpp 1970-01-01 08:00:00.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_vino/main.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -0,0 +1,8 @@ +#include <gtest/gtest.h> + +int main(int argc, char **argv) +{ + testing::InitGoogleTest(&argc, argv); + + return RUN_ALL_TESTS(); +} diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_vino/unit_test_vino.cpp ukui-control-center-5.0.0.0/tests/unit_test_vino/unit_test_vino.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_vino/unit_test_vino.cpp 1970-01-01 08:00:00.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_vino/unit_test_vino.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -0,0 +1,244 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * Copyright (C) 2024 KylinSoft 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 <gtest/gtest.h> +#include <gtest/gtest-death-test.h> + +#include "../../registeredSession/plugins/vino/vinointerface.h" + +#include "stubext.h" +using namespace stub_ext; + +class VinoInterfaceTest : public testing::Test +{ +protected: + static void SetUpTestSuite() + { + m_pVinoDbus = new VinoInterface(); + } + + static void TearDownTestSuite() + { + delete m_pVinoDbus; + m_pVinoDbus = nullptr; + } + + static VinoInterface *m_pVinoDbus; +}; + +VinoInterface *VinoInterfaceTest::m_pVinoDbus = nullptr; + +TEST_F(VinoInterfaceTest, viewOnly) +{ + // get current value + bool repeatKeyValue = m_pVinoDbus->getViewOnly(); + + // call setKeyRepeat function to set different value + m_pVinoDbus->setVinoKey(m_pVinoDbus->kVinoViewOnlyKey, !repeatKeyValue); + + // test the current value and the value you have set + ASSERT_EQ(!repeatKeyValue, m_pVinoDbus->getViewOnly()); + + // restore the value before test + m_pVinoDbus->setVinoKey(m_pVinoDbus->kVinoViewOnlyKey, repeatKeyValue); +} + +TEST_F(VinoInterfaceTest, noViewOnly) +{ + // get current value + QString originKey = m_pVinoDbus->kVinoViewOnlyKey; + m_pVinoDbus->kVinoViewOnlyKey = ""; + + bool repeatKeyValue = m_pVinoDbus->getViewOnly(); + + // call setKeyRepeat function to set different value + m_pVinoDbus->setVinoKey(m_pVinoDbus->kVinoViewOnlyKey, !repeatKeyValue); + + // test the current value and the value you have set + ASSERT_EQ(!repeatKeyValue, m_pVinoDbus->getViewOnly()); + + // restore the value before test + m_pVinoDbus->kVinoViewOnlyKey = originKey; +} + +TEST_F(VinoInterfaceTest, PromptEnabled) +{ + bool promptKeyValue = m_pVinoDbus->getPromptEnabled(); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kVinoPromptKey, !promptKeyValue); + + ASSERT_EQ(promptKeyValue, m_pVinoDbus->getPromptEnabled()); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kVinoPromptKey, promptKeyValue); +} + +TEST_F(VinoInterfaceTest, noPromptEnabled) +{ + // get current value + QString originKey = m_pVinoDbus->kVinoPromptKey; + m_pVinoDbus->kVinoPromptKey = ""; + + bool promptKeyValue = m_pVinoDbus->getPromptEnabled(); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kVinoPromptKey, !promptKeyValue); + + ASSERT_EQ(promptKeyValue, m_pVinoDbus->getPromptEnabled()); + + // restore the value before test + m_pVinoDbus->kVinoPromptKey = originKey; +} + +TEST_F(VinoInterfaceTest, Method) +{ + QString methodKeyValue = m_pVinoDbus->getMethod(); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kAuthenticationKey, methodKeyValue); + + ASSERT_EQ(methodKeyValue, m_pVinoDbus->getMethod()); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kAuthenticationKey, methodKeyValue); +} + +TEST_F(VinoInterfaceTest, noMethod) +{ + // get current value + QString originKey = m_pVinoDbus->kAuthenticationKey; + m_pVinoDbus->kAuthenticationKey = ""; + + QString methodKeyValue = m_pVinoDbus->getMethod(); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kAuthenticationKey, methodKeyValue); + + ASSERT_EQ(methodKeyValue, m_pVinoDbus->getMethod()); + + // restore the value before test + m_pVinoDbus->kAuthenticationKey = originKey; +} + + +TEST_F(VinoInterfaceTest, Password) +{ + QString passwordKeyValue = m_pVinoDbus->getPassword(); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kVncPwdKey, passwordKeyValue); + + ASSERT_EQ(passwordKeyValue, m_pVinoDbus->getPassword()); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kVncPwdKey, passwordKeyValue); +} + +TEST_F(VinoInterfaceTest, noPassword) +{ + // get current value + QString originKey = m_pVinoDbus->kVncPwdKey; + m_pVinoDbus->kVncPwdKey = ""; + + QString passwordKeyValue = m_pVinoDbus->getPassword(); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kVncPwdKey, passwordKeyValue); + + ASSERT_EQ(passwordKeyValue, m_pVinoDbus->getPassword()); + + // restore the value before test + m_pVinoDbus->kVncPwdKey = originKey; +} + +TEST_F(VinoInterfaceTest, VinoServerStatus) +{ + bool currentValue = m_pVinoDbus->getVinoServerStatus(); +} + +TEST_F(VinoInterfaceTest, VinoStatus) +{ + bool currentValue = m_pVinoDbus->getVinoStatus(); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kVinoEnableKey, !currentValue); + + ASSERT_EQ(!currentValue, m_pVinoDbus->getVinoStatus()); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kVinoEnableKey, currentValue); +} + +TEST_F(VinoInterfaceTest, noVinoStatus) +{ + // get current value + QString originKey = m_pVinoDbus->kVinoEnableKey; + m_pVinoDbus->kVinoEnableKey = ""; + + bool currentValue = m_pVinoDbus->getVinoStatus(); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kVinoEnableKey, !currentValue); + + ASSERT_EQ(!currentValue, m_pVinoDbus->getVinoStatus()); + + // restore the value before test + m_pVinoDbus->kVinoEnableKey = originKey; +} + +TEST_F(VinoInterfaceTest, XrdpStatus) +{ + bool currentValue = m_pVinoDbus->getXrdpStatus(); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kXrdpEnableKey, !currentValue); + + ASSERT_EQ(!currentValue, m_pVinoDbus->getXrdpStatus()); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kXrdpEnableKey, currentValue); +} + +TEST_F(VinoInterfaceTest, noXrdpStatus) +{ + // get current value + QString originKey = m_pVinoDbus->kXrdpEnableKey; + m_pVinoDbus->kXrdpEnableKey = ""; + + int currentValue = m_pVinoDbus->getXrdpStatus(); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kXrdpEnableKey, currentValue); + + // restore the value before test + m_pVinoDbus->kXrdpEnableKey = originKey; +} + +TEST_F(VinoInterfaceTest, noEnableStatus) +{ + bool currentValue = m_pVinoDbus->getEnableStatus(); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kEnableKey, !currentValue); + + ASSERT_EQ(currentValue, m_pVinoDbus->getEnableStatus()); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kEnableKey, currentValue); +} + +TEST_F(VinoInterfaceTest, EnableStatus) +{ + // get current value + QString originKey = m_pVinoDbus->kEnableKey; + m_pVinoDbus->kEnableKey = ""; + + bool currentValue = m_pVinoDbus->getEnableStatus(); + + m_pVinoDbus->setVinoKey(m_pVinoDbus->kEnableKey, !currentValue); + + ASSERT_EQ(currentValue, m_pVinoDbus->getEnableStatus()); + + // restore the value before test + m_pVinoDbus->kEnableKey = originKey; +} diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_vino/unit_test_vino.pro ukui-control-center-5.0.0.0/tests/unit_test_vino/unit_test_vino.pro --- ukui-control-center-5.0.0.0/tests/unit_test_vino/unit_test_vino.pro 1970-01-01 08:00:00.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_vino/unit_test_vino.pro 2025-02-07 16:27:50.000000000 +0800 @@ -0,0 +1,40 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2019-08-22T11:12:59 +# +#------------------------------------------------- +QT += dbus +QT -= gui +#greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +TEMPLATE = app + +TARGET = unit_test_vino +target.source += $$TARGET +target.path = ./ + +#代码覆盖率工具gcov +QMAKE_LFLAGS +=-fprofile-arcs -ftest-coverage +QMAKE_CXXFLAGS += --coverage -fno-inline -fno-access-control + +LIBS += -lgtest_main -lpthread +LIBS += -L$$[QT_INSTALL_LIBS] -lgsettings-qt -lgtest -lgcov + +#OBJECTS_DIR = ./obj +#MOC_DIR = ./moc + +#打桩工具 +TEST_UTILS_PATH = $$PWD/../kt-test-utils + +# Include directories +INCLUDEPATH += $$PROJECT_ROOTDIR \ + $$TEST_UTILS_PATH/cpp-stub \ + $$TEST_UTILS_PATH/cpp-stub-ext \ + +SOURCES += ../../registeredSession/plugins/vino/vinointerface.cpp \ + ../../registeredSession/universalinterface.cpp \ + unit_test_vino.cpp \ + main.cpp + +HEADERS += ../../registeredSession/plugins/vino/vinointerface.h \ + ../../registeredSession/universalinterface.h + diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_wallpaper/main.cpp ukui-control-center-5.0.0.0/tests/unit_test_wallpaper/main.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_wallpaper/main.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_wallpaper/main.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,10 +1,7 @@ #include <gtest/gtest.h> -#include <QGuiApplication> - int main(int argc, char **argv) { - QGuiApplication a(argc, argv); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_wallpaper/unit_test_wallpaper.cpp ukui-control-center-5.0.0.0/tests/unit_test_wallpaper/unit_test_wallpaper.cpp --- ukui-control-center-5.0.0.0/tests/unit_test_wallpaper/unit_test_wallpaper.cpp 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_wallpaper/unit_test_wallpaper.cpp 2025-02-07 16:27:50.000000000 +0800 @@ -1,73 +1,120 @@ #include <gtest/gtest.h> #include <gtest/gtest-death-test.h> -#include <QDBusReply> -#include <QDBusInterface> #include <QGSettings> -#include "../../registeredSession/plugins/wallpaper/workerobject.h" -#include "../../registeredSession/plugins/wallpaper/xmlhandle.h" -#include "stubext.h" - -using namespace stub_ext; +#include "../../registeredSession/plugins/wallpaper/wallpaperinterface.h" class WallpaperInterfaceTest : public testing::Test { protected: static void SetUpTestSuite() { - m_pWallpaperDbus = new QDBusInterface("org.ukui.ukcc.session", - "/Wallpaper", - "org.ukui.ukcc.session.Wallpaper", - QDBusConnection::sessionBus()); + m_pWallpaperInterface = new WallpaperInterface(); } static void TearDownTestSuite() { - if (m_pWallpaperDbus) { - delete m_pWallpaperDbus; - m_pWallpaperDbus = nullptr; + if (m_pWallpaperInterface) { + delete m_pWallpaperInterface; + m_pWallpaperInterface = nullptr; } } - static QDBusInterface* m_pWallpaperDbus; + static WallpaperInterface* m_pWallpaperInterface; }; -QDBusInterface *WallpaperInterfaceTest::m_pWallpaperDbus = nullptr; +WallpaperInterface *WallpaperInterfaceTest::m_pWallpaperInterface = nullptr; -TEST_F(WallpaperInterfaceTest, setWallpaper) +TEST_F(WallpaperInterfaceTest, getWallpaperMode) { - if (!m_pWallpaperDbus || !m_pWallpaperDbus->isValid()) { - return; + QGSettings gset("org.mate.background"); + QString oldValue = gset.get("picture-filename").toString(); + m_pWallpaperInterface->getWallpaper(); + std::string curValue = m_pWallpaperInterface->getWallpaperMode().toStdString(); + if (oldValue.isEmpty()) { + ASSERT_STREQ(curValue.c_str(), "color"); + } else { + ASSERT_STREQ(curValue.c_str(), "picture"); } +} + +TEST_F(WallpaperInterfaceTest, setWallpaperPicture) +{ QGSettings gset("org.mate.background"); - std::string oldValue = gset.get("picture-filename").toString().toStdString(); - m_pWallpaperDbus->call("setWallpaper", "picture", "/usr/share/backgrounds/city.jpg"); + QString oldValue = gset.get("picture-filename").toString(); + QString mode = "picture"; + QString colorData = ""; + if (oldValue.isEmpty()) { + mode = "color"; + colorData = gset.get("primary-color").toString(); + } + std::string wallpaperMode = m_pWallpaperInterface->getWallpaperMode().toStdString(); + m_pWallpaperInterface->setWallpaper("picture", "/usr/share/backgrounds/city.jpg"); std::string newValue = gset.get("picture-filename").toString().toStdString(); ASSERT_STREQ(newValue.c_str(), "/usr/share/backgrounds/city.jpg"); - m_pWallpaperDbus->call("setWallpaper", "picture", oldValue.c_str()); + if (mode == "color") { + m_pWallpaperInterface->setWallpaper("color", colorData.toStdString().c_str()); + } else { + m_pWallpaperInterface->setWallpaper("picture", oldValue.toStdString().c_str()); + } } -TEST_F(WallpaperInterfaceTest, setDisplayType) +TEST_F(WallpaperInterfaceTest, setWallpaperColor) { - if (!m_pWallpaperDbus || !m_pWallpaperDbus->isValid()) { - return; + QGSettings gset("org.mate.background"); + QString oldValue = gset.get("picture-filename").toString(); + QString mode = "picture"; + QString colorData = ""; + if (oldValue.isEmpty()) { + mode = "color"; + colorData = gset.get("primary-color").toString(); + } + std::string wallpaperMode = m_pWallpaperInterface->getWallpaperMode().toStdString(); + m_pWallpaperInterface->setWallpaper("color", "#2d7d9a"); + std::string newValue = gset.get("primary-color").toString().toStdString(); + ASSERT_STREQ(newValue.c_str(), "#2d7d9a"); + if (mode == "color") { + m_pWallpaperInterface->setWallpaper("color", colorData.toStdString().c_str()); + } else { + m_pWallpaperInterface->setWallpaper("picture", oldValue.toStdString().c_str()); } - std::string oldType = m_pWallpaperDbus->property("displayType").toString().toStdString(); - m_pWallpaperDbus->call("setDisplayType", "centered"); - std::string newType = m_pWallpaperDbus->property("displayType").toString().toStdString(); +} +TEST_F(WallpaperInterfaceTest, setDisplayType) +{ + std::string oldType = m_pWallpaperInterface->getDisplayType().toStdString(); + m_pWallpaperInterface->setDisplayType("centered"); + QGSettings gset("org.mate.background"); + std::string newType = gset.get("picture-options").toString().toStdString(); ASSERT_STREQ(newType.c_str(), "centered"); - m_pWallpaperDbus->call("setDisplayType", oldType.c_str()); + m_pWallpaperInterface->setDisplayType(oldType.c_str()); } TEST_F(WallpaperInterfaceTest, resetDefault) { - if (!m_pWallpaperDbus || !m_pWallpaperDbus->isValid()) { - return; - } + QString oldType = m_pWallpaperInterface->getDisplayType(); QGSettings gset("org.mate.background"); - std::string oldType = m_pWallpaperDbus->property("displayType").toString().toStdString(); - m_pWallpaperDbus->call("resetDefault"); - std::string newType = m_pWallpaperDbus->property("displayType").toString().toStdString(); + std::string oldPicName = gset.get("picture-filename").toString().toStdString(); + + m_pWallpaperInterface->resetDefault(); + + std::string newType = m_pWallpaperInterface->getDisplayType().toStdString(); ASSERT_STREQ(newType.c_str(), "scaled"); - m_pWallpaperDbus->call("setDisplayType", oldType.c_str()); + + std::string newPicName = gset.get("picture-filename").toString().toStdString(); + ASSERT_STREQ(newPicName.c_str(), "/usr/share/backgrounds/1-openkylin.jpg"); + + m_pWallpaperInterface->setDisplayType(oldType); + gset.set("picture-filename", oldPicName.c_str()); +} + +TEST_F(WallpaperInterfaceTest, getPreviewWallpapers) +{ + int size = m_pWallpaperInterface->property("previewWallpapers").toStringList().size(); + ASSERT_GE(size, 0); +} + +TEST_F(WallpaperInterfaceTest, getSourceWallpapers) +{ + int size = m_pWallpaperInterface->property("sourceWallpapers").toStringList().size(); + ASSERT_GE(size, 0); } diff -Nru ukui-control-center-5.0.0.0/tests/unit_test_wallpaper/unit_test_wallpaper.pro ukui-control-center-5.0.0.0/tests/unit_test_wallpaper/unit_test_wallpaper.pro --- ukui-control-center-5.0.0.0/tests/unit_test_wallpaper/unit_test_wallpaper.pro 2024-12-23 12:28:44.000000000 +0800 +++ ukui-control-center-5.0.0.0/tests/unit_test_wallpaper/unit_test_wallpaper.pro 2025-02-07 16:27:50.000000000 +0800 @@ -4,6 +4,7 @@ # #------------------------------------------------- QT += dbus xml +QT -= gui #greaterThan(QT_MAJOR_VERSION, 4): QT += widgets concurrent sql xml TEMPLATE = app