!4 增加wayland定位接口调用
This commit is contained in:
parent
26869a3bbf
commit
d1136ea880
|
@ -1,86 +0,0 @@
|
||||||
name: Check build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
- cron: '0 0 * * *'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
archlinux:
|
|
||||||
name: on Archlinux
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
container: docker.io/library/archlinux:latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout ukui-menu source code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Refresh pacman repository
|
|
||||||
run: pacman -Sy
|
|
||||||
- name: Install build dependencies
|
|
||||||
run: pacman -S --noconfirm base-devel qt5-base bamf gsettings-qt qt5-svg qt5-x11extras qt5-tools kwindowsystem
|
|
||||||
- name: QMake configure & Make
|
|
||||||
run: |
|
|
||||||
mkdir build;
|
|
||||||
cd build;
|
|
||||||
qmake-qt5 ..;
|
|
||||||
make -j$(nproc);
|
|
||||||
debian:
|
|
||||||
name: on Debian Sid
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
container: docker.io/library/debian:sid
|
|
||||||
env:
|
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
steps:
|
|
||||||
- name: Checkout ukui-menu source code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Update apt repository
|
|
||||||
run: apt-get update -y
|
|
||||||
- name: Install build dependcies
|
|
||||||
run: apt-get install -y build-essential qt5-default qttools5-dev-tools debhelper-compat qtbase5-dev libqt5svg5-dev libglib2.0-dev libgsettings-qt-dev libbamf3-dev libxrandr-dev libxtst-dev libx11-dev libqt5x11extras5-dev libkf5windowsystem-dev
|
|
||||||
- name: QMake configure & Make
|
|
||||||
run: |
|
|
||||||
mkdir build;
|
|
||||||
cd build;
|
|
||||||
qmake ..;
|
|
||||||
make -j$(nproc);
|
|
||||||
|
|
||||||
fedora:
|
|
||||||
name: on Fedora 32
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
container: docker.io/library/fedora:32
|
|
||||||
steps:
|
|
||||||
- name: Checkout ukui-menu source code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install build dependencies
|
|
||||||
run: dnf install -y which gcc gcc-c++ make cmake cmake-rpm-macros autoconf automake intltool rpm-build qt5-rpm-macros qt5-qtbase-devel qt5-qtsvg-devel qt5-qtx11extras-devel qt5-linguist glib2-devel gsettings-qt-devel bamf-devel libXrandr-devel libXtst-devel libX11-devel kf5-kwindowsystem-devel
|
|
||||||
- name: QMake configure & Make
|
|
||||||
run: |
|
|
||||||
mkdir build;
|
|
||||||
cd build;
|
|
||||||
qmake-qt5 ..;
|
|
||||||
make -j$(nproc);
|
|
||||||
ubuntu:
|
|
||||||
name: on Ubuntu 20.04
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
container: docker.io/library/ubuntu:focal
|
|
||||||
env:
|
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
steps:
|
|
||||||
- name: Checkout ukui-menu source code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Update apt repository
|
|
||||||
run: apt-get update -y
|
|
||||||
- name: Install build dependcies
|
|
||||||
run: apt-get install -y build-essential qt5-default qttools5-dev-tools debhelper-compat qtbase5-dev libqt5svg5-dev libglib2.0-dev libgsettings-qt-dev libbamf3-dev libxrandr-dev libxtst-dev libx11-dev libqt5x11extras5-dev libkf5windowsystem-dev
|
|
||||||
- name: QMake configure & Make
|
|
||||||
run: |
|
|
||||||
mkdir build;
|
|
||||||
cd build;
|
|
||||||
qmake ..;
|
|
||||||
make -j$(nproc);
|
|
34
README.md
34
README.md
|
@ -2,7 +2,34 @@
|
||||||
|
|
||||||
![build](https://github.com/ukui/ukui-menu/workflows/Check%20build/badge.svg?branch=master)
|
![build](https://github.com/ukui/ukui-menu/workflows/Check%20build/badge.svg?branch=master)
|
||||||
|
|
||||||
An advanced menu for UKUI, providing common and all software mixed sort module, alphabet classification module, functional classification module and search module.
|
An advanced menu for UKUI, providing common and all software mixed sort module, alphabet classification module, functional classification module and search module. Provides favorites and recent file functions, You can fix it to your favorites area by right-clicking the application. Provides two display modes: default window and full-screen window.
|
||||||
|
|
||||||
|
# The project structure
|
||||||
|
|
||||||
|
## data/img
|
||||||
|
|
||||||
|
Provide icon files for the projec.
|
||||||
|
|
||||||
|
## src/BackProcess
|
||||||
|
|
||||||
|
Background data processing function realization, Includes DBUS, path listening, data acquisition, and search functions.
|
||||||
|
|
||||||
|
## src/QtSingleApplication
|
||||||
|
|
||||||
|
Singleton pattern processing.
|
||||||
|
|
||||||
|
## src/UserInterface
|
||||||
|
|
||||||
|
The UI implementation.
|
||||||
|
|
||||||
|
## src/UtilityFunction
|
||||||
|
|
||||||
|
Implementation of common functions, including database operations.
|
||||||
|
|
||||||
|
## translations
|
||||||
|
|
||||||
|
Translation files
|
||||||
|
|
||||||
|
|
||||||
# How to report bugs
|
# How to report bugs
|
||||||
Bugs should be reported to the UKUI bug tracking system:
|
Bugs should be reported to the UKUI bug tracking system:
|
||||||
|
@ -15,6 +42,7 @@ Please read the HACKING file for information on where to send changes or
|
||||||
bugfixes for this package.
|
bugfixes for this package.
|
||||||
|
|
||||||
# How to build
|
# How to build
|
||||||
|
|
||||||
## Preparation
|
## Preparation
|
||||||
You can build pre-depends with such command:
|
You can build pre-depends with such command:
|
||||||
|
|
||||||
|
@ -34,7 +62,7 @@ Note: build-depends references the paragraph in debian/control.
|
||||||
|
|
||||||
Note: If you want to run ukui-menu, You just need to execute the ukui-menu command at the terminal.
|
Note: If you want to run ukui-menu, You just need to execute the ukui-menu command at the terminal.
|
||||||
|
|
||||||
## DBUS interface
|
# DBUS interface
|
||||||
|
|
||||||
BUS Name:org.ukui.menu
|
BUS Name:org.ukui.menu
|
||||||
|
|
||||||
|
@ -50,7 +78,7 @@ WinKeyResponse () <---> ukui-menu display hidden state change interface
|
||||||
|
|
||||||
GetSecurityConfigPath () <---> Get security control profile path
|
GetSecurityConfigPath () <---> Get security control profile path
|
||||||
|
|
||||||
## Configuration file
|
# Configuration file
|
||||||
|
|
||||||
.config/ukui/Ukuimenu.db
|
.config/ukui/Ukuimenu.db
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 305 B After Width: | Height: | Size: 305 B |
|
@ -1,5 +1,11 @@
|
||||||
ukui-menu (3.1.1-ok1) yangtze; urgency=medium
|
ukui-menu (3.20.0.3-0k1) yangtze; urgency=medium
|
||||||
|
|
||||||
* Initial for openKylin.
|
* 3.20版本提交
|
||||||
|
|
||||||
-- Xie Wei <xiewei@kylinos.cn> Fri, 06 May 2022 17:54:45 +0800
|
-- lixueman <lixueman@kylinos.cn> Sat, 18 Jun 2022 21:42:59 +0800
|
||||||
|
|
||||||
|
ukui-menu (3.1.1-0k0) yangtze; urgency=medium
|
||||||
|
|
||||||
|
* 版本号规范化
|
||||||
|
|
||||||
|
-- Xie Wei <xiewei@kylinos.cn> Fri, 06 May 2022 17:54:45 +0800
|
||||||
|
|
|
@ -19,7 +19,8 @@ Build-Depends: debhelper-compat (=12),
|
||||||
libx11-dev,
|
libx11-dev,
|
||||||
libukui-common0,
|
libukui-common0,
|
||||||
libukui-common-dev,
|
libukui-common-dev,
|
||||||
libpeony-dev
|
libpeony-dev,
|
||||||
|
libkysdk-waylandhelper-dev
|
||||||
Standards-Version: 4.5.0
|
Standards-Version: 4.5.0
|
||||||
Rules-Requires-Root: no
|
Rules-Requires-Root: no
|
||||||
Homepage: https://github.com/ukui/ukui-menu
|
Homepage: https://github.com/ukui/ukui-menu
|
||||||
|
@ -33,7 +34,8 @@ Depends: ${shlibs:Depends},
|
||||||
accountsservice,
|
accountsservice,
|
||||||
libgsettings-qt1,
|
libgsettings-qt1,
|
||||||
libqt5x11extras5,
|
libqt5x11extras5,
|
||||||
bamfdaemon
|
bamfdaemon,
|
||||||
|
libkysdk-waylandhelper
|
||||||
Suggests:kylin-status-manager,
|
Suggests:kylin-status-manager,
|
||||||
kylin-daq
|
kylin-daq
|
||||||
Description: Advanced ukui menu
|
Description: Advanced ukui menu
|
||||||
|
|
54
main.cpp
54
main.cpp
|
@ -30,6 +30,9 @@
|
||||||
#include "file-utils.h"
|
#include "file-utils.h"
|
||||||
#include <ukuisdk/kylin-com4c.h>
|
#include <ukuisdk/kylin-com4c.h>
|
||||||
#include <ukuisdk/kylin-com4cxx.h>
|
#include <ukuisdk/kylin-com4cxx.h>
|
||||||
|
#include "ukuistylehelper/ukuistylehelper.h"
|
||||||
|
#include "windowmanager/windowmanager.h"
|
||||||
|
|
||||||
#define UKUI_SERVICE "org.gnome.SessionManager"
|
#define UKUI_SERVICE "org.gnome.SessionManager"
|
||||||
#define UKUI_PATH "/org/gnome/SessionManager"
|
#define UKUI_PATH "/org/gnome/SessionManager"
|
||||||
#define UKUI_INTERFACE "org.gnome.SessionManager"
|
#define UKUI_INTERFACE "org.gnome.SessionManager"
|
||||||
|
@ -40,6 +43,9 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
initUkuiLog4qt("ukui-menu");
|
initUkuiLog4qt("ukui-menu");
|
||||||
g_projectCodeName = KDKGetPrjCodeName().c_str();
|
g_projectCodeName = KDKGetPrjCodeName().c_str();
|
||||||
|
g_subProjectCodeName = KDKGetOSRelease("SUB_PROJECT_CODENAME").c_str();
|
||||||
|
g_platform = QGuiApplication::platformName();
|
||||||
|
|
||||||
qRegisterMetaType<QVector<QStringList>>("QVector<QStringList>");
|
qRegisterMetaType<QVector<QStringList>>("QVector<QStringList>");
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
|
@ -69,20 +75,44 @@ int main(int argc, char *argv[])
|
||||||
MainWindow w;
|
MainWindow w;
|
||||||
app.setActivationWindow(&w);
|
app.setActivationWindow(&w);
|
||||||
|
|
||||||
if (Style::m_panelPosition == 0) {
|
|
||||||
w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + Style::m_availableScreenHeight - Style::minh - 3,
|
|
||||||
Style::minw, Style::minh));
|
|
||||||
} else if (Style::m_panelPosition == 1) {
|
|
||||||
w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + 4, Style::minw, Style::minh));
|
|
||||||
} else if (Style::m_panelPosition == 2) {
|
|
||||||
w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + 4, Style::minw, Style::minh));
|
|
||||||
} else {
|
|
||||||
w.setGeometry(QRect(Style::m_primaryScreenX + Style::m_availableScreenWidth - Style::minw - 4, Style::m_primaryScreenY + 4,
|
|
||||||
Style::minw, Style::minh));
|
|
||||||
}
|
|
||||||
|
|
||||||
w.show();
|
w.show();
|
||||||
w.raise();
|
w.raise();
|
||||||
|
|
||||||
|
if (Style::m_panelPosition == 0) {
|
||||||
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
|
kdk::WindowManager::setGeometry(w.windowHandle(),QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY +
|
||||||
|
Style::m_availableScreenHeight - Style::minh - 3, Style::minw, Style::minh));
|
||||||
|
} else {
|
||||||
|
w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + Style::m_availableScreenHeight - Style::minh - 3,
|
||||||
|
Style::minw, Style::minh));
|
||||||
|
}
|
||||||
|
} else if (Style::m_panelPosition == 1) {
|
||||||
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
|
kdk::WindowManager::setGeometry(w.windowHandle(),QRect(Style::m_primaryScreenX + 4,
|
||||||
|
Style::m_primaryScreenY + 4, Style::minw, Style::minh));
|
||||||
|
} else {
|
||||||
|
w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + 4, Style::minw, Style::minh));
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (Style::m_panelPosition == 2) {
|
||||||
|
|
||||||
|
|
||||||
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
|
kdk::WindowManager::setGeometry(w.windowHandle(), QRect(Style::m_primaryScreenX + 4,
|
||||||
|
Style::m_primaryScreenY + 4, Style::minw, Style::minh));
|
||||||
|
} else {
|
||||||
|
w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + 4, Style::minw, Style::minh));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
|
kdk::WindowManager::setGeometry(w.windowHandle(), QRect(Style::m_primaryScreenX + Style::m_availableScreenWidth -
|
||||||
|
Style::minw - 4, Style::m_primaryScreenY + 4, Style::minw, Style::minh));
|
||||||
|
} else {
|
||||||
|
w.setGeometry(QRect(Style::m_primaryScreenX + Style::m_availableScreenWidth - Style::minw - 4, Style::m_primaryScreenY + 4,
|
||||||
|
Style::minw, Style::minh));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
w.update();
|
w.update();
|
||||||
w.activateWindow();
|
w.activateWindow();
|
||||||
w.hide();
|
w.hide();
|
||||||
|
|
2
res.qrc
2
res.qrc
|
@ -27,7 +27,6 @@
|
||||||
<file>data/img/mainviewwidget/DM-icon-返回.svg</file>
|
<file>data/img/mainviewwidget/DM-icon-返回.svg</file>
|
||||||
<file>data/img/mainviewwidget/DM-icon-返回@2x.png</file>
|
<file>data/img/mainviewwidget/DM-icon-返回@2x.png</file>
|
||||||
<file>data/img/mainviewwidget/DM-icon-选项.png</file>
|
<file>data/img/mainviewwidget/DM-icon-选项.png</file>
|
||||||
<file>data/img/mainviewwidget/DM-icon-选项.svg</file>
|
|
||||||
<file>data/img/mainviewwidget/DM-icon-选项@2x.png</file>
|
<file>data/img/mainviewwidget/DM-icon-选项@2x.png</file>
|
||||||
<file>data/img/mainviewwidget/DM-icon-check.png</file>
|
<file>data/img/mainviewwidget/DM-icon-check.png</file>
|
||||||
<file>data/img/mainviewwidget/DM-icon-check.svg</file>
|
<file>data/img/mainviewwidget/DM-icon-check.svg</file>
|
||||||
|
@ -171,5 +170,6 @@
|
||||||
<file>data/img/sidebarwidget/usericon-lightcolor.svg</file>
|
<file>data/img/sidebarwidget/usericon-lightcolor.svg</file>
|
||||||
<file>src/BackProcess/Search/pinyinWithoutTone.txt</file>
|
<file>src/BackProcess/Search/pinyinWithoutTone.txt</file>
|
||||||
<file>src/BackProcess/Search/pinyinWithTone.txt</file>
|
<file>src/BackProcess/Search/pinyinWithTone.txt</file>
|
||||||
|
<file>data/img/mainviewwidget/DM-icon-option.svg</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
@ -0,0 +1,78 @@
|
||||||
|
#include "buriedpointdatasend.h"
|
||||||
|
#include <QHostInfo>
|
||||||
|
#include <QString>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QDateTime>
|
||||||
|
#include <QTimeZone>
|
||||||
|
|
||||||
|
Q_GLOBAL_STATIC(BuriedPointDataSend, buriedPointDataSend)
|
||||||
|
|
||||||
|
BuriedPointDataSend::BuriedPointDataSend()
|
||||||
|
{
|
||||||
|
QString path = QDir::homePath() + "/.config/ukui/menuUploadMessage/";
|
||||||
|
// m_sendDataInterface = new KUploadMessage(getpid());
|
||||||
|
// m_sendDataInterface->initUploadInterface("ukui-menu", "menuData", path);
|
||||||
|
}
|
||||||
|
|
||||||
|
BuriedPointDataSend::~BuriedPointDataSend()
|
||||||
|
{
|
||||||
|
// if (m_sendDataInterface != nullptr) {
|
||||||
|
// delete m_sendDataInterface;
|
||||||
|
// m_sendDataInterface = nullptr;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
BuriedPointDataSend *BuriedPointDataSend::getInstance()
|
||||||
|
{
|
||||||
|
return buriedPointDataSend();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString BuriedPointDataSend::getCurrentTime()
|
||||||
|
{
|
||||||
|
QString tempDateTimeStr;
|
||||||
|
QDateTime tempDateTime = QDateTime::currentDateTime().toTimeZone(QTimeZone(8 * 3600));
|
||||||
|
tempDateTimeStr = tempDateTime.toString("yyyy-MM-dd HH:mm:ss.zzz");
|
||||||
|
return tempDateTimeStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BuriedPointDataSend::setPoint(const pointDataStruct &data)
|
||||||
|
{
|
||||||
|
// int curNum = 1;
|
||||||
|
// QStringList applist = QStringList();
|
||||||
|
// QString keyValue = data.module + data.function;
|
||||||
|
|
||||||
|
// if (m_functionCount.keys().contains(keyValue)) {
|
||||||
|
// curNum = m_functionCount.value(keyValue);
|
||||||
|
// curNum ++;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// m_functionCount.insert(keyValue, curNum);
|
||||||
|
|
||||||
|
// if (!data.otherFunction.isEmpty()) {
|
||||||
|
// if (m_applist.keys().contains(keyValue)) {
|
||||||
|
// applist = m_applist.value(keyValue);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// applist.append(data.otherFunction.at(0));
|
||||||
|
// m_applist.insert(keyValue, applist);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// QString time = getCurrentTime();
|
||||||
|
// QJsonObject jsonObj;
|
||||||
|
// QJsonArray otherFunction = QJsonArray::fromStringList(data.otherFunction);
|
||||||
|
// jsonObj.insert("module", QJsonValue(data.module));
|
||||||
|
// jsonObj.insert("function", QJsonValue(data.function));
|
||||||
|
// jsonObj.insert("functionNum", QJsonValue(QString::number(curNum)));
|
||||||
|
// jsonObj.insert("otherFunction", otherFunction);
|
||||||
|
// jsonObj.insert("errorLevel", QJsonValue(data.errorLevel));
|
||||||
|
// jsonObj.insert("errorOutput", QJsonValue(data.errorOutput));
|
||||||
|
// jsonObj.insert("createTimeStamp", QJsonValue(time));//注意该字段名称不能修改,否则会报invalid
|
||||||
|
// // 将数据转化为QString
|
||||||
|
// QString informationData(QJsonDocument(jsonObj).toJson(QJsonDocument::Compact));
|
||||||
|
// qDebug() << "jsonObj:" << jsonObj;
|
||||||
|
// m_sendDataInterface->uploadMessage(informationData);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
#ifndef BURIEDPOINTDATASEND_H
|
||||||
|
#define BURIEDPOINTDATASEND_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QDateTime>
|
||||||
|
#include <QDir>
|
||||||
|
#include "src/UtilityFunction/utility.h"
|
||||||
|
#include "unistd.h"
|
||||||
|
//#include "kuploadmessage.h"
|
||||||
|
|
||||||
|
class BuriedPointDataSend : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
BuriedPointDataSend();
|
||||||
|
~BuriedPointDataSend();
|
||||||
|
|
||||||
|
static BuriedPointDataSend *getInstance();
|
||||||
|
|
||||||
|
void setPoint(const pointDataStruct &data);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QString getCurrentTime();
|
||||||
|
QHash<QString, int> m_functionCount;
|
||||||
|
QHash<QString, QStringList> m_applist;
|
||||||
|
// KUploadMessage *m_sendDataInterface = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // BURIEDPOINTDATASEND_H
|
|
@ -76,14 +76,24 @@ void TabletDirectoryChangedThread::run()
|
||||||
QStringList applist = setting->allKeys();
|
QStringList applist = setting->allKeys();
|
||||||
int appnum = setting->allKeys().count();
|
int appnum = setting->allKeys().count();
|
||||||
int maxindex = 0;
|
int maxindex = 0;
|
||||||
|
int minindex = 0;
|
||||||
|
|
||||||
for (int i = 0; i < appnum; i++) {
|
for (int i = 0; i < appnum; i++) {
|
||||||
if (setting->value(applist.at(i)).toInt() > maxindex) {
|
if (setting->value(applist.at(i)).toInt() > maxindex) {
|
||||||
maxindex = setting->value(applist.at(i)).toInt();
|
maxindex = setting->value(applist.at(i)).toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(setting->value(applist.at(i)).toInt() <= minindex) {
|
||||||
|
minindex = setting->value(applist.at(i)).toInt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (desktopfn.contains("small-plugin-manage")){
|
||||||
|
setting->setValue(desktopfn,minindex-1);
|
||||||
|
} else {
|
||||||
|
setting->setValue(desktopfn,maxindex+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
setting->setValue(desktopfn, maxindex + 1); //setting->allKeys().count()
|
|
||||||
setting->sync();
|
setting->sync();
|
||||||
setting->endGroup();
|
setting->endGroup();
|
||||||
//
|
//
|
||||||
|
|
|
@ -6244,7 +6244,7 @@ QString UkuiChineseLetter::getPinyin(int code)//此方法可以获取所有汉
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pinyin.isEmpty()) {
|
if (pinyin.isEmpty()) {
|
||||||
pinyin = "";
|
pinyin = " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
return pinyin;
|
return pinyin;
|
||||||
|
|
|
@ -576,8 +576,6 @@ QVector<QStringList> UkuiMenuInterface::createAppInfoVector()
|
||||||
sql.exec(QString("select name_zh from appCategory where app_name=\"%1\" ").arg(desktopfpExecName));
|
sql.exec(QString("select name_zh from appCategory where app_name=\"%1\" ").arg(desktopfpExecName));
|
||||||
|
|
||||||
if (sql.next()) {
|
if (sql.next()) {
|
||||||
myDebug() << "数据库执行成功";
|
|
||||||
|
|
||||||
for (int j = 0; j < vector.size(); j++) {
|
for (int j = 0; j < vector.size(); j++) {
|
||||||
if (vector.at(j).contains(sql.value(0).toString())) {
|
if (vector.at(j).contains(sql.value(0).toString())) {
|
||||||
appInfoList.append(QString::number(j));
|
appInfoList.append(QString::number(j));
|
||||||
|
@ -861,9 +859,11 @@ bool UkuiMenuInterface::initAppIni()
|
||||||
QVector<QStringList> tencentInitVector;
|
QVector<QStringList> tencentInitVector;
|
||||||
QVector<QStringList> customizedVector;
|
QVector<QStringList> customizedVector;
|
||||||
QVector<QStringList> thirdPartyVector;
|
QVector<QStringList> thirdPartyVector;
|
||||||
|
QVector<QStringList> preorderAppVector;
|
||||||
QString tencent_math = "/usr/share/applications/tencent-math-precise-practice.desktop";
|
QString tencent_math = "/usr/share/applications/tencent-math-precise-practice.desktop";
|
||||||
QString tencent_chinese = "/usr/share/applications/tencent-chinese-precise-practice.desktop";
|
QString tencent_chinese = "/usr/share/applications/tencent-chinese-precise-practice.desktop";
|
||||||
QString tencent_english = "/usr/share/applications/tencent-english-precise-practice.desktop";
|
QString tencent_english = "/usr/share/applications/tencent-english-precise-practice.desktop";
|
||||||
|
QString smallPluginManage = "/usr/share/applications/small-plugin-manage.desktop";
|
||||||
QVector<QStringList> precise_practiceVector;
|
QVector<QStringList> precise_practiceVector;
|
||||||
QStringList math;
|
QStringList math;
|
||||||
QStringList english;
|
QStringList english;
|
||||||
|
@ -903,6 +903,8 @@ bool UkuiMenuInterface::initAppIni()
|
||||||
customizedVector.append(appInfoVector.at(i));
|
customizedVector.append(appInfoVector.at(i));
|
||||||
} else if (tmp.indexOf("mdm") != -1) {
|
} else if (tmp.indexOf("mdm") != -1) {
|
||||||
customizedVector.append(appInfoVector.at(i));
|
customizedVector.append(appInfoVector.at(i));
|
||||||
|
} else if (tmp.contains(smallPluginManage)) {
|
||||||
|
preorderAppVector.append(appInfoVector.at(i));
|
||||||
} else {
|
} else {
|
||||||
appInitVector.append(appInfoVector.at(i));
|
appInitVector.append(appInfoVector.at(i));
|
||||||
}
|
}
|
||||||
|
@ -928,12 +930,22 @@ bool UkuiMenuInterface::initAppIni()
|
||||||
qSort(thirdPartyVector.begin(), thirdPartyVector.end(), cmpApp); //按中英文字母排序
|
qSort(thirdPartyVector.begin(), thirdPartyVector.end(), cmpApp); //按中英文字母排序
|
||||||
setting->beginGroup("application");
|
setting->beginGroup("application");
|
||||||
|
|
||||||
|
for (int i = 0; i < preorderAppVector.count(); i++) {
|
||||||
|
QString str = preorderAppVector.at(i).at(0).section(' ', 0, 0);
|
||||||
|
QStringList list = str.split('/');
|
||||||
|
str = list[list.size() - 1];
|
||||||
|
//qDebug()<<str;
|
||||||
|
setting->setValue(str, i);
|
||||||
|
}
|
||||||
|
|
||||||
|
int firstVectorCount = preorderAppVector.count();
|
||||||
|
|
||||||
for (int i = 0; i < tencentInitVector.count(); i++) {
|
for (int i = 0; i < tencentInitVector.count(); i++) {
|
||||||
QString str = tencentInitVector.at(i).at(0).section(' ', 0, 0);
|
QString str = tencentInitVector.at(i).at(0).section(' ', 0, 0);
|
||||||
QStringList list = str.split('/');
|
QStringList list = str.split('/');
|
||||||
str = list[list.size() - 1];
|
str = list[list.size() - 1];
|
||||||
//qDebug()<<str;
|
//qDebug()<<str;
|
||||||
setting->setValue(str, i);
|
setting->setValue(str, i + firstVectorCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
int a = tencentInitVector.count();
|
int a = tencentInitVector.count();
|
||||||
|
|
|
@ -7,7 +7,8 @@ INCLUDEPATH += \
|
||||||
$$PWD/Interface \
|
$$PWD/Interface \
|
||||||
$$PWD/Search \
|
$$PWD/Search \
|
||||||
$$PWD/tablet \
|
$$PWD/tablet \
|
||||||
$$PWD/XEventMonitor
|
$$PWD/XEventMonitor \
|
||||||
|
$$PWD/BuriedPoint
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
$$PWD/DBus/dbus-adaptor.h \
|
$$PWD/DBus/dbus-adaptor.h \
|
||||||
|
@ -24,7 +25,8 @@ HEADERS += \
|
||||||
$$PWD/Search/searchappthread.h \
|
$$PWD/Search/searchappthread.h \
|
||||||
$$PWD/XEventMonitor/xeventmonitor.h \
|
$$PWD/XEventMonitor/xeventmonitor.h \
|
||||||
$$PWD/tablet/getmodeldata.h \
|
$$PWD/tablet/getmodeldata.h \
|
||||||
$$PWD/tablet/pagemanager.h
|
$$PWD/tablet/pagemanager.h \
|
||||||
|
$$PWD/BuriedPoint/buriedpointdatasend.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
$$PWD/DBus/dbus-adaptor.cpp \
|
$$PWD/DBus/dbus-adaptor.cpp \
|
||||||
|
@ -41,4 +43,9 @@ SOURCES += \
|
||||||
$$PWD/Search/searchappthread.cpp \
|
$$PWD/Search/searchappthread.cpp \
|
||||||
$$PWD/XEventMonitor/xeventmonitor.cpp \
|
$$PWD/XEventMonitor/xeventmonitor.cpp \
|
||||||
$$PWD/tablet/getmodeldata.cpp \
|
$$PWD/tablet/getmodeldata.cpp \
|
||||||
$$PWD/tablet/pagemanager.cpp
|
$$PWD/tablet/pagemanager.cpp \
|
||||||
|
$$PWD/BuriedPoint/buriedpointdatasend.cpp
|
||||||
|
|
||||||
|
|
||||||
|
INCLUDEPATH += $$PWD/../
|
||||||
|
DEPENDPATH += $$PWD/../
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "getmodeldata.h"
|
#include "getmodeldata.h"
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include "src/UtilityFunction/utility.h"
|
#include "utility.h"
|
||||||
|
|
||||||
GetModelData::GetModelData()
|
GetModelData::GetModelData()
|
||||||
{
|
{
|
||||||
|
@ -34,6 +34,28 @@ QVector<QStringList> GetModelData::getMinAllData()
|
||||||
return m_minAllData;
|
return m_minAllData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QStringList GetModelData::getPreCollectionApp()
|
||||||
|
{
|
||||||
|
//收藏区预置应用:设置、天气、软件商店、截图、文件管理器
|
||||||
|
QStringList preAppList = QStringList();
|
||||||
|
QStringList preAppListExist = QStringList();
|
||||||
|
preAppList << QString("/usr/share/applications/ukui-control-center.desktop")
|
||||||
|
<<QString("/usr/share/applications/kylin-weather.desktop")
|
||||||
|
<<QString("/usr/share/applications/kylin-software-center.desktop")
|
||||||
|
<<QString("/usr/share/applications/kylin-screenshot.desktop")
|
||||||
|
<<QString("/usr/share/applications/peony.desktop");
|
||||||
|
Q_FOREACH (QString appDesktop,preAppList) {
|
||||||
|
if (UkuiMenuInterface::allAppVector.contains(appDesktop)) {
|
||||||
|
preAppListExist.append(appDesktop);
|
||||||
|
QFileInfo fileInfo(appDesktop);
|
||||||
|
QString desktopfn = fileInfo.fileName();
|
||||||
|
updateDataBaseCollect(desktopfn,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return preAppListExist;
|
||||||
|
}
|
||||||
|
|
||||||
QStringList GetModelData::getcollectData()
|
QStringList GetModelData::getcollectData()
|
||||||
{
|
{
|
||||||
m_collectData.clear();
|
m_collectData.clear();
|
||||||
|
|
|
@ -59,6 +59,11 @@ public:
|
||||||
* @brief 重新加载各个部分数据,用于初始化和整体更新
|
* @brief 重新加载各个部分数据,用于初始化和整体更新
|
||||||
*/
|
*/
|
||||||
void loadDesktopVercor();
|
void loadDesktopVercor();
|
||||||
|
/**
|
||||||
|
* @brief 获取预装应用
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
QStringList getPreCollectionApp();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -9,34 +9,50 @@ PageManager::PageManager()
|
||||||
m_ukuiMenuInterface->initAppIni();
|
m_ukuiMenuInterface->initAppIni();
|
||||||
}
|
}
|
||||||
|
|
||||||
int PageManager::getPageNum(int appnum)
|
int PageManager::getPageNum(const int &appNum)
|
||||||
{
|
{
|
||||||
int pageNum = 0;
|
int pageNum = 0;
|
||||||
Style::appColumn = 6;
|
|
||||||
Style::appLine = 4;
|
|
||||||
|
|
||||||
if (appnum % (Style::appColumn * Style::appLine) == 0) {
|
if (appNum / (Style::appColumnFirst * Style::appLineFirst) == 0) {
|
||||||
pageNum = appnum / (Style::appColumn * Style::appLine);
|
pageNum = 1;
|
||||||
} else {
|
} else {
|
||||||
pageNum = appnum / (Style::appColumn * Style::appLine) + 1;
|
int appNumOtherPage = appNum - (Style::appColumnFirst * Style::appLineFirst);
|
||||||
|
|
||||||
|
if (appNumOtherPage % (Style::appColumn * Style::appLine) == 0) {
|
||||||
|
pageNum = appNumOtherPage / (Style::appColumn * Style::appLine) + 1;
|
||||||
|
} else {
|
||||||
|
pageNum = appNumOtherPage / (Style::appColumn * Style::appLine) + 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return pageNum;
|
return pageNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<QStringList> PageManager::sortAppInPage(QVector<QString> appvector)
|
QVector<QStringList> PageManager::sortAppInPage(const QVector<QString> &appVector)
|
||||||
{
|
{
|
||||||
QVector<QString> m_data;
|
QVector<QString> m_data;
|
||||||
QVector<QStringList> pageData;
|
QVector<QStringList> pageData;
|
||||||
QStringList onePageData;
|
QStringList onePageData;
|
||||||
|
|
||||||
Q_FOREACH (QString desktopfp, appvector) {
|
Q_FOREACH (QString desktopfp, appVector) {
|
||||||
m_data.append(desktopfp);
|
m_data.append(desktopfp);
|
||||||
}
|
}
|
||||||
|
|
||||||
int pageSize = getPageNum(m_data.size());
|
int pageSize = getPageNum(m_data.size());
|
||||||
|
onePageData.clear();
|
||||||
|
|
||||||
for (int i = 0; i < pageSize; i++) {
|
for (int j = 0; j < Style::appColumnFirst * Style::appLineFirst; j++) {
|
||||||
|
if (m_data.size() > 0) {
|
||||||
|
onePageData.append(m_data.at(0));
|
||||||
|
m_data.pop_front();
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pageData.append(onePageData);
|
||||||
|
|
||||||
|
for (int i = 0; i < pageSize - 1; i++) {
|
||||||
onePageData.clear();
|
onePageData.clear();
|
||||||
|
|
||||||
for (int j = 0; j < Style::appColumn * Style::appLine; j++) {
|
for (int j = 0; j < Style::appColumn * Style::appLine; j++) {
|
||||||
|
@ -44,7 +60,6 @@ QVector<QStringList> PageManager::sortAppInPage(QVector<QString> appvector)
|
||||||
onePageData.append(m_data.at(0));
|
onePageData.append(m_data.at(0));
|
||||||
m_data.pop_front();
|
m_data.pop_front();
|
||||||
} else {
|
} else {
|
||||||
// pageData.append(onePageData);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,8 @@ class PageManager : public QObject
|
||||||
public:
|
public:
|
||||||
PageManager();
|
PageManager();
|
||||||
|
|
||||||
int getPageNum(int appnum);
|
int getPageNum(const int &appNum);
|
||||||
QVector<QStringList> sortAppInPage(QVector<QString> appvector);
|
QVector<QStringList> sortAppInPage(const QVector<QString> &appVector);
|
||||||
QVector<QStringList> getAppPageVector();
|
QVector<QStringList> getAppPageVector();
|
||||||
private:
|
private:
|
||||||
UkuiMenuInterface *m_ukuiMenuInterface = nullptr;
|
UkuiMenuInterface *m_ukuiMenuInterface = nullptr;
|
||||||
|
|
|
@ -89,8 +89,22 @@ void FunctionClassifyButton::paintEvent(QPaintEvent *e)
|
||||||
painter.setPen(Qt::NoPen);
|
painter.setPen(Qt::NoPen);
|
||||||
|
|
||||||
if (!m_fullscreen) {
|
if (!m_fullscreen) {
|
||||||
QColor color = option.palette.color(QPalette::Text);
|
QColor color;
|
||||||
color.setAlphaF(0.15);
|
|
||||||
|
if (option.state & QStyle::State_Selected) {
|
||||||
|
if (g_curStyle == "ukui-dark") {
|
||||||
|
color.setNamedColor("#33FFFFFF");
|
||||||
|
} else {
|
||||||
|
color.setNamedColor("#D1FFFFFF");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (g_curStyle == "ukui-dark") {
|
||||||
|
color.setNamedColor("#1AFFFFFF");
|
||||||
|
} else {
|
||||||
|
color.setNamedColor("#8CFFFFFF");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
painter.setBrush(color);
|
painter.setBrush(color);
|
||||||
} else {
|
} else {
|
||||||
painter.setOpacity(0.15);
|
painter.setOpacity(0.15);
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "letter_classify_button.h"
|
#include "letter_classify_button.h"
|
||||||
#include <QStylePainter>
|
#include <QStylePainter>
|
||||||
#include <QStyleOptionButton>
|
#include <QStyleOptionButton>
|
||||||
|
#include "utility.h"
|
||||||
|
|
||||||
LetterClassifyButton::LetterClassifyButton(QWidget *parent,
|
LetterClassifyButton::LetterClassifyButton(QWidget *parent,
|
||||||
bool fullscreen,
|
bool fullscreen,
|
||||||
|
@ -55,8 +56,22 @@ void LetterClassifyButton::paintEvent(QPaintEvent *e)
|
||||||
painter.setPen(Qt::NoPen);
|
painter.setPen(Qt::NoPen);
|
||||||
|
|
||||||
if (!m_fullscreen) {
|
if (!m_fullscreen) {
|
||||||
QColor color = option.palette.color(QPalette::Text);
|
QColor color;
|
||||||
color.setAlphaF(0.15);
|
|
||||||
|
if (option.state & QStyle::State_Selected) {
|
||||||
|
if (g_curStyle == "ukui-dark") {
|
||||||
|
color.setNamedColor("#33FFFFFF");
|
||||||
|
} else {
|
||||||
|
color.setNamedColor("#D1FFFFFF");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (g_curStyle == "ukui-dark") {
|
||||||
|
color.setNamedColor("#1AFFFFFF");
|
||||||
|
} else {
|
||||||
|
color.setNamedColor("#8CFFFFFF");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
painter.setBrush(color);
|
painter.setBrush(color);
|
||||||
} else {
|
} else {
|
||||||
painter.setOpacity(0.15);
|
painter.setOpacity(0.15);
|
||||||
|
@ -81,10 +96,13 @@ void LetterClassifyButton::paintEvent(QPaintEvent *e)
|
||||||
|
|
||||||
QStyleOptionButton subopt = option;
|
QStyleOptionButton subopt = option;
|
||||||
subopt.rect = painter.style()->subElementRect(QStyle::SE_PushButtonContents, &option, this);
|
subopt.rect = painter.style()->subElementRect(QStyle::SE_PushButtonContents, &option, this);
|
||||||
// if(m_fullscreen)
|
|
||||||
// subopt.palette.setBrush(QPalette::ButtonText, QColor(Qt::white));
|
if (m_fullscreen) {
|
||||||
// else
|
subopt.palette.setBrush(QPalette::ButtonText, QColor(Qt::white));
|
||||||
// subopt.palette.setBrush(QPalette::HighlightedText, subopt.palette.text());
|
} else {
|
||||||
|
subopt.palette.setBrush(QPalette::HighlightedText, subopt.palette.text());
|
||||||
|
}
|
||||||
|
|
||||||
painter.style()->drawControl(QStyle::CE_PushButtonLabel, &subopt, &painter, this);
|
painter.style()->drawControl(QStyle::CE_PushButtonLabel, &subopt, &painter, this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "utility.h"
|
#include "utility.h"
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
#include "buriedpointdatasend.h"
|
||||||
|
|
||||||
ListView::ListView(QWidget *parent/*, int width, int height, int module*/):
|
ListView::ListView(QWidget *parent/*, int width, int height, int module*/):
|
||||||
KListView(parent)
|
KListView(parent)
|
||||||
|
@ -108,6 +109,12 @@ void ListView::onClicked(QModelIndex index)
|
||||||
Q_EMIT sendAppClassificationBtnClicked();
|
Q_EMIT sendAppClassificationBtnClicked();
|
||||||
} else {
|
} else {
|
||||||
execApp(desktopfp);
|
execApp(desktopfp);
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "mainWindow/execApplication";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
pointData.otherFunction.append(desktopfp);
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -129,8 +136,14 @@ void ListView::paintEvent(QPaintEvent *e)
|
||||||
{
|
{
|
||||||
//滚动条
|
//滚动条
|
||||||
QPalette p = this->verticalScrollBar()->palette();
|
QPalette p = this->verticalScrollBar()->palette();
|
||||||
QColor color(255, 255, 255);
|
QColor color;
|
||||||
color.setAlphaF(0.25);
|
|
||||||
|
if (g_curStyle == "ukui-dark") {
|
||||||
|
color = QColor("#26FFFFFF");
|
||||||
|
} else {
|
||||||
|
color = QColor("#1A000000");
|
||||||
|
}
|
||||||
|
|
||||||
p.setColor(QPalette::Active, QPalette::Button, color);
|
p.setColor(QPalette::Active, QPalette::Button, color);
|
||||||
this->verticalScrollBar()->setPalette(p);
|
this->verticalScrollBar()->setPalette(p);
|
||||||
QListView::paintEvent(e);
|
QListView::paintEvent(e);
|
||||||
|
|
|
@ -39,7 +39,9 @@ RightListView::~RightListView()
|
||||||
|
|
||||||
void RightListView::initWidget()
|
void RightListView::initWidget()
|
||||||
{
|
{
|
||||||
|
setAttribute(Qt::WA_TranslucentBackground);
|
||||||
viewport()->setAttribute(Qt::WA_TranslucentBackground);
|
viewport()->setAttribute(Qt::WA_TranslucentBackground);
|
||||||
|
viewport()->setAutoFillBackground(false);
|
||||||
this->setSelectionMode(QAbstractItemView::SingleSelection);
|
this->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||||
this->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
this->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
this->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
this->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
@ -62,10 +64,10 @@ void RightListView::dropEvent(QDropEvent *event)
|
||||||
RightListView *source = qobject_cast<RightListView *>(event->source());
|
RightListView *source = qobject_cast<RightListView *>(event->source());
|
||||||
|
|
||||||
if (source && source == this) {
|
if (source && source == this) {
|
||||||
dropPos = event->pos();
|
m_dropPos = event->pos();
|
||||||
|
|
||||||
if (this->indexAt(dropPos).isValid()) {
|
if (this->indexAt(m_dropPos).isValid()) {
|
||||||
QVariant var = listmodel->data(indexAt(dropPos), Qt::DisplayRole);
|
QVariant var = listmodel->data(indexAt(m_dropPos), Qt::DisplayRole);
|
||||||
QString desktopfp = var.value<QString>();
|
QString desktopfp = var.value<QString>();
|
||||||
QFileInfo fileInfo(desktopfp);
|
QFileInfo fileInfo(desktopfp);
|
||||||
QString desktopfn = fileInfo.fileName();
|
QString desktopfn = fileInfo.fileName();
|
||||||
|
@ -88,6 +90,11 @@ void RightListView::selectFirstItem()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RightListView::paintEvent(QPaintEvent *e)
|
||||||
|
{
|
||||||
|
QListView::paintEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
void RightListView::keyPressEvent(QKeyEvent *e)
|
void RightListView::keyPressEvent(QKeyEvent *e)
|
||||||
{
|
{
|
||||||
if (e->type() == QEvent::KeyPress) {
|
if (e->type() == QEvent::KeyPress) {
|
||||||
|
@ -106,6 +113,11 @@ void RightListView::keyPressEvent(QKeyEvent *e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RightListView::changeStyleColor(const QColor &color)
|
||||||
|
{
|
||||||
|
m_styleColor = color;
|
||||||
|
}
|
||||||
|
|
||||||
void RightListView::enterEvent(QEvent *e)
|
void RightListView::enterEvent(QEvent *e)
|
||||||
{
|
{
|
||||||
Q_UNUSED(e);
|
Q_UNUSED(e);
|
||||||
|
|
|
@ -26,12 +26,14 @@ protected:
|
||||||
void keyPressEvent(QKeyEvent *e);
|
void keyPressEvent(QKeyEvent *e);
|
||||||
void dropEvent(QDropEvent *event);
|
void dropEvent(QDropEvent *event);
|
||||||
void enterEvent(QEvent *e);
|
void enterEvent(QEvent *e);
|
||||||
|
void paintEvent(QPaintEvent *e);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RightClickMenu *menu = nullptr; //右键菜单
|
RightClickMenu *menu = nullptr; //右键菜单
|
||||||
QStringList data;
|
QStringList data;
|
||||||
QGSettings *gsetting;
|
QGSettings *gsetting;
|
||||||
QPoint dropPos;
|
QPoint m_dropPos;
|
||||||
|
QColor m_styleColor;
|
||||||
|
|
||||||
// bool inCurView;
|
// bool inCurView;
|
||||||
|
|
||||||
|
@ -39,6 +41,7 @@ public Q_SLOTS:
|
||||||
|
|
||||||
// void rightClickedSlot(const QPoint &pos);//右键菜单
|
// void rightClickedSlot(const QPoint &pos);//右键菜单
|
||||||
void selectFirstItem();
|
void selectFirstItem();
|
||||||
|
void changeStyleColor(const QColor &color);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
#include "rotationlabel.h"
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
RotationLabel::RotationLabel(QWidget *parent)
|
||||||
|
: QLabel(parent)
|
||||||
|
{
|
||||||
|
this->setFrameShape(QFrame::NoFrame);
|
||||||
|
this->setContentsMargins(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RotationLabel::setRotation(int rot)
|
||||||
|
{
|
||||||
|
m_rotation = rot;
|
||||||
|
this->update();
|
||||||
|
qDebug() << m_rotation;
|
||||||
|
}
|
||||||
|
|
||||||
|
int RotationLabel::rotation()
|
||||||
|
{
|
||||||
|
return m_rotation;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RotationLabel::paintEvent(QPaintEvent *event)
|
||||||
|
{
|
||||||
|
QPainter painter(this);
|
||||||
|
painter.setRenderHints(QPainter::SmoothPixmapTransform, true);
|
||||||
|
painter.translate(rect().width() / 2, rect().height() / 2);
|
||||||
|
painter.rotate(m_rotation);
|
||||||
|
painter.translate(-rect().width() / 2, -rect().height() / 2);
|
||||||
|
painter.drawPixmap(rect().adjusted(0, 9, 0, -9), m_pixmap);
|
||||||
|
return QLabel::paintEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RotationLabel::setIcon(const QPixmap &pixmap)
|
||||||
|
{
|
||||||
|
m_pixmap = pixmap;
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
#ifndef ROTATIONLABEL_H
|
||||||
|
#define ROTATIONLABEL_H
|
||||||
|
#include <QLabel>
|
||||||
|
|
||||||
|
class RotationLabel : public QLabel
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PROPERTY(int rotation READ rotation WRITE setRotation) //旋转
|
||||||
|
public:
|
||||||
|
RotationLabel(QWidget *parent = nullptr);
|
||||||
|
void setIcon(const QPixmap &pixmap);
|
||||||
|
protected:
|
||||||
|
int rotation();
|
||||||
|
void setRotation(int rot);
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
private:
|
||||||
|
int m_rotation = 0;
|
||||||
|
QPixmap m_pixmap;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ROTATIONLABEL_H
|
|
@ -19,3 +19,9 @@ void MenuBox::mousePressEvent(QMouseEvent *event)
|
||||||
return QMenu::mousePressEvent(event);
|
return QMenu::mousePressEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MenuBox::hideEvent(QHideEvent *e)
|
||||||
|
{
|
||||||
|
Q_EMIT sendMainWinActiveSignal(true);
|
||||||
|
return QMenu::hideEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void mousePressEvent(QMouseEvent *event);
|
void mousePressEvent(QMouseEvent *event);
|
||||||
|
void hideEvent(QHideEvent *e) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
|
|
|
@ -25,8 +25,7 @@ TabletRightClickMenu::TabletRightClickMenu(QWidget *parent):
|
||||||
{
|
{
|
||||||
QString path = QDir::homePath() + "/.config/ukui/ukui-menu.ini";
|
QString path = QDir::homePath() + "/.config/ukui/ukui-menu.ini";
|
||||||
m_setting = new QSettings(path, QSettings::IniFormat);
|
m_setting = new QSettings(path, QSettings::IniFormat);
|
||||||
m_cmdProc = new QProcess;
|
|
||||||
connect(m_cmdProc, &QProcess::readyReadStandardOutput, this, &TabletRightClickMenu::onReadOutput);
|
|
||||||
sprintf(m_style, "QMenu{padding-left:2px;padding-top:6px;padding-right:2px;padding-bottom:6px;border:1px solid %s;border-radius:6px;background-color:%s;}\
|
sprintf(m_style, "QMenu{padding-left:2px;padding-top:6px;padding-right:2px;padding-bottom:6px;border:1px solid %s;border-radius:6px;background-color:%s;}\
|
||||||
QMenu::item:selected{background-color:%s;border-radius:6px;}\
|
QMenu::item:selected{background-color:%s;border-radius:6px;}\
|
||||||
QMenu::separator{height:1px;background-color:%s;margin-top:2px;margin-bottom:2px;}",
|
QMenu::separator{height:1px;background-color:%s;margin-top:2px;margin-bottom:2px;}",
|
||||||
|
@ -35,15 +34,10 @@ TabletRightClickMenu::TabletRightClickMenu(QWidget *parent):
|
||||||
|
|
||||||
TabletRightClickMenu::~TabletRightClickMenu()
|
TabletRightClickMenu::~TabletRightClickMenu()
|
||||||
{
|
{
|
||||||
if (m_cmdProc) {
|
|
||||||
delete m_cmdProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_setting) {
|
if (m_setting) {
|
||||||
delete m_setting;
|
delete m_setting;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_cmdProc = nullptr;
|
|
||||||
m_setting = nullptr;
|
m_setting = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,28 +179,13 @@ void TabletRightClickMenu::addToDesktopActionTriggerSlot()
|
||||||
|
|
||||||
void TabletRightClickMenu::uninstallActionTriggerSlot()
|
void TabletRightClickMenu::uninstallActionTriggerSlot()
|
||||||
{
|
{
|
||||||
// QString cmd = QString("dpkg -S " + m_desktopfp);
|
QString cmd = QString("kylin-uninstaller %1")
|
||||||
// myDebug() << "void TabletRightClickMenu::uninstallActionTriggerSlot()" << m_desktopfp;
|
.arg(m_desktopfp.toLocal8Bit().data());
|
||||||
// m_cmdProc->setReadChannel(QProcess::StandardOutput);
|
bool ret = QProcess::startDetached(cmd);
|
||||||
// m_cmdProc->start("sh", QStringList() << "-c" << cmd);
|
myDebug() << "卸载:" << cmd << ret;
|
||||||
// m_cmdProc->waitForFinished();
|
|
||||||
// m_cmdProc->waitForReadyRead();
|
|
||||||
// m_cmdProc->close();
|
|
||||||
onReadOutput();
|
|
||||||
m_actionNumber = 6;
|
m_actionNumber = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabletRightClickMenu::onReadOutput()
|
|
||||||
{
|
|
||||||
// QString packagestr = QString::fromLocal8Bit(m_cmdProc->readAllStandardOutput().data());
|
|
||||||
// QString packageName = packagestr.split(":").at(0);
|
|
||||||
//目前仅调用起软件商店,不传递参数
|
|
||||||
char command[100];
|
|
||||||
// sprintf(command, "kylin-software-center -remove %s", packageName.toLocal8Bit().data());
|
|
||||||
sprintf(command, "kylin-software-center");
|
|
||||||
QProcess::startDetached(command);
|
|
||||||
}
|
|
||||||
|
|
||||||
void TabletRightClickMenu::attributeActionTriggerSlot()
|
void TabletRightClickMenu::attributeActionTriggerSlot()
|
||||||
{
|
{
|
||||||
char command[100];
|
char command[100];
|
||||||
|
|
|
@ -76,8 +76,6 @@ private:
|
||||||
|
|
||||||
char m_style[400];
|
char m_style[400];
|
||||||
|
|
||||||
QProcess *m_cmdProc = nullptr;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @brief Get icon pixmap
|
* @brief Get icon pixmap
|
||||||
|
@ -150,10 +148,6 @@ private Q_SLOTS:
|
||||||
* @brief Personalize this list
|
* @brief Personalize this list
|
||||||
*/
|
*/
|
||||||
//void otherListActionTriggerSlot();
|
//void otherListActionTriggerSlot();
|
||||||
/**
|
|
||||||
* @brief Read command output
|
|
||||||
*/
|
|
||||||
void onReadOutput();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // RIGHTCLICKMENU_H
|
#endif // RIGHTCLICKMENU_H
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <QToolTip>
|
#include <QToolTip>
|
||||||
#include "src/UtilityFunction/utility.h"
|
#include "utility.h"
|
||||||
|
|
||||||
ItemDelegate::ItemDelegate(QObject *parent, int module):
|
ItemDelegate::ItemDelegate(QObject *parent, int module):
|
||||||
KItemDelegate(parent)
|
KItemDelegate(parent)
|
||||||
|
@ -58,8 +58,22 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
|
||||||
painter->setRenderHint(QPainter::Antialiasing);
|
painter->setRenderHint(QPainter::Antialiasing);
|
||||||
|
|
||||||
if ((option.state & QStyle::State_MouseOver) || (option.state & QStyle::State_HasFocus)) {
|
if ((option.state & QStyle::State_MouseOver) || (option.state & QStyle::State_HasFocus)) {
|
||||||
QColor color = option.palette.text().color();
|
QColor color;
|
||||||
color.setAlphaF(0.15);
|
|
||||||
|
if (option.state & QStyle::State_Selected) {
|
||||||
|
if (g_curStyle == "ukui-dark") {
|
||||||
|
color.setNamedColor("#33FFFFFF");
|
||||||
|
} else {
|
||||||
|
color.setNamedColor("#D1FFFFFF");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (g_curStyle == "ukui-dark") {
|
||||||
|
color.setNamedColor("#1AFFFFFF");
|
||||||
|
} else {
|
||||||
|
color.setNamedColor("#8CFFFFFF");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
painter->save();
|
painter->save();
|
||||||
painter->setPen(QPen(Qt::NoPen));
|
painter->setPen(QPen(Qt::NoPen));
|
||||||
painter->setBrush(color);
|
painter->setBrush(color);
|
||||||
|
@ -153,10 +167,13 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
|
||||||
// QRect textRect=QRect(rect.x()+11,rect.y()+12,rect.width(),rect.height());
|
// QRect textRect=QRect(rect.x()+11,rect.y()+12,rect.width(),rect.height());
|
||||||
QRect textRect = QRect(rect.x() + 11, rect.y(), rect.width(), rect.height());
|
QRect textRect = QRect(rect.x() + 11, rect.y(), rect.width(), rect.height());
|
||||||
painter->drawText(textRect, Qt::AlignVCenter, strlist.at(0));
|
painter->drawText(textRect, Qt::AlignVCenter, strlist.at(0));
|
||||||
painter->setRenderHint(QPainter::Antialiasing, true);
|
painter->setRenderHints(QPainter::SmoothPixmapTransform, true);
|
||||||
painter->setPen(QPen(QColor(option.palette.text().color()), 1));
|
QPixmap pixmap = getCurIcon(":/data/img/mainviewwidget/DM-icon-option.svg", true).pixmap(QSize(16, 16));
|
||||||
painter->setOpacity(0.1);
|
|
||||||
painter->drawLine(QPoint(5, rect.bottom()), QPoint(rect.right(), rect.bottom()));
|
if ((option.state & QStyle::State_MouseOver) || (option.state & QStyle::State_HasFocus)) {
|
||||||
|
painter->drawPixmap(rect.width() - 25, rect.y() + 15, pixmap);
|
||||||
|
}
|
||||||
|
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
}
|
||||||
} else if (module == -1) {
|
} else if (module == -1) {
|
||||||
|
@ -279,7 +296,7 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
|
||||||
QString desktopfn = fileInfo.fileName();
|
QString desktopfn = fileInfo.fileName();
|
||||||
|
|
||||||
if (checkIfLocked(desktopfn)) {
|
if (checkIfLocked(desktopfn)) {
|
||||||
QIcon icon(QString(":/data/img/mainviewwidget/lock.svg"));
|
QIcon icon = getCurIcon(":/data/img/mainviewwidget/lock.svg", true);
|
||||||
icon.paint(painter, QRect(rect.topRight().x() - 22, rect.y() + (rect.height() - 16) / 2, 16, 16));
|
icon.paint(painter, QRect(rect.topRight().x() - 22, rect.y() + (rect.height() - 16) / 2, 16, 16));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "right_item_delegate.h"
|
#include "right_item_delegate.h"
|
||||||
#include "src/UtilityFunction/utility.h"
|
#include "utility.h"
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
RightItemDelegate::RightItemDelegate(QObject *parent):
|
RightItemDelegate::RightItemDelegate(QObject *parent):
|
||||||
|
@ -37,16 +37,27 @@ void RightItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opt
|
||||||
painter->setRenderHint(QPainter::Antialiasing);
|
painter->setRenderHint(QPainter::Antialiasing);
|
||||||
painter->save();
|
painter->save();
|
||||||
painter->setPen(QPen(Qt::NoPen));
|
painter->setPen(QPen(Qt::NoPen));
|
||||||
painter->setBrush(option.palette.base().color());
|
|
||||||
|
|
||||||
if ((option.state & QStyle::State_MouseOver) || (option.state & QStyle::State_HasFocus)) {
|
if ((option.state & QStyle::State_MouseOver) || (option.state & QStyle::State_HasFocus)) {
|
||||||
if (option.state & QStyle::State_Selected) {
|
if (option.state & QStyle::State_Selected) {
|
||||||
painter->setOpacity(0.8);
|
if (g_curStyle == "ukui-dark") {
|
||||||
|
painter->setBrush(QColor("#7A000000"));
|
||||||
|
} else {
|
||||||
|
painter->setBrush(QColor("#BFFFFFFF"));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
painter->setOpacity(0.6);
|
if (g_curStyle == "ukui-dark") {
|
||||||
|
painter->setBrush(QColor("#66000000"));
|
||||||
|
} else {
|
||||||
|
painter->setBrush(QColor("#99FFFFFF"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
painter->setOpacity(0.4);
|
if (g_curStyle == "ukui-dark") {
|
||||||
|
painter->setBrush(QColor("#40000000"));
|
||||||
|
} else {
|
||||||
|
painter->setBrush(QColor("#66FFFFFF"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
painter->drawPath(path);
|
painter->drawPath(path);
|
||||||
|
|
|
@ -33,7 +33,6 @@ TabletFullItemDelegate::TabletFullItemDelegate(QObject *parent, int module):
|
||||||
settt = new QSettings(pathini, QSettings::IniFormat);
|
settt = new QSettings(pathini, QSettings::IniFormat);
|
||||||
QString path = QDir::homePath() + "/.config/ukui/ukui-menu.ini";
|
QString path = QDir::homePath() + "/.config/ukui/ukui-menu.ini";
|
||||||
setting = new QSettings(path, QSettings::IniFormat);
|
setting = new QSettings(path, QSettings::IniFormat);
|
||||||
// qDebug() << "---------------------gengxinleziti---------------------";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TabletFullItemDelegate::~TabletFullItemDelegate()
|
TabletFullItemDelegate::~TabletFullItemDelegate()
|
||||||
|
@ -73,11 +72,6 @@ void TabletFullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem
|
||||||
QString appname = pUkuiMenuInterface->getAppName(desktopfp);
|
QString appname = pUkuiMenuInterface->getAppName(desktopfp);
|
||||||
QRect iconRect;
|
QRect iconRect;
|
||||||
QRect textRect;
|
QRect textRect;
|
||||||
// QString desktopfn=desktopfp.split('/').last();
|
|
||||||
// setting->beginGroup("groupname");
|
|
||||||
// bool iscontain=setting->contains(desktopfn);
|
|
||||||
// setting->sync();
|
|
||||||
// setting->endGroup();
|
|
||||||
|
|
||||||
if (iconFileInfo.isFile() && (iconstr.endsWith(".png") || iconstr.endsWith(".svg"))) {
|
if (iconFileInfo.isFile() && (iconstr.endsWith(".png") || iconstr.endsWith(".svg"))) {
|
||||||
icon = QIcon(iconstr);
|
icon = QIcon(iconstr);
|
||||||
|
@ -118,28 +112,27 @@ void TabletFullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bigIcon = index.data(Qt::UserRole + 2).toBool();
|
bool bigIcon = index.data(Qt::UserRole + 2).toBool();
|
||||||
|
int iconTopSpace = (rect.height() - Style::AppListIconSize) / 2;
|
||||||
|
int iconLeftSpace = (rect.width() - Style::AppListIconSize) / 2;
|
||||||
|
|
||||||
if (bigIcon) {
|
if (bigIcon) {
|
||||||
iconRect = QRect(rect.x() + Style::AppLeftSpace - 6, //94
|
iconRect = QRect(rect.x() + iconLeftSpace - 6,
|
||||||
rect.y() + Style::AppTopSpace - 6, //60
|
rect.y() + iconTopSpace - 6,
|
||||||
Style::AppListIconSize + 12,//96
|
Style::AppListIconSize + 12,
|
||||||
Style::AppListIconSize + 12);
|
Style::AppListIconSize + 12);
|
||||||
textRect = QRect(rect.x(),
|
textRect = QRect(rect.x(),
|
||||||
iconRect.bottom() /*- 3*/,
|
rect.bottom() - iconTopSpace,
|
||||||
rect.width(),
|
rect.width(),
|
||||||
rect.height() - iconRect.height() - Style::AppTopSpace - 30);
|
iconTopSpace);
|
||||||
// QPixmap pixmap;
|
|
||||||
// pixmap = icon.pixmap((Style::AppListIconSize+20,Style::AppListIconSize+20));//wgx
|
|
||||||
// icon=QIcon(pixmap);
|
|
||||||
} else {
|
} else {
|
||||||
iconRect = QRect(rect.x() + Style::AppLeftSpace,
|
iconRect = QRect(rect.x() + iconLeftSpace,
|
||||||
rect.y() + Style::AppTopSpace,
|
rect.y() + iconTopSpace,
|
||||||
Style::AppListIconSize,
|
Style::AppListIconSize,
|
||||||
Style::AppListIconSize);
|
Style::AppListIconSize);
|
||||||
textRect = QRect(rect.x(),
|
textRect = QRect(rect.x(),
|
||||||
iconRect.bottom(),
|
rect.bottom() - iconTopSpace,
|
||||||
rect.width(),
|
rect.width(),
|
||||||
rect.height() - iconRect.height() - Style::AppTopSpace - 30);
|
iconTopSpace);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString str;
|
QString str;
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include "style.h"
|
#include "style.h"
|
||||||
#include "utility.h"
|
#include "utility.h"
|
||||||
|
#include "buriedpointdatasend.h"
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
FullCommonUseWidget::FullCommonUseWidget(QWidget *parent) :
|
FullCommonUseWidget::FullCommonUseWidget(QWidget *parent) :
|
||||||
|
@ -131,6 +132,11 @@ void FullCommonUseWidget::initVerticalScrollBar()
|
||||||
void FullCommonUseWidget::on_powerOffButton_clicked()
|
void FullCommonUseWidget::on_powerOffButton_clicked()
|
||||||
{
|
{
|
||||||
QProcess::startDetached(QString("ukui-session-tools"));
|
QProcess::startDetached(QString("ukui-session-tools"));
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow/commonUseWidget/powerOffButton";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FullCommonUseWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos)
|
void FullCommonUseWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos)
|
||||||
|
@ -138,6 +144,11 @@ void FullCommonUseWidget::on_powerOffButton_customContextMenuRequested(const QPo
|
||||||
RightClickMenu m_otherMenu(this);
|
RightClickMenu m_otherMenu(this);
|
||||||
m_otherMenu.showShutdownMenu(m_powerOffButton->mapToGlobal(pos));
|
m_otherMenu.showShutdownMenu(m_powerOffButton->mapToGlobal(pos));
|
||||||
myDebug() << "SideBarWidget::shutdownBtnRightClickSlot() 开始";
|
myDebug() << "SideBarWidget::shutdownBtnRightClickSlot() 开始";
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow/commonUseWidget/powerOffButton";
|
||||||
|
pointData.function = "RightClicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FullCommonUseWidget::initAppListWidget()
|
void FullCommonUseWidget::initAppListWidget()
|
||||||
|
@ -190,6 +201,12 @@ void FullCommonUseWidget::execApplication(QString desktopfp)
|
||||||
{
|
{
|
||||||
Q_EMIT sendHideMainWindowSignal();
|
Q_EMIT sendHideMainWindowSignal();
|
||||||
execApp(desktopfp);
|
execApp(desktopfp);
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow/commonUseWidget/execApplication";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
pointData.otherFunction[0] = desktopfp;
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FullCommonUseWidget::selectFirstItem()
|
void FullCommonUseWidget::selectFirstItem()
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QSvgRenderer>
|
#include <QSvgRenderer>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
#include "buriedpointdatasend.h"
|
||||||
|
|
||||||
FullFunctionWidget::FullFunctionWidget(QWidget *parent) :
|
FullFunctionWidget::FullFunctionWidget(QWidget *parent) :
|
||||||
QWidget(parent)
|
QWidget(parent)
|
||||||
|
@ -151,6 +152,11 @@ void FullFunctionWidget::initVerticalScrollBar()
|
||||||
void FullFunctionWidget::on_powerOffButton_clicked()
|
void FullFunctionWidget::on_powerOffButton_clicked()
|
||||||
{
|
{
|
||||||
QProcess::startDetached(QString("ukui-session-tools"));
|
QProcess::startDetached(QString("ukui-session-tools"));
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow/FullFunctionWidget/powerOffButton";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FullFunctionWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos)
|
void FullFunctionWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos)
|
||||||
|
@ -158,6 +164,11 @@ void FullFunctionWidget::on_powerOffButton_customContextMenuRequested(const QPoi
|
||||||
RightClickMenu m_otherMenu(this);
|
RightClickMenu m_otherMenu(this);
|
||||||
m_otherMenu.showShutdownMenu(m_powerOffButton->mapToGlobal(pos));
|
m_otherMenu.showShutdownMenu(m_powerOffButton->mapToGlobal(pos));
|
||||||
myDebug() << "SideBarWidget::shutdownBtnRightClickSlot() 开始";
|
myDebug() << "SideBarWidget::shutdownBtnRightClickSlot() 开始";
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow/FullFunctionWidget/powerOffButton";
|
||||||
|
pointData.function = "RightClicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -218,6 +229,12 @@ void FullFunctionWidget::execApplication(QString desktopfp)
|
||||||
{
|
{
|
||||||
Q_EMIT sendHideMainWindowSignal();
|
Q_EMIT sendHideMainWindowSignal();
|
||||||
execApp(desktopfp);
|
execApp(desktopfp);
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow/FullFunctionWidget/execApplication";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
pointData.otherFunction[0] = desktopfp;
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FullFunctionWidget::on_setAreaScrollBarValue(int value)
|
void FullFunctionWidget::on_setAreaScrollBarValue(int value)
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "full_letter_widget.h"
|
#include "full_letter_widget.h"
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
#include "buriedpointdatasend.h"
|
||||||
|
|
||||||
FullLetterWidget::FullLetterWidget(QWidget *parent) :
|
FullLetterWidget::FullLetterWidget(QWidget *parent) :
|
||||||
QWidget(parent)
|
QWidget(parent)
|
||||||
|
@ -145,6 +146,11 @@ void FullLetterWidget::initVerticalScrollBar()
|
||||||
void FullLetterWidget::on_powerOffButton_clicked()
|
void FullLetterWidget::on_powerOffButton_clicked()
|
||||||
{
|
{
|
||||||
QProcess::startDetached(QString("ukui-session-tools"));
|
QProcess::startDetached(QString("ukui-session-tools"));
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow/FullLetterWidget/powerOffButton";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FullLetterWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos)
|
void FullLetterWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos)
|
||||||
|
@ -152,6 +158,11 @@ void FullLetterWidget::on_powerOffButton_customContextMenuRequested(const QPoint
|
||||||
RightClickMenu m_otherMenu(this);
|
RightClickMenu m_otherMenu(this);
|
||||||
m_otherMenu.showShutdownMenu(m_powerOffButton->mapToGlobal(pos));
|
m_otherMenu.showShutdownMenu(m_powerOffButton->mapToGlobal(pos));
|
||||||
qDebug() << "SideBarWidget::shutdownBtnRightClickSlot() 开始";
|
qDebug() << "SideBarWidget::shutdownBtnRightClickSlot() 开始";
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow/FullLetterWidget/powerOffButton";
|
||||||
|
pointData.function = "RightClicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FullLetterWidget::setFocusToThis()
|
void FullLetterWidget::setFocusToThis()
|
||||||
|
@ -222,6 +233,12 @@ void FullLetterWidget::execApplication(QString desktopfp)
|
||||||
{
|
{
|
||||||
Q_EMIT sendHideMainWindowSignal();
|
Q_EMIT sendHideMainWindowSignal();
|
||||||
execApp(desktopfp);
|
execApp(desktopfp);
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow/FullLetterWidget/execApplication";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
pointData.otherFunction[0] = desktopfp;
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FullLetterWidget::on_setAreaScrollBarValue(int value)
|
void FullLetterWidget::on_setAreaScrollBarValue(int value)
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "style.h"
|
#include "style.h"
|
||||||
#include "utility.h"
|
#include "utility.h"
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include "buriedpointdatasend.h"
|
||||||
|
|
||||||
FullSearchResultWidget::FullSearchResultWidget(QWidget *parent) :
|
FullSearchResultWidget::FullSearchResultWidget(QWidget *parent) :
|
||||||
QWidget(parent)
|
QWidget(parent)
|
||||||
|
@ -120,6 +121,11 @@ void FullSearchResultWidget::initVerticalScrollBar()
|
||||||
void FullSearchResultWidget::on_powerOffButton_clicked()
|
void FullSearchResultWidget::on_powerOffButton_clicked()
|
||||||
{
|
{
|
||||||
QProcess::startDetached(QString("ukui-session-tools"));
|
QProcess::startDetached(QString("ukui-session-tools"));
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow/FullSearchResultWidget/powerOffButton";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FullSearchResultWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos)
|
void FullSearchResultWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos)
|
||||||
|
@ -127,6 +133,11 @@ void FullSearchResultWidget::on_powerOffButton_customContextMenuRequested(const
|
||||||
RightClickMenu m_otherMenu(this);
|
RightClickMenu m_otherMenu(this);
|
||||||
m_otherMenu.showShutdownMenu(m_powerOffButton->mapToGlobal(pos));
|
m_otherMenu.showShutdownMenu(m_powerOffButton->mapToGlobal(pos));
|
||||||
myDebug() << "SideBarWidget::shutdownBtnRightClickSlot() 开始";
|
myDebug() << "SideBarWidget::shutdownBtnRightClickSlot() 开始";
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow/FullSearchResultWidget/powerOffButton";
|
||||||
|
pointData.function = "RightClicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FullSearchResultWidget::initAppListWidget()
|
void FullSearchResultWidget::initAppListWidget()
|
||||||
|
@ -153,6 +164,12 @@ void FullSearchResultWidget::execApplication(QString desktopfp)
|
||||||
{
|
{
|
||||||
Q_EMIT sendHideMainWindowSignal();
|
Q_EMIT sendHideMainWindowSignal();
|
||||||
execApp(desktopfp);
|
execApp(desktopfp);
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow/FullLetterWidget/execApplication";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
pointData.otherFunction[0] = desktopfp;
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FullSearchResultWidget::updateAppListView(QVector<QStringList> arg)
|
void FullSearchResultWidget::updateAppListView(QVector<QStringList> arg)
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <QPluginLoader>
|
#include <QPluginLoader>
|
||||||
#include "currenttime_interface.h"
|
#include "currenttime_interface.h"
|
||||||
#include "style.h"
|
#include "style.h"
|
||||||
|
#include "utility.h"
|
||||||
#include <QtSvg/QSvgRenderer>
|
#include <QtSvg/QSvgRenderer>
|
||||||
#define TIME_FORMAT "org.ukui.control-center.panel.plugins"
|
#define TIME_FORMAT "org.ukui.control-center.panel.plugins"
|
||||||
#define TIME_FORMAT_KEY "hoursystem"
|
#define TIME_FORMAT_KEY "hoursystem"
|
||||||
|
@ -153,11 +154,12 @@ void FunctionWidget::initUi()
|
||||||
this->setStyleSheet("border:0px solid #ff0000;background:transparent;");
|
this->setStyleSheet("border:0px solid #ff0000;background:transparent;");
|
||||||
this->setFocusPolicy(Qt::NoFocus);
|
this->setFocusPolicy(Qt::NoFocus);
|
||||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||||
mainLayout->setSpacing(0);
|
mainLayout->setSpacing(10);
|
||||||
|
mainLayout->setContentsMargins(5, 0, 0, 0);
|
||||||
this->setLayout(mainLayout);
|
this->setLayout(mainLayout);
|
||||||
//时间+搜索框
|
//时间
|
||||||
upWidget = new QWidget();
|
upWidget = new QWidget();
|
||||||
upWidget->setFixedSize(400, 232);
|
upWidget->setFixedSize(400, 96);
|
||||||
upLayout = new QVBoxLayout();
|
upLayout = new QVBoxLayout();
|
||||||
upWidget->setLayout(upLayout);
|
upWidget->setLayout(upLayout);
|
||||||
upLayout->setContentsMargins(0, 0, 0, 32);
|
upLayout->setContentsMargins(0, 0, 0, 32);
|
||||||
|
@ -184,13 +186,6 @@ void FunctionWidget::initUi()
|
||||||
upRightLayout->setContentsMargins(0, 0, 0, 0);
|
upRightLayout->setContentsMargins(0, 0, 0, 0);
|
||||||
upRightLayout->setSpacing(0);
|
upRightLayout->setSpacing(0);
|
||||||
// upRightWidget->setStyleSheet("border-width:1px;border-style:solid;border-color:red");
|
// upRightWidget->setStyleSheet("border-width:1px;border-style:solid;border-color:red");
|
||||||
//左下
|
|
||||||
downWidget = new QWidget;
|
|
||||||
downLayout = new QVBoxLayout();
|
|
||||||
downWidget->setLayout(downLayout);
|
|
||||||
downWidget->setFixedSize(400, 104);
|
|
||||||
downLayout->setSpacing(0);
|
|
||||||
downLayout->setContentsMargins(0, 24, 0, 0);
|
|
||||||
//左侧控件
|
//左侧控件
|
||||||
timeLabel = new QLabel();
|
timeLabel = new QLabel();
|
||||||
weekLabel = new QLabel();
|
weekLabel = new QLabel();
|
||||||
|
@ -205,17 +200,19 @@ void FunctionWidget::initUi()
|
||||||
QDBusReply<QString> styleName = usrInterface->call(QString("get_current_stylename"));
|
QDBusReply<QString> styleName = usrInterface->call(QString("get_current_stylename"));
|
||||||
changeSearchBoxBackground(styleName);
|
changeSearchBoxBackground(styleName);
|
||||||
connect(searchEditBtn, &QPushButton::clicked, this, &FunctionWidget::obtainSearchResult);
|
connect(searchEditBtn, &QPushButton::clicked, this, &FunctionWidget::obtainSearchResult);
|
||||||
downLayout->addWidget(searchEditBtn);
|
|
||||||
upLayout->addWidget(leftUpWidget);
|
upLayout->addWidget(leftUpWidget);
|
||||||
upLayout->addWidget(downWidget);
|
mainLayout->addStretch();
|
||||||
mainLayout->addWidget(upWidget);
|
|
||||||
|
if (g_subProjectCodeName.contains("mavis")) {
|
||||||
|
upWidget->setFixedSize(0, 0);
|
||||||
|
} else {
|
||||||
|
mainLayout->addWidget(upWidget);
|
||||||
|
}
|
||||||
|
|
||||||
|
mainLayout->addWidget(searchEditBtn);
|
||||||
focusPlug = new pluginwidget(this);
|
focusPlug = new pluginwidget(this);
|
||||||
//加入专注模式
|
|
||||||
// if(plugin)
|
|
||||||
// {
|
|
||||||
mainLayout->addWidget(focusPlug);
|
mainLayout->addWidget(focusPlug);
|
||||||
focusPlug->setFixedSize(400, 638);
|
focusPlug->setFixedSize(400, 638);
|
||||||
// }
|
|
||||||
mainLayout->addStretch();
|
mainLayout->addStretch();
|
||||||
leftUpLayout->addWidget(upLeftWidget);
|
leftUpLayout->addWidget(upLeftWidget);
|
||||||
leftUpLayout->addWidget(upRightWidget);
|
leftUpLayout->addWidget(upRightWidget);
|
||||||
|
|
|
@ -35,7 +35,6 @@ private:
|
||||||
QGSettings *timeSetting = nullptr;
|
QGSettings *timeSetting = nullptr;
|
||||||
QString themeName;
|
QString themeName;
|
||||||
QObject *plugin = nullptr;
|
QObject *plugin = nullptr;
|
||||||
AbstractInterface *app;
|
|
||||||
QGraphicsDropShadowEffect *effect;
|
QGraphicsDropShadowEffect *effect;
|
||||||
QPalette palette;
|
QPalette palette;
|
||||||
QTimer *myTimer = nullptr;
|
QTimer *myTimer = nullptr;
|
||||||
|
|
|
@ -48,9 +48,8 @@ void FunctionButtonWidget::initUi()
|
||||||
{
|
{
|
||||||
this->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
|
this->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
|
||||||
this->setAttribute(Qt::WA_StyledBackground, true);
|
this->setAttribute(Qt::WA_StyledBackground, true);
|
||||||
this->resize(Style::LeftBtnWidth * 2 + 5, Style::LeftBtnHeight * 6 + 25);
|
|
||||||
QGridLayout *gridLayout = new QGridLayout;
|
QGridLayout *gridLayout = new QGridLayout;
|
||||||
gridLayout->setContentsMargins(0, 0, 0, 0);
|
gridLayout->setContentsMargins(40, 80, 40, 80);
|
||||||
gridLayout->setSpacing(5);
|
gridLayout->setSpacing(5);
|
||||||
this->setLayout(gridLayout);
|
this->setLayout(gridLayout);
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,8 @@ void LetterButtonWidget::initUi()
|
||||||
this->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
|
this->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
|
||||||
this->setAttribute(Qt::WA_StyledBackground, true);
|
this->setAttribute(Qt::WA_StyledBackground, true);
|
||||||
this->setFocusPolicy(Qt::NoFocus);
|
this->setFocusPolicy(Qt::NoFocus);
|
||||||
this->resize(235, 366);
|
|
||||||
QGridLayout *gridLayout = new QGridLayout;
|
QGridLayout *gridLayout = new QGridLayout;
|
||||||
gridLayout->setContentsMargins(0, 0, 0, 0);
|
gridLayout->setContentsMargins(35, 80, 35, 80);
|
||||||
gridLayout->setSpacing(5);
|
gridLayout->setSpacing(5);
|
||||||
this->setLayout(gridLayout);
|
this->setLayout(gridLayout);
|
||||||
QStringList letterlist;
|
QStringList letterlist;
|
||||||
|
@ -51,13 +50,13 @@ void LetterButtonWidget::initUi()
|
||||||
letterlist.append("&&");
|
letterlist.append("&&");
|
||||||
letterlist.append("#");
|
letterlist.append("#");
|
||||||
|
|
||||||
for (int row = 0; row < 7; row++) {
|
for (int row = 0; row < 6; row++) {
|
||||||
for (int col = 0; col < 4; col++) {
|
for (int col = 0; col < 5; col++) {
|
||||||
if (row * 4 + col < letterlist.size()) {
|
if (row * 5 + col < letterlist.size()) {
|
||||||
LetterClassifyButton *btn = new LetterClassifyButton(this, false, letterlist.at(row * 4 + col));
|
LetterClassifyButton *btn = new LetterClassifyButton(this, false, letterlist.at(row * 5 + col));
|
||||||
btn->setFlat(true);
|
btn->setFlat(true);
|
||||||
btn->setCheckable(false);
|
btn->setCheckable(false);
|
||||||
btn->setFixedSize(55, 48);
|
btn->setFixedSize(38, 38);
|
||||||
gridLayout->addWidget(btn, row, col);
|
gridLayout->addWidget(btn, row, col);
|
||||||
connect(btn, &LetterClassifyButton::buttonClicked, this, &LetterButtonWidget::letterBtnClickedSlot);
|
connect(btn, &LetterClassifyButton::buttonClicked, this, &LetterButtonWidget::letterBtnClickedSlot);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -42,9 +42,20 @@ MainViewWidget::~MainViewWidget()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainViewWidget::styleChangeSlot(const QString &style)
|
||||||
|
{
|
||||||
|
m_curStyle = style;
|
||||||
|
|
||||||
|
if (style == "ukui-dark") {
|
||||||
|
m_backColor.setNamedColor("#800D0D0D");
|
||||||
|
} else {
|
||||||
|
m_backColor.setNamedColor("#94FFFFFF");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainViewWidget::paintEvent(QPaintEvent *event)
|
void MainViewWidget::paintEvent(QPaintEvent *event)
|
||||||
{
|
{
|
||||||
double transparency = getTransparency();
|
// double transparency = getTransparency();
|
||||||
QRect rect = this->rect();
|
QRect rect = this->rect();
|
||||||
QPainterPath path;
|
QPainterPath path;
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
|
@ -60,11 +71,8 @@ void MainViewWidget::paintEvent(QPaintEvent *event)
|
||||||
path.quadTo(rect.bottomRight(), rect.bottomRight() + QPointF(0, -radius));
|
path.quadTo(rect.bottomRight(), rect.bottomRight() + QPointF(0, -radius));
|
||||||
path.lineTo(rect.topRight() + QPointF(0, radius));
|
path.lineTo(rect.topRight() + QPointF(0, radius));
|
||||||
path.quadTo(rect.topRight(), rect.topRight() + QPointF(-radius, -0));
|
path.quadTo(rect.topRight(), rect.topRight() + QPointF(-radius, -0));
|
||||||
painter.setBrush(this->palette().base());
|
|
||||||
painter.setPen(Qt::transparent);
|
painter.setPen(Qt::transparent);
|
||||||
painter.setOpacity(transparency + 0.1);
|
painter.setOpacity(0.58);
|
||||||
painter.fillPath(path, this->palette().base());
|
painter.fillPath(path, m_backColor);
|
||||||
// setProperty("blurRegion", QRegion(path.toFillPolygon().toPolygon()));
|
|
||||||
// KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon()));
|
|
||||||
QWidget::paintEvent(event);
|
QWidget::paintEvent(event);
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,12 +55,16 @@ protected:
|
||||||
void paintEvent(QPaintEvent *event);
|
void paintEvent(QPaintEvent *event);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
|
void styleChangeSlot(const QString &style);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
|
|
||||||
void directoryChangedSignal();
|
void directoryChangedSignal();
|
||||||
|
|
||||||
void sendDirectoryPath();
|
void sendDirectoryPath();
|
||||||
|
private:
|
||||||
|
QString m_curStyle;
|
||||||
|
QColor m_backColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MAINVIEWWIDGET_H
|
#endif // MAINVIEWWIDGET_H
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
#include <KWindowEffects>
|
#include <KWindowEffects>
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
#include "src/UtilityFunction/utility.h"
|
#include "utility.h"
|
||||||
|
#include "buriedpointdatasend.h"
|
||||||
|
|
||||||
FullMainWindow::FullMainWindow(QWidget *parent) :
|
FullMainWindow::FullMainWindow(QWidget *parent) :
|
||||||
QMainWindow(parent)
|
QMainWindow(parent)
|
||||||
|
@ -41,7 +42,7 @@ FullMainWindow::FullMainWindow(QWidget *parent) :
|
||||||
queryWidLayout->setSpacing(5);
|
queryWidLayout->setSpacing(5);
|
||||||
m_queryWid->setLayout(queryWidLayout);
|
m_queryWid->setLayout(queryWidLayout);
|
||||||
char style[200];
|
char style[200];
|
||||||
QPixmap pixmap = loadSvg(QString(":/data/img/mainviewwidget/search.svg"), 16);
|
QPixmap pixmap = loadSvg(QString(":/data/img/mainviewwidget/full-search.svg"), 16);
|
||||||
|
|
||||||
if (QGSettings::isSchemaInstalled(QString("org.ukui.style").toLocal8Bit())) {
|
if (QGSettings::isSchemaInstalled(QString("org.ukui.style").toLocal8Bit())) {
|
||||||
QGSettings *gsetting = new QGSettings("org.ukui.style", QByteArray(), this);
|
QGSettings *gsetting = new QGSettings("org.ukui.style", QByteArray(), this);
|
||||||
|
@ -225,6 +226,11 @@ void FullMainWindow::changeStyle()
|
||||||
void FullMainWindow::on_minPushButton_clicked()
|
void FullMainWindow::on_minPushButton_clicked()
|
||||||
{
|
{
|
||||||
Q_EMIT showNormalWindow();
|
Q_EMIT showNormalWindow();
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow/minPushButton";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FullMainWindow::paintEvent(QPaintEvent *event)
|
void FullMainWindow::paintEvent(QPaintEvent *event)
|
||||||
|
@ -250,6 +256,11 @@ bool FullMainWindow::eventFilter(QObject *watched, QEvent *event)
|
||||||
char style[200];
|
char style[200];
|
||||||
|
|
||||||
if (event->type() == QEvent::FocusIn) {
|
if (event->type() == QEvent::FocusIn) {
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow/Search";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
sprintf(style, "QLineEdit{border:2px solid %s;background-color:%s;border-radius:17px;color:#ffffff;}",
|
sprintf(style, "QLineEdit{border:2px solid %s;background-color:%s;border-radius:17px;color:#ffffff;}",
|
||||||
QueryLineEditClickedBorder, QueryLineEditClickedBackground);
|
QueryLineEditClickedBorder, QueryLineEditClickedBackground);
|
||||||
m_lineEdit->setStyleSheet(style);
|
m_lineEdit->setStyleSheet(style);
|
||||||
|
@ -425,6 +436,8 @@ void FullMainWindow::on_fullSelectMenuButton_clicked()
|
||||||
|
|
||||||
void FullMainWindow::on_fullSelectMenuButton_triggered(QAction *arg1)
|
void FullMainWindow::on_fullSelectMenuButton_triggered(QAction *arg1)
|
||||||
{
|
{
|
||||||
|
pointDataStruct pointData;
|
||||||
|
|
||||||
if (arg1 == m_allAction) {
|
if (arg1 == m_allAction) {
|
||||||
m_fullStackedWidget->setCurrentIndex(0);
|
m_fullStackedWidget->setCurrentIndex(0);
|
||||||
m_fullCommonPage->repaintWidget();
|
m_fullCommonPage->repaintWidget();
|
||||||
|
@ -434,6 +447,10 @@ void FullMainWindow::on_fullSelectMenuButton_triggered(QAction *arg1)
|
||||||
m_allAction->setChecked(true);
|
m_allAction->setChecked(true);
|
||||||
m_letterAction->setChecked(false);
|
m_letterAction->setChecked(false);
|
||||||
m_funcAction->setChecked(false);
|
m_funcAction->setChecked(false);
|
||||||
|
pointData.module = "fullWindow/fullSelectMenuButton";
|
||||||
|
pointData.function = "AllSelect";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
} else if (arg1 == m_letterAction) {
|
} else if (arg1 == m_letterAction) {
|
||||||
m_fullStackedWidget->setCurrentIndex(1);
|
m_fullStackedWidget->setCurrentIndex(1);
|
||||||
m_fullLetterPage->repaintWidget();
|
m_fullLetterPage->repaintWidget();
|
||||||
|
@ -442,6 +459,10 @@ void FullMainWindow::on_fullSelectMenuButton_triggered(QAction *arg1)
|
||||||
m_allAction->setChecked(false);
|
m_allAction->setChecked(false);
|
||||||
m_letterAction->setChecked(true);
|
m_letterAction->setChecked(true);
|
||||||
m_funcAction->setChecked(false);
|
m_funcAction->setChecked(false);
|
||||||
|
pointData.module = "fullWindow/fullSelectMenuButton";
|
||||||
|
pointData.function = "letterSelect";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
} else if (arg1 == m_funcAction) {
|
} else if (arg1 == m_funcAction) {
|
||||||
m_fullStackedWidget->setCurrentIndex(2);
|
m_fullStackedWidget->setCurrentIndex(2);
|
||||||
m_fullFunctionPage->repaintWidget();
|
m_fullFunctionPage->repaintWidget();
|
||||||
|
@ -450,6 +471,10 @@ void FullMainWindow::on_fullSelectMenuButton_triggered(QAction *arg1)
|
||||||
m_allAction->setChecked(false);
|
m_allAction->setChecked(false);
|
||||||
m_letterAction->setChecked(false);
|
m_letterAction->setChecked(false);
|
||||||
m_funcAction->setChecked(true);
|
m_funcAction->setChecked(true);
|
||||||
|
pointData.module = "fullWindow/fullSelectMenuButton";
|
||||||
|
pointData.function = "FunctionSelect";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include <QGroupBox>
|
#include <QGroupBox>
|
||||||
#include <QEventLoop>
|
#include <QEventLoop>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
#include "buriedpointdatasend.h"
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) :
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
QMainWindow(parent)
|
QMainWindow(parent)
|
||||||
|
@ -49,19 +50,19 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
//左侧
|
//左侧
|
||||||
m_viewWidget = new MainViewWidget(m_centralwidget);
|
m_viewWidget = new MainViewWidget(m_centralwidget);
|
||||||
m_mainLeftVerticalLayout = new QVBoxLayout(m_viewWidget);
|
m_mainLeftVerticalLayout = new QVBoxLayout(m_viewWidget);
|
||||||
m_mainLeftVerticalLayout->setSpacing(0);
|
m_mainLeftVerticalLayout->setSpacing(9);
|
||||||
m_mainLeftVerticalLayout->setContentsMargins(8, 8, 0, 0);
|
m_mainLeftVerticalLayout->setContentsMargins(8, 15, 4, 0);
|
||||||
//搜索框部分
|
//搜索框部分
|
||||||
m_topStackedWidget = new QStackedWidget(m_viewWidget);
|
m_topStackedWidget = new QStackedWidget(m_viewWidget);
|
||||||
m_topStackedWidget->setFixedHeight(48);
|
m_topStackedWidget->setFixedHeight(34);
|
||||||
//搜索框收起页
|
//搜索框收起页
|
||||||
m_minMenuPage = new QWidget();
|
m_minMenuPage = new QWidget();
|
||||||
m_minMenuPage->setMinimumSize(QSize(0, 48));
|
m_minMenuPage->setMinimumSize(QSize(0, 34));
|
||||||
m_letfTopSelectHorizontalLayout = new QHBoxLayout(m_minMenuPage);
|
m_letfTopSelectHorizontalLayout = new QHBoxLayout(m_minMenuPage);
|
||||||
m_letfTopSelectHorizontalLayout->setSpacing(8);
|
m_letfTopSelectHorizontalLayout->setSpacing(2);
|
||||||
m_letfTopSelectHorizontalLayout->setContentsMargins(8, 0, 8, 12);
|
m_letfTopSelectHorizontalLayout->setContentsMargins(8, 0, 4, 0);
|
||||||
m_minSelectTextLabel = new QLabel(m_minMenuPage);
|
m_minSelectTextLabel = new QLabel(m_minMenuPage);
|
||||||
m_horizontalSpacer = new QSpacerItem(68, 10, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
m_horizontalSpacer = new QSpacerItem(58, 10, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||||
m_searchPushButton = new QPushButton(m_minMenuPage);
|
m_searchPushButton = new QPushButton(m_minMenuPage);
|
||||||
// m_searchPushButton->setStyleSheet(m_buttonStyle.arg("QPushButton"));
|
// m_searchPushButton->setStyleSheet(m_buttonStyle.arg("QPushButton"));
|
||||||
m_searchPushButton->setFixedSize(QSize(26, 26));
|
m_searchPushButton->setFixedSize(QSize(26, 26));
|
||||||
|
@ -71,20 +72,21 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
m_minSelectButton->setFixedSize(QSize(26, 26));
|
m_minSelectButton->setFixedSize(QSize(26, 26));
|
||||||
m_minSelectButton->setIcon(getCurIcon(":/data/img/mainviewwidget/DM-all.svg", true));
|
m_minSelectButton->setIcon(getCurIcon(":/data/img/mainviewwidget/DM-all.svg", true));
|
||||||
m_minSelectButton->installEventFilter(this);
|
m_minSelectButton->installEventFilter(this);
|
||||||
m_selectMenuButton = new QToolButton(m_minMenuPage);
|
m_selectMenuButton = new RotationLabel(m_minMenuPage);
|
||||||
|
m_selectMenuButton->installEventFilter(this);
|
||||||
m_selectMenuButton->setStyleSheet("background: transparent;");
|
m_selectMenuButton->setStyleSheet("background: transparent;");
|
||||||
m_selectMenuButton->setFixedSize(QSize(16, 26));
|
m_selectMenuButton->setFixedSize(QSize(8, 26));
|
||||||
m_selectMenuButton->setAcceptDrops(true);
|
m_selectMenuButton->setAcceptDrops(true);
|
||||||
m_selectMenuButton->setIcon(getCurIcon(":/data/img/mainviewwidget/DM-arrow.svg", true));
|
m_selectMenuButton->setFocusPolicy(Qt::StrongFocus);
|
||||||
m_selectMenuButton->setPopupMode(QToolButton::InstantPopup);
|
m_selectMenuButton->setIcon(getCurIcon(":/data/img/mainviewwidget/downarrow.svg", true)
|
||||||
// m_selectMenuButton->setStyleSheet(QString::fromUtf8("QToolButton::menu-indicator { image: None; }"));
|
.pixmap(QSize(Style::miniIconSize, Style::miniIconSize)));
|
||||||
//搜索框展开页
|
//搜索框展开页
|
||||||
m_minSearchPage = new QWidget();
|
m_minSearchPage = new QWidget();
|
||||||
m_leftTopSearchHorizontalLayout = new QHBoxLayout(m_minSearchPage);
|
m_leftTopSearchHorizontalLayout = new QHBoxLayout(m_minSearchPage);
|
||||||
m_leftTopSearchHorizontalLayout->setContentsMargins(8, 0, 8, 12);
|
m_leftTopSearchHorizontalLayout->setContentsMargins(8, 0, 8, 0);
|
||||||
m_lineEdit = new QLineEdit(m_minSearchPage);
|
m_lineEdit = new QLineEdit(m_minSearchPage);
|
||||||
m_lineEdit->setMinimumSize(QSize(30, 26));
|
m_lineEdit->setMinimumSize(QSize(30, 26));
|
||||||
m_lineEdit->setStyleSheet(QString::fromUtf8("border-radius: 13px; border:2px solid rgba(5, 151, 255, 1); background: transparent;"));
|
m_lineEdit->setStyleSheet(QString::fromUtf8("border-radius: 13px; border:1px solid rgba(5, 151, 255, 1); background: transparent;"));
|
||||||
m_lineEdit->setFrame(false);
|
m_lineEdit->setFrame(false);
|
||||||
m_lineEdit->setPlaceholderText(tr("Search"));
|
m_lineEdit->setPlaceholderText(tr("Search"));
|
||||||
m_cancelSearchPushButton = new QPushButton(m_minSearchPage);
|
m_cancelSearchPushButton = new QPushButton(m_minSearchPage);
|
||||||
|
@ -127,19 +129,21 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
//右侧窗口
|
//右侧窗口
|
||||||
m_mainRightVerticalLayout = new QVBoxLayout();
|
m_mainRightVerticalLayout = new QVBoxLayout();
|
||||||
m_mainRightVerticalLayout->setSpacing(0);
|
m_mainRightVerticalLayout->setSpacing(0);
|
||||||
m_mainRightVerticalLayout->setContentsMargins(8, 8, 8, 8);
|
m_mainRightVerticalLayout->setContentsMargins(8, 6, 8, 8);
|
||||||
m_mainRightVerticalLayout_1 = new QVBoxLayout();
|
m_mainRightVerticalLayout_1 = new QVBoxLayout();
|
||||||
m_rightTopHorizontalLayout = new QHBoxLayout();
|
m_rightTopHorizontalLayout = new QHBoxLayout();
|
||||||
m_rightTopHorizontalLayout->setSpacing(30);
|
m_rightTopHorizontalLayout->setSpacing(30);
|
||||||
m_rightTopHorizontalLayout->setContentsMargins(8, 0, 10, 0);
|
m_rightTopHorizontalLayout->setContentsMargins(8, 0, 10, 0);
|
||||||
//收藏按键
|
//收藏按键
|
||||||
m_collectPushButton = new QLabel(m_centralwidget);
|
m_collectPushButton = new QLabel(m_centralwidget);
|
||||||
|
m_collectPushButton->setFocusPolicy(Qt::StrongFocus);
|
||||||
m_collectPushButton->setFixedHeight(34);
|
m_collectPushButton->setFixedHeight(34);
|
||||||
// m_collectPushButton->setFlat(true);
|
// m_collectPushButton->setFlat(true);
|
||||||
m_collectPushButton->installEventFilter(this);
|
m_collectPushButton->installEventFilter(this);
|
||||||
//最近按键
|
//最近按键
|
||||||
m_recentPushButton = new QLabel(m_centralwidget);
|
m_recentPushButton = new QLabel(m_centralwidget);
|
||||||
m_recentPushButton->setFixedHeight(34);
|
m_recentPushButton->setFixedHeight(34);
|
||||||
|
m_recentPushButton->setFocusPolicy(Qt::StrongFocus);
|
||||||
// m_recentPushButton->setFlat(true);
|
// m_recentPushButton->setFlat(true);
|
||||||
m_recentPushButton->installEventFilter(this);
|
m_recentPushButton->installEventFilter(this);
|
||||||
m_horizontalSpacer_3 = new QSpacerItem(332, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
m_horizontalSpacer_3 = new QSpacerItem(332, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||||
|
@ -160,7 +164,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
m_collectPage = new QWidget();
|
m_collectPage = new QWidget();
|
||||||
m_collectPage->setFixedSize(QSize(324, 480));
|
m_collectPage->setFixedSize(QSize(324, 480));
|
||||||
m_rightCollectLayout = new QVBoxLayout(m_collectPage);
|
m_rightCollectLayout = new QVBoxLayout(m_collectPage);
|
||||||
m_rightCollectLayout->setContentsMargins(0, 0, 0, 0);
|
m_rightCollectLayout->setContentsMargins(0, 18, 0, 0);
|
||||||
//收藏视图
|
//收藏视图
|
||||||
m_collectListView = new RightListView(m_collectPage);
|
m_collectListView = new RightListView(m_collectPage);
|
||||||
m_collectListView->setFixedSize(QSize(324, 428));
|
m_collectListView->setFixedSize(QSize(324, 428));
|
||||||
|
@ -182,7 +186,12 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
//最近视图
|
//最近视图
|
||||||
m_recentListView = new ListView(m_recentPage);
|
m_recentListView = new ListView(m_recentPage);
|
||||||
m_recentListView->installEventFilter(this);
|
m_recentListView->installEventFilter(this);
|
||||||
m_recentListView->setFixedSize(QSize(324, 470));
|
m_recentListView->setFixedSize(QSize(Style::rightViewWidth, Style::rightViewHeight));
|
||||||
|
m_recentTextlabel = new QLabel(m_recentPage);
|
||||||
|
m_recentTextlabel->setFixedSize(QSize(Style::rightViewWidth, Style::rightViewHeight));
|
||||||
|
m_recentTextlabel->setAlignment(Qt::AlignCenter);
|
||||||
|
m_recentTextlabel->setText(QApplication::translate("MainWindow", "No recent files"));
|
||||||
|
|
||||||
m_rightStackedWidget->addWidget(m_collectPage);
|
m_rightStackedWidget->addWidget(m_collectPage);
|
||||||
m_rightStackedWidget->addWidget(m_recentPage);
|
m_rightStackedWidget->addWidget(m_recentPage);
|
||||||
m_verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
m_verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||||
|
@ -190,26 +199,30 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
m_rightBottomHorizontalLayout->setSizeConstraint(QLayout::SetDefaultConstraint);
|
m_rightBottomHorizontalLayout->setSizeConstraint(QLayout::SetDefaultConstraint);
|
||||||
m_rightBottomHorizontalLayout->setContentsMargins(0, 0, 8, 0);
|
m_rightBottomHorizontalLayout->setContentsMargins(0, 0, 8, 0);
|
||||||
m_horizontalSpacer_2 = new QSpacerItem(332, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
m_horizontalSpacer_2 = new QSpacerItem(332, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||||
|
m_horizontalSpacer_4 = new QSpacerItem(10, 10, QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||||
m_powerOffButton = new QPushButton(m_centralwidget);
|
m_powerOffButton = new QPushButton(m_centralwidget);
|
||||||
m_powerOffButton->setFixedSize(QSize(24, 24));
|
m_powerOffButton->setFixedSize(QSize(32, 32));
|
||||||
m_powerOffButton->setContextMenuPolicy(Qt::CustomContextMenu);
|
m_powerOffButton->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
m_powerOffButton->setIcon(QIcon(":/data/img/mainviewwidget/power.svg"));
|
m_powerOffButton->setIcon(QIcon(":/data/img/mainviewwidget/power.svg"));
|
||||||
|
m_powerOffButton->setIconSize(QSize(24, 24));
|
||||||
m_powerOffButton->setFlat(true);
|
m_powerOffButton->setFlat(true);
|
||||||
m_powerOffButton->installEventFilter(this);
|
m_powerOffButton->installEventFilter(this);
|
||||||
m_letfTopSelectHorizontalLayout->addWidget(m_minSelectTextLabel);
|
m_letfTopSelectHorizontalLayout->addWidget(m_minSelectTextLabel);
|
||||||
m_letfTopSelectHorizontalLayout->addItem(m_horizontalSpacer);
|
m_letfTopSelectHorizontalLayout->addItem(m_horizontalSpacer);
|
||||||
m_letfTopSelectHorizontalLayout->addWidget(m_searchPushButton);
|
m_letfTopSelectHorizontalLayout->addWidget(m_searchPushButton);
|
||||||
|
m_letfTopSelectHorizontalLayout->addItem(m_horizontalSpacer_4);
|
||||||
m_letfTopSelectHorizontalLayout->addWidget(m_minSelectButton);
|
m_letfTopSelectHorizontalLayout->addWidget(m_minSelectButton);
|
||||||
m_letfTopSelectHorizontalLayout->addWidget(m_selectMenuButton);
|
m_letfTopSelectHorizontalLayout->addWidget(m_selectMenuButton);
|
||||||
m_leftTopSearchHorizontalLayout->addWidget(m_lineEdit);
|
m_leftTopSearchHorizontalLayout->addWidget(m_lineEdit);
|
||||||
m_leftTopSearchHorizontalLayout->addWidget(m_cancelSearchPushButton);
|
m_leftTopSearchHorizontalLayout->addWidget(m_cancelSearchPushButton);
|
||||||
m_mainLeftVerticalLayout->addWidget(m_topStackedWidget);
|
m_mainLeftVerticalLayout->addWidget(m_topStackedWidget);
|
||||||
m_mainLeftVerticalLayout->addWidget(m_leftStackedWidget);
|
m_mainLeftVerticalLayout->addWidget(m_leftStackedWidget);
|
||||||
|
m_mainLeftVerticalLayout->addStretch();
|
||||||
m_mainRightVerticalLayout_1->addLayout(m_rightTopHorizontalLayout);
|
m_mainRightVerticalLayout_1->addLayout(m_rightTopHorizontalLayout);
|
||||||
m_rightCollectLayout->addItem(m_verticalSpacer);
|
|
||||||
m_rightCollectLayout->addWidget(m_collectListView);
|
m_rightCollectLayout->addWidget(m_collectListView);
|
||||||
m_rightCollectLayout->addItem(m_verticalSpacer_2);
|
m_rightCollectLayout->addItem(m_verticalSpacer_2);
|
||||||
m_rightRecentLayout->addWidget(m_recentListView);
|
m_rightRecentLayout->addWidget(m_recentListView);
|
||||||
|
m_rightRecentLayout->addWidget(m_recentTextlabel);
|
||||||
m_mainRightVerticalLayout_1->addWidget(m_rightStackedWidget);
|
m_mainRightVerticalLayout_1->addWidget(m_rightStackedWidget);
|
||||||
m_rightBottomHorizontalLayout->addItem(m_horizontalSpacer_2);
|
m_rightBottomHorizontalLayout->addItem(m_horizontalSpacer_2);
|
||||||
m_rightBottomHorizontalLayout->addWidget(m_powerOffButton);
|
m_rightBottomHorizontalLayout->addWidget(m_powerOffButton);
|
||||||
|
@ -223,6 +236,8 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
m_minSelectButton->setText(QString());
|
m_minSelectButton->setText(QString());
|
||||||
m_selectMenuButton->setText(QString());
|
m_selectMenuButton->setText(QString());
|
||||||
m_cancelSearchPushButton->setText(QString());
|
m_cancelSearchPushButton->setText(QString());
|
||||||
|
QFont collectFont(QGuiApplication::font().family(), QGuiApplication::font().pointSize() + 2);
|
||||||
|
m_collectPushButton->setFont(collectFont);
|
||||||
m_collectPushButton->setText(QApplication::translate("MainWindow", "collection", nullptr));
|
m_collectPushButton->setText(QApplication::translate("MainWindow", "collection", nullptr));
|
||||||
m_recentPushButton->setText(QApplication::translate("MainWindow", "recent", nullptr));
|
m_recentPushButton->setText(QApplication::translate("MainWindow", "recent", nullptr));
|
||||||
m_minMaxChangeButton->setToolTip(QApplication::translate("MainWindow", "Max", nullptr));
|
m_minMaxChangeButton->setToolTip(QApplication::translate("MainWindow", "Max", nullptr));
|
||||||
|
@ -309,29 +324,50 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
this->hide();
|
this->hide();
|
||||||
this->clearFocus();
|
this->clearFocus();
|
||||||
m_isFullScreen = false;
|
m_isFullScreen = false;
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "mainWindow";
|
||||||
|
pointData.function = "winHide";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
} else if (m_fullWindow->isVisible())
|
} else if (m_fullWindow->isVisible())
|
||||||
{
|
{
|
||||||
m_fullWindow->hide();
|
m_fullWindow->hide();
|
||||||
m_fullWindow->clearFocus();
|
m_fullWindow->clearFocus();
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow";
|
||||||
|
pointData.function = "winHide";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
m_isFullScreen = true;
|
m_isFullScreen = true;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if (!m_isFullScreen) {
|
if (!m_isFullScreen) {
|
||||||
this->show();
|
this->show();
|
||||||
|
setMinWindowPos();
|
||||||
this->raise();
|
this->raise();
|
||||||
this->activateWindow();
|
this->activateWindow();
|
||||||
// m_collectPushButton->clicked(true);
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "mainWindow";
|
||||||
|
pointData.function = "winShow";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
on_collectPushButton_clicked();
|
on_collectPushButton_clicked();
|
||||||
m_viewWidget->setFocus();
|
m_viewWidget->setFocus();
|
||||||
} else {
|
} else {
|
||||||
m_fullWindow->show();
|
m_fullWindow->show();
|
||||||
// fullWindow->raise();
|
// fullWindow->raise();
|
||||||
m_fullWindow->activateWindow();
|
m_fullWindow->activateWindow();
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow";
|
||||||
|
pointData.function = "winShow";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
m_maxAnimation = new QPropertyAnimation(&m_animationPage, "geometry");
|
m_animationPage = new AnimationPage();
|
||||||
m_minAnimation = new QPropertyAnimation(&m_animationPage, "geometry");
|
m_maxAnimation = new QPropertyAnimation(m_animationPage, "geometry", this);
|
||||||
|
m_minAnimation = new QPropertyAnimation(m_animationPage, "geometry", this);
|
||||||
connect(m_maxAnimation, &QPropertyAnimation::finished, this, &MainWindow::maxAnimationFinished);
|
connect(m_maxAnimation, &QPropertyAnimation::finished, this, &MainWindow::maxAnimationFinished);
|
||||||
connect(m_minAnimation, &QPropertyAnimation::finished, this, &MainWindow::minAnimationFinished);
|
connect(m_minAnimation, &QPropertyAnimation::finished, this, &MainWindow::minAnimationFinished);
|
||||||
connect(m_lineEdit, &QLineEdit::textChanged, this, &MainWindow::searchAppSlot);
|
connect(m_lineEdit, &QLineEdit::textChanged, this, &MainWindow::searchAppSlot);
|
||||||
|
@ -340,11 +376,14 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
connect(m_fullWindow, &FullMainWindow::showNormalWindow, this, &MainWindow::showNormalWindowSlot);
|
connect(m_fullWindow, &FullMainWindow::showNormalWindow, this, &MainWindow::showNormalWindowSlot);
|
||||||
connect(m_fullWindow, &FullMainWindow::sendUpdateOtherView, this, &MainWindow::updateMinAllView);
|
connect(m_fullWindow, &FullMainWindow::sendUpdateOtherView, this, &MainWindow::updateMinAllView);
|
||||||
connect(m_minSelectButton, &QToolButton::clicked, this, &MainWindow::on_minSelectButton_clicked);
|
connect(m_minSelectButton, &QToolButton::clicked, this, &MainWindow::on_minSelectButton_clicked);
|
||||||
connect(m_selectMenuButton, &QToolButton::triggered, this, &MainWindow::on_selectMenuButton_triggered);
|
connect(m_dropDownMenu, &MenuBox::triggered, this, &MainWindow::on_selectMenuButton_triggered);
|
||||||
|
connect(m_dropDownMenu, &MenuBox::sendMainWinActiveSignal, [ = ]() {
|
||||||
|
m_selectMenuButton->setIcon(getCurIcon(":/data/img/mainviewwidget/downarrow.svg", true)
|
||||||
|
.pixmap(QSize(Style::miniIconSize, Style::miniIconSize)));
|
||||||
|
selectIconAnimation(false);
|
||||||
|
});
|
||||||
connect(m_powerOffButton, &QPushButton::customContextMenuRequested, this, &MainWindow::on_powerOffButton_customContextMenuRequested);
|
connect(m_powerOffButton, &QPushButton::customContextMenuRequested, this, &MainWindow::on_powerOffButton_customContextMenuRequested);
|
||||||
connect(m_powerOffButton, &QPushButton::clicked, this, &MainWindow::on_powerOffButton_clicked);
|
connect(m_powerOffButton, &QPushButton::clicked, this, &MainWindow::on_powerOffButton_clicked);
|
||||||
// connect(m_collectPushButton, &QPushButton::clicked, this, &MainWindow::on_collectPushButton_clicked);
|
|
||||||
// connect(m_recentPushButton, &QPushButton::clicked, this, &MainWindow::on_recentPushButton_clicked);
|
|
||||||
connect(m_cancelSearchPushButton, &QPushButton::clicked, this, &MainWindow::on_cancelSearchPushButton_clicked);
|
connect(m_cancelSearchPushButton, &QPushButton::clicked, this, &MainWindow::on_cancelSearchPushButton_clicked);
|
||||||
connect(m_searchPushButton, &QPushButton::clicked, this, &MainWindow::on_searchPushButton_clicked);
|
connect(m_searchPushButton, &QPushButton::clicked, this, &MainWindow::on_searchPushButton_clicked);
|
||||||
connect(m_minMaxChangeButton, &QPushButton::clicked, this, &MainWindow::on_minMaxChangeButton_clicked);
|
connect(m_minMaxChangeButton, &QPushButton::clicked, this, &MainWindow::on_minMaxChangeButton_clicked);
|
||||||
|
@ -375,7 +414,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
m_lineEdit->setParent(nullptr);
|
m_lineEdit->setParent(nullptr);
|
||||||
m_leftTopSearchHorizontalLayout->addWidget(m_lineEdit);
|
m_leftTopSearchHorizontalLayout->addWidget(m_lineEdit);
|
||||||
m_leftTopSearchHorizontalLayout->addWidget(m_cancelSearchPushButton);
|
m_leftTopSearchHorizontalLayout->addWidget(m_cancelSearchPushButton);
|
||||||
m_lineEdit->setPlaceholderText("搜索应用");
|
m_lineEdit->setPlaceholderText(QApplication::translate("MainWindow", "Search application"));
|
||||||
m_fullWindow->updateView();
|
m_fullWindow->updateView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -399,6 +438,11 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
closeDataBase("MainThread");
|
closeDataBase("MainThread");
|
||||||
|
|
||||||
|
if (m_animationPage != nullptr) {
|
||||||
|
delete m_animationPage;
|
||||||
|
m_animationPage = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::initUi()
|
void MainWindow::initUi()
|
||||||
|
@ -412,25 +456,38 @@ void MainWindow::initUi()
|
||||||
m_minAllListView->addData(m_modaldata->getMinAllData(), 0);
|
m_minAllListView->addData(m_modaldata->getMinAllData(), 0);
|
||||||
m_minFuncListView->addData(m_modaldata->getMinFuncData(), 1);
|
m_minFuncListView->addData(m_modaldata->getMinFuncData(), 1);
|
||||||
m_minLetterListView->addData(m_modaldata->getMinLetterData(), 2);
|
m_minLetterListView->addData(m_modaldata->getMinLetterData(), 2);
|
||||||
m_collectListView->addData(m_modaldata->getcollectData());
|
|
||||||
m_recentListView->addData(m_modaldata->getRecentData(), -1);
|
if (dataBaseIsEmpty()) {
|
||||||
QMenu *m_menu = new QMenu;
|
m_collectListView->addData(m_modaldata->getPreCollectionApp());
|
||||||
m_allAction = new QAction(m_menu);
|
} else {
|
||||||
m_letterAction = new QAction(m_menu);
|
m_collectListView->addData(m_modaldata->getcollectData());
|
||||||
m_funcAction = new QAction(m_menu);
|
}
|
||||||
|
|
||||||
|
QVector<QStringList> recentFile = m_modaldata->getRecentData();
|
||||||
|
m_recentListView->addData(recentFile , -1);
|
||||||
|
|
||||||
|
if (recentFile.isEmpty()) {
|
||||||
|
m_recentListView->hide();
|
||||||
|
} else {
|
||||||
|
m_recentTextlabel->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_dropDownMenu = new MenuBox(this);
|
||||||
|
m_dropDownMenu->setFixedWidth(Style::DropMenuWidth);
|
||||||
|
m_allAction = new QAction(m_dropDownMenu);
|
||||||
|
m_letterAction = new QAction(m_dropDownMenu);
|
||||||
|
m_funcAction = new QAction(m_dropDownMenu);
|
||||||
m_allAction->setText(tr("All"));
|
m_allAction->setText(tr("All"));
|
||||||
m_allAction->setCheckable(true);
|
m_allAction->setCheckable(true);
|
||||||
m_letterAction->setText(tr("Letter"));
|
m_letterAction->setText(tr("Letter"));
|
||||||
m_letterAction->setCheckable(true);
|
m_letterAction->setCheckable(true);
|
||||||
m_funcAction->setText(tr("Function"));
|
m_funcAction->setText(tr("Function"));
|
||||||
m_funcAction->setCheckable(true);
|
m_funcAction->setCheckable(true);
|
||||||
m_menu->addAction(m_allAction);
|
m_dropDownMenu->addAction(m_allAction);
|
||||||
m_menu->addAction(m_letterAction);
|
m_dropDownMenu->addAction(m_letterAction);
|
||||||
m_menu->addAction(m_funcAction);
|
m_dropDownMenu->addAction(m_funcAction);
|
||||||
m_allAction->setChecked(true);
|
m_allAction->setChecked(true);
|
||||||
m_selectMenuButton->setMenu(m_menu);
|
|
||||||
m_collectPushButton->setStyleSheet("color:#3790FA;");
|
m_collectPushButton->setStyleSheet("color:#3790FA;");
|
||||||
// m_collectPushButton->setStyleSheet("border: 1px solid red;");
|
|
||||||
QColor textColor = this->palette().color(QPalette::Text);
|
QColor textColor = this->palette().color(QPalette::Text);
|
||||||
QRgb rgbDefault = qRgb(textColor.red(), textColor.green(), textColor.blue());
|
QRgb rgbDefault = qRgb(textColor.red(), textColor.green(), textColor.blue());
|
||||||
QString textColorDefault = "#" + QString::number(rgbDefault, 16);
|
QString textColorDefault = "#" + QString::number(rgbDefault, 16);
|
||||||
|
@ -450,6 +507,7 @@ void MainWindow::initUi()
|
||||||
connect(m_collectListView, &RightListView::sendCollectViewUpdate, this, &MainWindow::updateCollectView);
|
connect(m_collectListView, &RightListView::sendCollectViewUpdate, this, &MainWindow::updateCollectView);
|
||||||
connect(m_desktopWatcher, &DesktopWatcher::directoryChangedSignal, this, &MainWindow::updateView);
|
connect(m_desktopWatcher, &DesktopWatcher::directoryChangedSignal, this, &MainWindow::updateView);
|
||||||
connect(m_desktopWatcher, &DesktopWatcher::updateRecentList, this, &MainWindow::updateRecentView);
|
connect(m_desktopWatcher, &DesktopWatcher::updateRecentList, this, &MainWindow::updateRecentView);
|
||||||
|
connect(this, &MainWindow::sendStyleChangeSignal, m_viewWidget, &MainViewWidget::styleChangeSlot);
|
||||||
changeStyle();
|
changeStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -467,10 +525,17 @@ void MainWindow::changeStyle()
|
||||||
if (gsetting.keys().contains(QString("styleName"))) {
|
if (gsetting.keys().contains(QString("styleName"))) {
|
||||||
if (gsetting.get("style-name").toString() == "ukui-light"
|
if (gsetting.get("style-name").toString() == "ukui-light"
|
||||||
|| gsetting.get("style-name").toString() == "ukui-default") {
|
|| gsetting.get("style-name").toString() == "ukui-default") {
|
||||||
|
g_curStyle = "ukui-light";
|
||||||
buttonColorDefault = "rgba(16, 23, 29, 0.06)";
|
buttonColorDefault = "rgba(16, 23, 29, 0.06)";
|
||||||
buttonColorHover = "rgba(16, 23, 29, 0.12)";
|
buttonColorHover = "rgba(16, 23, 29, 0.12)";
|
||||||
buttonColorPress = "rgba(16, 23, 29, 0.17)";
|
buttonColorPress = "rgba(16, 23, 29, 0.17)";
|
||||||
|
m_windowColor.setNamedColor("#C7E9EEF2");
|
||||||
|
Q_EMIT sendStyleChangeSignal("ukui-light");
|
||||||
|
m_powerOffButton->setStyleSheet("QPushButton {padding: 0px;}"
|
||||||
|
"QPushButton:hover {border-radius:16px; background: rgba(255, 255, 255, 0.4);}"
|
||||||
|
"QPushButton:pressed {border-radius:16px; background: rgba(255, 255, 255, 0.65);}");
|
||||||
} else {
|
} else {
|
||||||
|
g_curStyle = "ukui-dark";
|
||||||
buttonColor = linePe.color(QPalette::Light);
|
buttonColor = linePe.color(QPalette::Light);
|
||||||
QRgb rgbDefault = qRgba(buttonColor.red(), buttonColor.green(), buttonColor.blue(), 25);
|
QRgb rgbDefault = qRgba(buttonColor.red(), buttonColor.green(), buttonColor.blue(), 25);
|
||||||
buttonColorDefault = "#" + QString::number(rgbDefault, 16);
|
buttonColorDefault = "#" + QString::number(rgbDefault, 16);
|
||||||
|
@ -478,6 +543,11 @@ void MainWindow::changeStyle()
|
||||||
buttonColorHover = "#" + QString::number(rgbHover, 16);
|
buttonColorHover = "#" + QString::number(rgbHover, 16);
|
||||||
QRgb rgbPress = qRgba(buttonColor.red(), buttonColor.green(), buttonColor.blue(), 75);
|
QRgb rgbPress = qRgba(buttonColor.red(), buttonColor.green(), buttonColor.blue(), 75);
|
||||||
buttonColorPress = "#" + QString::number(rgbPress, 16);
|
buttonColorPress = "#" + QString::number(rgbPress, 16);
|
||||||
|
m_windowColor.setNamedColor("#FF383838");
|
||||||
|
Q_EMIT sendStyleChangeSignal("ukui-dark");
|
||||||
|
m_powerOffButton->setStyleSheet("QPushButton {padding: 0px;}"
|
||||||
|
"QPushButton:hover {border-radius:16px; background: rgba(255, 255, 255, 0.12);}"
|
||||||
|
"QPushButton:pressed {border-radius:16px; background: rgba(255, 255, 255, 0.25);}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -488,10 +558,7 @@ void MainWindow::changeStyle()
|
||||||
m_searchPushButton->setStyleSheet(m_buttonStyle.arg("QPushButton"));
|
m_searchPushButton->setStyleSheet(m_buttonStyle.arg("QPushButton"));
|
||||||
m_minSelectButton->setStyleSheet(m_buttonStyle.arg("QPushButton"));
|
m_minSelectButton->setStyleSheet(m_buttonStyle.arg("QPushButton"));
|
||||||
m_cancelSearchPushButton->setStyleSheet(m_buttonStyle.arg("QPushButton"));
|
m_cancelSearchPushButton->setStyleSheet(m_buttonStyle.arg("QPushButton"));
|
||||||
m_powerOffButton->setStyleSheet("QPushButton {padding: 0px;}"
|
m_searchPushButton->setIcon(getCurIcon(":/data/img/mainviewwidget/full-search.svg", true));
|
||||||
"QPushButton:hover {border-radius:12px; background: rgba(255, 255, 255, 0.2);}"
|
|
||||||
"QPushButton:pressed {border-radius:12px; background: rgba(255, 255, 255, 0.3);}");
|
|
||||||
m_searchPushButton->setIcon(getCurIcon(":/data/img/mainviewwidget/search.svg", true));
|
|
||||||
QAction *lineAction = m_lineEdit->actions().at(0);
|
QAction *lineAction = m_lineEdit->actions().at(0);
|
||||||
|
|
||||||
if (lineAction != nullptr) {
|
if (lineAction != nullptr) {
|
||||||
|
@ -501,7 +568,7 @@ void MainWindow::changeStyle()
|
||||||
}
|
}
|
||||||
|
|
||||||
QAction *action = new QAction();
|
QAction *action = new QAction();
|
||||||
action->setIcon(getCurIcon(":/data/img/mainviewwidget/DM-icon-search.svg", true));
|
action->setIcon(getCurIcon(":/data/img/mainviewwidget/full-search.svg", true));
|
||||||
m_lineEdit->addAction(action, QLineEdit::LeadingPosition);
|
m_lineEdit->addAction(action, QLineEdit::LeadingPosition);
|
||||||
m_cancelSearchPushButton->setIcon(getCurIcon(":/data/img/mainviewwidget/DM-close-2x.png", true));
|
m_cancelSearchPushButton->setIcon(getCurIcon(":/data/img/mainviewwidget/DM-close-2x.png", true));
|
||||||
|
|
||||||
|
@ -533,7 +600,7 @@ void MainWindow::paintEvent(QPaintEvent *event)
|
||||||
path.quadTo(rect.bottomRight(), rect.bottomRight() + QPointF(0, -radius));
|
path.quadTo(rect.bottomRight(), rect.bottomRight() + QPointF(0, -radius));
|
||||||
path.lineTo(rect.topRight() + QPointF(0, radius));
|
path.lineTo(rect.topRight() + QPointF(0, radius));
|
||||||
path.quadTo(rect.topRight(), rect.topRight() + QPointF(-radius, -0));
|
path.quadTo(rect.topRight(), rect.topRight() + QPointF(-radius, -0));
|
||||||
painter.setBrush(this->palette().base());
|
painter.setBrush(m_windowColor);
|
||||||
painter.setPen(Qt::transparent);
|
painter.setPen(Qt::transparent);
|
||||||
painter.setOpacity(transparency);
|
painter.setOpacity(transparency);
|
||||||
painter.drawPath(path);
|
painter.drawPath(path);
|
||||||
|
@ -581,7 +648,7 @@ bool MainWindow::event(QEvent *event)
|
||||||
if (m_minSelectButton->hasFocus()) {
|
if (m_minSelectButton->hasFocus()) {
|
||||||
m_minSelectButton->click();
|
m_minSelectButton->click();
|
||||||
} else if (m_selectMenuButton->hasFocus()) {
|
} else if (m_selectMenuButton->hasFocus()) {
|
||||||
m_selectMenuButton->click();
|
QApplication::postEvent(m_selectMenuButton, new QEvent(QEvent::MouseButtonPress));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_lineEdit->hasFocus()) {
|
if (m_lineEdit->hasFocus()) {
|
||||||
|
@ -603,6 +670,7 @@ bool MainWindow::event(QEvent *event)
|
||||||
void MainWindow::minAnimationFinished()
|
void MainWindow::minAnimationFinished()
|
||||||
{
|
{
|
||||||
this->show();
|
this->show();
|
||||||
|
setMinWindowPos();
|
||||||
this->raise();
|
this->raise();
|
||||||
this->activateWindow();
|
this->activateWindow();
|
||||||
m_viewWidget->setFocus();
|
m_viewWidget->setFocus();
|
||||||
|
@ -611,8 +679,16 @@ void MainWindow::minAnimationFinished()
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
QTimer::singleShot(100, &loop, SLOT(quit()));
|
QTimer::singleShot(100, &loop, SLOT(quit()));
|
||||||
loop.exec();
|
loop.exec();
|
||||||
m_animationPage.hide();
|
m_animationPage->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::iconAnimationFinished()
|
||||||
|
{
|
||||||
|
m_dropDownMenu->raise();
|
||||||
|
m_dropDownMenu->exec(m_selectMenuButton->mapToGlobal(QPoint(m_selectMenuButton->width()
|
||||||
|
-Style::DropMenuWidth + 5, 29)));
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::maxAnimationFinished()
|
void MainWindow::maxAnimationFinished()
|
||||||
{
|
{
|
||||||
m_fullWindow->raise();
|
m_fullWindow->raise();
|
||||||
|
@ -621,7 +697,7 @@ void MainWindow::maxAnimationFinished()
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
QTimer::singleShot(100, &loop, SLOT(quit()));
|
QTimer::singleShot(100, &loop, SLOT(quit()));
|
||||||
loop.exec();
|
loop.exec();
|
||||||
m_animationPage.hide();
|
m_animationPage->hide();
|
||||||
}
|
}
|
||||||
void MainWindow::resetLetterPage()
|
void MainWindow::resetLetterPage()
|
||||||
{
|
{
|
||||||
|
@ -725,6 +801,9 @@ void MainWindow::animationFinishedSLot()
|
||||||
}
|
}
|
||||||
void MainWindow::on_minSelectButton_clicked()
|
void MainWindow::on_minSelectButton_clicked()
|
||||||
{
|
{
|
||||||
|
// selectIconAnimation(true);
|
||||||
|
selectIconAnimation(false);
|
||||||
|
|
||||||
if (m_leftStackedWidget->currentIndex() == 0) {
|
if (m_leftStackedWidget->currentIndex() == 0) {
|
||||||
on_selectMenuButton_triggered(m_letterAction);
|
on_selectMenuButton_triggered(m_letterAction);
|
||||||
} else if (m_leftStackedWidget->currentIndex() == 1) {
|
} else if (m_leftStackedWidget->currentIndex() == 1) {
|
||||||
|
@ -733,6 +812,30 @@ void MainWindow::on_minSelectButton_clicked()
|
||||||
on_selectMenuButton_triggered(m_allAction);
|
on_selectMenuButton_triggered(m_allAction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::selectIconAnimation(const bool &flag)
|
||||||
|
{
|
||||||
|
iconAnimation = new QPropertyAnimation(m_selectMenuButton, "rotation", this);
|
||||||
|
|
||||||
|
if (flag) {
|
||||||
|
connect(iconAnimation, &QPropertyAnimation::finished, this, &MainWindow::iconAnimationFinished);
|
||||||
|
|
||||||
|
if (m_selectMenuButton->property("rotation") == 0) {
|
||||||
|
iconAnimation->setStartValue(0);
|
||||||
|
iconAnimation->setEndValue(-180);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (m_selectMenuButton->property("rotation") == -180) {
|
||||||
|
iconAnimation->setStartValue(-180);
|
||||||
|
iconAnimation->setEndValue(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
iconAnimation->setEasingCurve(QEasingCurve::Linear);
|
||||||
|
iconAnimation->setDuration(300);
|
||||||
|
iconAnimation->start(QPropertyAnimation::DeleteWhenStopped);
|
||||||
|
}
|
||||||
|
|
||||||
bool MainWindow::eventFilter(QObject *target, QEvent *event)
|
bool MainWindow::eventFilter(QObject *target, QEvent *event)
|
||||||
{
|
{
|
||||||
if (event->type() == QEvent::MouseButtonPress) {
|
if (event->type() == QEvent::MouseButtonPress) {
|
||||||
|
@ -745,6 +848,12 @@ bool MainWindow::eventFilter(QObject *target, QEvent *event)
|
||||||
on_collectPushButton_clicked();
|
on_collectPushButton_clicked();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (target == m_selectMenuButton) {
|
||||||
|
m_selectMenuButton->setIcon(getCurIcon(":/data/img/mainviewwidget/downarrow.svg", true)
|
||||||
|
.pixmap(QSize(Style::miniIconSize, Style::miniIconSize)));
|
||||||
|
selectIconAnimation(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event->type() == QEvent::KeyPress) {
|
if (event->type() == QEvent::KeyPress) {
|
||||||
|
@ -929,17 +1038,22 @@ void MainWindow::searchAppSlot(QString arg)
|
||||||
}
|
}
|
||||||
void MainWindow::on_selectMenuButton_triggered(QAction *arg1)
|
void MainWindow::on_selectMenuButton_triggered(QAction *arg1)
|
||||||
{
|
{
|
||||||
qDebug() << "void MainWindow::on_selectMenuButton_triggered(QAction *arg1)" << m_allAction << arg1;
|
pointDataStruct pointData;
|
||||||
|
m_selectMenuButton->setIcon(getCurIcon(":/data/img/mainviewwidget/downarrow.svg", true).pixmap(QSize(Style::miniIconSize, Style::miniIconSize)));
|
||||||
|
selectIconAnimation(false);
|
||||||
|
|
||||||
if (arg1 == m_allAction) {
|
if (arg1 == m_allAction) {
|
||||||
m_leftStackedWidget->setCurrentIndex(0);
|
m_leftStackedWidget->setCurrentIndex(0);
|
||||||
m_state = 0;
|
m_state = 0;
|
||||||
m_minSelectButton->setIcon(getCurIcon(":/data/img/mainviewwidget/DM-all.svg", true));
|
m_minSelectButton->setIcon(getCurIcon(":/data/img/mainviewwidget/DM-all.svg", true));
|
||||||
// m_minSelectButton->setIcon(QIcon(":/data/img/mainviewwidget/DM-all.svg"));
|
|
||||||
m_minSelectTextLabel->setText(tr("All"));
|
m_minSelectTextLabel->setText(tr("All"));
|
||||||
m_allAction->setChecked(true);
|
m_allAction->setChecked(true);
|
||||||
m_letterAction->setChecked(false);
|
m_letterAction->setChecked(false);
|
||||||
m_funcAction->setChecked(false);
|
m_funcAction->setChecked(false);
|
||||||
|
pointData.module = "mainWindow/selectMenuButton";
|
||||||
|
pointData.function = "AllSelect";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
} else if (arg1 == m_letterAction) {
|
} else if (arg1 == m_letterAction) {
|
||||||
m_leftStackedWidget->setCurrentIndex(1);
|
m_leftStackedWidget->setCurrentIndex(1);
|
||||||
m_state = 1;
|
m_state = 1;
|
||||||
|
@ -948,6 +1062,10 @@ void MainWindow::on_selectMenuButton_triggered(QAction *arg1)
|
||||||
m_allAction->setChecked(false);
|
m_allAction->setChecked(false);
|
||||||
m_letterAction->setChecked(true);
|
m_letterAction->setChecked(true);
|
||||||
m_funcAction->setChecked(false);
|
m_funcAction->setChecked(false);
|
||||||
|
pointData.module = "mainWindow/selectMenuButton";
|
||||||
|
pointData.function = "LetterSelect";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
} else if (arg1 == m_funcAction) {
|
} else if (arg1 == m_funcAction) {
|
||||||
m_leftStackedWidget->setCurrentIndex(2);
|
m_leftStackedWidget->setCurrentIndex(2);
|
||||||
m_state = 2;
|
m_state = 2;
|
||||||
|
@ -956,6 +1074,10 @@ void MainWindow::on_selectMenuButton_triggered(QAction *arg1)
|
||||||
m_allAction->setChecked(false);
|
m_allAction->setChecked(false);
|
||||||
m_letterAction->setChecked(false);
|
m_letterAction->setChecked(false);
|
||||||
m_funcAction->setChecked(true);
|
m_funcAction->setChecked(true);
|
||||||
|
pointData.module = "mainWindow/selectMenuButton";
|
||||||
|
pointData.function = "FunctionSelect";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void MainWindow::updateCollectView()
|
void MainWindow::updateCollectView()
|
||||||
|
@ -971,7 +1093,15 @@ void MainWindow::updateMinAllView()
|
||||||
void MainWindow::updateRecentView()
|
void MainWindow::updateRecentView()
|
||||||
{
|
{
|
||||||
m_modaldata->loadDesktopVercor();
|
m_modaldata->loadDesktopVercor();
|
||||||
m_recentListView->updateData(m_modaldata->getRecentData());
|
QVector<QStringList> recentFile = m_modaldata->getRecentData();
|
||||||
|
if (recentFile.isEmpty()) {
|
||||||
|
m_recentListView->hide();
|
||||||
|
m_recentTextlabel->show();
|
||||||
|
} else {
|
||||||
|
m_recentTextlabel->hide();
|
||||||
|
m_recentListView->show();
|
||||||
|
m_recentListView->updateData(recentFile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void MainWindow::updateView()
|
void MainWindow::updateView()
|
||||||
{
|
{
|
||||||
|
@ -993,15 +1123,26 @@ void MainWindow::databaseThreadCloseSlot()
|
||||||
m_softwareDbThread->quit();
|
m_softwareDbThread->quit();
|
||||||
updateView();
|
updateView();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_collectPushButton_clicked()
|
void MainWindow::on_collectPushButton_clicked()
|
||||||
{
|
{
|
||||||
m_rightStackedWidget->setCurrentIndex(0);
|
m_rightStackedWidget->setCurrentIndex(0);
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "mainWindow/collectPushButton";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
|
||||||
m_collectPushButton->setStyleSheet("color:#3790FA;");
|
m_collectPushButton->setStyleSheet("color:#3790FA;");
|
||||||
|
QFont collectFont(QGuiApplication::font().family(), QGuiApplication::font().pointSize() + 2);
|
||||||
|
m_collectPushButton->setFont(collectFont);
|
||||||
QColor textColor = this->palette().color(QPalette::Text);
|
QColor textColor = this->palette().color(QPalette::Text);
|
||||||
QRgb rgbDefault = qRgb(textColor.red(), textColor.green(), textColor.blue());
|
QRgb rgbDefault = qRgb(textColor.red(), textColor.green(), textColor.blue());
|
||||||
QString textColorDefault = "#" + QString::number(rgbDefault, 16);
|
QString textColorDefault = "#" + QString::number(rgbDefault, 16);
|
||||||
m_recentPushButton->setStyleSheet(QString("color:%1;").arg(textColorDefault));
|
m_recentPushButton->setStyleSheet(QString("color:%1;").arg(textColorDefault));
|
||||||
|
QFont recentFont(QGuiApplication::font().family(), QGuiApplication::font().pointSize());
|
||||||
|
m_recentPushButton->setFont(recentFont);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_recentPushButton_clicked()
|
void MainWindow::on_recentPushButton_clicked()
|
||||||
{
|
{
|
||||||
m_rightStackedWidget->setCurrentIndex(1);
|
m_rightStackedWidget->setCurrentIndex(1);
|
||||||
|
@ -1009,27 +1150,52 @@ void MainWindow::on_recentPushButton_clicked()
|
||||||
QRgb rgbDefault = qRgb(textColor.red(), textColor.green(), textColor.blue());
|
QRgb rgbDefault = qRgb(textColor.red(), textColor.green(), textColor.blue());
|
||||||
QString textColorDefault = "#" + QString::number(rgbDefault, 16);
|
QString textColorDefault = "#" + QString::number(rgbDefault, 16);
|
||||||
m_collectPushButton->setStyleSheet(QString("color:%1").arg(textColorDefault));
|
m_collectPushButton->setStyleSheet(QString("color:%1").arg(textColorDefault));
|
||||||
// m_collectPushButton->setStyleSheet("color:white");
|
QFont collectFont(QGuiApplication::font().family(), QGuiApplication::font().pointSize());
|
||||||
|
m_collectPushButton->setFont(collectFont);
|
||||||
m_recentPushButton->setStyleSheet("color:#3790FA");
|
m_recentPushButton->setStyleSheet("color:#3790FA");
|
||||||
|
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "mainWindow/recentPushButton";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
|
||||||
|
QFont recentFont(QGuiApplication::font().family(), QGuiApplication::font().pointSize() + 2);
|
||||||
|
m_recentPushButton->setFont(recentFont);
|
||||||
|
updateRecentView();
|
||||||
}
|
}
|
||||||
void MainWindow::on_cancelSearchPushButton_clicked()
|
void MainWindow::on_cancelSearchPushButton_clicked()
|
||||||
{
|
{
|
||||||
m_topStackedWidget->setCurrentIndex(0);
|
m_topStackedWidget->setCurrentIndex(0);
|
||||||
m_lineEdit->clear();
|
m_lineEdit->clear();
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "mainWindow/cancelSearchPushButton";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
void MainWindow::on_searchPushButton_clicked()
|
void MainWindow::on_searchPushButton_clicked()
|
||||||
{
|
{
|
||||||
m_topStackedWidget->setCurrentIndex(1);
|
m_topStackedWidget->setCurrentIndex(1);
|
||||||
m_lineEdit->setFocus();
|
m_lineEdit->setFocus();
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "mainWindow/searchPushButton";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
void MainWindow::on_minMaxChangeButton_clicked()
|
void MainWindow::on_minMaxChangeButton_clicked()
|
||||||
{
|
{
|
||||||
m_canHide = true;
|
m_canHide = true;
|
||||||
m_isFullScreen = true;
|
m_isFullScreen = true;
|
||||||
m_animationPage.setGeometry(this->x(), this->y(), Style::minw, Style::minh);
|
|
||||||
m_animationPage.show();
|
m_animationPage->show();
|
||||||
m_animationPage.raise();
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
m_animationPage.repaint();
|
kdk::WindowManager::setGeometry(m_animationPage->windowHandle(), QRect(this->x(), this->y(), Style::minw, Style::minh));
|
||||||
|
} else {
|
||||||
|
m_animationPage->setGeometry(this->x(), this->y(), Style::minw, Style::minh);
|
||||||
|
}
|
||||||
|
m_animationPage->raise();
|
||||||
|
m_animationPage->repaint();
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
QTimer::singleShot(100, &loop, SLOT(quit()));
|
QTimer::singleShot(100, &loop, SLOT(quit()));
|
||||||
loop.exec();
|
loop.exec();
|
||||||
|
@ -1040,6 +1206,11 @@ void MainWindow::on_minMaxChangeButton_clicked()
|
||||||
m_maxAnimation->setDuration(260);
|
m_maxAnimation->setDuration(260);
|
||||||
m_maxAnimation->start();
|
m_maxAnimation->start();
|
||||||
this->hide();
|
this->hide();
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "mainWindow/minMaxChangeButton";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
void MainWindow::showWindow()
|
void MainWindow::showWindow()
|
||||||
{
|
{
|
||||||
|
@ -1047,13 +1218,24 @@ void MainWindow::showWindow()
|
||||||
m_fullWindow->raise();
|
m_fullWindow->raise();
|
||||||
m_fullWindow->showNormal();
|
m_fullWindow->showNormal();
|
||||||
m_fullWindow->activateWindow();
|
m_fullWindow->activateWindow();
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow";
|
||||||
|
pointData.function = "Show";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
} else {
|
} else {
|
||||||
this->raise();
|
this->raise();
|
||||||
this->showNormal();
|
this->showNormal();
|
||||||
|
setMinWindowPos();
|
||||||
this->activateWindow();
|
this->activateWindow();
|
||||||
// m_collectPushButton->clicked(true);
|
// m_collectPushButton->clicked(true);
|
||||||
on_collectPushButton_clicked();
|
on_collectPushButton_clicked();
|
||||||
m_viewWidget->setFocus();
|
m_viewWidget->setFocus();
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "mainWindow";
|
||||||
|
pointData.function = "Show";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void MainWindow::hideWindow()
|
void MainWindow::hideWindow()
|
||||||
|
@ -1062,16 +1244,25 @@ void MainWindow::hideWindow()
|
||||||
m_fullWindow->hide();
|
m_fullWindow->hide();
|
||||||
this->clearFocus();
|
this->clearFocus();
|
||||||
m_isFullScreen = true;
|
m_isFullScreen = true;
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "fullWindow";
|
||||||
|
pointData.function = "Hide";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
} else {
|
} else {
|
||||||
this->hide();
|
this->hide();
|
||||||
this->clearFocus();
|
this->clearFocus();
|
||||||
m_isFullScreen = false;
|
m_isFullScreen = false;
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "mainWindow";
|
||||||
|
pointData.function = "Hide";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void MainWindow::repaintWidget()
|
|
||||||
|
void MainWindow::setMinWindowPos()
|
||||||
{
|
{
|
||||||
Style::initWidStyle();
|
|
||||||
this->setMinimumSize(Style::minw, Style::minh);
|
|
||||||
int position = Style::m_panelPosition;
|
int position = Style::m_panelPosition;
|
||||||
int x = Style::m_primaryScreenX;
|
int x = Style::m_primaryScreenX;
|
||||||
int y = Style::m_primaryScreenY;
|
int y = Style::m_primaryScreenY;
|
||||||
|
@ -1079,15 +1270,41 @@ void MainWindow::repaintWidget()
|
||||||
int height = Style::m_availableScreenHeight;
|
int height = Style::m_availableScreenHeight;
|
||||||
|
|
||||||
if (position == 0) {
|
if (position == 0) {
|
||||||
this->setGeometry(QRect(x + 4, y + height - Style::minh - 3, Style::minw, Style::minh));
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
|
kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + 4, y + height - Style::minh - 3, Style::minw, Style::minh));
|
||||||
|
} else {
|
||||||
|
this->setGeometry(QRect(x + 4, y + height - Style::minh - 3, Style::minw, Style::minh));
|
||||||
|
}
|
||||||
} else if (position == 1) {
|
} else if (position == 1) {
|
||||||
this->setGeometry(QRect(x + 4, y + 4, Style::minw, Style::minh));
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
|
kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + 4, y + 4, Style::minw, Style::minh));
|
||||||
|
} else {
|
||||||
|
this->setGeometry(QRect(x + 4, y + 4, Style::minw, Style::minh));
|
||||||
|
}
|
||||||
} else if (position == 2) {
|
} else if (position == 2) {
|
||||||
this->setGeometry(QRect(x + 4, y + 4, Style::minw, Style::minh));
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
|
kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + 4, y + 4, Style::minw, Style::minh));
|
||||||
|
} else {
|
||||||
|
this->setGeometry(QRect(x + 4, y + 4, Style::minw, Style::minh));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this->setGeometry(QRect(x + width - Style::minw - 4, y + 4, Style::minw, Style::minh));
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
|
kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + width - Style::minw - 4, y + 4, Style::minw, Style::minh));
|
||||||
|
} else {
|
||||||
|
this->setGeometry(QRect(x + width - Style::minw - 4, y + 4, Style::minw, Style::minh));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::repaintWidget()
|
||||||
|
{
|
||||||
|
Style::initWidStyle();
|
||||||
|
this->setMinimumSize(Style::minw, Style::minh);
|
||||||
|
int x = Style::m_primaryScreenX;
|
||||||
|
int y = Style::m_primaryScreenY;
|
||||||
|
int width = Style::m_availableScreenWidth;
|
||||||
|
int height = Style::m_availableScreenHeight;
|
||||||
|
setMinWindowPos();
|
||||||
m_fullWindow->move(x, y);
|
m_fullWindow->move(x, y);
|
||||||
m_fullWindow->setFixedSize(width, height);
|
m_fullWindow->setFixedSize(width, height);
|
||||||
m_fullWindow->repaintWidget();
|
m_fullWindow->repaintWidget();
|
||||||
|
@ -1095,10 +1312,14 @@ void MainWindow::repaintWidget()
|
||||||
void MainWindow::showNormalWindowSlot()
|
void MainWindow::showNormalWindowSlot()
|
||||||
{
|
{
|
||||||
myDebug() << "Style::m_availableScreenWidth" << Style::m_availableScreenWidth << "Style::m_availableScreenHeight" << Style::m_availableScreenHeight;
|
myDebug() << "Style::m_availableScreenWidth" << Style::m_availableScreenWidth << "Style::m_availableScreenHeight" << Style::m_availableScreenHeight;
|
||||||
m_animationPage.setGeometry(0, 0, Style::m_availableScreenWidth, Style::m_availableScreenHeight);
|
m_animationPage->show();
|
||||||
m_animationPage.show();
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
m_animationPage.raise();
|
kdk::WindowManager::setGeometry(m_animationPage->windowHandle(), QRect(0, 0, Style::m_availableScreenWidth, Style::m_availableScreenHeight));
|
||||||
myDebug() << m_animationPage.rect();
|
} else {
|
||||||
|
m_animationPage->setGeometry(0, 0, Style::m_availableScreenWidth, Style::m_availableScreenHeight);
|
||||||
|
}
|
||||||
|
m_animationPage->raise();
|
||||||
|
myDebug() << m_animationPage->rect();
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
QTimer::singleShot(100, &loop, SLOT(quit()));
|
QTimer::singleShot(100, &loop, SLOT(quit()));
|
||||||
loop.exec();
|
loop.exec();
|
||||||
|
@ -1113,10 +1334,20 @@ void MainWindow::showNormalWindowSlot()
|
||||||
void MainWindow::on_powerOffButton_clicked()
|
void MainWindow::on_powerOffButton_clicked()
|
||||||
{
|
{
|
||||||
QProcess::startDetached(QString("ukui-session-tools"));
|
QProcess::startDetached(QString("ukui-session-tools"));
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "mainWindow/powerOffButton";
|
||||||
|
pointData.function = "Clicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
}
|
}
|
||||||
void MainWindow::on_powerOffButton_customContextMenuRequested(const QPoint &pos)
|
void MainWindow::on_powerOffButton_customContextMenuRequested(const QPoint &pos)
|
||||||
{
|
{
|
||||||
RightClickMenu m_otherMenu(this);
|
RightClickMenu m_otherMenu(this);
|
||||||
m_otherMenu.showShutdownMenu(this->mapToGlobal(m_centralwidget->rect().bottomRight()));
|
m_otherMenu.showShutdownMenu(this->mapToGlobal(m_centralwidget->rect().bottomRight()));
|
||||||
|
pointDataStruct pointData;
|
||||||
|
pointData.module = "mainWindow/powerOffButton";
|
||||||
|
pointData.function = "RightClicked";
|
||||||
|
pointData.functionNum = "";
|
||||||
|
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||||
qDebug() << "SideBarWidget::shutdownBtnRightClickSlot() 开始";
|
qDebug() << "SideBarWidget::shutdownBtnRightClickSlot() 开始";
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,9 @@
|
||||||
#include "function_button_widget.h"
|
#include "function_button_widget.h"
|
||||||
#include "letter_button_widget.h"
|
#include "letter_button_widget.h"
|
||||||
#include "animationpage.h"
|
#include "animationpage.h"
|
||||||
|
#include "rotationlabel.h"
|
||||||
|
#include "ukuistylehelper/ukuistylehelper.h"
|
||||||
|
#include "windowmanager/windowmanager.h"
|
||||||
|
|
||||||
class MainWindow : public QMainWindow
|
class MainWindow : public QMainWindow
|
||||||
{
|
{
|
||||||
|
@ -100,12 +103,17 @@ protected:
|
||||||
|
|
||||||
// void mouseReleaseEvent(QMouseEvent *event);
|
// void mouseReleaseEvent(QMouseEvent *event);
|
||||||
|
|
||||||
|
void selectIconAnimation(const bool &flag);
|
||||||
|
|
||||||
|
void setMinWindowPos();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void sendSearchKeyword(QString arg);
|
void sendSearchKeyword(QString arg);
|
||||||
void sendClassificationbtnList();
|
void sendClassificationbtnList();
|
||||||
void sendLetterClassificationList(QStringList list);
|
void sendLetterClassificationList(QStringList list);
|
||||||
void sendSetFullWindowItemHide(bool flag);
|
void sendSetFullWindowItemHide(bool flag);
|
||||||
|
void sendStyleChangeSignal(QString style);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void updateCollectView();
|
void updateCollectView();
|
||||||
|
@ -122,6 +130,7 @@ public Q_SLOTS:
|
||||||
void resetFunctionPage();
|
void resetFunctionPage();
|
||||||
void minAnimationFinished();
|
void minAnimationFinished();
|
||||||
void maxAnimationFinished();
|
void maxAnimationFinished();
|
||||||
|
void iconAnimationFinished();
|
||||||
void changeStyle();
|
void changeStyle();
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void on_selectMenuButton_triggered(QAction *arg1);
|
void on_selectMenuButton_triggered(QAction *arg1);
|
||||||
|
@ -160,7 +169,7 @@ private:
|
||||||
QSpacerItem *m_horizontalSpacer = nullptr;
|
QSpacerItem *m_horizontalSpacer = nullptr;
|
||||||
QPushButton *m_searchPushButton = nullptr;
|
QPushButton *m_searchPushButton = nullptr;
|
||||||
QPushButton *m_minSelectButton = nullptr;
|
QPushButton *m_minSelectButton = nullptr;
|
||||||
QToolButton *m_selectMenuButton = nullptr;
|
RotationLabel *m_selectMenuButton = nullptr;
|
||||||
QWidget *m_minSearchPage = nullptr;
|
QWidget *m_minSearchPage = nullptr;
|
||||||
QHBoxLayout *m_leftTopSearchHorizontalLayout = nullptr;
|
QHBoxLayout *m_leftTopSearchHorizontalLayout = nullptr;
|
||||||
QLineEdit *m_lineEdit = nullptr;
|
QLineEdit *m_lineEdit = nullptr;
|
||||||
|
@ -189,11 +198,14 @@ private:
|
||||||
RightListView *m_collectListView = nullptr;
|
RightListView *m_collectListView = nullptr;
|
||||||
QWidget *m_recentPage = nullptr;
|
QWidget *m_recentPage = nullptr;
|
||||||
ListView *m_recentListView = nullptr;
|
ListView *m_recentListView = nullptr;
|
||||||
|
QLabel *m_recentTextlabel = nullptr;
|
||||||
QSpacerItem *m_verticalSpacer_2 = nullptr;
|
QSpacerItem *m_verticalSpacer_2 = nullptr;
|
||||||
QHBoxLayout *m_rightBottomHorizontalLayout = nullptr;
|
QHBoxLayout *m_rightBottomHorizontalLayout = nullptr;
|
||||||
QSpacerItem *m_horizontalSpacer_2 = nullptr;
|
QSpacerItem *m_horizontalSpacer_2 = nullptr;
|
||||||
|
QSpacerItem *m_horizontalSpacer_4 = nullptr;
|
||||||
QPushButton *m_powerOffButton = nullptr;
|
QPushButton *m_powerOffButton = nullptr;
|
||||||
AnimationPage m_animationPage;
|
AnimationPage *m_animationPage = nullptr;
|
||||||
|
MenuBox *m_dropDownMenu = nullptr;
|
||||||
|
|
||||||
bool m_canHide = true;
|
bool m_canHide = true;
|
||||||
bool m_isFullScreen = false;
|
bool m_isFullScreen = false;
|
||||||
|
@ -214,10 +226,12 @@ private:
|
||||||
QPropertyAnimation *m_leaveAnimation = nullptr;
|
QPropertyAnimation *m_leaveAnimation = nullptr;
|
||||||
QPropertyAnimation *m_minAnimation = nullptr;
|
QPropertyAnimation *m_minAnimation = nullptr;
|
||||||
QPropertyAnimation *m_maxAnimation = nullptr;
|
QPropertyAnimation *m_maxAnimation = nullptr;
|
||||||
|
QPropertyAnimation *iconAnimation = nullptr;
|
||||||
int m_widgetState = -1;
|
int m_widgetState = -1;
|
||||||
FunctionButtonWidget *m_functionBtnWid = nullptr;
|
FunctionButtonWidget *m_functionBtnWid = nullptr;
|
||||||
LetterButtonWidget *m_letterBtnWid = nullptr;
|
LetterButtonWidget *m_letterBtnWid = nullptr;
|
||||||
SoftwareDatabaseUpdateThread *m_softwareDbThread = nullptr;
|
SoftwareDatabaseUpdateThread *m_softwareDbThread = nullptr;
|
||||||
|
QColor m_windowColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
#endif // MAINWINDOW_H
|
||||||
|
|
|
@ -98,28 +98,6 @@ void TabletWindow::initUi()
|
||||||
initStatusManager();
|
initStatusManager();
|
||||||
initTransparency();
|
initTransparency();
|
||||||
registDbusService();
|
registDbusService();
|
||||||
/*//备用待窗管修改后启用
|
|
||||||
connect(m_dbus, &DBus::winKeyResponseSignal, this, [ = ] {
|
|
||||||
if (QGSettings::isSchemaInstalled(QString("org.ukui.session").toLocal8Bit()))
|
|
||||||
{
|
|
||||||
QGSettings gsetting(QString("org.ukui.session").toLocal8Bit());
|
|
||||||
if (gsetting.keys().contains("winKeyRelease")) {
|
|
||||||
if (gsetting.get(QString("winKeyRelease")).toBool()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (QApplication::activeWindow() == this)
|
|
||||||
{
|
|
||||||
myDebug() << "win键触发窗口隐藏事件";
|
|
||||||
this->hide();
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
myDebug() << "win键触发窗口显示事件";
|
|
||||||
this->showPCMenu();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
ways();
|
ways();
|
||||||
buttonWidgetShow();
|
buttonWidgetShow();
|
||||||
connect(m_leftWidget, &FunctionWidget::hideTabletWindow, this, &TabletWindow::recvHideMainWindowSlot);
|
connect(m_leftWidget, &FunctionWidget::hideTabletWindow, this, &TabletWindow::recvHideMainWindowSlot);
|
||||||
|
@ -232,15 +210,13 @@ void TabletWindow::setBackground()
|
||||||
|
|
||||||
void TabletWindow::registDbusService()
|
void TabletWindow::registDbusService()
|
||||||
{
|
{
|
||||||
m_dbus = new DBus;
|
// m_dbus = new DBus;
|
||||||
new MenuAdaptor(m_dbus);
|
// new MenuAdaptor(m_dbus);
|
||||||
QDBusConnection con = QDBusConnection::sessionBus();
|
// QDBusConnection con = QDBusConnection::sessionBus();
|
||||||
|
// if (!con.registerService("org.ukui.menu") ||
|
||||||
if (!con.registerService("org.ukui.menu") ||
|
// !con.registerObject("/org/ukui/menu", m_dbus)) {
|
||||||
!con.registerObject("/org/ukui/menu", m_dbus)) {
|
// qDebug() << "error:" << con.lastError().message();
|
||||||
qDebug() << "error:" << con.lastError().message();
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
// connect(m_dbus, &DBus::winKeyResponseSignal, this, [ = ] {
|
// connect(m_dbus, &DBus::winKeyResponseSignal, this, [ = ] {
|
||||||
// if (QGSettings::isSchemaInstalled(QString("org.ukui.session").toLocal8Bit()))
|
// if (QGSettings::isSchemaInstalled(QString("org.ukui.session").toLocal8Bit()))
|
||||||
// {
|
// {
|
||||||
|
@ -261,21 +237,6 @@ void TabletWindow::registDbusService()
|
||||||
// this->showPCMenu();
|
// this->showPCMenu();
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
ways();
|
|
||||||
buttonWidgetShow();
|
|
||||||
// connect(this,&TabletWindow::pagenumchanged,this,&TabletWindow::pageNumberChanged);
|
|
||||||
connect(m_leftWidget, &FunctionWidget::hideTabletWindow, this, &TabletWindow::recvHideMainWindowSlot);
|
|
||||||
|
|
||||||
if (checkapplist()) {
|
|
||||||
directoryChangedSlot();//更新应用列表
|
|
||||||
}
|
|
||||||
|
|
||||||
//pc下鼠标功能
|
|
||||||
XEventMonitor::instance()->start();
|
|
||||||
connect(XEventMonitor::instance(), SIGNAL(keyRelease(QString)),
|
|
||||||
this, SLOT(XkbEventsRelease(QString)));
|
|
||||||
connect(XEventMonitor::instance(), SIGNAL(keyPress(QString)),
|
|
||||||
this, SLOT(XkbEventsPress(QString)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TabletWindow::checkapplist()
|
bool TabletWindow::checkapplist()
|
||||||
|
@ -413,6 +374,8 @@ void TabletWindow::showPCMenu()
|
||||||
this->raise();
|
this->raise();
|
||||||
this->activateWindow();
|
this->activateWindow();
|
||||||
g_menuStatus = true;
|
g_menuStatus = true;
|
||||||
|
menuStatusChange();
|
||||||
|
myDebug() << "showMenu显示开始菜单";
|
||||||
}
|
}
|
||||||
|
|
||||||
//改变搜索框及工具栏透明度
|
//改变搜索框及工具栏透明度
|
||||||
|
@ -560,9 +523,10 @@ bool TabletWindow::event(QEvent *event)
|
||||||
//if(QEvent::WindowDeactivate == event->type())//窗口停用
|
//if(QEvent::WindowDeactivate == event->type())//窗口停用
|
||||||
{
|
{
|
||||||
if (QApplication::activeWindow() != this) {
|
if (QApplication::activeWindow() != this) {
|
||||||
qDebug() << " * 鼠标点击窗口外部事件";
|
myDebug() << " * 鼠标点击窗口外部事件";
|
||||||
this->hide();
|
this->hide();
|
||||||
g_menuStatus = false;
|
g_menuStatus = false;
|
||||||
|
menuStatusChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -576,6 +540,7 @@ bool TabletWindow::event(QEvent *event)
|
||||||
if (!(m_scrollAnimation->state() == QPropertyAnimation::Running)) {
|
if (!(m_scrollAnimation->state() == QPropertyAnimation::Running)) {
|
||||||
this->hide();
|
this->hide();
|
||||||
g_menuStatus = false;
|
g_menuStatus = false;
|
||||||
|
myDebug() << "鼠标点击事件触发隐藏";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -642,65 +607,71 @@ void TabletWindow::insertAppList(QStringList desktopfplist)
|
||||||
*/
|
*/
|
||||||
void TabletWindow::execApplication(QString desktopfp)
|
void TabletWindow::execApplication(QString desktopfp)
|
||||||
{
|
{
|
||||||
// Q_EMIT sendHideMainWindowSignal();
|
Q_EMIT sendHideMainWindowSignal();
|
||||||
// execApp(desktopfp);
|
QDBusInterface iface("com.kylin.AppManager",
|
||||||
QString str;
|
"/com/kylin/AppManager",
|
||||||
//打开文件.desktop
|
"com.kylin.AppManager",
|
||||||
GError **error = nullptr;
|
QDBusConnection::sessionBus());
|
||||||
GKeyFileFlags flags = G_KEY_FILE_NONE;
|
|
||||||
GKeyFile *keyfile = g_key_file_new();
|
|
||||||
QByteArray fpbyte = desktopfp.toLocal8Bit();
|
|
||||||
char *filepath = fpbyte.data();
|
|
||||||
g_key_file_load_from_file(keyfile, filepath, flags, error);
|
|
||||||
char *name = g_key_file_get_locale_string(keyfile, "Desktop Entry", "Exec", nullptr, nullptr);
|
|
||||||
//取出value值
|
|
||||||
QString execnamestr = QString::fromLocal8Bit(name);
|
|
||||||
str = execnamestr;
|
|
||||||
//qDebug()<<"2 exec"<<str;
|
|
||||||
//关闭文件
|
|
||||||
g_key_file_free(keyfile);
|
|
||||||
//打开ini文件
|
|
||||||
QString pathini = QDir::homePath() + "/.cache/ukui-menu/ukui-menu.ini";
|
|
||||||
m_disableAppSet = new QSettings(pathini, QSettings::IniFormat);
|
|
||||||
m_disableAppSet->beginGroup("application");
|
|
||||||
QString desktopfp1 = str;
|
|
||||||
//判断
|
|
||||||
bool bo = m_disableAppSet->contains(desktopfp1.toLocal8Bit().data()); // iskey
|
|
||||||
bool bo1 = m_disableAppSet->QSettings::value(desktopfp1.toLocal8Bit().data()).toBool(); //isvalue
|
|
||||||
m_disableAppSet->endGroup();
|
|
||||||
|
|
||||||
if (bo && bo1 == false) { //都存在//存在并且为false,从filepathlist中去掉
|
if (!g_subProjectCodeName.contains("mavis")
|
||||||
//qDebug()<<"bool"<<bo<<bo1;
|
|| (g_subProjectCodeName.contains("mavis") && !QDBusReply<bool>(iface.call("LaunchApp", desktopfp)))) {
|
||||||
return;
|
execApp(desktopfp);
|
||||||
}
|
QString str;
|
||||||
|
//打开文件.desktop
|
||||||
|
GError **error = nullptr;
|
||||||
|
GKeyFileFlags flags = G_KEY_FILE_NONE;
|
||||||
|
GKeyFile *keyfile = g_key_file_new();
|
||||||
|
QByteArray fpbyte = desktopfp.toLocal8Bit();
|
||||||
|
char *filepath = fpbyte.data();
|
||||||
|
g_key_file_load_from_file(keyfile, filepath, flags, error);
|
||||||
|
char *name = g_key_file_get_locale_string(keyfile, "Desktop Entry", "Exec", nullptr, nullptr);
|
||||||
|
//取出value值
|
||||||
|
QString execnamestr = QString::fromLocal8Bit(name);
|
||||||
|
str = execnamestr;
|
||||||
|
//qDebug()<<"2 exec"<<str;
|
||||||
|
//关闭文件
|
||||||
|
g_key_file_free(keyfile);
|
||||||
|
//打开ini文件
|
||||||
|
QString pathini = QDir::homePath() + "/.cache/ukui-menu/ukui-menu.ini";
|
||||||
|
m_disableAppSet = new QSettings(pathini, QSettings::IniFormat);
|
||||||
|
m_disableAppSet->beginGroup("application");
|
||||||
|
QString desktopfp1 = str;
|
||||||
|
//判断
|
||||||
|
bool bo = m_disableAppSet->contains(desktopfp1.toLocal8Bit().data()); // iskey
|
||||||
|
bool bo1 = m_disableAppSet->QSettings::value(desktopfp1.toLocal8Bit().data()).toBool(); //isvalue
|
||||||
|
m_disableAppSet->endGroup();
|
||||||
|
|
||||||
QString exe = execnamestr;
|
if (bo && bo1 == false) { //都存在//存在并且为false,从filepathlist中去掉
|
||||||
QStringList parameters;
|
//qDebug()<<"bool"<<bo<<bo1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (exe.indexOf("%") != -1) {
|
QString exe = execnamestr.simplified();
|
||||||
exe = exe.left(exe.indexOf("%") - 1);
|
QStringList parameters;
|
||||||
//qDebug()<<"=====dd====="<<exe;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (exe.indexOf("-") != -1) {
|
if (exe.indexOf("%") != -1) {
|
||||||
parameters = exe.split(" ");
|
exe = exe.left(exe.indexOf("%") - 1);
|
||||||
exe = parameters[0];
|
}
|
||||||
parameters.removeAt(0);
|
|
||||||
//qDebug()<<"===qqq==="<<exe;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (exe == "/usr/bin/indicator-china-weather") {
|
if (exe.indexOf(" ") != -1) {
|
||||||
parameters.removeAt(0);
|
parameters = exe.split(" ");
|
||||||
parameters.append("showmainwindow");
|
exe = parameters[0];
|
||||||
}
|
parameters.removeAt(0);
|
||||||
|
}
|
||||||
|
|
||||||
qDebug() << "5 exe" << exe << parameters;
|
if (exe == "/usr/bin/indicator-china-weather") {
|
||||||
QDBusInterface session("org.gnome.SessionManager", "/com/ukui/app", "com.ukui.app");
|
parameters.removeAt(0);
|
||||||
|
parameters.append("showmainwindow");
|
||||||
|
}
|
||||||
|
|
||||||
if (parameters.isEmpty()) {
|
qDebug() << "5 exe" << exe << parameters;
|
||||||
session.call("app_open", exe, parameters);
|
QDBusInterface session("org.gnome.SessionManager", "/com/ukui/app", "com.ukui.app");
|
||||||
} else {
|
|
||||||
session.call("app_open", exe, parameters);
|
if (parameters.isEmpty()) {
|
||||||
|
session.call("app_open", exe, parameters);
|
||||||
|
} else {
|
||||||
|
session.call("app_open", exe, parameters);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Q_EMIT sendHideMainWindowSignal();
|
//Q_EMIT sendHideMainWindowSignal();
|
||||||
|
@ -889,6 +860,7 @@ void TabletWindow::recvHideMainWindowSlot()
|
||||||
// this->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
|
// this->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
|
||||||
this->hide();
|
this->hide();
|
||||||
g_menuStatus = false;
|
g_menuStatus = false;
|
||||||
|
myDebug() << "信号触发隐藏窗口";
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabletWindow::btnGroupClickedSlot(int prePageNum, int pageNum)
|
void TabletWindow::btnGroupClickedSlot(int prePageNum, int pageNum)
|
||||||
|
@ -1080,7 +1052,7 @@ void TabletWindow::winKeyReleaseSlot(const QString &key)
|
||||||
if (QGSettings::isSchemaInstalled(QString("org.ukui.session").toLocal8Bit())) {
|
if (QGSettings::isSchemaInstalled(QString("org.ukui.session").toLocal8Bit())) {
|
||||||
QGSettings gsetting(QString("org.ukui.session").toLocal8Bit());
|
QGSettings gsetting(QString("org.ukui.session").toLocal8Bit());
|
||||||
|
|
||||||
if (gsetting.keys().contains("winKeyRelease"))
|
if (gsetting.keys().contains("winKeyRelease")) {
|
||||||
if (gsetting.get(QString("winKeyRelease")).toBool()) {
|
if (gsetting.get(QString("winKeyRelease")).toBool()) {
|
||||||
disconnect(XEventMonitor::instance(), SIGNAL(keyRelease(QString)),
|
disconnect(XEventMonitor::instance(), SIGNAL(keyRelease(QString)),
|
||||||
this, SLOT(xkbEventsRelease(QString)));
|
this, SLOT(xkbEventsRelease(QString)));
|
||||||
|
@ -1092,7 +1064,16 @@ void TabletWindow::winKeyReleaseSlot(const QString &key)
|
||||||
connect(XEventMonitor::instance(), SIGNAL(keyPress(QString)),
|
connect(XEventMonitor::instance(), SIGNAL(keyPress(QString)),
|
||||||
this, SLOT(xkbEventsPress(QString)));
|
this, SLOT(xkbEventsPress(QString)));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TabletWindow::menuStatusChange()
|
||||||
|
{
|
||||||
|
QDBusMessage message = QDBusMessage::createSignal("/com/ukui/menu", "com.ukui.menu", "statusChangeSignal");
|
||||||
|
//给信号赋值
|
||||||
|
message << g_menuStatus;
|
||||||
|
//发射
|
||||||
|
QDBusConnection::sessionBus().send(message);
|
||||||
|
}
|
||||||
|
|
|
@ -46,8 +46,6 @@
|
||||||
#include "tabletlistview.h"
|
#include "tabletlistview.h"
|
||||||
#include "pagemanager.h"
|
#include "pagemanager.h"
|
||||||
#include "tablet_directorychanged_thread.h"
|
#include "tablet_directorychanged_thread.h"
|
||||||
#include "dbus.h"
|
|
||||||
#include "dbus-adaptor.h"
|
|
||||||
|
|
||||||
class TabletWindow : public QWidget
|
class TabletWindow : public QWidget
|
||||||
{
|
{
|
||||||
|
@ -123,8 +121,9 @@ private:
|
||||||
QFileSystemWatcher *m_configFileWatcher = nullptr;
|
QFileSystemWatcher *m_configFileWatcher = nullptr;
|
||||||
TabletDirectoryChangedThread *m_directoryChangedThread = nullptr;
|
TabletDirectoryChangedThread *m_directoryChangedThread = nullptr;
|
||||||
QSettings *m_disableAppSet = nullptr;
|
QSettings *m_disableAppSet = nullptr;
|
||||||
DBus *m_dbus = nullptr;
|
|
||||||
QLabel m_animationPage;
|
QLabel m_animationPage;
|
||||||
|
// DBus *m_dbus = nullptr;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
|
@ -183,6 +182,8 @@ protected:
|
||||||
|
|
||||||
bool checkapplist();
|
bool checkapplist();
|
||||||
|
|
||||||
|
void menuStatusChange();
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
/**
|
/**
|
||||||
* @brief Open the application
|
* @brief Open the application
|
||||||
|
|
|
@ -18,6 +18,7 @@ HEADERS += \
|
||||||
$$PWD/ListView/tabletlistview.h \
|
$$PWD/ListView/tabletlistview.h \
|
||||||
$$PWD/Other/classify_btn_scrollarea.h \
|
$$PWD/Other/classify_btn_scrollarea.h \
|
||||||
$$PWD/Other/lettertooltip.h \
|
$$PWD/Other/lettertooltip.h \
|
||||||
|
$$PWD/Other/rotationlabel.h \
|
||||||
$$PWD/Other/scrollarea.h \
|
$$PWD/Other/scrollarea.h \
|
||||||
$$PWD/RightClickMenu/menubox.h \
|
$$PWD/RightClickMenu/menubox.h \
|
||||||
$$PWD/RightClickMenu/rightclickmenu.h \
|
$$PWD/RightClickMenu/rightclickmenu.h \
|
||||||
|
@ -55,6 +56,7 @@ SOURCES += \
|
||||||
$$PWD/ListView/tabletlistview.cpp \
|
$$PWD/ListView/tabletlistview.cpp \
|
||||||
$$PWD/Other/classify_btn_scrollarea.cpp \
|
$$PWD/Other/classify_btn_scrollarea.cpp \
|
||||||
$$PWD/Other/lettertooltip.cpp \
|
$$PWD/Other/lettertooltip.cpp \
|
||||||
|
$$PWD/Other/rotationlabel.cpp \
|
||||||
$$PWD/Other/scrollarea.cpp \
|
$$PWD/Other/scrollarea.cpp \
|
||||||
$$PWD/RightClickMenu/menubox.cpp \
|
$$PWD/RightClickMenu/menubox.cpp \
|
||||||
$$PWD/RightClickMenu/rightclickmenu.cpp \
|
$$PWD/RightClickMenu/rightclickmenu.cpp \
|
||||||
|
|
|
@ -76,6 +76,8 @@ int Style::SideBarWidWidth = 0;
|
||||||
|
|
||||||
int Style::appLine = 0;
|
int Style::appLine = 0;
|
||||||
int Style::appColumn = 0;
|
int Style::appColumn = 0;
|
||||||
|
int Style::appLineFirst = 0;
|
||||||
|
int Style::appColumnFirst = 0;
|
||||||
int Style::appPage = 1;
|
int Style::appPage = 1;
|
||||||
int Style::appNum = 0;
|
int Style::appNum = 0;
|
||||||
int Style::nowpagenum = 1;
|
int Style::nowpagenum = 1;
|
||||||
|
@ -100,6 +102,13 @@ int Style::ButtonWidgetWidth = 56;
|
||||||
int Style::ToolWidgetLeft = 24;
|
int Style::ToolWidgetLeft = 24;
|
||||||
bool Style::IsWideScreen = false;
|
bool Style::IsWideScreen = false;
|
||||||
|
|
||||||
|
int Style::DropMenuWidth = 0;
|
||||||
|
int Style::DropMenuHeight = 0;
|
||||||
|
int Style::miniIconSize = 0;
|
||||||
|
|
||||||
|
int Style::rightViewWidth = 0;
|
||||||
|
int Style::rightViewHeight = 0;
|
||||||
|
|
||||||
void Style::initWidStyle()
|
void Style::initWidStyle()
|
||||||
{
|
{
|
||||||
if (!g_projectCodeName.contains("V10SP1-edu")) {
|
if (!g_projectCodeName.contains("V10SP1-edu")) {
|
||||||
|
@ -121,10 +130,12 @@ void Style::initWidStyle()
|
||||||
if (m_availableScreenWidth == 800 && m_availableScreenHeight == 600) {
|
if (m_availableScreenWidth == 800 && m_availableScreenHeight == 600) {
|
||||||
minw = 320;
|
minw = 320;
|
||||||
minh = 500;
|
minh = 500;
|
||||||
|
leftPageWidth = 300;
|
||||||
|
leftPageHeight = 517;
|
||||||
} else {
|
} else {
|
||||||
minw = 652;
|
minw = 652;
|
||||||
minh = 590;
|
minh = 590;
|
||||||
leftPageWidth = 292;
|
leftPageWidth = 300;
|
||||||
leftPageHeight = 517;
|
leftPageHeight = 517;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,11 +205,16 @@ void Style::initWidStyle()
|
||||||
AppSpaceBetweenIconText = 14;
|
AppSpaceBetweenIconText = 14;
|
||||||
}
|
}
|
||||||
|
|
||||||
LeftBtnWidth = 100 + 5 * len;
|
LeftBtnWidth = 68 + 5 * len;
|
||||||
LeftBtnHeight = 43;
|
LeftBtnHeight = 34;
|
||||||
QueryLineEditHeight = 30;
|
QueryLineEditHeight = 30;
|
||||||
LeftLetterBtnHeight = 25;
|
LeftLetterBtnHeight = 25;
|
||||||
LeftIconSize = 19;
|
LeftIconSize = 19;
|
||||||
|
DropMenuWidth = 140;
|
||||||
|
DropMenuHeight = 112;
|
||||||
|
miniIconSize = 8;
|
||||||
|
rightViewWidth = 324;
|
||||||
|
rightViewHeight = 470;
|
||||||
LeftSpaceIconText = 14;
|
LeftSpaceIconText = 14;
|
||||||
m_applistWidWidth = m_availableScreenWidth / 1.25;
|
m_applistWidWidth = m_availableScreenWidth / 1.25;
|
||||||
m_applistWidWidth = m_applistWidWidth - (m_applistWidWidth % m_applistGridSizeWidth) + 1;
|
m_applistWidWidth = m_applistWidWidth - (m_applistWidWidth % m_applistGridSizeWidth) + 1;
|
||||||
|
@ -208,23 +224,25 @@ void Style::initWidStyle()
|
||||||
} else {
|
} else {
|
||||||
ScreenWidth = QApplication::primaryScreen()->geometry().width();
|
ScreenWidth = QApplication::primaryScreen()->geometry().width();
|
||||||
ScreenHeight = QApplication::primaryScreen()->geometry().height();
|
ScreenHeight = QApplication::primaryScreen()->geometry().height();
|
||||||
|
myDebug() << "Winches" << qApp->desktop()->widthMM();
|
||||||
if (ScreenHeight != 1080) {
|
myDebug() << "Hinches" << qApp->desktop()->heightMM();
|
||||||
AppListViewTopMargin = 30;
|
myDebug() << "ScreenWidth" << ScreenWidth;
|
||||||
} else {
|
myDebug() << "ScreenHeight" << ScreenHeight;
|
||||||
AppListViewTopMargin = 70;
|
appColumn = 6;
|
||||||
}
|
appLine = 4;
|
||||||
|
appLineFirst = 4;
|
||||||
|
AppListViewTopMargin = 70;
|
||||||
AppListViewLeftMargin = 52;
|
AppListViewLeftMargin = 52;
|
||||||
AppListViewBottomMargin = AppListViewTopMargin - 30;
|
AppListViewBottomMargin = AppListViewTopMargin - 30;
|
||||||
AppListViewRightMargin = 0;
|
AppListViewRightMargin = 0;
|
||||||
m_leftWidWidth = ScreenWidth * 0.3;
|
m_leftWidWidth = ScreenWidth * 0.3;
|
||||||
FirsPageViewWidth = ScreenWidth - m_leftWidWidth - 5;
|
FirsPageViewWidth = ScreenWidth - m_leftWidWidth - 5;
|
||||||
|
appColumnFirst = FirsPageViewWidth / 220;
|
||||||
OtherPageViewWidth = ScreenWidth;
|
OtherPageViewWidth = ScreenWidth;
|
||||||
TabletItemSizeWidthFirst = FirsPageViewWidth / 6;
|
TabletItemSizeWidthFirst = FirsPageViewWidth / appColumnFirst;
|
||||||
TabletItemSizeWidthOther = (ScreenWidth - 5) / 6;
|
TabletItemSizeWidthOther = (ScreenWidth - 5) / appColumn;
|
||||||
CenterWindHeight = ScreenHeight - AppListViewBottomMargin - AppListViewTopMargin;
|
CenterWindHeight = ScreenHeight - AppListViewBottomMargin - AppListViewTopMargin;
|
||||||
AppListItemSizeHeight = CenterWindHeight / 4;
|
AppListItemSizeHeight = CenterWindHeight / appLine;
|
||||||
AppListIconSize = 96;
|
AppListIconSize = 96;
|
||||||
AppListBigIconSize = 108;
|
AppListBigIconSize = 108;
|
||||||
AppTopSpace = (AppListItemSizeHeight - AppListIconSize) / 2;
|
AppTopSpace = (AppListItemSizeHeight - AppListIconSize) / 2;
|
||||||
|
|
|
@ -133,6 +133,8 @@ public:
|
||||||
|
|
||||||
static int appLine;
|
static int appLine;
|
||||||
static int appColumn;
|
static int appColumn;
|
||||||
|
static int appLineFirst;
|
||||||
|
static int appColumnFirst;
|
||||||
static int appNum;
|
static int appNum;
|
||||||
static int appPage;
|
static int appPage;
|
||||||
static int nowpagenum;
|
static int nowpagenum;
|
||||||
|
@ -169,7 +171,12 @@ public:
|
||||||
static int WideAppListItemSizeHeight;
|
static int WideAppListItemSizeHeight;
|
||||||
static int WideAppViewLeftMargin;
|
static int WideAppViewLeftMargin;
|
||||||
static bool IsWideScreen;
|
static bool IsWideScreen;
|
||||||
|
static int DropMenuWidth;
|
||||||
|
static int DropMenuHeight;
|
||||||
|
static int miniIconSize;
|
||||||
|
|
||||||
|
static int rightViewWidth;
|
||||||
|
static int rightViewHeight;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -17,4 +17,4 @@ public:
|
||||||
virtual QWidget *createWidget(QWidget *parent) = 0;
|
virtual QWidget *createWidget(QWidget *parent) = 0;
|
||||||
};
|
};
|
||||||
Q_DECLARE_INTERFACE(kyMenuPluginInterface, "org.kyMenuPlugin.AbstractInterface")
|
Q_DECLARE_INTERFACE(kyMenuPluginInterface, "org.kyMenuPlugin.AbstractInterface")
|
||||||
#endif
|
#endif
|
|
@ -28,10 +28,14 @@
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDBusInterface>
|
#include <QDBusInterface>
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
|
#include "ukuimenuinterface.h"
|
||||||
|
|
||||||
#define DATABASENAME QDir::homePath()+"/.config/ukui/"+"UkuiMenu.db"
|
#define DATABASENAME QDir::homePath()+"/.config/ukui/"+"UkuiMenu.db"
|
||||||
QString g_projectCodeName = "V10SP1";
|
QString g_projectCodeName = "V10SP1";
|
||||||
|
QString g_subProjectCodeName = "";
|
||||||
|
QString g_platform = "";
|
||||||
bool g_menuStatus = false;
|
bool g_menuStatus = false;
|
||||||
|
QString g_curStyle = "";
|
||||||
|
|
||||||
const QPixmap loadSvg(const QString &fileName, const int size)
|
const QPixmap loadSvg(const QString &fileName, const int size)
|
||||||
{
|
{
|
||||||
|
@ -370,6 +374,27 @@ bool updateDataBaseTableTimes(QString desktopfn)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool dataBaseIsEmpty()
|
||||||
|
{
|
||||||
|
QSqlDatabase db = QSqlDatabase::database("MainThreadDataBase");
|
||||||
|
QSqlQuery sql(db);
|
||||||
|
QString cmd;
|
||||||
|
cmd = QString("select * from appInfo");
|
||||||
|
if (sql.exec(cmd)) {
|
||||||
|
if (!sql.next()) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
if (sql.value(0).toString() == "") {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool updateDataBaseCollect(QString desktopfn, int type)
|
bool updateDataBaseCollect(QString desktopfn, int type)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include <QSqlError>
|
#include <QSqlError>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <gio/gdesktopappinfo.h>
|
#include <gio/gdesktopappinfo.h>
|
||||||
#include "ukuimenuinterface.h"
|
|
||||||
|
|
||||||
#define DBUS_NAME "org.ukui.panel"
|
#define DBUS_NAME "org.ukui.panel"
|
||||||
#define DBUS_PATH "/panel/position"
|
#define DBUS_PATH "/panel/position"
|
||||||
|
@ -33,6 +32,26 @@
|
||||||
|
|
||||||
#define myDebug() qDebug() << QString("%1 %2 行 %3").arg(__FILE__).arg(__FUNCTION__).arg(__LINE__)
|
#define myDebug() qDebug() << QString("%1 %2 行 %3").arg(__FILE__).arg(__FUNCTION__).arg(__LINE__)
|
||||||
|
|
||||||
|
typedef struct pointDataStruct {
|
||||||
|
QString module;
|
||||||
|
QString function;
|
||||||
|
QString functionNum;
|
||||||
|
QStringList otherFunction;
|
||||||
|
QString errorLevel;
|
||||||
|
QString errorOutput;
|
||||||
|
QString timeStamp;
|
||||||
|
pointDataStruct()
|
||||||
|
{
|
||||||
|
module = QString();
|
||||||
|
function = QString();
|
||||||
|
functionNum = QString();
|
||||||
|
otherFunction = QStringList();
|
||||||
|
errorLevel = QString();
|
||||||
|
errorOutput = QString();
|
||||||
|
timeStamp = QString();
|
||||||
|
}
|
||||||
|
} pointDataStruct;
|
||||||
|
|
||||||
static int collectCount = 0;
|
static int collectCount = 0;
|
||||||
|
|
||||||
const QPixmap loadSvg(const QString &fileName, const int size);
|
const QPixmap loadSvg(const QString &fileName, const int size);
|
||||||
|
@ -60,6 +79,7 @@ bool checkIfRecent(QString desktopfn);//检查是否最近安装
|
||||||
bool checkIfCollected(QString desktopfn);
|
bool checkIfCollected(QString desktopfn);
|
||||||
QStringList getCollectAppList();
|
QStringList getCollectAppList();
|
||||||
void changeCollectSort(QString dragDesktopfn, QString dropDesktopfn);
|
void changeCollectSort(QString dragDesktopfn, QString dropDesktopfn);
|
||||||
|
bool dataBaseIsEmpty();//判断数据库是否为空
|
||||||
bool updateDataBaseCollect(QString desktopfn, int type);
|
bool updateDataBaseCollect(QString desktopfn, int type);
|
||||||
QStringList getLockAppList();//获取被锁定应用
|
QStringList getLockAppList();//获取被锁定应用
|
||||||
QStringList getUnlockAllList();//获取未被锁定应用
|
QStringList getUnlockAllList();//获取未被锁定应用
|
||||||
|
@ -86,7 +106,10 @@ enum PanelPositon {
|
||||||
};
|
};
|
||||||
|
|
||||||
extern QString g_projectCodeName;
|
extern QString g_projectCodeName;
|
||||||
|
extern QString g_subProjectCodeName;
|
||||||
|
extern QString g_platform;
|
||||||
extern bool g_menuStatus;
|
extern bool g_menuStatus;
|
||||||
|
extern QString g_curStyle;
|
||||||
|
|
||||||
|
|
||||||
#endif // UTILITY_H
|
#endif // UTILITY_H
|
||||||
|
|
|
@ -4,22 +4,22 @@
|
||||||
<context>
|
<context>
|
||||||
<name>FullMainWindow</name>
|
<name>FullMainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/full_mainwindow.cpp" line="79"/>
|
<location filename="../src/UserInterface/full_mainwindow.cpp" line="86"/>
|
||||||
<source>Search</source>
|
<source>Search</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/full_mainwindow.cpp" line="138"/>
|
<location filename="../src/UserInterface/full_mainwindow.cpp" line="144"/>
|
||||||
<source>All</source>
|
<source>All</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/full_mainwindow.cpp" line="140"/>
|
<location filename="../src/UserInterface/full_mainwindow.cpp" line="146"/>
|
||||||
<source>Letter</source>
|
<source>Letter</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/full_mainwindow.cpp" line="142"/>
|
<location filename="../src/UserInterface/full_mainwindow.cpp" line="148"/>
|
||||||
<source>Function</source>
|
<source>Function</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
<context>
|
<context>
|
||||||
<name>FunctionWidget</name>
|
<name>FunctionWidget</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/Widget/function_Widget.cpp" line="205"/>
|
<location filename="../src/UserInterface/Widget/function_Widget.cpp" line="204"/>
|
||||||
<source>Search</source>
|
<source>Search</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -35,51 +35,56 @@
|
||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="239"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="240"/>
|
||||||
<source>...</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="242"/>
|
|
||||||
<source>collection</source>
|
<source>collection</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="237"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="233"/>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="426"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="452"/>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="844"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="985"/>
|
||||||
<source>All</source>
|
<source>All</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="97"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="90"/>
|
||||||
<source>Search</source>
|
<source>Search</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="243"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="192"/>
|
||||||
|
<source>No recent files</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../src/UserInterface/mainwindow.cpp" line="241"/>
|
||||||
<source>recent</source>
|
<source>recent</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="244"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="242"/>
|
||||||
<source>Max</source>
|
<source>Max</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="246"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="244"/>
|
||||||
<source>PowerOff</source>
|
<source>PowerOff</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="428"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="395"/>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="852"/>
|
<source>Search application</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../src/UserInterface/mainwindow.cpp" line="454"/>
|
||||||
|
<location filename="../src/UserInterface/mainwindow.cpp" line="993"/>
|
||||||
<source>Letter</source>
|
<source>Letter</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="430"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="456"/>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="860"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="1001"/>
|
||||||
<source>Function</source>
|
<source>Function</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -156,82 +161,82 @@
|
||||||
<context>
|
<context>
|
||||||
<name>RightClickMenu</name>
|
<name>RightClickMenu</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="228"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="213"/>
|
||||||
<source>Pin to all</source>
|
<source>Pin to all</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="231"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="216"/>
|
||||||
<source>Unpin from all</source>
|
<source>Unpin from all</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="241"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="226"/>
|
||||||
<source>Pin to taskbar</source>
|
<source>Pin to taskbar</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="244"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="229"/>
|
||||||
<source>Unpin from taskbar</source>
|
<source>Unpin from taskbar</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="247"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="232"/>
|
||||||
<source>Add to desktop shortcuts</source>
|
<source>Add to desktop shortcuts</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="251"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="236"/>
|
||||||
<source>Pin to collection</source>
|
<source>Pin to collection</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="254"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="239"/>
|
||||||
<source>Remove from collection</source>
|
<source>Remove from collection</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="269"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="254"/>
|
||||||
<source>Uninstall</source>
|
<source>Uninstall</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="290"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="274"/>
|
||||||
<source>Switch user</source>
|
<source>Switch user</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="296"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="281"/>
|
||||||
<source>Hibernate</source>
|
<source>Hibernate</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="302"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="288"/>
|
||||||
<source>Sleep</source>
|
<source>Sleep</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="306"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="292"/>
|
||||||
<source>Lock Screen</source>
|
<source>Lock Screen</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="311"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="297"/>
|
||||||
<source>Log Out</source>
|
<source>Log Out</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="317"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="304"/>
|
||||||
<source>Restart</source>
|
<source>Restart</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="323"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="311"/>
|
||||||
<source>Power Off</source>
|
<source>Power Off</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="354"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="342"/>
|
||||||
<source>Personalize this list</source>
|
<source>Personalize this list</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -4,22 +4,22 @@
|
||||||
<context>
|
<context>
|
||||||
<name>FullMainWindow</name>
|
<name>FullMainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/full_mainwindow.cpp" line="79"/>
|
<location filename="../src/UserInterface/full_mainwindow.cpp" line="86"/>
|
||||||
<source>Search</source>
|
<source>Search</source>
|
||||||
<translation type="unfinished">Ara</translation>
|
<translation type="unfinished">Ara</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/full_mainwindow.cpp" line="138"/>
|
<location filename="../src/UserInterface/full_mainwindow.cpp" line="144"/>
|
||||||
<source>All</source>
|
<source>All</source>
|
||||||
<translation type="unfinished">Tümü</translation>
|
<translation type="unfinished">Tümü</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/full_mainwindow.cpp" line="140"/>
|
<location filename="../src/UserInterface/full_mainwindow.cpp" line="146"/>
|
||||||
<source>Letter</source>
|
<source>Letter</source>
|
||||||
<translation type="unfinished">Alfabetik</translation>
|
<translation type="unfinished">Alfabetik</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/full_mainwindow.cpp" line="142"/>
|
<location filename="../src/UserInterface/full_mainwindow.cpp" line="148"/>
|
||||||
<source>Function</source>
|
<source>Function</source>
|
||||||
<translation type="unfinished">Kategori</translation>
|
<translation type="unfinished">Kategori</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -118,7 +118,7 @@
|
||||||
<translation type="vanished">Diğer</translation>
|
<translation type="vanished">Diğer</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/Widget/function_Widget.cpp" line="205"/>
|
<location filename="../src/UserInterface/Widget/function_Widget.cpp" line="204"/>
|
||||||
<source>Search</source>
|
<source>Search</source>
|
||||||
<translation type="unfinished">Ara</translation>
|
<translation type="unfinished">Ara</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -192,51 +192,56 @@
|
||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="239"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="240"/>
|
||||||
<source>...</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="242"/>
|
|
||||||
<source>collection</source>
|
<source>collection</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="237"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="233"/>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="426"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="452"/>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="844"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="985"/>
|
||||||
<source>All</source>
|
<source>All</source>
|
||||||
<translation type="unfinished">Tümü</translation>
|
<translation type="unfinished">Tümü</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="97"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="90"/>
|
||||||
<source>Search</source>
|
<source>Search</source>
|
||||||
<translation type="unfinished">Ara</translation>
|
<translation type="unfinished">Ara</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="243"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="192"/>
|
||||||
|
<source>No recent files</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../src/UserInterface/mainwindow.cpp" line="241"/>
|
||||||
<source>recent</source>
|
<source>recent</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="244"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="242"/>
|
||||||
<source>Max</source>
|
<source>Max</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="246"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="244"/>
|
||||||
<source>PowerOff</source>
|
<source>PowerOff</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="428"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="395"/>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="852"/>
|
<source>Search application</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../src/UserInterface/mainwindow.cpp" line="454"/>
|
||||||
|
<location filename="../src/UserInterface/mainwindow.cpp" line="993"/>
|
||||||
<source>Letter</source>
|
<source>Letter</source>
|
||||||
<translation type="unfinished">Alfabetik</translation>
|
<translation type="unfinished">Alfabetik</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="430"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="456"/>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="860"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="1001"/>
|
||||||
<source>Function</source>
|
<source>Function</source>
|
||||||
<translation type="unfinished">Kategori</translation>
|
<translation type="unfinished">Kategori</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -360,62 +365,62 @@
|
||||||
<context>
|
<context>
|
||||||
<name>RightClickMenu</name>
|
<name>RightClickMenu</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="228"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="213"/>
|
||||||
<source>Pin to all</source>
|
<source>Pin to all</source>
|
||||||
<translation>Tümünü sabitle</translation>
|
<translation>Tümünü sabitle</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="231"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="216"/>
|
||||||
<source>Unpin from all</source>
|
<source>Unpin from all</source>
|
||||||
<translation>Tüm sabitlemeleri kaldır</translation>
|
<translation>Tüm sabitlemeleri kaldır</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="241"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="226"/>
|
||||||
<source>Pin to taskbar</source>
|
<source>Pin to taskbar</source>
|
||||||
<translation>Görev çubuğuna sabitle</translation>
|
<translation>Görev çubuğuna sabitle</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="244"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="229"/>
|
||||||
<source>Unpin from taskbar</source>
|
<source>Unpin from taskbar</source>
|
||||||
<translation>Görev çubuğundan sabitlemeyi kaldır</translation>
|
<translation>Görev çubuğundan sabitlemeyi kaldır</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="247"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="232"/>
|
||||||
<source>Add to desktop shortcuts</source>
|
<source>Add to desktop shortcuts</source>
|
||||||
<translation>Masaüstü kısayollarına ekle</translation>
|
<translation>Masaüstü kısayollarına ekle</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="251"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="236"/>
|
||||||
<source>Pin to collection</source>
|
<source>Pin to collection</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="254"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="239"/>
|
||||||
<source>Remove from collection</source>
|
<source>Remove from collection</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="269"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="254"/>
|
||||||
<source>Uninstall</source>
|
<source>Uninstall</source>
|
||||||
<translation>Kaldır</translation>
|
<translation>Kaldır</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="290"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="274"/>
|
||||||
<source>Switch user</source>
|
<source>Switch user</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="296"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="281"/>
|
||||||
<source>Hibernate</source>
|
<source>Hibernate</source>
|
||||||
<translation>Beklemeye Al</translation>
|
<translation>Beklemeye Al</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="302"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="288"/>
|
||||||
<source>Sleep</source>
|
<source>Sleep</source>
|
||||||
<translation>Uyku Modu</translation>
|
<translation>Uyku Modu</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="306"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="292"/>
|
||||||
<source>Lock Screen</source>
|
<source>Lock Screen</source>
|
||||||
<translation>Ekranı Kilitle</translation>
|
<translation>Ekranı Kilitle</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -424,22 +429,22 @@
|
||||||
<translation type="vanished">Kullanıcı Değiştir</translation>
|
<translation type="vanished">Kullanıcı Değiştir</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="311"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="297"/>
|
||||||
<source>Log Out</source>
|
<source>Log Out</source>
|
||||||
<translation>Çıkış</translation>
|
<translation>Çıkış</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="317"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="304"/>
|
||||||
<source>Restart</source>
|
<source>Restart</source>
|
||||||
<translation>Yeniden Başlat</translation>
|
<translation>Yeniden Başlat</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="323"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="311"/>
|
||||||
<source>Power Off</source>
|
<source>Power Off</source>
|
||||||
<translation>Kapat</translation>
|
<translation>Kapat</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="354"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="342"/>
|
||||||
<source>Personalize this list</source>
|
<source>Personalize this list</source>
|
||||||
<translation>Bu listeyi özelleştirin</translation>
|
<translation>Bu listeyi özelleştirin</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -4,22 +4,22 @@
|
||||||
<context>
|
<context>
|
||||||
<name>FullMainWindow</name>
|
<name>FullMainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/full_mainwindow.cpp" line="79"/>
|
<location filename="../src/UserInterface/full_mainwindow.cpp" line="86"/>
|
||||||
<source>Search</source>
|
<source>Search</source>
|
||||||
<translation>搜索应用</translation>
|
<translation>搜索应用</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/full_mainwindow.cpp" line="138"/>
|
<location filename="../src/UserInterface/full_mainwindow.cpp" line="144"/>
|
||||||
<source>All</source>
|
<source>All</source>
|
||||||
<translation>全部</translation>
|
<translation>全部</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/full_mainwindow.cpp" line="140"/>
|
<location filename="../src/UserInterface/full_mainwindow.cpp" line="146"/>
|
||||||
<source>Letter</source>
|
<source>Letter</source>
|
||||||
<translation>字母排序</translation>
|
<translation>字母排序</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/full_mainwindow.cpp" line="142"/>
|
<location filename="../src/UserInterface/full_mainwindow.cpp" line="148"/>
|
||||||
<source>Function</source>
|
<source>Function</source>
|
||||||
<translation>功能分类</translation>
|
<translation>功能分类</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
<context>
|
<context>
|
||||||
<name>FunctionWidget</name>
|
<name>FunctionWidget</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/Widget/function_Widget.cpp" line="205"/>
|
<location filename="../src/UserInterface/Widget/function_Widget.cpp" line="204"/>
|
||||||
<source>Search</source>
|
<source>Search</source>
|
||||||
<translation>全局搜索</translation>
|
<translation>全局搜索</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -35,51 +35,56 @@
|
||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="97"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="90"/>
|
||||||
<source>Search</source>
|
<source>Search</source>
|
||||||
<translation>搜索应用</translation>
|
<translation>搜索应用</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="237"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="192"/>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="426"/>
|
<source>No recent files</source>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="844"/>
|
<translation>暂无最近文件</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../src/UserInterface/mainwindow.cpp" line="233"/>
|
||||||
|
<location filename="../src/UserInterface/mainwindow.cpp" line="452"/>
|
||||||
|
<location filename="../src/UserInterface/mainwindow.cpp" line="985"/>
|
||||||
<source>All</source>
|
<source>All</source>
|
||||||
<translation>全部</translation>
|
<translation>全部</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="239"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="240"/>
|
||||||
<source>...</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="242"/>
|
|
||||||
<source>collection</source>
|
<source>collection</source>
|
||||||
<translation>收藏</translation>
|
<translation>收藏</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="243"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="241"/>
|
||||||
<source>recent</source>
|
<source>recent</source>
|
||||||
<translation>最近</translation>
|
<translation>最近</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="244"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="242"/>
|
||||||
<source>Max</source>
|
<source>Max</source>
|
||||||
<translation>放大</translation>
|
<translation>放大</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="246"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="244"/>
|
||||||
<source>PowerOff</source>
|
<source>PowerOff</source>
|
||||||
<translation>关机</translation>
|
<translation>关机</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="428"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="395"/>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="852"/>
|
<source>Search application</source>
|
||||||
|
<translation>搜索应用</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../src/UserInterface/mainwindow.cpp" line="454"/>
|
||||||
|
<location filename="../src/UserInterface/mainwindow.cpp" line="993"/>
|
||||||
<source>Letter</source>
|
<source>Letter</source>
|
||||||
<translation>字母排序</translation>
|
<translation>字母排序</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="430"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="456"/>
|
||||||
<location filename="../src/UserInterface/mainwindow.cpp" line="860"/>
|
<location filename="../src/UserInterface/mainwindow.cpp" line="1001"/>
|
||||||
<source>Function</source>
|
<source>Function</source>
|
||||||
<translation>功能分类</translation>
|
<translation>功能分类</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -156,82 +161,82 @@
|
||||||
<context>
|
<context>
|
||||||
<name>RightClickMenu</name>
|
<name>RightClickMenu</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="228"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="213"/>
|
||||||
<source>Pin to all</source>
|
<source>Pin to all</source>
|
||||||
<translation>固定到“所有软件”</translation>
|
<translation>固定到“所有软件”</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="231"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="216"/>
|
||||||
<source>Unpin from all</source>
|
<source>Unpin from all</source>
|
||||||
<translation>从“所有软件”取消固定</translation>
|
<translation>从“所有软件”取消固定</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="241"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="226"/>
|
||||||
<source>Pin to taskbar</source>
|
<source>Pin to taskbar</source>
|
||||||
<translation>固定到任务栏</translation>
|
<translation>固定到任务栏</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="244"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="229"/>
|
||||||
<source>Unpin from taskbar</source>
|
<source>Unpin from taskbar</source>
|
||||||
<translation>从任务栏取消固定</translation>
|
<translation>从任务栏取消固定</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="247"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="232"/>
|
||||||
<source>Add to desktop shortcuts</source>
|
<source>Add to desktop shortcuts</source>
|
||||||
<translation>添加到桌面快捷方式</translation>
|
<translation>添加到桌面快捷方式</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="251"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="236"/>
|
||||||
<source>Pin to collection</source>
|
<source>Pin to collection</source>
|
||||||
<translation>固定到收藏</translation>
|
<translation>固定到收藏</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="254"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="239"/>
|
||||||
<source>Remove from collection</source>
|
<source>Remove from collection</source>
|
||||||
<translation>从收藏移除</translation>
|
<translation>从收藏移除</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="269"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="254"/>
|
||||||
<source>Uninstall</source>
|
<source>Uninstall</source>
|
||||||
<translation>卸载</translation>
|
<translation>卸载</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="290"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="274"/>
|
||||||
<source>Switch user</source>
|
<source>Switch user</source>
|
||||||
<translation>切换用户</translation>
|
<translation>切换用户</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="296"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="281"/>
|
||||||
<source>Hibernate</source>
|
<source>Hibernate</source>
|
||||||
<translation>休眠</translation>
|
<translation>休眠</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="302"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="288"/>
|
||||||
<source>Sleep</source>
|
<source>Sleep</source>
|
||||||
<translation>睡眠</translation>
|
<translation>睡眠</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="306"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="292"/>
|
||||||
<source>Lock Screen</source>
|
<source>Lock Screen</source>
|
||||||
<translation>锁屏</translation>
|
<translation>锁屏</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="311"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="297"/>
|
||||||
<source>Log Out</source>
|
<source>Log Out</source>
|
||||||
<translation>注销</translation>
|
<translation>注销</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="317"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="304"/>
|
||||||
<source>Restart</source>
|
<source>Restart</source>
|
||||||
<translation>重启</translation>
|
<translation>重启</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="323"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="311"/>
|
||||||
<source>Power Off</source>
|
<source>Power Off</source>
|
||||||
<translation>关机</translation>
|
<translation>关机</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="354"/>
|
<location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="342"/>
|
||||||
<source>Personalize this list</source>
|
<source>Personalize this list</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -48,11 +48,11 @@ INSTALLS += qm_files
|
||||||
# So we can access it from main.cpp
|
# So we can access it from main.cpp
|
||||||
DEFINES += QM_FILES_INSTALL_PATH='\\"$${QM_FILES_INSTALL_PATH}\\"'
|
DEFINES += QM_FILES_INSTALL_PATH='\\"$${QM_FILES_INSTALL_PATH}\\"'
|
||||||
|
|
||||||
PKGCONFIG+=glib-2.0 gio-unix-2.0 gsettings-qt libbamf3 x11 xtst
|
PKGCONFIG+=glib-2.0 gio-unix-2.0 gsettings-qt libbamf3 x11 xtst kysdk-waylandhelper
|
||||||
|
|
||||||
CONFIG += no_keywords link_pkgconfig
|
CONFIG += no_keywords link_pkgconfig
|
||||||
|
|
||||||
LIBS+=-pthread -luchardet -lukui-log4qt -lukui-com4c -lukui-com4cxx -lpeony
|
LIBS+=-pthread -luchardet -lukui-log4qt -lukui-com4c -lukui-com4cxx -lpeony -ldl -lcrypto
|
||||||
|
|
||||||
desktop_file.files = ukui-menu.desktop
|
desktop_file.files = ukui-menu.desktop
|
||||||
desktop_file.path = /etc/xdg/autostart
|
desktop_file.path = /etc/xdg/autostart
|
||||||
|
@ -63,7 +63,7 @@ INSTALLS += \
|
||||||
FORMS +=
|
FORMS +=
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
main.cpp
|
main.cpp \
|
||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
res.qrc
|
res.qrc
|
||||||
|
|
Loading…
Reference in New Issue