forked from openkylin/qt5-ukui-platformtheme
New upstream version 3.20.1.1
This commit is contained in:
parent
0ccca7aa82
commit
48f635f205
|
@ -38,7 +38,7 @@
|
|||
|
||||
#define ColorDifference 10
|
||||
|
||||
QColor HighLightEffect::symbolic_color = QColor(31, 32, 34, 192);
|
||||
QColor HighLightEffect::symbolic_color = QColor(38, 38, 38);
|
||||
|
||||
void HighLightEffect::setSkipEffect(QWidget *w, bool skip)
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@ static const QStringList blackAppListWithBlurHelper() {
|
|||
QStringList l;
|
||||
l<<"youker-assistant";
|
||||
l<<"kylin-assistant";
|
||||
l<<"kylin-video";
|
||||
// l<<"kylin-video";
|
||||
// l<<"ukui-control-center";
|
||||
l<<"ubuntu-kylin-software-center.py";
|
||||
// l<<"kylin-burner";
|
||||
|
@ -92,4 +92,13 @@ static const QStringList useTransparentButtonList() {
|
|||
return l;
|
||||
}
|
||||
|
||||
static const QStringList focusStateActiveList() {
|
||||
//focus state style
|
||||
QStringList l;
|
||||
l<<"ukui-menu";
|
||||
l<<"platformthemeDemo";
|
||||
|
||||
return l;
|
||||
}
|
||||
|
||||
#endif // BLACKLIST_H
|
||||
|
|
|
@ -60,13 +60,6 @@
|
|||
<summary>System Palette</summary>
|
||||
<description>Set default system palette for UKUI desktop environment.</description>
|
||||
</key>
|
||||
<key type="b" name="use-custom-highlight-color">
|
||||
<default>false</default>
|
||||
<summary>Use custom highlight color.</summary>
|
||||
<description>
|
||||
Globally enable or disable custom highlight color.
|
||||
</description>
|
||||
</key>
|
||||
<key type="s" name="theme-color">
|
||||
<default>"daybreakBlue"</default>
|
||||
<summary> theme color</summary>
|
||||
|
@ -84,5 +77,15 @@
|
|||
<summary>Blink text cursor interval.</summary>
|
||||
<description>The interval of text cursor blink.</description>
|
||||
</key>
|
||||
<key type="b" name="use-custom-highlight-color">
|
||||
<default>false</default>
|
||||
<summary>Use custom highlight color.</summary>
|
||||
<description>Globally enable or disable custom highlight color.Now is to compatible with third party application</description>
|
||||
</key>
|
||||
<key type="s" name="custom-highlight-color">
|
||||
<default>"#3D6BE5"</default>
|
||||
<summary>Custom highlight color</summary>
|
||||
<description>Set custom highlight color for UKUI desktop environment.Now is to compatible with third party application</description>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
HEADERS += $$PWD/libqt5-ukui-style_global.h \
|
||||
$$PWD/ukui-style-settings.h \
|
||||
$$PWD/application-style-settings.h
|
||||
$$PWD/black-list.h \
|
||||
$$PWD/application-style-settings.h
|
||||
|
||||
SOURCES += $$PWD/ukui-style-settings.cpp \
|
||||
$$PWD/application-style-settings.cpp
|
||||
$$PWD/application-style-settings.cpp
|
||||
|
||||
INCLUDEPATH += $$PWD/..
|
||||
INCLUDEPATH += $$PWD
|
||||
|
|
|
@ -47,7 +47,9 @@
|
|||
|
||||
#include <QQuickStyle>
|
||||
|
||||
#include "widget/message-box.h"
|
||||
#include "widget/messagebox/message-box.h"
|
||||
#include "widget/filedialog/kyfiledialog.h"
|
||||
#include "widget/filedialog/debug.h"
|
||||
|
||||
#if !defined(QT_NO_DBUS) && !defined(QT_NO_SYSTEMTRAYICON)
|
||||
static bool isDBusTrayAvailable() {
|
||||
|
@ -233,14 +235,18 @@ QIconEngine *Qt5UKUIPlatformTheme::createIconEngine(const QString &iconName) con
|
|||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
|
||||
bool Qt5UKUIPlatformTheme::usePlatformNativeDialog(DialogType type) const
|
||||
{
|
||||
return true;
|
||||
switch (type) {
|
||||
case QPlatformTheme::FileDialog:
|
||||
#ifdef UseNativeFileDialog
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
case QPlatformTheme::FontDialog:
|
||||
case QPlatformTheme::ColorDialog:
|
||||
return false;
|
||||
case QPlatformTheme::MessageDialog:
|
||||
if (qAppName() == "ukui-control-center" || qAppName() == "kybackup")
|
||||
if (qAppName() == "ukui-control-center")
|
||||
return false;
|
||||
return true;
|
||||
default:
|
||||
|
@ -254,12 +260,15 @@ QPlatformDialogHelper *Qt5UKUIPlatformTheme::createPlatformDialogHelper(DialogTy
|
|||
{
|
||||
switch (type) {
|
||||
case QPlatformTheme::FileDialog:
|
||||
#ifdef UseNativeFileDialog
|
||||
return new KyFileDialogHelper;
|
||||
#else
|
||||
return QPlatformTheme::createPlatformDialogHelper(type);
|
||||
#endif
|
||||
case QPlatformTheme::FontDialog:
|
||||
case QPlatformTheme::ColorDialog:
|
||||
return QPlatformTheme::createPlatformDialogHelper(type);
|
||||
case QPlatformTheme::MessageDialog:
|
||||
if (qAppName() == "kybackup")
|
||||
return nullptr;
|
||||
return new MessageBoxHelper;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -14,8 +14,9 @@ else: \
|
|||
TARGET = qt5-ukui-platformtheme
|
||||
TEMPLATE = lib
|
||||
CONFIG += plugin
|
||||
CONFIG += c++11 link_pkgconfig
|
||||
PKGCONFIG += gsettings-qt Qt5XdgIconLoader kysdk-waylandhelper
|
||||
CONFIG += c++11 link_pkgconfig lrelease
|
||||
PKGCONFIG += gsettings-qt Qt5XdgIconLoader peony
|
||||
LIBS += -lX11
|
||||
|
||||
include(../libqt5-ukui-style/libqt5-ukui-style.pri)
|
||||
|
||||
|
@ -50,9 +51,20 @@ HEADERS += \
|
|||
qt5-ukui-platform-theme.h \
|
||||
qt5-ukui-platformtheme_global.h
|
||||
|
||||
TRANSLATIONS += \
|
||||
$$PWD/translations/qt5-ukui-platformtheme_zh_CN.ts \
|
||||
$$PWD/translations/qt5-ukui-platformtheme_en_US.ts \
|
||||
$$PWD/translations/qt5-ukui-platformtheme_fa.ts \
|
||||
$$PWD/translations/qt5-ukui-platformtheme_fr.ts \
|
||||
$$PWD/translations/qt5-ukui-platformtheme_cs.ts \
|
||||
$$PWD/translations/qt5-ukui-platformtheme_bo_CN.ts \
|
||||
$$PWD/translations/qt5-ukui-platformtheme_tr.ts \
|
||||
|
||||
unix {
|
||||
target.path = $$[QT_INSTALL_PLUGINS]/platformthemes
|
||||
INSTALLS += target
|
||||
|
||||
QM_FILES_INSTALL_PATH=/usr/share/qt5-ukui-platformtheme
|
||||
}
|
||||
|
||||
DISTFILES += \
|
||||
|
|
|
@ -0,0 +1,339 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="bo_CN">
|
||||
<context>
|
||||
<name>KyNativeFileDialog</name>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="146"/>
|
||||
<source>Go Back</source>
|
||||
<translation>ཕྱིར་ལོག</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="153"/>
|
||||
<source>Go Forward</source>
|
||||
<translation>མདུན་སྐྱོད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="159"/>
|
||||
<source>Cd Up</source>
|
||||
<translation>འོད་སྡེར་གྱི་འོད་ཆེ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="166"/>
|
||||
<source>Search</source>
|
||||
<translation>འཚོལ་ཞིབ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="174"/>
|
||||
<source>View Type</source>
|
||||
<translation>ལྟ་ཀློག་གི་རིགས་དབྱིབས</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="184"/>
|
||||
<source>Sort Type</source>
|
||||
<translation>རིགས་དབྱིབས་རིགས་དབྱེ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="777"/>
|
||||
<source>Name</source>
|
||||
<translation>མིང་།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="780"/>
|
||||
<source>Open</source>
|
||||
<translation>སྒོ་ཕྱེ་བ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="781"/>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="790"/>
|
||||
<source>Cancel</source>
|
||||
<translation>ཕྱིར་འཐེན།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="785"/>
|
||||
<source>Save as</source>
|
||||
<translation>གྲོན་ཆུང་བྱ་རྒྱུ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="787"/>
|
||||
<source>New Folder</source>
|
||||
<translation>ཡིག་ཁུག་གསར་འཛུགས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="789"/>
|
||||
<source>Save</source>
|
||||
<translation>གྲོན་ཆུང་བྱེད་དགོས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="824"/>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="826"/>
|
||||
<source>Directories</source>
|
||||
<translation>དཀར་ཆག</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1010"/>
|
||||
<source>Warning</source>
|
||||
<translation>ཐ་ཚིག་སྒྲོག་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1010"/>
|
||||
<source>exist, are you sure replace?</source>
|
||||
<translation>གནས་ཡོད་པས། ཁྱོད་ཀྱིས་དངོས་གནས་ཚབ་བྱེད་ཐུབ་བམ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1013"/>
|
||||
<source>ok</source>
|
||||
<translation>འགྲིགས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1022"/>
|
||||
<source>no</source>
|
||||
<translation>མིན།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1452"/>
|
||||
<source>NewFolder</source>
|
||||
<translation>དཀར་ཆག་གསར་བ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1601"/>
|
||||
<source>Undo</source>
|
||||
<translation>ཁ་ཕྱིར་འཐེན་བྱ་དགོས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1608"/>
|
||||
<source>Redo</source>
|
||||
<translation>ཡང་བསྐྱར་ཐེངས་གཅིག་ལ་བསྐྱར</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1805"/>
|
||||
<source>warn</source>
|
||||
<translation>ཉེན་བརྡ་བཏང་བ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1805"/>
|
||||
<source>This operation is not supported.</source>
|
||||
<translation>གཤགས་བཅོས་འདི་ལ་རྒྱབ་སྐྱོར་མི་བྱེད།</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KyFileDialogHelper</name>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1924"/>
|
||||
<source>Open File</source>
|
||||
<translation>ཁ་ཕྱེ་བའི་ཡིག་ཆ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1925"/>
|
||||
<source>Save File</source>
|
||||
<translation>ཡིག་ཆ་ཉར་ཚགས་བྱེད་པ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1938"/>
|
||||
<source>All Files (*)</source>
|
||||
<translation>ཡིག་ཆ་ཡོད་ཚད་(*)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>MainWindow</source>
|
||||
<translation>MainWindow</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test open</source>
|
||||
<translation>ཚད་ལེན་ཚོད་ལྟ་བྱས་ནས</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>directory</source>
|
||||
<translation>དཀར་ཆག</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>selected uri</source>
|
||||
<translation>བདམས་ཟིན་པའི་uri</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test show</source>
|
||||
<translation>ཚད་ལེན་ཚོད་ལྟའི་ལེ་ཚན</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test exec</source>
|
||||
<translation>ཚད་ལེན་ཚོད་ལྟ་ཁང་།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test save</source>
|
||||
<translation>ཚོད་ལྟའི་གྲོན་ཆུང་།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test static open</source>
|
||||
<translation>ཚོད་ལྟའི་ལྷིང་འཇགས་ཀྱི་ཁ་ཕྱེ་བ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>PushButton</source>
|
||||
<translation>མཐེབ་གནོན་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>use auto highlight icon</source>
|
||||
<translation>རང་འགུལ་གྱིས་བཀྲག་མདངས་འཚེར་བའི་མཚོན་རྟགས</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>...</source>
|
||||
<translation>...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>highlightOnly</source>
|
||||
<translation>བཀྲག་མདངས་འཚེརས་ཞིག</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>bothDefaultAndHighlight</source>
|
||||
<translation>ཕྱོགས་གཉིས་ཀས་ཉེན་འགོག་འགན་ལེན་གྱི་འོད་ཟེར་འཕྲོ་བཞིན་ཡོད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>RadioButton</source>
|
||||
<translation>ཀུན་ཁྱབ་རླུང་འཕྲིན་ལས་ཁུངས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>style</source>
|
||||
<translation>ཉམས་འགྱུར།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>icon</source>
|
||||
<translation>icon</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>menu opacity</source>
|
||||
<translation>ཟས་ཐོའི་སྟེང་གི་གོ་མི་ཆོད་པའི་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>font</source>
|
||||
<translation>ཡིག་གཟུགས་</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QApplication</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.h" line="190"/>
|
||||
<source>Executable '%1' requires Qt %2, found Qt %3.</source>
|
||||
<translation>ལག་བསྟར་བྱེད་ཆོག་པའི་'%1'ལ་Qt %2,Qt%3རྙེད་པ་རེད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/message-box.h" line="192"/>
|
||||
<source>Incompatible Qt Library Error</source>
|
||||
<translation>ཕན་ཚུན་མཐུན་ཐབས་མེད་པའི་Qt དཔེ་མཛོད་ཁང་གི་ནོར་འཁྲུལ།</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QDialogButtonBox</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="405"/>
|
||||
<location filename="../widget/message-box.cpp" line="1075"/>
|
||||
<source>OK</source>
|
||||
<translation>འགྲིགས།</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QMessageBox</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="461"/>
|
||||
<location filename="../widget/message-box.cpp" line="866"/>
|
||||
<location filename="../widget/message-box.cpp" line="1376"/>
|
||||
<source>Show Details...</source>
|
||||
<translation>ཞིབ་ཕྲའི་གནས་ཚུལ་གསལ་བཤད་བྱ་དགོས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="866"/>
|
||||
<location filename="../widget/message-box.cpp" line="1376"/>
|
||||
<source>Hide Details...</source>
|
||||
<translation>གནས་ཚུལ་ཞིབ་ཕྲ་སྦས་སྐུང་བྱེད་</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="19"/>
|
||||
<source>File Name</source>
|
||||
<translation>ཡིག་ཆའི་མིང་།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="23"/>
|
||||
<source>Modified Date</source>
|
||||
<translation>བཟོ་བཅོས་བརྒྱབ་པའི་དུས་ཚོད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="27"/>
|
||||
<source>File Type</source>
|
||||
<translation>ཡིག་ཆའི་རིགས་གྲས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="31"/>
|
||||
<source>File Size</source>
|
||||
<translation>ཡིག་ཆའི་ཆེ་ཆུང་།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="35"/>
|
||||
<source>Original Path</source>
|
||||
<translation>ཐོག་མའི་འགྲོ་ལམ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="44"/>
|
||||
<source>Descending</source>
|
||||
<translation>མར་འབབ་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="49"/>
|
||||
<source>Ascending</source>
|
||||
<translation>རིམ་པ་ཇེ་མང་དུ་འགྲོ་བཞིན</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="55"/>
|
||||
<source>Use global sorting</source>
|
||||
<translation>གོ་ལ་ཧྲིལ་པོའི་རིགས་འབྱེད་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="75"/>
|
||||
<source>List View</source>
|
||||
<translation>མིང་ཐོའི་ལྟ་ཚུལ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="76"/>
|
||||
<source>Icon View</source>
|
||||
<translation>མཚོན་རྟགས་ལྟ་ཚུལ།</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name>
|
||||
<message>
|
||||
<location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="49"/>
|
||||
<source>Default Slide</source>
|
||||
<translation>ཁ་ཆད་བཞག་པའི་སྒྲོན་བརྙན</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/>
|
||||
<source>Let tab widget switch with a slide animation.</source>
|
||||
<translation>སྒྲོན་བརྙན་གྱི་འགུལ་རིས་ལ་བརྟེན་ནས་ཤོག་བྱང་ཆུང་ཆུང་བརྗེ་རེས་བྱེད་དུ་འཇུག་དགོས།</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
|
@ -0,0 +1,339 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="cs">
|
||||
<context>
|
||||
<name>KyNativeFileDialog</name>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="146"/>
|
||||
<source>Go Back</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="153"/>
|
||||
<source>Go Forward</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="159"/>
|
||||
<source>Cd Up</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="166"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="174"/>
|
||||
<source>View Type</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="184"/>
|
||||
<source>Sort Type</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="777"/>
|
||||
<source>Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="780"/>
|
||||
<source>Open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="781"/>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="790"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="785"/>
|
||||
<source>Save as</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="787"/>
|
||||
<source>New Folder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="789"/>
|
||||
<source>Save</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="824"/>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="826"/>
|
||||
<source>Directories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1010"/>
|
||||
<source>Warning</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1010"/>
|
||||
<source>exist, are you sure replace?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1013"/>
|
||||
<source>ok</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1022"/>
|
||||
<source>no</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1452"/>
|
||||
<source>NewFolder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1601"/>
|
||||
<source>Undo</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1608"/>
|
||||
<source>Redo</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1805"/>
|
||||
<source>warn</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1805"/>
|
||||
<source>This operation is not supported.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KyFileDialogHelper</name>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1924"/>
|
||||
<source>Open File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1925"/>
|
||||
<source>Save File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1938"/>
|
||||
<source>All Files (*)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>MainWindow</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>directory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>selected uri</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test show</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test exec</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test save</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test static open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>PushButton</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>use auto highlight icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>highlightOnly</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>bothDefaultAndHighlight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>RadioButton</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>style</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>menu opacity</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>font</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QApplication</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.h" line="190"/>
|
||||
<source>Executable '%1' requires Qt %2, found Qt %3.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/message-box.h" line="192"/>
|
||||
<source>Incompatible Qt Library Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QDialogButtonBox</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="405"/>
|
||||
<location filename="../widget/message-box.cpp" line="1075"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QMessageBox</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="461"/>
|
||||
<location filename="../widget/message-box.cpp" line="866"/>
|
||||
<location filename="../widget/message-box.cpp" line="1376"/>
|
||||
<source>Show Details...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="866"/>
|
||||
<location filename="../widget/message-box.cpp" line="1376"/>
|
||||
<source>Hide Details...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="19"/>
|
||||
<source>File Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="23"/>
|
||||
<source>Modified Date</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="27"/>
|
||||
<source>File Type</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="31"/>
|
||||
<source>File Size</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="35"/>
|
||||
<source>Original Path</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="44"/>
|
||||
<source>Descending</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="49"/>
|
||||
<source>Ascending</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="55"/>
|
||||
<source>Use global sorting</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="75"/>
|
||||
<source>List View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="76"/>
|
||||
<source>Icon View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name>
|
||||
<message>
|
||||
<location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="49"/>
|
||||
<source>Default Slide</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/>
|
||||
<source>Let tab widget switch with a slide animation.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
|
@ -0,0 +1,339 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="en_US">
|
||||
<context>
|
||||
<name>KyNativeFileDialog</name>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="146"/>
|
||||
<source>Go Back</source>
|
||||
<translation>Go Back</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="153"/>
|
||||
<source>Go Forward</source>
|
||||
<translation>Go Forward</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="159"/>
|
||||
<source>Cd Up</source>
|
||||
<translation>Cd Up</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="166"/>
|
||||
<source>Search</source>
|
||||
<translation>Search</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="174"/>
|
||||
<source>View Type</source>
|
||||
<translation>View Type</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="184"/>
|
||||
<source>Sort Type</source>
|
||||
<translation>Sort Type</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="777"/>
|
||||
<source>Name</source>
|
||||
<translation>Name</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="780"/>
|
||||
<source>Open</source>
|
||||
<translation>Open</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="781"/>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="790"/>
|
||||
<source>Cancel</source>
|
||||
<translation>Cancel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="785"/>
|
||||
<source>Save as</source>
|
||||
<translation>Save as</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="787"/>
|
||||
<source>New Folder</source>
|
||||
<translation>New Folder</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="789"/>
|
||||
<source>Save</source>
|
||||
<translation>Save</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="824"/>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="826"/>
|
||||
<source>Directories</source>
|
||||
<translation>Directories</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1010"/>
|
||||
<source>Warning</source>
|
||||
<translation>Warning</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1010"/>
|
||||
<source>exist, are you sure replace?</source>
|
||||
<translation>exist, are you sure replace?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1013"/>
|
||||
<source>ok</source>
|
||||
<translation>ok</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1022"/>
|
||||
<source>no</source>
|
||||
<translation>no</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1452"/>
|
||||
<source>NewFolder</source>
|
||||
<translation>NewFolder</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1601"/>
|
||||
<source>Undo</source>
|
||||
<translation>Undo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1608"/>
|
||||
<source>Redo</source>
|
||||
<translation>Redo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1805"/>
|
||||
<source>warn</source>
|
||||
<translation>warn</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1805"/>
|
||||
<source>This operation is not supported.</source>
|
||||
<translation>This operation is not supported.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KyFileDialogHelper</name>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1924"/>
|
||||
<source>Open File</source>
|
||||
<translation>Open File</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1925"/>
|
||||
<source>Save File</source>
|
||||
<translation>Save File</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1938"/>
|
||||
<source>All Files (*)</source>
|
||||
<translation>All Files (*)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>MainWindow</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>directory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>selected uri</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test show</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test exec</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test save</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test static open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>PushButton</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>use auto highlight icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>highlightOnly</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>bothDefaultAndHighlight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>RadioButton</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>style</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>menu opacity</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>font</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QApplication</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.h" line="190"/>
|
||||
<source>Executable '%1' requires Qt %2, found Qt %3.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/message-box.h" line="192"/>
|
||||
<source>Incompatible Qt Library Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QDialogButtonBox</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="405"/>
|
||||
<location filename="../widget/message-box.cpp" line="1075"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QMessageBox</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="461"/>
|
||||
<location filename="../widget/message-box.cpp" line="866"/>
|
||||
<location filename="../widget/message-box.cpp" line="1376"/>
|
||||
<source>Show Details...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="866"/>
|
||||
<location filename="../widget/message-box.cpp" line="1376"/>
|
||||
<source>Hide Details...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="19"/>
|
||||
<source>File Name</source>
|
||||
<translation>File Name</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="23"/>
|
||||
<source>Modified Date</source>
|
||||
<translation>Modified Date</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="27"/>
|
||||
<source>File Type</source>
|
||||
<translation>File Type</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="31"/>
|
||||
<source>File Size</source>
|
||||
<translation>File Size</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="35"/>
|
||||
<source>Original Path</source>
|
||||
<translation>Original Path</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="44"/>
|
||||
<source>Descending</source>
|
||||
<translation>Descending</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="49"/>
|
||||
<source>Ascending</source>
|
||||
<translation>Ascending</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="55"/>
|
||||
<source>Use global sorting</source>
|
||||
<translation>Use global sorting</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="75"/>
|
||||
<source>List View</source>
|
||||
<translation>List View</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="76"/>
|
||||
<source>Icon View</source>
|
||||
<translation>Icon View</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name>
|
||||
<message>
|
||||
<location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="49"/>
|
||||
<source>Default Slide</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/>
|
||||
<source>Let tab widget switch with a slide animation.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
|
@ -0,0 +1,339 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="fa">
|
||||
<context>
|
||||
<name>KyNativeFileDialog</name>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="146"/>
|
||||
<source>Go Back</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="153"/>
|
||||
<source>Go Forward</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="159"/>
|
||||
<source>Cd Up</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="166"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="174"/>
|
||||
<source>View Type</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="184"/>
|
||||
<source>Sort Type</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="777"/>
|
||||
<source>Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="780"/>
|
||||
<source>Open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="781"/>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="790"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="785"/>
|
||||
<source>Save as</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="787"/>
|
||||
<source>New Folder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="789"/>
|
||||
<source>Save</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="824"/>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="826"/>
|
||||
<source>Directories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1010"/>
|
||||
<source>Warning</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1010"/>
|
||||
<source>exist, are you sure replace?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1013"/>
|
||||
<source>ok</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1022"/>
|
||||
<source>no</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1452"/>
|
||||
<source>NewFolder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1601"/>
|
||||
<source>Undo</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1608"/>
|
||||
<source>Redo</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1805"/>
|
||||
<source>warn</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1805"/>
|
||||
<source>This operation is not supported.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KyFileDialogHelper</name>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1924"/>
|
||||
<source>Open File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1925"/>
|
||||
<source>Save File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1938"/>
|
||||
<source>All Files (*)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>MainWindow</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>directory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>selected uri</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test show</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test exec</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test save</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test static open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>PushButton</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>use auto highlight icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>highlightOnly</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>bothDefaultAndHighlight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>RadioButton</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>style</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>menu opacity</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>font</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QApplication</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.h" line="190"/>
|
||||
<source>Executable '%1' requires Qt %2, found Qt %3.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/message-box.h" line="192"/>
|
||||
<source>Incompatible Qt Library Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QDialogButtonBox</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="405"/>
|
||||
<location filename="../widget/message-box.cpp" line="1075"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QMessageBox</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="461"/>
|
||||
<location filename="../widget/message-box.cpp" line="866"/>
|
||||
<location filename="../widget/message-box.cpp" line="1376"/>
|
||||
<source>Show Details...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="866"/>
|
||||
<location filename="../widget/message-box.cpp" line="1376"/>
|
||||
<source>Hide Details...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="19"/>
|
||||
<source>File Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="23"/>
|
||||
<source>Modified Date</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="27"/>
|
||||
<source>File Type</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="31"/>
|
||||
<source>File Size</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="35"/>
|
||||
<source>Original Path</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="44"/>
|
||||
<source>Descending</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="49"/>
|
||||
<source>Ascending</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="55"/>
|
||||
<source>Use global sorting</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="75"/>
|
||||
<source>List View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="76"/>
|
||||
<source>Icon View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name>
|
||||
<message>
|
||||
<location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="49"/>
|
||||
<source>Default Slide</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/>
|
||||
<source>Let tab widget switch with a slide animation.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
|
@ -0,0 +1,339 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="fr">
|
||||
<context>
|
||||
<name>KyNativeFileDialog</name>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="146"/>
|
||||
<source>Go Back</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="153"/>
|
||||
<source>Go Forward</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="159"/>
|
||||
<source>Cd Up</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="166"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="174"/>
|
||||
<source>View Type</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="184"/>
|
||||
<source>Sort Type</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="777"/>
|
||||
<source>Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="780"/>
|
||||
<source>Open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="781"/>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="790"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="785"/>
|
||||
<source>Save as</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="787"/>
|
||||
<source>New Folder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="789"/>
|
||||
<source>Save</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="824"/>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="826"/>
|
||||
<source>Directories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1010"/>
|
||||
<source>Warning</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1010"/>
|
||||
<source>exist, are you sure replace?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1013"/>
|
||||
<source>ok</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1022"/>
|
||||
<source>no</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1452"/>
|
||||
<source>NewFolder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1601"/>
|
||||
<source>Undo</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1608"/>
|
||||
<source>Redo</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1805"/>
|
||||
<source>warn</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1805"/>
|
||||
<source>This operation is not supported.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KyFileDialogHelper</name>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1924"/>
|
||||
<source>Open File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1925"/>
|
||||
<source>Save File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1938"/>
|
||||
<source>All Files (*)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>MainWindow</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>directory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>selected uri</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test show</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test exec</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test save</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test static open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>PushButton</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>use auto highlight icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>highlightOnly</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>bothDefaultAndHighlight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>RadioButton</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>style</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>menu opacity</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>font</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QApplication</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.h" line="190"/>
|
||||
<source>Executable '%1' requires Qt %2, found Qt %3.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/message-box.h" line="192"/>
|
||||
<source>Incompatible Qt Library Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QDialogButtonBox</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="405"/>
|
||||
<location filename="../widget/message-box.cpp" line="1075"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QMessageBox</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="461"/>
|
||||
<location filename="../widget/message-box.cpp" line="866"/>
|
||||
<location filename="../widget/message-box.cpp" line="1376"/>
|
||||
<source>Show Details...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="866"/>
|
||||
<location filename="../widget/message-box.cpp" line="1376"/>
|
||||
<source>Hide Details...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="19"/>
|
||||
<source>File Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="23"/>
|
||||
<source>Modified Date</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="27"/>
|
||||
<source>File Type</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="31"/>
|
||||
<source>File Size</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="35"/>
|
||||
<source>Original Path</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="44"/>
|
||||
<source>Descending</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="49"/>
|
||||
<source>Ascending</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="55"/>
|
||||
<source>Use global sorting</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="75"/>
|
||||
<source>List View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="76"/>
|
||||
<source>Icon View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name>
|
||||
<message>
|
||||
<location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="49"/>
|
||||
<source>Default Slide</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/>
|
||||
<source>Let tab widget switch with a slide animation.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
|
@ -0,0 +1,339 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="tr">
|
||||
<context>
|
||||
<name>KyNativeFileDialog</name>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="146"/>
|
||||
<source>Go Back</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="153"/>
|
||||
<source>Go Forward</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="159"/>
|
||||
<source>Cd Up</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="166"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="174"/>
|
||||
<source>View Type</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="184"/>
|
||||
<source>Sort Type</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="777"/>
|
||||
<source>Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="780"/>
|
||||
<source>Open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="781"/>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="790"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="785"/>
|
||||
<source>Save as</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="787"/>
|
||||
<source>New Folder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="789"/>
|
||||
<source>Save</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="824"/>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="826"/>
|
||||
<source>Directories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1010"/>
|
||||
<source>Warning</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1010"/>
|
||||
<source>exist, are you sure replace?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1013"/>
|
||||
<source>ok</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1022"/>
|
||||
<source>no</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1452"/>
|
||||
<source>NewFolder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1601"/>
|
||||
<source>Undo</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1608"/>
|
||||
<source>Redo</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1805"/>
|
||||
<source>warn</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1805"/>
|
||||
<source>This operation is not supported.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KyFileDialogHelper</name>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1924"/>
|
||||
<source>Open File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1925"/>
|
||||
<source>Save File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1938"/>
|
||||
<source>All Files (*)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>MainWindow</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>directory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>selected uri</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test show</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test exec</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test save</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test static open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>PushButton</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>use auto highlight icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>highlightOnly</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>bothDefaultAndHighlight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>RadioButton</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>style</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>menu opacity</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>font</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QApplication</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.h" line="190"/>
|
||||
<source>Executable '%1' requires Qt %2, found Qt %3.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/message-box.h" line="192"/>
|
||||
<source>Incompatible Qt Library Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QDialogButtonBox</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="405"/>
|
||||
<location filename="../widget/message-box.cpp" line="1075"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QMessageBox</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="461"/>
|
||||
<location filename="../widget/message-box.cpp" line="866"/>
|
||||
<location filename="../widget/message-box.cpp" line="1376"/>
|
||||
<source>Show Details...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="866"/>
|
||||
<location filename="../widget/message-box.cpp" line="1376"/>
|
||||
<source>Hide Details...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="19"/>
|
||||
<source>File Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="23"/>
|
||||
<source>Modified Date</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="27"/>
|
||||
<source>File Type</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="31"/>
|
||||
<source>File Size</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="35"/>
|
||||
<source>Original Path</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="44"/>
|
||||
<source>Descending</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="49"/>
|
||||
<source>Ascending</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="55"/>
|
||||
<source>Use global sorting</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="75"/>
|
||||
<source>List View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="76"/>
|
||||
<source>Icon View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name>
|
||||
<message>
|
||||
<location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="49"/>
|
||||
<source>Default Slide</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/>
|
||||
<source>Let tab widget switch with a slide animation.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
|
@ -0,0 +1,339 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="zh_CN">
|
||||
<context>
|
||||
<name>KyNativeFileDialog</name>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="146"/>
|
||||
<source>Go Back</source>
|
||||
<translation>后退</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="153"/>
|
||||
<source>Go Forward</source>
|
||||
<translation>前进</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="159"/>
|
||||
<source>Cd Up</source>
|
||||
<translation>向上</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="166"/>
|
||||
<source>Search</source>
|
||||
<translation>搜索</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="174"/>
|
||||
<source>View Type</source>
|
||||
<translation>视图类型</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="184"/>
|
||||
<source>Sort Type</source>
|
||||
<translation>排序类型</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="777"/>
|
||||
<source>Name</source>
|
||||
<translation>文件名</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="780"/>
|
||||
<source>Open</source>
|
||||
<translation>打开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="781"/>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="790"/>
|
||||
<source>Cancel</source>
|
||||
<translation>取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="785"/>
|
||||
<source>Save as</source>
|
||||
<translation>另存为</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="787"/>
|
||||
<source>New Folder</source>
|
||||
<translation>新建文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="789"/>
|
||||
<source>Save</source>
|
||||
<translation>保存</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="824"/>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="826"/>
|
||||
<source>Directories</source>
|
||||
<translation>目录</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1010"/>
|
||||
<source>Warning</source>
|
||||
<translation>警告</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1010"/>
|
||||
<source>exist, are you sure replace?</source>
|
||||
<translation>已存在,是否替换?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1013"/>
|
||||
<source>ok</source>
|
||||
<translation>确定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1022"/>
|
||||
<source>no</source>
|
||||
<translation>取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1452"/>
|
||||
<source>NewFolder</source>
|
||||
<translation>新建文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1601"/>
|
||||
<source>Undo</source>
|
||||
<translation>撤销</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1608"/>
|
||||
<source>Redo</source>
|
||||
<translation>重做</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1805"/>
|
||||
<source>warn</source>
|
||||
<translation>警告</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1805"/>
|
||||
<source>This operation is not supported.</source>
|
||||
<translation>不支持此操作。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KyFileDialogHelper</name>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1924"/>
|
||||
<source>Open File</source>
|
||||
<translation>打开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1925"/>
|
||||
<source>Save File</source>
|
||||
<translation>保存</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/kyfiledialog.cpp" line="1938"/>
|
||||
<source>All Files (*)</source>
|
||||
<translation>所有(*)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>MainWindow</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>directory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>selected uri</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test show</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test exec</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test save</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/filedialog/mainwindow.ui"/>
|
||||
<source>test static open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>PushButton</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>use auto highlight icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>highlightOnly</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/highlighted-icon-button/mainwindow.ui"/>
|
||||
<source>bothDefaultAndHighlight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/mps-style-application/mainwindow.ui"/>
|
||||
<source>RadioButton</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>style</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>menu opacity</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../test/system-settings/mainwindow.ui"/>
|
||||
<source>font</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QApplication</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.h" line="190"/>
|
||||
<source>Executable '%1' requires Qt %2, found Qt %3.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/message-box.h" line="192"/>
|
||||
<source>Incompatible Qt Library Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QDialogButtonBox</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="405"/>
|
||||
<location filename="../widget/message-box.cpp" line="1075"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QMessageBox</name>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="461"/>
|
||||
<location filename="../widget/message-box.cpp" line="866"/>
|
||||
<location filename="../widget/message-box.cpp" line="1376"/>
|
||||
<source>Show Details...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/message-box.cpp" line="866"/>
|
||||
<location filename="../widget/message-box.cpp" line="1376"/>
|
||||
<source>Hide Details...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="19"/>
|
||||
<source>File Name</source>
|
||||
<translation>文件名称</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="23"/>
|
||||
<source>Modified Date</source>
|
||||
<translation>修改日期</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="27"/>
|
||||
<source>File Type</source>
|
||||
<translation>文件类型</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="31"/>
|
||||
<source>File Size</source>
|
||||
<translation>文件大小</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="35"/>
|
||||
<source>Original Path</source>
|
||||
<translation>原始路径</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="44"/>
|
||||
<source>Descending</source>
|
||||
<translation>降序</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="49"/>
|
||||
<source>Ascending</source>
|
||||
<translation>升序</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="55"/>
|
||||
<source>Use global sorting</source>
|
||||
<translation>使用全局排序</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="75"/>
|
||||
<source>List View</source>
|
||||
<translation>列表视图</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/ui_kyfiledialog.cpp" line="76"/>
|
||||
<source>Icon View</source>
|
||||
<translation>图标视图</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name>
|
||||
<message>
|
||||
<location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="49"/>
|
||||
<source>Default Slide</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/>
|
||||
<source>Let tab widget switch with a slide animation.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
|
@ -0,0 +1,36 @@
|
|||
#ifndef PDEBUG_H
|
||||
#define PDEBUG_H
|
||||
#include <QDebug>
|
||||
|
||||
//#ifndef UseNativeFileDialog
|
||||
//#define UseNativeFileDialog
|
||||
//#endif
|
||||
|
||||
class NullDebug
|
||||
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
template<typename T>
|
||||
|
||||
NullDebug & operator <<(const T&){return *this;}
|
||||
|
||||
};
|
||||
|
||||
inline NullDebug nullDebug(){return NullDebug();}
|
||||
|
||||
|
||||
#define LOG_TIMI
|
||||
|
||||
#ifdef LOG_TIMI
|
||||
|
||||
# define pDebug qDebug()<< "platformtheme input:"
|
||||
|
||||
#else
|
||||
|
||||
# define pDebug nullDebug()
|
||||
|
||||
#endif
|
||||
|
||||
#endif // KYFILEDIALOG_H
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,260 @@
|
|||
#include "debug.h"
|
||||
#ifdef UseNativeFileDialog
|
||||
#ifndef KYNATIVEFILEDIALOG_H
|
||||
#define KYNATIVEFILEDIALOG_H
|
||||
#include <QDialog>
|
||||
#include <QDir>
|
||||
#include <QFileDialog>
|
||||
#include <QFileSystemModel>
|
||||
#include <QCompleter>
|
||||
#include <QListView>
|
||||
#include "qpa/qplatformdialoghelper.h"
|
||||
#include <peony-qt/FMWindowIface.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui { class KyNativeFileDialog; }
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Peony {
|
||||
class DirectoryViewContainer;
|
||||
class DirectoryViewWidget;
|
||||
class FMWindowIface;
|
||||
}
|
||||
class Ui_KyFileDialog;
|
||||
class FileDialogSideBar;
|
||||
class FileDialogPathBar;
|
||||
class KyNativeFileDialogPrivate;
|
||||
class KyFileDialogHelper;
|
||||
|
||||
class KyNativeFileDialog : public QDialog, public Peony::FMWindowIface
|
||||
{
|
||||
Q_OBJECT
|
||||
friend class KyFileDialogHelper;
|
||||
|
||||
public:
|
||||
enum ViewMode { List, Icon };
|
||||
KyNativeFileDialog(QWidget *parent = nullptr);
|
||||
~KyNativeFileDialog();
|
||||
|
||||
Peony::FMWindowIface *create(const QString &uri);
|
||||
Peony::FMWindowIface *create(const QStringList &uris);
|
||||
|
||||
|
||||
const QString getCurrentUri();
|
||||
const QStringList getCurrentSelections();
|
||||
const QStringList getCurrentAllFileUris();
|
||||
const QStringList getCurrentSelectionsList();
|
||||
const QList<std::shared_ptr<Peony::FileInfo>> getCurrentSelectionFileInfos();
|
||||
|
||||
Qt::SortOrder getCurrentSortOrder();
|
||||
int getCurrentSortColumn();
|
||||
|
||||
bool getWindowShowHidden();
|
||||
bool getWindowUseDefaultNameSortOrder();
|
||||
bool getWindowSortFolderFirst();
|
||||
|
||||
void refresh();
|
||||
void forceStopLoading();
|
||||
|
||||
void setShowHidden(bool showHidden);
|
||||
void setUseDefaultNameSortOrder(bool use);
|
||||
void setSortFolderFirst(bool set);
|
||||
|
||||
void setCurrentSelectionUris(const QStringList &uris);
|
||||
void setCurrentSortOrder (Qt::SortOrder order);
|
||||
void setCurrentSortColumn (int sortColumn);
|
||||
|
||||
void editUri(const QString &uri);
|
||||
void editUris(const QStringList &uris);
|
||||
|
||||
bool getFilterWorking();
|
||||
|
||||
void beginSwitchView(const QString &viewId);
|
||||
|
||||
|
||||
void setDirectory(const QString &directory);
|
||||
void setDirectory(const QDir &directory);
|
||||
QDir directory() const;
|
||||
|
||||
void selectFile(const QString &filename);
|
||||
QStringList selectedFiles() const;
|
||||
|
||||
void setDirectoryUrl(const QUrl &directory);
|
||||
QUrl directoryUrl() const;
|
||||
|
||||
void selectUrl(const QUrl &url);
|
||||
QList<QUrl> selectedUrls() const;
|
||||
|
||||
void setNameFilterDetailsVisible(bool enabled);
|
||||
bool isNameFilterDetailsVisible() const;
|
||||
|
||||
void setNameFilter(const QString &filter);
|
||||
void setNameFilters(const QStringList &filters);
|
||||
QStringList nameFilters() const;
|
||||
void selectNameFilter(const QString &filter);
|
||||
QString selectedMimeTypeFilter() const;
|
||||
QString selectedNameFilter() const;
|
||||
void selectNameFilterByIndex(int index);
|
||||
void selectNameFilterCurrentIndex(int index);
|
||||
int selectNameFilterIndex() const;
|
||||
|
||||
QDir::Filters filter();
|
||||
void setFilter(QDir::Filters filters);
|
||||
|
||||
void setViewMode(ViewMode mode);
|
||||
ViewMode viewMode() const;
|
||||
|
||||
void setFileMode(QFileDialog::FileMode mode);
|
||||
QFileDialog::FileMode fileMode();
|
||||
|
||||
void setAcceptMode(QFileDialog::AcceptMode mode);
|
||||
QFileDialog::AcceptMode acceptMode() const;
|
||||
|
||||
void setLabelText(QFileDialog::DialogLabel label, const QString &text);
|
||||
QString labelText(QFileDialog::DialogLabel label) const;
|
||||
|
||||
void setOptions(QFileDialog::Options options);
|
||||
void setOption(QFileDialog::Option option, bool on = true);
|
||||
bool testOption(QFileDialog::Option option) const;
|
||||
QFileDialog::Options options() const;
|
||||
void setCurrentInputName(const QString &name);
|
||||
Peony::DirectoryViewContainer *getCurrentPage();
|
||||
Peony::DirectoryViewContainer *getCurrentPage() const;
|
||||
|
||||
Peony::DirectoryViewWidget *containerView() const;
|
||||
|
||||
void setComBoxItems(const QStringList &filters);
|
||||
|
||||
bool isDir(QString path);
|
||||
|
||||
void updateMaximizeState();
|
||||
|
||||
void intiContainerSort();
|
||||
|
||||
void refreshContainerSort();
|
||||
|
||||
bool doSave(QStringList sFiles);
|
||||
|
||||
bool doOpen(QStringList sFiles);
|
||||
|
||||
bool saveMessageBox(QString name);
|
||||
|
||||
void setHelper(KyFileDialogHelper* helepr);
|
||||
|
||||
void setShortCuts();
|
||||
|
||||
void initialViewId();
|
||||
|
||||
|
||||
Q_SIGNALS:
|
||||
void switchViewRequest(const QString &viewId);
|
||||
|
||||
void fileSelected(const QUrl &file);
|
||||
void filesSelected(const QList<QUrl> &files);
|
||||
void currentChanged(const QUrl &path);
|
||||
void directoryEntered(const QUrl &directory);
|
||||
void selectedNameFilterChanged();
|
||||
void filterSelected(const QString &filter);
|
||||
void locationChangeEnd();
|
||||
|
||||
public Q_SLOTS:
|
||||
void goToUri(const QString &uri, bool addToHistory = true, bool forceUpdate = false);
|
||||
void goBack();
|
||||
void goForward();
|
||||
void goToParent();
|
||||
void onSwitchView();
|
||||
void updateWindowState();
|
||||
QString selectName();
|
||||
void updateStatusBar();
|
||||
void delayShow();
|
||||
void discardDelayedShow();
|
||||
void onNewFolder();
|
||||
void setSortType();
|
||||
void searchButtonClicked();
|
||||
void setSearchMode(bool mode);
|
||||
void lineEditTextChange(QString text);
|
||||
void containerMenuRequest(const QPoint &pos);
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
|
||||
private:
|
||||
Ui_KyFileDialog *mKyFileDialogUi;
|
||||
KyNativeFileDialog *mKyFileDialog;
|
||||
QScopedPointer<KyNativeFileDialogPrivate> d_ptr;
|
||||
Q_DECLARE_PRIVATE_D(qGetPtrHelper(d_ptr), KyNativeFileDialog)
|
||||
void onAcceptButtonClicked();
|
||||
void onRejectButtonClicked();
|
||||
void onCurrentInputNameChanged();
|
||||
void handleEnterPressed();
|
||||
void updateAcceptButtonState();
|
||||
|
||||
private:
|
||||
bool m_searchMode = false;
|
||||
// QFileSystemModel *m_fileSystemModel = nullptr;
|
||||
QCompleter * m_completer = nullptr;
|
||||
QListView *m_listView = nullptr;
|
||||
QStringList m_CurrentPathAllFiles;
|
||||
KyFileDialogHelper *m_fileDialogHelper = nullptr;
|
||||
bool isInitialGoToUriNum = true;
|
||||
bool m_shortcutsSet = false;
|
||||
QString m_lastSearchPath;
|
||||
bool m_isClearSearchKey = false;
|
||||
};
|
||||
|
||||
class KyFileDialogHelper : public QPlatformFileDialogHelper
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit KyFileDialogHelper();
|
||||
|
||||
~KyFileDialogHelper() override;
|
||||
|
||||
|
||||
virtual void exec() override;
|
||||
virtual bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) override;
|
||||
virtual void hide() override;
|
||||
|
||||
virtual bool defaultNameFilterDisables() const override;
|
||||
virtual void setDirectory(const QUrl &directory) override;
|
||||
virtual QUrl directory() const override;
|
||||
virtual void selectFile(const QUrl &filename) override;
|
||||
virtual QList<QUrl> selectedFiles() const override;
|
||||
virtual void setFilter() override;
|
||||
virtual void selectNameFilter(const QString &filter) override;
|
||||
|
||||
virtual void selectMimeTypeFilter(const QString &filter) override;
|
||||
virtual QString selectedNameFilter() const override;
|
||||
virtual QString selectedMimeTypeFilter() const override;
|
||||
|
||||
virtual bool isSupportedUrl(const QUrl &url) const override;
|
||||
|
||||
bool isViewInitialFinished();
|
||||
|
||||
bool isShow();
|
||||
|
||||
public Q_SLOTS:
|
||||
void viewInitialFinished();
|
||||
Q_SIGNALS:
|
||||
void fileSelected(const QUrl &file);
|
||||
void filesSelected(const QList<QUrl> &files);
|
||||
void currentChanged(const QUrl &path);
|
||||
void directoryEntered(const QUrl &directory);
|
||||
void filterSelected(const QString &filter);
|
||||
|
||||
|
||||
private:
|
||||
KyNativeFileDialog* mKyFileDialog = nullptr;
|
||||
QUrl m_selectedFiles;
|
||||
bool m_viewInitialFinished = false;
|
||||
bool m_isShow = false;
|
||||
|
||||
private:
|
||||
void initDialog();
|
||||
};
|
||||
|
||||
|
||||
#endif // KYNATIVEFILEDIALOG_H
|
||||
#endif
|
|
@ -0,0 +1,60 @@
|
|||
#include "debug.h"
|
||||
#ifdef UseNativeFileDialog
|
||||
|
||||
#include "kyfiledialogprivate.h"
|
||||
#include <QFileDialog>
|
||||
#include <QTimer>
|
||||
#include <QLineEdit>
|
||||
#include "kyfiledialog.h"
|
||||
#include "ui_kyfiledialog.h"
|
||||
|
||||
KyNativeFileDialogPrivate::KyNativeFileDialogPrivate()
|
||||
{
|
||||
// Q_Q(KyNativeFileDialog);
|
||||
|
||||
m_timer = new QTimer;
|
||||
// m_container = q->m_container;
|
||||
}
|
||||
|
||||
QStringList KyNativeFileDialogPrivate::typedFiles()
|
||||
{
|
||||
/*
|
||||
Q_Q(KyNativeFileDialog);
|
||||
QStringList files;
|
||||
QString editText = q->mKyFileDialogUi->m_fileNameEdit->text();
|
||||
if (!editText.contains(QLatin1Char('"'))) {
|
||||
#ifdef Q_OS_UNIX
|
||||
const QString prefix = q->directory().absolutePath() + QDir::separator();
|
||||
if (QFile::exists(prefix + editText))
|
||||
files << editText;
|
||||
else
|
||||
files << qt_tildeExpansion(editText);
|
||||
#else
|
||||
files << editText;
|
||||
Q_UNUSED(q)
|
||||
#endif
|
||||
} else {
|
||||
// " is used to separate files like so: "file1" "file2" "file3" ...
|
||||
// ### need escape character for filenames with quotes (")
|
||||
QStringList tokens = editText.split(QLatin1Char('\"'));
|
||||
for (int i=0; i<tokens.size(); ++i) {
|
||||
if ((i % 2) == 0)
|
||||
continue; // Every even token is a separator
|
||||
#ifdef Q_OS_UNIX
|
||||
const QString token = tokens.at(i);
|
||||
const QString prefix = q->directory().absolutePath() + QDir::separator();
|
||||
if (QFile::exists(prefix + token))
|
||||
files << token;
|
||||
else
|
||||
files << qt_tildeExpansion(token);
|
||||
#else
|
||||
files << toInternal(tokens.at(i));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return addDefaultSuffixToFiles(files);
|
||||
|
||||
*/
|
||||
return QStringList();
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,81 @@
|
|||
#include "debug.h"
|
||||
#ifdef UseNativeFileDialog
|
||||
#ifndef KYNATIVEFILEDIALOGPRIVATE_H
|
||||
#define KYNATIVEFILEDIALOGPRIVATE_H
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QTimer>
|
||||
|
||||
namespace Peony {
|
||||
class DirectoryViewContainer;
|
||||
}
|
||||
class KyFileDialogHelper;
|
||||
class KyNativeFileDialogPrivate
|
||||
{
|
||||
friend class KyNativeFileDialog;
|
||||
private:
|
||||
KyNativeFileDialogPrivate();
|
||||
|
||||
QStringList typedFiles();
|
||||
|
||||
QStringList nameFilters;
|
||||
QFileDialog::AcceptMode acceptMode;
|
||||
QFileDialog::FileMode fileMode;
|
||||
QFileDialog::Options options;
|
||||
Peony::DirectoryViewContainer *m_container = nullptr;
|
||||
QString currentInputName;
|
||||
QTimer *m_timer = nullptr;
|
||||
QDir::Filters filters = QDir::AllEntries;
|
||||
};
|
||||
|
||||
#endif // KYNATIVEFILEDIALOGPRIVATE_H
|
||||
#endif
|
||||
/*
|
||||
KyNativeFileDialogPrivate::KyNativeFileDialogPrivate()
|
||||
{
|
||||
// Q_Q(KyNativeFileDialog);
|
||||
|
||||
m_timer = new QTimer;
|
||||
// m_container = q->m_container;
|
||||
}
|
||||
|
||||
QStringList KyNativeFileDialogPrivate::typedFiles() const
|
||||
{
|
||||
Q_Q(KyNativeFileDialog);
|
||||
QStringList files;
|
||||
QString editText = q->mk ->text();
|
||||
if (!editText.contains(QLatin1Char('"'))) {
|
||||
#ifdef Q_OS_UNIX
|
||||
const QString prefix = q->directory().absolutePath() + QDir::separator();
|
||||
if (QFile::exists(prefix + editText))
|
||||
files << editText;
|
||||
else
|
||||
files << qt_tildeExpansion(editText);
|
||||
#else
|
||||
files << editText;
|
||||
Q_UNUSED(q)
|
||||
#endif
|
||||
} else {
|
||||
// " is used to separate files like so: "file1" "file2" "file3" ...
|
||||
// ### need escape character for filenames with quotes (")
|
||||
QStringList tokens = editText.split(QLatin1Char('\"'));
|
||||
for (int i=0; i<tokens.size(); ++i) {
|
||||
if ((i % 2) == 0)
|
||||
continue; // Every even token is a separator
|
||||
#ifdef Q_OS_UNIX
|
||||
const QString token = tokens.at(i);
|
||||
const QString prefix = q->directory().absolutePath() + QDir::separator();
|
||||
if (QFile::exists(prefix + token))
|
||||
files << token;
|
||||
else
|
||||
files << qt_tildeExpansion(token);
|
||||
#else
|
||||
files << toInternal(tokens.at(i));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return addDefaultSuffixToFiles(files);
|
||||
|
||||
return QStringList();
|
||||
}
|
||||
*/
|
|
@ -0,0 +1,66 @@
|
|||
#include "debug.h"
|
||||
#ifdef UseNativeFileDialog
|
||||
|
||||
#include "menutoolbutoon.h"
|
||||
#include <QApplication>
|
||||
static ToolButtonStyle *global_instance = nullptr;
|
||||
|
||||
MenuToolButton::MenuToolButton(QWidget *parent) : QToolButton(parent)
|
||||
{
|
||||
setStyle(ToolButtonStyle::getStyle());
|
||||
}
|
||||
|
||||
ToolButtonStyle *ToolButtonStyle::getStyle()
|
||||
{
|
||||
if (!global_instance) {
|
||||
global_instance = new ToolButtonStyle;
|
||||
}
|
||||
return global_instance;
|
||||
}
|
||||
|
||||
int ToolButtonStyle::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, const QWidget *widget) const
|
||||
{
|
||||
if (qobject_cast<const QToolButton *>(widget))
|
||||
return 0;
|
||||
|
||||
switch (metric) {
|
||||
case PM_ToolBarIconSize:
|
||||
return 16;
|
||||
case PM_ToolBarSeparatorExtent:
|
||||
return 1;
|
||||
case PM_ToolBarItemSpacing: {
|
||||
return 1;
|
||||
}
|
||||
default:
|
||||
return QProxyStyle::pixelMetric(metric, option, widget);
|
||||
}
|
||||
}
|
||||
|
||||
void ToolButtonStyle::drawComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const
|
||||
{
|
||||
//This is a "lie". We want to use instant popup menu for tool button, and we aslo
|
||||
//want use popup menu style with this tool button, so we change the related flags
|
||||
//to draw in our expected.
|
||||
if (control == CC_ToolButton) {
|
||||
QStyleOptionToolButton button = *qstyleoption_cast<const QStyleOptionToolButton *>(option);
|
||||
if (button.features.testFlag(QStyleOptionToolButton::HasMenu)) {
|
||||
button.features = QStyleOptionToolButton::None;
|
||||
if (!widget->property("isOptionButton").toBool()) {
|
||||
button.features |= QStyleOptionToolButton::HasMenu;
|
||||
button.features |= QStyleOptionToolButton::MenuButtonPopup;
|
||||
button.subControls |= QStyle::SC_ToolButtonMenu;
|
||||
}
|
||||
return qApp->style()->drawComplexControl(control, &button, painter, widget);
|
||||
}
|
||||
}
|
||||
return qApp->style()->drawComplexControl(control, option, painter, widget);
|
||||
}
|
||||
|
||||
void ToolButtonStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const
|
||||
{
|
||||
if (element == PE_IndicatorToolBarSeparator) {
|
||||
return;
|
||||
}
|
||||
return qApp->style()->drawPrimitive(element, option, painter, widget);
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,38 @@
|
|||
#include "debug.h"
|
||||
#ifdef UseNativeFileDialog
|
||||
|
||||
#ifndef MENUTOOLBUTTON_H
|
||||
#define MENUTOOLBUTTON_H
|
||||
#include <QToolButton>
|
||||
#include <QProxyStyle>
|
||||
#include <QStyleOption>
|
||||
#include <QPainter>
|
||||
|
||||
class MenuToolButton : public QToolButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MenuToolButton(QWidget *parent = nullptr);
|
||||
|
||||
Q_SIGNALS:
|
||||
|
||||
|
||||
public Q_SLOTS:
|
||||
|
||||
};
|
||||
|
||||
class ToolButtonStyle : public QProxyStyle
|
||||
{
|
||||
friend class MenuToolButton;
|
||||
friend class HeaderBarContainer;
|
||||
static ToolButtonStyle *getStyle();
|
||||
|
||||
ToolButtonStyle() {}
|
||||
|
||||
int pixelMetric(PixelMetric metric, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override;
|
||||
|
||||
void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget = nullptr) const override;
|
||||
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = nullptr) const override;
|
||||
};
|
||||
#endif // MENUTOOLBUTTON_H
|
||||
#endif
|
|
@ -0,0 +1,37 @@
|
|||
#include "debug.h"
|
||||
#ifdef UseNativeFileDialog
|
||||
|
||||
#include "pathbar.h"
|
||||
#include <PeonyPathCompleter>
|
||||
#include <PeonyPathBarModel>
|
||||
#include <QDebug>
|
||||
#include <QObject>
|
||||
#include "debug.h"
|
||||
|
||||
FileDialogPathBar::FileDialogPathBar(QWidget *parent) : QWidget(parent)//Peony::AdvancedLocationBar(parent)//QLineEdit(parent)//
|
||||
{
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
m_pathBar = new Peony::AdvancedLocationBar(this);
|
||||
m_pathBar->setFixedWidth(this->width());
|
||||
m_pathBar->setGeometry(0, (this->height() - m_pathBar->height()) / 2, this->width(), m_pathBar->height());
|
||||
}
|
||||
|
||||
void FileDialogPathBar::updatePath(const QString &uri)
|
||||
{
|
||||
pDebug << "m_pathBar........ updatePath:" << uri;
|
||||
m_pathBar->updateLocation(uri);
|
||||
// setText(uri);
|
||||
// clearFocus();
|
||||
}
|
||||
|
||||
void FileDialogPathBar::resizeEvent(QResizeEvent *e)
|
||||
{
|
||||
m_pathBar->setFixedWidth(this->width());
|
||||
m_pathBar->setGeometry(0, (this->height() - m_pathBar->height()) / 2, this->width(), m_pathBar->height());
|
||||
}
|
||||
|
||||
Peony::AdvancedLocationBar *FileDialogPathBar::getPathBar()
|
||||
{
|
||||
return m_pathBar;
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,30 @@
|
|||
#include "debug.h"
|
||||
#ifdef UseNativeFileDialog
|
||||
|
||||
#ifndef PATHBAR_H
|
||||
#define PATHBAR_H
|
||||
#include <QLineEdit>
|
||||
#include <QResizeEvent>
|
||||
#include <peony-qt/controls/navigation-bar/advanced-location-bar.h>
|
||||
|
||||
class FileDialogPathBar : public QWidget//public QLineEdit//
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FileDialogPathBar(QWidget *parent = nullptr);
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
Peony::AdvancedLocationBar *getPathBar();
|
||||
|
||||
Q_SIGNALS:
|
||||
void goToUriRequest(const QString &uri, bool addToHistory = true);
|
||||
void updateWindowLocationRequest(const QString &uri, bool addHistory, bool forceUpdate = false);
|
||||
void refreshRequest();
|
||||
void searchRequest(const QString &path, const QString &key);
|
||||
|
||||
public Q_SLOTS:
|
||||
void updatePath(const QString &uri);
|
||||
private:
|
||||
Peony::AdvancedLocationBar *m_pathBar = nullptr;
|
||||
};
|
||||
#endif // PATHBAR_H
|
||||
#endif
|
|
@ -0,0 +1,431 @@
|
|||
#include "debug.h"
|
||||
#ifdef UseNativeFileDialog
|
||||
|
||||
#include "sidebar.h"
|
||||
#include <QTimer>
|
||||
#include <PeonySideBarModel>
|
||||
#include <QScrollBar>
|
||||
#include <QHeaderView>
|
||||
#include <QPainterPath>
|
||||
#include <QPainter>
|
||||
#include <QDebug>
|
||||
#include <QApplication>
|
||||
#include <QTreeWidget>
|
||||
#include <QMessageBox>
|
||||
#include <QToolTip>
|
||||
#include <QScreen>
|
||||
#include "kyfiledialog.h"
|
||||
#include "peony-qt/controls/menu/side-bar-menu/side-bar-menu.h"
|
||||
#include "peony-qt/side-bar-abstract-item.h"
|
||||
#include "peony-qt/controls/directory-view/delegate/side-bar-delegate.h"
|
||||
#include "peony-qt/volume-manager.h"
|
||||
#include "peony-qt/file-enumerator.h"
|
||||
#include "peony-qt/file-utils.h"
|
||||
#include "peony-qt/file-info.h"
|
||||
#include "ukui-style-settings.h"
|
||||
#include "debug.h"
|
||||
|
||||
FileDialogComboBox::FileDialogComboBox(QWidget *parent):QComboBox(parent)
|
||||
{
|
||||
if (QGSettings::isSchemaInstalled("org.ukui.style")) {
|
||||
auto settings = UKUIStyleSettings::globalInstance();
|
||||
connect(settings, &QGSettings::changed, this, [=](const QString &key){
|
||||
pDebug << "key changed:" << key << this->size();
|
||||
m_styleChanged = true;
|
||||
});
|
||||
}
|
||||
|
||||
connect(this, &FileDialogComboBox::setStyleChanged, this, [=](bool change){
|
||||
pDebug << "setStyleChanged m_styleChanged:" << change;
|
||||
m_styleChanged = change;
|
||||
});
|
||||
m_minSize = this->minimumSize();
|
||||
}
|
||||
|
||||
QSize FileDialogComboBox::minimumSizeHint() const
|
||||
{
|
||||
pDebug << "minimumSizeHint...." << m_styleChanged << this->size() << m_minSize;
|
||||
if(m_styleChanged || (qApp->screenAt(QCursor::pos())->availableSize().width() - 300) < QComboBox::minimumSizeHint().width())
|
||||
{
|
||||
Q_EMIT setStyleChanged(false);
|
||||
return m_minSize;//this->size();
|
||||
}
|
||||
QSize size = QComboBox::minimumSizeHint();
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
FileDialogSideBar::FileDialogSideBar(QWidget *parent) : QTreeView(parent)
|
||||
{
|
||||
static SideBarStyle *global_style = new SideBarStyle;
|
||||
|
||||
setIconSize(QSize(16, 16));
|
||||
|
||||
// header()->setSectionResizeMode(QHeaderView::Stretch );
|
||||
header()->setStretchLastSection(false);
|
||||
header()->hide();
|
||||
|
||||
this->verticalScrollBar()->setProperty("drawScrollBarGroove", true);
|
||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
this->setFrameStyle(QFrame::NoFrame);
|
||||
setSortingEnabled(true);
|
||||
|
||||
setProperty("useIconHighlightEffect", true);
|
||||
setDragDropMode(QTreeView::NoDragDrop);
|
||||
setProperty("doNotBlur", true);
|
||||
viewport()->setProperty("doNotBlur", true);
|
||||
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
|
||||
setExpandsOnDoubleClick(false);
|
||||
setMouseTracking(true);//追踪鼠标
|
||||
setAutoScrollMargin(0);
|
||||
|
||||
|
||||
auto delegate = new SideBarItemDelegate(this);
|
||||
setItemDelegate(delegate);
|
||||
|
||||
auto model = new Peony::SideBarModel(this);
|
||||
auto proxyModel = new Peony::SideBarProxyFilterSortModel(this);
|
||||
proxyModel->setSourceModel(model);
|
||||
setModel(proxyModel);
|
||||
|
||||
Peony::VolumeManager *volumeManager = Peony::VolumeManager::getInstance();
|
||||
connect(volumeManager,&Peony::VolumeManager::volumeAdded,this,[=](const std::shared_ptr<Peony::Volume> &volume){
|
||||
proxyModel->invalidate();//display DVD device in real time.
|
||||
});
|
||||
connect(volumeManager,&Peony::VolumeManager::volumeRemoved,this,[=](const std::shared_ptr<Peony::Volume> &volume){
|
||||
proxyModel->invalidate();//The drive does not display when the DVD device is removed.
|
||||
//pDebug << "volumeRemoved:" <<QToolTip::text();
|
||||
//fix abnormal pull out usb device tips not hide issue, link to bug#81190
|
||||
if (QToolTip::isVisible()) {
|
||||
QToolTip::hideText();
|
||||
}
|
||||
});
|
||||
connect(volumeManager,&Peony::VolumeManager::driveDisconnected,this,[=](const std::shared_ptr<Peony::Drive> &drive){
|
||||
proxyModel->invalidate();//Multiple udisk eject display problem
|
||||
});
|
||||
connect(volumeManager,&Peony::VolumeManager::mountAdded,this,[=](const std::shared_ptr<Peony::Mount> &mount){
|
||||
proxyModel->invalidate();//display udisk in real time after format it.
|
||||
});
|
||||
|
||||
|
||||
connect(this, &FileDialogSideBar::clicked, this, [=](const QModelIndex &index){
|
||||
switch (index.column()) {
|
||||
case 0: {
|
||||
auto item = proxyModel->itemFromIndex(index);
|
||||
|
||||
if (! item)
|
||||
break;
|
||||
//continue to fix crash issue, related to bug#116201,116589
|
||||
if(item->isMountable()&&!item->isMounted())
|
||||
item->mount();
|
||||
else{
|
||||
auto uri = item->uri();
|
||||
|
||||
if (!item->uri().isEmpty()){
|
||||
if (uri == "computer:///ukui-data-volume") {
|
||||
uri = "file:///data";
|
||||
}
|
||||
Q_EMIT goToUriRequest(uri);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
auto item = proxyModel->itemFromIndex(index);
|
||||
if (item->isMounted() || item->isEjectable()||item->isStopable()) {
|
||||
auto leftIndex = proxyModel->index(index.row(), 0, index.parent());
|
||||
this->collapse(leftIndex);
|
||||
item->ejectOrUnmount();
|
||||
} else {
|
||||
// if item is not unmountable, just be same with first column.
|
||||
// fix #39716
|
||||
auto uri = item->uri();
|
||||
|
||||
if (!item->uri().isNull()){
|
||||
if (uri == "computer:///ukui-data-volume") {
|
||||
uri = "file:///data";
|
||||
}
|
||||
Q_EMIT goToUriRequest(uri);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
connect(this, &FileDialogSideBar::expanded, this, [=](const QModelIndex &index){
|
||||
auto item = proxyModel->itemFromIndex(index);
|
||||
item->findChildrenAsync();
|
||||
});
|
||||
|
||||
connect(this, &FileDialogSideBar::collapsed, this, [=](const QModelIndex &index){
|
||||
auto item = proxyModel->itemFromIndex(index);
|
||||
item->clearChildren();
|
||||
});
|
||||
|
||||
connect(this, &QTreeView::customContextMenuRequested, this, [=](const QPoint &pos){
|
||||
auto index = indexAt(pos);
|
||||
auto item = proxyModel->itemFromIndex(index);
|
||||
if (item) {
|
||||
if (item->type() != Peony::SideBarAbstractItem::SeparatorItem) {
|
||||
Peony::SideBarMenu menu(item, nullptr);
|
||||
QList<QAction *> actionList;
|
||||
if (item->type() == Peony::SideBarAbstractItem::FileSystemItem) {
|
||||
if ((0 != QString::compare(item->uri(), "computer:///")) &&
|
||||
(0 != QString::compare(item->uri(), "filesafe:///"))) {
|
||||
for (const auto &actionItem : actionList) {
|
||||
if(item->isVolume())/* 分区才去需要判断是否已挂载 */
|
||||
actionItem->setEnabled(item->isMounted());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
menu.exec(QCursor::pos());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// if (QGSettings::isSchemaInstalled("org.ukui.style")) {
|
||||
// auto settings = UKUIStyleSettings::globalInstance();
|
||||
// connect(settings, &QGSettings::changed, this, [=](const QString &key){
|
||||
// pDebug << "key changed:" << key << width();
|
||||
// if (key == "styleName") {
|
||||
// m_siderWidth = this->width();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
expandToDepth(1);
|
||||
setStyle(global_style);
|
||||
setViewportMargins(4, 4, 0, 0);
|
||||
|
||||
pDebug << "columndffffffffffffffff";
|
||||
// setColumnHidden(1, true);
|
||||
}
|
||||
|
||||
void FileDialogSideBar::resizeEvent(QResizeEvent *e)
|
||||
{
|
||||
setViewportMargins(4, 4, 0, 0);
|
||||
|
||||
// this->setGeometry(this->x(), this->y(), m_siderWidth, this->height());
|
||||
QTreeView::resizeEvent(e);
|
||||
pDebug << "FileDialogSideBar resizeEvent header count......:" << header()->count() << this->viewport()->width() << this->columnWidth(0) << this->columnWidth(1);
|
||||
if (header()->count() > 0) {
|
||||
this->setColumnWidth(1, 20);
|
||||
header()->resizeSection(0, this->viewport()->width() - this->columnWidth(1));
|
||||
}
|
||||
}
|
||||
|
||||
QSize FileDialogSideBar::sizeHint() const
|
||||
{
|
||||
return QTreeView::sizeHint();
|
||||
}
|
||||
|
||||
void FileDialogSideBar::menuRequest(const QPoint &pos)
|
||||
{
|
||||
// auto index = indexAt(pos);
|
||||
// auto item = proxyModel->itemFromIndex(index);
|
||||
// if (item) {
|
||||
// pDebug << "sider bar menu00000" << item->type() << index;
|
||||
// if (item->type() != Peony::SideBarAbstractItem::SeparatorItem) {
|
||||
// pDebug << "sider bar menu11111";
|
||||
//// Peony::SideBarMenu *menu = new Peony::SideBarMenu(item, this);
|
||||
// pDebug << "sider bar menu22222222";
|
||||
//// menu->exec(QCursor::pos());
|
||||
// pDebug << "sider bar menu3333333";
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
void FileDialogSideBar::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
// pDebug << "sidebar paintEvent.......:" << this->size();
|
||||
QTreeView::paintEvent(event);
|
||||
}
|
||||
|
||||
//void FileDialogSideBar::paintEvent(QPaintEvent *e)
|
||||
//{
|
||||
// QColor color = this->palette().window().color();
|
||||
// QColor colorBase = QColor(Qt::red); //this->palette().base().color();
|
||||
|
||||
// int R1 = color.red();
|
||||
// int G1 = color.green();
|
||||
// int B1 = color.blue();
|
||||
// qreal a1 = 0.3;
|
||||
|
||||
// int R2 = colorBase.red();
|
||||
// int G2 = colorBase.green();
|
||||
// int B2 = colorBase.blue();
|
||||
// qreal a2 = 1;
|
||||
|
||||
// qreal a = 1 - (1 - a1)*(1 - a2);
|
||||
|
||||
// qreal R = (a1*R1 + (1 - a1)*a2*R2) / a;
|
||||
// qreal G = (a1*G1 + (1 - a1)*a2*G2) / a;
|
||||
// qreal B = (a1*B1 + (1 - a1)*a2*B2) / a;
|
||||
|
||||
// colorBase.setRed(R);
|
||||
// colorBase.setGreen(G);
|
||||
// colorBase.setBlue(B);
|
||||
// colorBase.setAlphaF(1);
|
||||
|
||||
//// QPainter p(this);
|
||||
//// QPainterPath sidebarPath;
|
||||
//// sidebarPath.addRoundedRect(this->geometry(), 6, 6);
|
||||
//// p.fillPath(sidebarPath, colorBase);
|
||||
//// viewport()->setObjectName("viewport");
|
||||
//// viewport()->setStyleSheet("QWidget#viewport{background-color:rgba(255,255,255,0.5)");////" + QString::number(colorBase.red()) + "," + QString::number(colorBase.green()) + "," + QString::number(colorBase.blue()) + "," + QString::number(colorBase.alpha()) + "}");
|
||||
// QTreeView::paintEvent(e);
|
||||
//}
|
||||
|
||||
|
||||
SideBarItemDelegate::SideBarItemDelegate(QObject *parent)
|
||||
{
|
||||
// if (QGSettings::isSchemaInstalled("org.ukui.style")) {
|
||||
// auto settings = UKUIStyleSettings::globalInstance();
|
||||
// connect(settings, &QGSettings::changed, this, [=](const QString &key){
|
||||
// pDebug << "key changed:" << key;
|
||||
// if (key == "styleName") {
|
||||
// pDebug << "key changed....";
|
||||
// this->paint();
|
||||
// this->update();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
QSize SideBarItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
auto size = QStyledItemDelegate::sizeHint(option, index);
|
||||
size.setHeight(36);
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
void SideBarItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
painter->save();
|
||||
if (index.column() == 1) {
|
||||
QPainterPath rightRoundedRegion;
|
||||
rightRoundedRegion.setFillRule(Qt::WindingFill);
|
||||
auto rect = option.rect;
|
||||
auto view = qobject_cast<const QAbstractItemView *>(option.widget);
|
||||
if (view) {
|
||||
rect.setRight(view->viewport()->rect().right());
|
||||
}
|
||||
rightRoundedRegion.addRoundedRect(rect, 4, 4);
|
||||
rightRoundedRegion.addRect(rect.adjusted(0, 0, -4, 0));
|
||||
painter->setClipPath(rightRoundedRegion);
|
||||
}
|
||||
|
||||
painter->setRenderHint(QPainter::Antialiasing);
|
||||
QStyledItemDelegate::paint(painter, option, index);
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
SideBarStyle::SideBarStyle()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SideBarStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const
|
||||
{
|
||||
painter->save();
|
||||
switch (element) {
|
||||
case QStyle::PE_IndicatorItemViewItemDrop: {
|
||||
painter->setRenderHint(QPainter::Antialiasing, true);/* 反锯齿 */
|
||||
/* 按设计要求,边框颜色为调色板highlight值,圆角为6px */
|
||||
QColor color = option->palette.color(QPalette::Highlight);
|
||||
painter->setPen(color);
|
||||
painter->drawRoundedRect(option->rect, 6, 6);
|
||||
painter->restore();
|
||||
return;
|
||||
}
|
||||
|
||||
case QStyle::PE_IndicatorBranch: {
|
||||
if (option->rect.x() == 0) {
|
||||
QPainterPath leftRoundedRegion;
|
||||
leftRoundedRegion.setFillRule(Qt::WindingFill);
|
||||
leftRoundedRegion.addRoundedRect(option->rect, 4, 4);
|
||||
leftRoundedRegion.addRect(option->rect.adjusted(4, 0, 0, 0));
|
||||
painter->setClipPath(leftRoundedRegion);
|
||||
}
|
||||
const QStyleOptionViewItem *tmp = qstyleoption_cast<const QStyleOptionViewItem *>(option);
|
||||
QStyleOptionViewItem opt = *tmp;
|
||||
if (!opt.state.testFlag(QStyle::State_Selected)) {
|
||||
if (opt.state & QStyle::State_Sunken) {
|
||||
opt.palette.setColor(QPalette::Highlight, opt.palette.button().color());
|
||||
// opt.palette.setColor(QPalette::Highlight, Qt::red);
|
||||
}
|
||||
if (opt.state & QStyle::State_MouseOver) {
|
||||
opt.palette.setColor(QPalette::Highlight, opt.palette.mid().color());
|
||||
// opt.palette.setColor(QPalette::Highlight, Qt::green);
|
||||
}
|
||||
}
|
||||
qApp->style()->drawPrimitive(element, &opt, painter, widget);
|
||||
painter->restore();
|
||||
return;
|
||||
}
|
||||
case QStyle::PE_PanelItemViewRow: {
|
||||
painter->restore();
|
||||
return;
|
||||
break;
|
||||
}
|
||||
case QStyle::PE_PanelItemViewItem: {
|
||||
/*
|
||||
const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option);
|
||||
QStyleOptionViewItem opt = *vi;
|
||||
painter->save();
|
||||
painter->setPen(Qt::NoPen);
|
||||
QPainterPath path;
|
||||
if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) {
|
||||
path.addRoundedRect(vi->rect, 6, 6);
|
||||
}
|
||||
else {
|
||||
path.addRect(vi->rect);
|
||||
}
|
||||
// pDebug << "vi->rect:" << vi->rect;
|
||||
|
||||
if (!opt.state.testFlag(QStyle::State_Selected)) {
|
||||
if (opt.state & QStyle::State_Sunken) {
|
||||
opt.palette.setColor(QPalette::Highlight, opt.palette.button().color());
|
||||
}
|
||||
if (opt.state & QStyle::State_MouseOver) {
|
||||
opt.palette.setColor(QPalette::Highlight, opt.palette.mid().color());
|
||||
}
|
||||
}
|
||||
painter->drawPath(path);
|
||||
*/
|
||||
painter->restore();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
qApp->style()->drawPrimitive(element, option, painter, widget);
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
void SideBarStyle::drawControl(QStyle::ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const
|
||||
{
|
||||
if (element == QStyle::CE_ItemViewItem) {
|
||||
const QStyleOptionViewItem *tmp = qstyleoption_cast<const QStyleOptionViewItem *>(option);
|
||||
QStyleOptionViewItem opt = *tmp;
|
||||
if (!opt.state.testFlag(QStyle::State_Selected)) {
|
||||
if (opt.state & QStyle::State_Sunken) {
|
||||
opt.palette.setColor(QPalette::Highlight, opt.palette.button().color());
|
||||
}
|
||||
if (opt.state & QStyle::State_MouseOver) {
|
||||
opt.palette.setColor(QPalette::Highlight, opt.palette.mid().color());
|
||||
}
|
||||
}
|
||||
return qApp->style()->drawControl(element, &opt, painter, widget);
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,72 @@
|
|||
#include "debug.h"
|
||||
#ifdef UseNativeFileDialog
|
||||
|
||||
#ifndef SIDEBAR_H
|
||||
#define SIDEBAR_H
|
||||
#include <QTreeView>
|
||||
#include <QPaintEvent>
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QStyleOptionViewItem>
|
||||
#include <QModelIndex>
|
||||
#include <QPainter>
|
||||
#include <QProxyStyle>
|
||||
#include <QStyleOption>
|
||||
#include <PeonySideBarProxyModel>
|
||||
#include <QComboBox>
|
||||
#include <QSize>
|
||||
|
||||
class FileDialogComboBox : public QComboBox
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FileDialogComboBox(QWidget *parent = nullptr);
|
||||
QSize minimumSizeHint() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
void setStyleChanged(bool change) const;
|
||||
|
||||
private:
|
||||
bool m_styleChanged = false;
|
||||
QSize m_minSize;
|
||||
};
|
||||
|
||||
|
||||
class FileDialogSideBar : public QTreeView
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FileDialogSideBar(QWidget *parent = nullptr);
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
QSize sizeHint() const;
|
||||
|
||||
public Q_SLOTS:
|
||||
void menuRequest(const QPoint &pos);
|
||||
|
||||
Q_SIGNALS:
|
||||
void goToUriRequest(const QString &uri, bool addToHistory = true, bool forceUpdate = false);
|
||||
|
||||
};
|
||||
|
||||
|
||||
class SideBarItemDelegate : public QStyledItemDelegate
|
||||
{
|
||||
friend class FileDialogSideBar;
|
||||
explicit SideBarItemDelegate(QObject *parent = nullptr);
|
||||
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
};
|
||||
|
||||
|
||||
class SideBarStyle : public QProxyStyle
|
||||
{
|
||||
public:
|
||||
explicit SideBarStyle();
|
||||
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override;
|
||||
void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override;
|
||||
};
|
||||
#endif // SIDEBAR_H
|
||||
#endif
|
|
@ -0,0 +1,264 @@
|
|||
#include "debug.h"
|
||||
#ifdef UseNativeFileDialog
|
||||
|
||||
#include "ui_kyfiledialog.h"
|
||||
#include <QFileDialog>
|
||||
#include "kyfiledialog.h"
|
||||
|
||||
//Ui_KyFileDialog::Ui_KyFileDialog(QDialog *parent)
|
||||
//{
|
||||
// setupUi(parent);
|
||||
//}
|
||||
|
||||
|
||||
void Ui_KyFileDialog::initSortMenu(QDialog *mKyFileDialog)
|
||||
{
|
||||
m_sortButton = new MenuToolButton();
|
||||
m_sortMenu = new QMenu(m_sortButton);
|
||||
|
||||
m_sortTypeGroup = new QActionGroup(m_sortMenu);
|
||||
m_sortTypeGroup->setExclusive(true);
|
||||
|
||||
m_fileName = m_sortMenu->addAction(QObject::tr("File Name"));
|
||||
m_fileName->setCheckable(true);
|
||||
m_sortTypeGroup->addAction(m_fileName);
|
||||
|
||||
m_modifiedDate = m_sortMenu->addAction(QObject::tr("Modified Date"));
|
||||
m_modifiedDate->setCheckable(true);
|
||||
m_sortTypeGroup->addAction(m_modifiedDate);
|
||||
|
||||
m_fileType = m_sortMenu->addAction(QObject::tr("File Type"));
|
||||
m_fileType->setCheckable(true);
|
||||
m_sortTypeGroup->addAction(m_fileType);
|
||||
|
||||
m_fileSize = m_sortMenu->addAction(QObject::tr("File Size"));
|
||||
m_fileSize->setCheckable(true);
|
||||
m_sortTypeGroup->addAction(m_fileSize);
|
||||
|
||||
m_originalPath = m_sortMenu->addAction(QObject::tr("Original Path"));
|
||||
m_originalPath->setCheckable(true);
|
||||
m_sortTypeGroup->addAction(m_originalPath);
|
||||
|
||||
m_sortMenu->addSeparator();
|
||||
|
||||
m_sortOrderGroup = new QActionGroup(m_sortMenu);
|
||||
m_sortOrderGroup->setExclusive(true);
|
||||
|
||||
m_descending = m_sortMenu->addAction(QObject::tr("Descending"));
|
||||
m_descending->setCheckable(true);
|
||||
m_sortOrderGroup->addAction(m_descending);
|
||||
|
||||
//switch defautl Descending Ascending order, fix bug#99924
|
||||
m_ascending = m_sortMenu->addAction(QObject::tr("Ascending"));
|
||||
m_ascending->setCheckable(true);
|
||||
m_sortOrderGroup->addAction(m_ascending);
|
||||
|
||||
m_sortMenu->addSeparator();
|
||||
|
||||
m_useGlobalSortAction = m_sortMenu->addAction(QObject::tr("Use global sorting"));
|
||||
m_useGlobalSortAction->setCheckable(true);
|
||||
|
||||
m_sortButton->setMenu(m_sortMenu);
|
||||
m_sortButton->setPopupMode(QToolButton::InstantPopup);
|
||||
m_sortButton->setAutoRaise(true);
|
||||
m_sortButton->setFixedSize(QSize(57, 40));
|
||||
m_sortButton->setIconSize(QSize(16, 16));
|
||||
|
||||
}
|
||||
|
||||
void Ui_KyFileDialog::initModeMenu(QDialog *mKyFileDialog)
|
||||
{
|
||||
m_modeButton = new MenuToolButton();
|
||||
m_modeButton->setPopupMode(QToolButton::InstantPopup);
|
||||
m_modeButton->setAutoRaise(true);
|
||||
m_modeButton->setFixedSize(QSize(57, 40));
|
||||
m_modeButton->setIconSize(QSize(16, 16));
|
||||
|
||||
m_modeMenu = new QMenu(m_modeButton);
|
||||
m_listModeAction = m_modeMenu->addAction(QIcon::fromTheme("view-list-symbolic"), QObject::tr("List View"));
|
||||
m_iconModeAction = m_modeMenu->addAction(QIcon::fromTheme("view-grid-symbolic"), QObject::tr("Icon View"));
|
||||
m_listModeAction->setCheckable(true);
|
||||
m_iconModeAction->setCheckable(true);
|
||||
m_modeButton->setMenu(m_modeMenu);
|
||||
}
|
||||
|
||||
void Ui_KyFileDialog::initSiderBar(QDialog *mKyFileDialog)
|
||||
{
|
||||
m_siderWidget = new QWidget();
|
||||
m_siderLayout = new QVBoxLayout();
|
||||
m_siderLayout->setContentsMargins(0,0,0,0);
|
||||
|
||||
m_sider = new FileDialogSideBar();
|
||||
m_sider->setAttribute(Qt::WA_TranslucentBackground);
|
||||
}
|
||||
|
||||
void Ui_KyFileDialog::initHeaderBar(QDialog *mKyFileDialog)
|
||||
{
|
||||
m_hHeaderLayout = new QHBoxLayout();
|
||||
m_hHeaderLayout->setContentsMargins(4,5,4,5);
|
||||
initModeMenu(mKyFileDialog);
|
||||
initSortMenu(mKyFileDialog);
|
||||
|
||||
m_hHeaderLayout->setContentsMargins(0,0,0,0);
|
||||
m_hHeaderLayout->setObjectName(QString::fromUtf8("hboxLayout"));
|
||||
m_backButton = new QToolButton();
|
||||
m_forwardButton = new QToolButton();
|
||||
m_toParentButton = new QToolButton();
|
||||
|
||||
m_pathbarWidget = new FileDialogPathBar();//new Peony::AdvancedLocationBar(mKyFileDialog);//
|
||||
m_pathbar = m_pathbarWidget->getPathBar();
|
||||
m_pathbar->setMinimumWidth(250);
|
||||
m_pathbar->setFocusPolicy(Qt::FocusPolicy(m_pathbar->focusPolicy() & ~Qt::TabFocus));
|
||||
|
||||
m_searchBtn = new QToolButton();
|
||||
|
||||
m_maximizeAndRestore = new QToolButton();
|
||||
|
||||
m_closeButton = new QToolButton();
|
||||
m_hHeaderLayout->setAlignment(Qt::AlignVCenter);
|
||||
|
||||
m_hHeaderLayout->addWidget(m_backButton);
|
||||
m_hHeaderLayout->addWidget(m_forwardButton);
|
||||
m_hHeaderLayout->addWidget(m_toParentButton);
|
||||
m_hHeaderLayout->addWidget(m_pathbarWidget);
|
||||
m_hHeaderLayout->addWidget(m_searchBtn);
|
||||
m_hHeaderLayout->addWidget(m_modeButton);
|
||||
m_hHeaderLayout->addWidget(m_sortButton);
|
||||
m_hHeaderLayout->addWidget(m_maximizeAndRestore);
|
||||
m_hHeaderLayout->addWidget(m_closeButton);
|
||||
|
||||
}
|
||||
|
||||
void Ui_KyFileDialog::initLineEditLayout(QDialog *mKyFileDialog)
|
||||
{
|
||||
m_hLineEditLayout = new QHBoxLayout();
|
||||
m_hLineEditLayout->setContentsMargins(4,0,24,0);
|
||||
m_fileNameLabel = new QLabel();
|
||||
m_fileNameLabel->setObjectName(QString::fromUtf8("fileNameLabel"));
|
||||
QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Preferred);
|
||||
sizePolicy2.setHorizontalStretch(0);
|
||||
sizePolicy2.setVerticalStretch(0);
|
||||
sizePolicy2.setHeightForWidth(m_fileNameLabel->sizePolicy().hasHeightForWidth());
|
||||
m_fileNameLabel->setSizePolicy(sizePolicy2);
|
||||
m_fileNameLabel->setMinimumSize(QSize(0, 0));
|
||||
qDebug() << "3333333333333333333";
|
||||
|
||||
m_fileNameEdit = new QLineEdit();
|
||||
m_fileNameEdit->setObjectName("fileNameEdit");
|
||||
QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Fixed);
|
||||
sizePolicy3.setHorizontalStretch(1);
|
||||
sizePolicy3.setVerticalStretch(0);
|
||||
sizePolicy3.setHeightForWidth(m_fileNameEdit->sizePolicy().hasHeightForWidth());
|
||||
m_fileNameEdit->setSizePolicy(sizePolicy3);
|
||||
qDebug() << "44444444444444444";
|
||||
|
||||
m_fileTypeCombo = new FileDialogComboBox();
|
||||
QSizePolicy sizePolicy4(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
sizePolicy4.setHorizontalStretch(0);
|
||||
sizePolicy4.setVerticalStretch(0);
|
||||
sizePolicy4.setHeightForWidth(m_fileTypeCombo->sizePolicy().hasHeightForWidth());
|
||||
m_fileTypeCombo->setSizePolicy(sizePolicy4);
|
||||
// m_fileTypeCombo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength);
|
||||
//m_fileTypeCombo->setVisible(false);
|
||||
|
||||
m_hLineEditLayout->addWidget(m_fileNameLabel);
|
||||
m_hLineEditLayout->addWidget(m_fileNameEdit);
|
||||
m_hLineEditLayout->addWidget(m_fileTypeCombo);
|
||||
m_hLineEditLayout->setSpacing(15);
|
||||
}
|
||||
|
||||
void Ui_KyFileDialog::intiBtnLayout(QDialog *mKyFileDialog)
|
||||
{
|
||||
m_hBtnLayout = new QHBoxLayout();
|
||||
m_hBtnLayout->addSpacing(20);
|
||||
m_hBtnLayout->setContentsMargins(0,0,24,0);
|
||||
m_newFolderButton =new QPushButton();
|
||||
m_newFolderButton->setObjectName(QString::fromUtf8("newFolderButton"));
|
||||
m_hBtnLayout->addWidget(m_newFolderButton);
|
||||
|
||||
|
||||
m_acceptButton = new QPushButton();
|
||||
m_rejectButton = new QPushButton();
|
||||
m_acceptButton->setEnabled(false);
|
||||
m_hBtnLayout->addStretch();
|
||||
m_hBtnLayout->addWidget(m_rejectButton, 0, Qt::AlignRight | Qt::AlignVCenter);
|
||||
m_hBtnLayout->addSpacing(15);
|
||||
m_hBtnLayout->addWidget(m_acceptButton, 0, Qt::AlignRight | Qt::AlignVCenter);
|
||||
qDebug() << "6666666666666666";
|
||||
}
|
||||
|
||||
void Ui_KyFileDialog::setupUi(QDialog *mKyFileDialog)
|
||||
{
|
||||
if(mKyFileDialog->objectName().isEmpty()) {
|
||||
mKyFileDialog->setObjectName(QString::fromUtf8("KyNativeFileDialog"));
|
||||
}
|
||||
mKyFileDialog->resize(1160, 635);
|
||||
|
||||
mKyFileDialog->setSizeGripEnabled(true);
|
||||
mKyFileDialog->setAttribute(Qt::WA_TranslucentBackground);
|
||||
mKyFileDialog->setContentsMargins(0,0,0,0);
|
||||
|
||||
m_gridLayout = new QGridLayout(mKyFileDialog);
|
||||
m_gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
|
||||
|
||||
m_container = new Peony::DirectoryViewContainer();
|
||||
m_frame = new QFrame();
|
||||
vboxLayout = new QVBoxLayout();
|
||||
|
||||
initSiderBar(mKyFileDialog);
|
||||
|
||||
initHeaderBar(mKyFileDialog);
|
||||
initLineEditLayout(mKyFileDialog);
|
||||
intiBtnLayout(mKyFileDialog);
|
||||
|
||||
vboxLayout->addSpacing(8);
|
||||
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
|
||||
vboxLayout->setContentsMargins(0, 0, 8, 0);
|
||||
|
||||
vboxLayout->addLayout(m_hHeaderLayout);
|
||||
vboxLayout->addSpacing(6);
|
||||
m_upSeperate = new QFrame();
|
||||
m_upSeperate->setFrameShape(QFrame::HLine);
|
||||
vboxLayout->addWidget(m_upSeperate);
|
||||
vboxLayout->addSpacing(6);
|
||||
vboxLayout->addWidget(m_container);
|
||||
vboxLayout->addSpacing(15);
|
||||
|
||||
vboxLayout->addLayout(m_hLineEditLayout);
|
||||
vboxLayout->addSpacing(16);
|
||||
|
||||
m_downSeperate = new QFrame();
|
||||
m_downSeperate->setFrameShape(QFrame::HLine);
|
||||
vboxLayout->addWidget(m_downSeperate);
|
||||
vboxLayout->addSpacing(16);
|
||||
|
||||
vboxLayout->addLayout(m_hBtnLayout);
|
||||
vboxLayout->addSpacing(25);
|
||||
|
||||
m_frame->setFrameShadow(QFrame::Raised);
|
||||
m_frame->setFrameShape(QFrame::NoFrame);
|
||||
m_frame->setLayout(vboxLayout);
|
||||
|
||||
m_splitter = new QSplitter();
|
||||
m_splitter->setAttribute(Qt::WA_TranslucentBackground);
|
||||
QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
sizePolicy1.setHorizontalStretch(0);
|
||||
sizePolicy1.setVerticalStretch(0);
|
||||
sizePolicy1.setHeightForWidth(m_splitter->sizePolicy().hasHeightForWidth());
|
||||
m_splitter->setSizePolicy(sizePolicy1);
|
||||
m_splitter->setOrientation(Qt::Horizontal);
|
||||
m_splitter->setHandleWidth(0);
|
||||
m_siderLayout->addWidget(m_sider);
|
||||
m_siderWidget->setLayout(m_siderLayout);
|
||||
m_splitter->addWidget(m_siderWidget);
|
||||
m_splitter->setStretchFactor(0, 20);
|
||||
m_splitter->addWidget(m_frame);
|
||||
m_splitter->setStretchFactor(1, 40);
|
||||
int siderWidIndex = m_splitter->indexOf(m_siderWidget);
|
||||
int frameIndex = m_splitter->indexOf(m_frame);
|
||||
m_splitter->setCollapsible(siderWidIndex, false);
|
||||
m_splitter->setCollapsible(frameIndex, false);
|
||||
m_gridLayout->addWidget(m_splitter);
|
||||
m_gridLayout->setContentsMargins(0,0,0,0);
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,103 @@
|
|||
#include "debug.h"
|
||||
#ifdef UseNativeFileDialog
|
||||
|
||||
#ifndef UI_KYFILEDIALOG_H
|
||||
#define UI_KYFILEDIALOG_H
|
||||
#include <QApplication>
|
||||
#include <QComboBox>
|
||||
#include <QTreeView>
|
||||
#include <QToolButton>
|
||||
#include <QLineEdit>
|
||||
#include <QFrame>
|
||||
#include <QSplitter>
|
||||
#include <QLabel>
|
||||
#include <QMenu>
|
||||
#include <QAction>
|
||||
#include <QGridLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QDebug>
|
||||
#include "sidebar.h"
|
||||
#include <QSizePolicy>
|
||||
#include "kyfiledialog.h"
|
||||
#include <peony-qt/controls/directory-view/directory-view-container.h>
|
||||
#include <peony-qt/controls/navigation-bar/advanced-location-bar.h>
|
||||
#include "pathbar.h"
|
||||
#include <QPushButton>
|
||||
#include <QToolBar>
|
||||
#include <QObject>
|
||||
#include <QDialog>
|
||||
#include "menutoolbutoon.h"
|
||||
|
||||
namespace Peony {
|
||||
class DirectoryViewContainer;
|
||||
}
|
||||
class Ui_KyFileDialog
|
||||
{
|
||||
public:
|
||||
// explicit Ui_KyFileDialog;
|
||||
|
||||
QGridLayout *m_gridLayout = nullptr;
|
||||
QHBoxLayout *m_hHeaderLayout = nullptr;
|
||||
QHBoxLayout *m_hLineEditLayout = nullptr;
|
||||
QHBoxLayout *m_hBtnLayout = nullptr;
|
||||
FileDialogPathBar *m_pathbarWidget = nullptr;
|
||||
Peony::AdvancedLocationBar *m_pathbar = nullptr;
|
||||
QToolButton *m_searchBtn = nullptr;
|
||||
//QWidget *m_pathbar = nullptr;
|
||||
QToolButton *m_backButton = nullptr;
|
||||
QToolButton *m_forwardButton = nullptr;
|
||||
QToolButton *m_toParentButton = nullptr;
|
||||
MenuToolButton *m_modeButton = nullptr;
|
||||
MenuToolButton *m_sortButton = nullptr;
|
||||
QToolButton *m_maximizeAndRestore = nullptr;
|
||||
QToolButton *m_closeButton = nullptr;
|
||||
QMenu *m_modeMenu = nullptr;
|
||||
QMenu *m_sortMenu = nullptr;
|
||||
QAction *m_listModeAction = nullptr;
|
||||
QAction *m_iconModeAction = nullptr;
|
||||
FileDialogSideBar *m_sider = nullptr;
|
||||
QFrame *m_frame = nullptr;
|
||||
QSplitter *m_splitter = nullptr;
|
||||
QVBoxLayout *vboxLayout = nullptr;
|
||||
QTreeView *m_treeView = nullptr;
|
||||
QLabel *m_fileNameLabel = nullptr;
|
||||
QLineEdit *m_fileNameEdit = nullptr;
|
||||
FileDialogComboBox *m_fileTypeCombo = nullptr;
|
||||
QPushButton *m_newFolderButton = nullptr;
|
||||
QPushButton *m_acceptButton = nullptr;
|
||||
QPushButton *m_rejectButton = nullptr;
|
||||
QFrame *m_upSeperate = nullptr;
|
||||
QFrame *m_downSeperate = nullptr;
|
||||
|
||||
QWidget *m_widget = nullptr;
|
||||
Peony::DirectoryViewContainer *m_container = nullptr;
|
||||
|
||||
QWidget *m_siderWidget = nullptr;
|
||||
QVBoxLayout *m_siderLayout = nullptr;
|
||||
|
||||
QActionGroup *m_sortTypeGroup = nullptr;
|
||||
QAction *m_fileName = nullptr;
|
||||
QAction *m_modifiedDate = nullptr;
|
||||
QAction *m_fileType = nullptr;
|
||||
QAction *m_fileSize = nullptr;
|
||||
QAction *m_originalPath = nullptr;
|
||||
QActionGroup *m_sortOrderGroup = nullptr;
|
||||
QAction *m_descending = nullptr;
|
||||
QAction *m_ascending = nullptr;
|
||||
QAction *m_useGlobalSortAction = nullptr;
|
||||
|
||||
public:
|
||||
void setupUi(QDialog *mKyFileDialog);
|
||||
|
||||
private:
|
||||
void initSortMenu(QDialog *mKyFileDialog);
|
||||
void initModeMenu(QDialog *mKyFileDialog);
|
||||
void initSiderBar(QDialog *mKyFileDialog);
|
||||
void initHeaderBar(QDialog *mKyFileDialog);
|
||||
void initLineEditLayout(QDialog *mKyFileDialog);
|
||||
void intiBtnLayout(QDialog *mKyFileDialog);
|
||||
};
|
||||
#endif // UI_KYFILEDIALOG_H
|
||||
#endif
|
|
@ -32,8 +32,6 @@
|
|||
#include <QStyleOption>
|
||||
#include <qpa/qplatformdialoghelper.h>
|
||||
#include <QtWidgets/qdialogbuttonbox.h>
|
||||
#include "ukuistylehelper/ukuistylehelper.h"
|
||||
#include "windowmanager/windowmanager.h"
|
||||
|
||||
#include "private/qlabel_p.h"
|
||||
#include "private/qdialog_p.h"
|
||||
|
@ -54,7 +52,9 @@
|
|||
#include <QSpacerItem>
|
||||
#include <QScrollArea>
|
||||
#include <QDebug>
|
||||
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusInterface>
|
||||
#include <QDBusConnection>
|
||||
|
||||
enum Button
|
||||
{
|
||||
|
@ -108,6 +108,8 @@ private:
|
|||
void helperPrepareShow(QPlatformDialogHelper*) override;
|
||||
void helperDone(QDialog::DialogCode, QPlatformDialogHelper*) override;
|
||||
|
||||
public slots:
|
||||
void tableModeChanged(bool isTableMode);
|
||||
public:
|
||||
QLabel* mLabel;
|
||||
QLabel* mInformativeLabel;
|
||||
|
@ -153,6 +155,14 @@ MessageBox::MessageBox(QWidget *parent) : QDialog(*new MessageBoxPrivate, parent
|
|||
d->init();
|
||||
setContentsMargins(0, 0, 0, 0);
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
|
||||
QDBusInterface *interFace = new QDBusInterface("com.kylin.statusmanager.interface",
|
||||
"/",
|
||||
"com.kylin.statusmanager.interface",
|
||||
QDBusConnection::sessionBus());
|
||||
if(interFace->isValid()){
|
||||
connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(d->tableModeChanged(bool)));
|
||||
}
|
||||
}
|
||||
|
||||
MessageBox::~MessageBox()
|
||||
|
@ -721,24 +731,52 @@ void MessageBoxPrivate::init(const QString &title, const QString &text)
|
|||
mButtonBox->setCenterButtons(q->style()->styleHint(QStyle::SH_MessageBox_CenterButtons, nullptr, q));
|
||||
QObject::connect(mButtonBox, SIGNAL(clicked(QAbstractButton*)), q, SLOT(_q_buttonClicked(QAbstractButton*)));
|
||||
|
||||
bool isTableMode = false;
|
||||
QDBusMessage message = QDBusMessage::createMethodCall("com.kylin.statusmanager.interface",
|
||||
"/",
|
||||
"com.kylin.statusmanager.interface",
|
||||
"get_current_tabletmode");
|
||||
QDBusMessage ret = QDBusConnection::sessionBus().call(message);
|
||||
if (ret.type() != QDBusMessage::ReplyMessage)
|
||||
{
|
||||
//从返回参数获取返回值
|
||||
qDebug() << "complex type failed!";
|
||||
}
|
||||
else
|
||||
{
|
||||
isTableMode = ret.arguments()[0].value<bool>();
|
||||
}
|
||||
|
||||
|
||||
mCloseButtton = new QPushButton(q);
|
||||
mCloseButtton->setFlat(true);
|
||||
mCloseButtton->setFocusPolicy(Qt::NoFocus);
|
||||
mCloseButtton->setProperty("isWindowButton", 0x2);
|
||||
mCloseButtton->setIcon(QIcon::fromTheme("window-close-symbolic"));
|
||||
mCloseButtton->setIconSize(QSize(16, 16));
|
||||
mCloseButtton->setFixedSize(32, 32);
|
||||
if(isTableMode)//styleName == "ukui-dark"){//
|
||||
mCloseButtton->setFixedSize(48, 48);
|
||||
else
|
||||
mCloseButtton->setFixedSize(32, 32);
|
||||
|
||||
QObject::connect(mCloseButtton, &QPushButton::clicked, q, [=]() {
|
||||
q->close();
|
||||
});
|
||||
|
||||
mTitleText = new QLabel(q);
|
||||
mTitleText->setText(title);
|
||||
|
||||
q->setModal(true);
|
||||
mIcon = QMessageBox::NoIcon;
|
||||
}
|
||||
|
||||
void MessageBoxPrivate::tableModeChanged(bool tableMode)
|
||||
{
|
||||
if(tableMode)
|
||||
mCloseButtton->setFixedSize(48, 48);
|
||||
else
|
||||
mCloseButtton->setFixedSize(32, 32);
|
||||
}
|
||||
|
||||
void MessageBoxPrivate::setupLayout()
|
||||
{
|
||||
Q_Q(MessageBox);
|
||||
|
@ -1273,7 +1311,8 @@ public:
|
|||
|
||||
MessageBoxHelper::MessageBoxHelper() : QPlatformMessageDialogHelper(), mMessageBox(new MessageBox)
|
||||
{
|
||||
|
||||
connect(mMessageBox, &QDialog::accepted, this, &MessageBoxHelper::accept);
|
||||
connect(mMessageBox, &QDialog::rejected, this, &MessageBoxHelper::reject);
|
||||
}
|
||||
|
||||
MessageBoxHelper::~MessageBoxHelper()
|
||||
|
@ -1339,18 +1378,11 @@ bool MessageBoxHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality wind
|
|||
+ QPoint(parent->x(), parent->y()));
|
||||
}
|
||||
|
||||
//remove header
|
||||
QString platform = QGuiApplication::platformName();
|
||||
if(platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive))
|
||||
{
|
||||
kdk::UkuiStyleHelper::self()->removeHeader(mMessageBox);
|
||||
} else {
|
||||
MotifWmHints hints;
|
||||
hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
|
||||
hints.functions = MWM_FUNC_ALL;
|
||||
hints.decorations = MWM_DECOR_BORDER;
|
||||
XAtomHelper::getInstance()->setWindowMotifHint(mMessageBox->winId(), hints);
|
||||
}
|
||||
MotifWmHints hints;
|
||||
hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
|
||||
hints.functions = MWM_FUNC_ALL;
|
||||
hints.decorations = MWM_DECOR_BORDER;
|
||||
XAtomHelper::getInstance()->setWindowMotifHint(mMessageBox->winId(), hints);
|
||||
|
||||
foreach (QAbstractButton *ab, mMessageBox->buttons()) {
|
||||
if (QPushButton *pb = qobject_cast<QPushButton *>(ab)) {
|
|
@ -53,7 +53,7 @@ class MessageBox : public QDialog
|
|||
Q_PROPERTY(QString mInformativeText READ informativeText WRITE setInformativeText)
|
||||
Q_PROPERTY(StandardButtons mStandardButtons READ standardButtons WRITE setStandardButtons)
|
||||
Q_PROPERTY(Qt::TextInteractionFlags textInteractionFlags READ textInteractionFlags WRITE setTextInteractionFlags)
|
||||
friend MessageBoxHelper;
|
||||
friend class MessageBoxHelper;
|
||||
public:
|
||||
explicit MessageBox(QWidget *parent = nullptr);
|
||||
~MessageBox();
|
|
@ -1,7 +1,55 @@
|
|||
HEADERS += \
|
||||
$$PWD/message-box.h \
|
||||
$$PWD/xatom-helper.h
|
||||
$$PWD/filedialog/kyfiledialog.h \
|
||||
$$PWD/filedialog/kyfiledialogprivate.h \
|
||||
$$PWD/messagebox/message-box.h \
|
||||
$$PWD/filedialog/pathbar.h \
|
||||
$$PWD/filedialog/sidebar.h \
|
||||
$$PWD/filedialog/ui_kyfiledialog.h \
|
||||
$$PWD/xatom-helper.h \
|
||||
$$PWD/filedialog/menutoolbutoon.h \
|
||||
$$PWD/filedialog/debug.h \
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/message-box.cpp \
|
||||
$$PWD/xatom-helper.cpp
|
||||
$$PWD/filedialog/kyfiledialog.cpp \
|
||||
$$PWD/messagebox/message-box.cpp \
|
||||
$$PWD/filedialog/pathbar.cpp \
|
||||
$$PWD/filedialog/sidebar.cpp \
|
||||
$$PWD/xatom-helper.cpp \
|
||||
$$PWD/filedialog/menutoolbutoon.cpp \
|
||||
$$PWD/filedialog/kyfiledialogprivate.cpp \
|
||||
$$PWD/filedialog/ui_kyfiledialog.cpp \
|
||||
|
||||
DEFINES += OPEN_ACTIONS_SEPARATOR='\\"open-actions-seperator\\"'
|
||||
DEFINES += CREATE_ACTIONS_SEPARATOR='\\"create-actions-seperator\\"'
|
||||
DEFINES += VIEW_ACTIONS_SEPARATOR='\\"view-actions-seperator\\"'
|
||||
DEFINES += FILE_OPERATION_ACTIONS_SEPARATOR='\\"file-operation-actions-seperator\\"'
|
||||
DEFINES += PLUGIN_ACTIONS_SEPARATOR='\\"plugin-actions-seperator\\"'
|
||||
DEFINES += PROPERTIES_ACTIONS_SEPARATOR='\\"properties-actions-seperator\\"'
|
||||
DEFINES += COMPUTER_ACTIONS_SEPARATOR='\\"computer-actions-seperator\\"'
|
||||
DEFINES += TRASH_ACTIONS_SEPARATOR='\\"trash-actions-seperator\\"'
|
||||
|
||||
DEFINES += OPEN_IN_NEW_WINDOW_ACTION='\\"open-in-new-window-action\\"'
|
||||
DEFINES += OPEN_IN_NEW_TAB_ACTION='\\"open-in-new-tab-action\\"'
|
||||
DEFINES += ADD_TO_BOOKMARK_ACTION='\\"add-to-bookmark-action\\"'
|
||||
DEFINES += OPEN_ACTION='\\"open-action\\"'
|
||||
DEFINES += OPEN_WITH_ACTION='\\"open-with-action\\"'
|
||||
DEFINES += OPEN_SELECTED_FILES_ACTION='\\"open-selected-files-action\\"'
|
||||
DEFINES += CREATE_ACTION='\\"create-action\\"'
|
||||
DEFINES += VIEW_TYPE_ACTION='\\"view-type-action\\"'
|
||||
DEFINES += SORT_TYPE_ACTION='\\"sort-type-action\\"'
|
||||
DEFINES += SORT_ORDER_ACTION='\\"sort-order-action\\"'
|
||||
DEFINES += SORT_PREFERENCES_ACTION='\\"sort-preferences-action\\"'
|
||||
DEFINES += COPY_ACTION='\\"copy-action\\"'
|
||||
DEFINES += CUT_ACTION='\\"cut-action\\"'
|
||||
DEFINES += TRASH_ACTION='\\"trash-action\\"'
|
||||
DEFINES += DELETE_ACTION='\\"delete-action\\"'
|
||||
DEFINES += RENAME_ACTION='\\"rename-action\\"'
|
||||
DEFINES += PASTE_ACTION='\\"paste-action\\"'
|
||||
DEFINES += REFRESH_ACTION='\\"refresh-action\\"'
|
||||
DEFINES += SELECT_ALL_ACTION='\\"select-all-action\\"'
|
||||
DEFINES += REVERSE_SELECT_ACTION='\\"reverse-select-action\\"'
|
||||
DEFINES += PROPERTIES_ACTION='\\"properties-action\\"'
|
||||
DEFINES += FORMAT_ACTION='\\"format-action\\"'
|
||||
DEFINES += CLEAN_THE_TRASH_ACTION='\\"clean-the-trash-action\\"'
|
||||
DEFINES += RESTORE_ACTION='\\"restore-action\\"'
|
||||
DEFINES += CLEAN_THE_RECENT_ACTION='\\"clean-the-recent-action\\"'
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any Qt feature that has been marked deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if it uses deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
mainwindow.cpp
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h
|
||||
|
||||
FORMS += \
|
||||
mainwindow.ui
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
|
@ -0,0 +1,17 @@
|
|||
#include "mainwindow.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
#include <QFileDialog>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
QFileDialog d;
|
||||
d.exec();
|
||||
|
||||
MainWindow w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QDir>
|
||||
#include <QUrl>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_pushButton_clicked()
|
||||
{
|
||||
QFileDialog d;
|
||||
d.setDirectory(ui->label->text());
|
||||
d.selectFile(ui->label_2->text());
|
||||
d.exec();
|
||||
|
||||
qDebug()<<d.selectedUrls();
|
||||
qDebug()<<d.directory();
|
||||
}
|
||||
|
||||
void MainWindow::on_pushButton_2_clicked()
|
||||
{
|
||||
auto d = new QFileDialog;
|
||||
d->setDirectory(ui->label->text());
|
||||
d->selectFile(ui->label_2->text());
|
||||
d->show();
|
||||
}
|
||||
|
||||
void MainWindow::on_pushButton_3_clicked()
|
||||
{
|
||||
QFileDialog d;
|
||||
d.setAcceptMode(QFileDialog::AcceptOpen);
|
||||
d.setDirectory(ui->label->text());
|
||||
d.selectFile(ui->label_2->text());
|
||||
d.exec();
|
||||
|
||||
qDebug()<<d.selectedUrls();
|
||||
qDebug()<<d.directory();
|
||||
}
|
||||
|
||||
void MainWindow::on_pushButton_4_clicked()
|
||||
{
|
||||
QFileDialog d;
|
||||
d.setAcceptMode(QFileDialog::AcceptSave);
|
||||
d.setDirectory(ui->label->text());
|
||||
d.selectFile(ui->label_2->text());
|
||||
d.exec();
|
||||
|
||||
qDebug()<<d.selectedUrls();
|
||||
qDebug()<<d.directory();
|
||||
}
|
||||
|
||||
void MainWindow::on_pushButton_5_clicked()
|
||||
{
|
||||
qDebug()<<QFileDialog::getOpenFileUrl(0, "test", ui->label->text());
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui { class MainWindow; }
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_clicked();
|
||||
|
||||
void on_pushButton_2_clicked();
|
||||
|
||||
void on_pushButton_3_clicked();
|
||||
|
||||
void on_pushButton_4_clicked();
|
||||
|
||||
void on_pushButton_5_clicked();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
};
|
||||
#endif // MAINWINDOW_H
|
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>892</width>
|
||||
<height>608</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>13</x>
|
||||
<y>89</y>
|
||||
<width>880</width>
|
||||
<height>182</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="pushButton_3">
|
||||
<property name="text">
|
||||
<string>test open</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>directory</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit"/>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>selected uri</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="text">
|
||||
<string>test show</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="lineEdit_2"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>test exec</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButton_4">
|
||||
<property name="text">
|
||||
<string>test save</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="pushButton_5">
|
||||
<property name="text">
|
||||
<string>test static open</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>892</width>
|
||||
<height>49</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -2,6 +2,7 @@ TEMPLATE = subdirs
|
|||
|
||||
SUBDIRS += \
|
||||
custom-shadow \
|
||||
filedialog \
|
||||
highlighted-icon-button \
|
||||
messagebox \
|
||||
region-blur \
|
||||
|
|
|
@ -110,10 +110,7 @@ bool BlurHelper::eventFilter(QObject *obj, QEvent *e)
|
|||
void BlurHelper::registerWidget(QWidget *widget)
|
||||
{
|
||||
// FIXME: how to blur window on wayland?
|
||||
//if (!QX11Info::isPlatformX11())
|
||||
//return;
|
||||
|
||||
if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind))
|
||||
if (!QX11Info::isPlatformX11())
|
||||
return;
|
||||
|
||||
if (!widget)
|
||||
|
@ -159,9 +156,6 @@ void BlurHelper::unregisterWidget(QWidget *widget)
|
|||
if (!QX11Info::isPlatformX11())
|
||||
return;
|
||||
|
||||
if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind))
|
||||
return;
|
||||
|
||||
if (!widget)
|
||||
return;
|
||||
|
||||
|
@ -217,6 +211,10 @@ void BlurHelper::onBlurEnableChanged(bool enable)
|
|||
} else {
|
||||
qApp->setProperty("blurEnable", false);
|
||||
}
|
||||
|
||||
if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind))
|
||||
return;
|
||||
|
||||
for (auto widget : qApp->allWidgets()) {
|
||||
widget->update();
|
||||
if (m_blur_widgets.contains(widget)) {
|
||||
|
@ -247,6 +245,9 @@ void BlurHelper::delayUpdate(QWidget *w, bool updateBlurRegionOnly)
|
|||
if (w->winId() <= 0)
|
||||
return;
|
||||
|
||||
if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind))
|
||||
return;
|
||||
|
||||
m_update_list.append(w);
|
||||
if (!m_timer.isActive()) {
|
||||
for (auto widget : m_update_list) {
|
||||
|
@ -272,7 +273,7 @@ void BlurHelper::delayUpdate(QWidget *w, bool updateBlurRegionOnly)
|
|||
break;
|
||||
}
|
||||
QPainterPath path;
|
||||
path.addRoundedRect(widget->rect().adjusted(+5,+5,-5,-5), 8, 8);
|
||||
path.addRoundedRect(widget->rect().adjusted(+2,+8,-2,-8), 8, 8);
|
||||
KWindowEffects::enableBlurBehind(widget->winId(), true, path.toFillPolygon().toPolygon());
|
||||
if (!updateBlurRegionOnly)
|
||||
widget->update();
|
||||
|
@ -281,7 +282,7 @@ void BlurHelper::delayUpdate(QWidget *w, bool updateBlurRegionOnly)
|
|||
|
||||
if (widget->inherits("QTipLabel")) {
|
||||
QPainterPath path;
|
||||
path.addRoundedRect(widget->rect().adjusted(+3,+3,-3,-3),6, 6);
|
||||
path.addRoundedRect(widget->rect().adjusted(+3,+3,-3,-3), 6, 6);
|
||||
KWindowEffects::enableBlurBehind(widget->winId(), true, path.toFillPolygon().toPolygon());
|
||||
if (!updateBlurRegionOnly)
|
||||
widget->update();
|
||||
|
|
|
@ -33,6 +33,10 @@
|
|||
#include <QWidget>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusInterface>
|
||||
#include <QDBusConnection>
|
||||
#include <QLayout>
|
||||
|
||||
using namespace UKUI;
|
||||
|
||||
|
@ -41,7 +45,7 @@ ProxyStylePlugin::ProxyStylePlugin()
|
|||
if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) {
|
||||
auto settings = UKUIStyleSettings::globalInstance();
|
||||
connect(settings, &UKUIStyleSettings::changed, this, [=](const QString &key) {
|
||||
if (key == "styleName" || key == "widgetThemeName") {
|
||||
if (key == "styleName" || key == "widgetThemeName" || key == "themeColor") {
|
||||
if (blackList().contains(qAppName()) || qAppName() == "kylin-software-center.py")
|
||||
return;
|
||||
|
||||
|
@ -66,28 +70,29 @@ ProxyStylePlugin::ProxyStylePlugin()
|
|||
else if (styleName == "ukui-white")
|
||||
styleName = "ukui-light";
|
||||
|
||||
} else {
|
||||
styleName = "ukui-default";
|
||||
|
||||
if (themeName == "default" || themeName == "classical" || themeName == "fashion") {
|
||||
qApp->setProperty("widgetThemeName", themeName);
|
||||
} else {
|
||||
qApp->setProperty("widgetThemeName", "default");
|
||||
}
|
||||
// tableModeChanged(false);
|
||||
qApp->setStyle(new ProxyStyle(styleName));
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
if (themeName == "default" || themeName == "classical" || themeName == "fashion") {
|
||||
qApp->setProperty("widgetThemeName", themeName);
|
||||
} else {
|
||||
qApp->setProperty("widgetThemeName", "default");
|
||||
//other style
|
||||
for (auto keys : QStyleFactory::keys()) {
|
||||
if (styleName.toLower() == keys.toLower()) {
|
||||
qApp->setStyle(new QProxyStyle(styleName));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
qApp->setStyle(new ProxyStyle(styleName));
|
||||
//default style fusion
|
||||
qApp->setStyle(new QProxyStyle("fusion"));
|
||||
return;
|
||||
|
||||
// for (auto keys : QStyleFactory::keys()) {
|
||||
// if (styleName.toLower() == keys.toLower()) {
|
||||
// qApp->setStyle(new QProxyStyle(styleName));
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
// qApp->setStyle(new QProxyStyle("fusion"));
|
||||
// return;
|
||||
}
|
||||
|
||||
if (key == "systemPalette") {
|
||||
|
@ -99,6 +104,20 @@ ProxyStylePlugin::ProxyStylePlugin()
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
QDBusInterface *interFace = new QDBusInterface("com.kylin.statusmanager.interface",
|
||||
"/",
|
||||
"com.kylin.statusmanager.interface",
|
||||
QDBusConnection::sessionBus());
|
||||
if(interFace->isValid()){
|
||||
connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(tableModeChanged(bool)));
|
||||
// {
|
||||
// auto settings = UKUIStyleSettings::globalInstance();
|
||||
// auto styleName = settings->get("styleName").toString();
|
||||
// qApp->setStyle(new ProxyStyle(styleName));
|
||||
// return;
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
QStyle *ProxyStylePlugin::create(const QString &key)
|
||||
|
@ -161,3 +180,40 @@ void ProxyStylePlugin::onSystemPaletteChanged()
|
|||
QApplication::setPalette(palette);
|
||||
}
|
||||
}
|
||||
|
||||
void ProxyStylePlugin::tableModeChanged(bool isTableMode)
|
||||
{
|
||||
auto settings = UKUIStyleSettings::globalInstance();
|
||||
auto styleName = settings->get("styleName").toString();
|
||||
qApp->setProperty("isInitial", false);
|
||||
qApp->setStyle(new ProxyStyle(styleName));
|
||||
/*
|
||||
foreach (QObject *obj, qApp->children()) {
|
||||
if(qobject_cast<const QVBoxLayout*>(obj))//obj->inherits("QVBoxLayout"))
|
||||
{
|
||||
auto *vlayout = qobject_cast<QVBoxLayout *>(obj);
|
||||
qDebug() << "vlayout..." << vlayout->spacing();
|
||||
|
||||
//layout->update();
|
||||
}
|
||||
else if(qobject_cast<QHBoxLayout *>(obj))
|
||||
{
|
||||
auto *hlayout = qobject_cast<QHBoxLayout *>(obj);
|
||||
qDebug() << "hlayout..." << hlayout->spacing();
|
||||
|
||||
//layout->update();
|
||||
}
|
||||
}
|
||||
foreach (QWidget *widget, qApp->topLevelWidgets()) {
|
||||
qDebug() << "widget size...." << widget->size() << widget->minimumSizeHint() << widget->minimumSize();
|
||||
widget->adjustSize();
|
||||
if(widget->layout() != nullptr)
|
||||
{
|
||||
qDebug() << "layoutSpace...." << widget->layout()->spacing();
|
||||
}
|
||||
// if(widget->size() != widget->minimumSizeHint())
|
||||
// widget->setGeometry(widget->x(), widget->y(), widget->minimumSizeHint().width(), widget->minimumSizeHint().height());
|
||||
}
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ protected:
|
|||
signals:
|
||||
|
||||
public slots:
|
||||
void tableModeChanged(bool isTableMode);
|
||||
|
||||
private:
|
||||
QString m_current_style_name;
|
||||
|
|
|
@ -95,6 +95,8 @@ ProxyStyle::ProxyStyle(const QString &key) : QProxyStyle(key == nullptr? "fusion
|
|||
// qApp->paletteChanged(pal);
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
} else {
|
||||
qWarning("org.ukui.style is null!");
|
||||
}
|
||||
|
@ -280,3 +282,4 @@ void ProxyStyle::polish(QPalette &pal)
|
|||
{
|
||||
QProxyStyle::polish(pal);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += widgets KWindowSystem x11extras KWaylandClient
|
||||
QT += widgets KWindowSystem x11extras KWaylandClient dbus
|
||||
|
||||
TARGET = ukui-proxy-style
|
||||
TEMPLATE = lib
|
||||
|
|
|
@ -164,10 +164,18 @@ void WindowManager::buttonPresseEvent(QObject *obj, QMouseEvent *e)
|
|||
QWidget *w = qobject_cast<QWidget*>(obj);
|
||||
//NOTE: We have to skip the border for resize event.
|
||||
auto pos = w->mapFromGlobal(e->globalPos());
|
||||
if (!w->rect().adjusted(10, 10, -10, -10).contains(pos)) {
|
||||
|
||||
//title active height set 48px
|
||||
QRect activeRect(0, 0, w->width(), 48);
|
||||
if (!activeRect.contains(pos)) {
|
||||
//qDebug()<<"skip move event";
|
||||
return;
|
||||
}
|
||||
// if (!w->rect().adjusted(10, 10, -10, -10).contains(pos)) {
|
||||
// //qDebug()<<"skip move event";
|
||||
// return;
|
||||
// }
|
||||
|
||||
|
||||
m_prepared_to_drag = true;
|
||||
m_is_dragging = false;
|
||||
|
|
|
@ -2,8 +2,20 @@ INCLUDEPATH += $$PWD
|
|||
|
||||
HEADERS += \
|
||||
$$PWD/box-animator.h \
|
||||
$$PWD/button-animator.h
|
||||
$$PWD/box-animation-helper.h \
|
||||
$$PWD/button-animator.h \
|
||||
$$PWD/button-animation-helper.h \
|
||||
$$PWD/progressbar-animation-helper.h \
|
||||
$$PWD/progressbar-animation.h \
|
||||
$$PWD/scrollbar-animation-helper.h \
|
||||
$$PWD/tab-widget-animation-helper.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/box-animator.cpp \
|
||||
$$PWD/button-animator.cpp
|
||||
$$PWD/box-animation-helper.cpp \
|
||||
$$PWD/button-animation-helper.cpp \
|
||||
$$PWD/button-animator.cpp \
|
||||
$$PWD/progressbar-animation-helper.cpp \
|
||||
$$PWD/progressbar-animation.cpp \
|
||||
$$PWD/scrollbar-animation-helper.cpp \
|
||||
$$PWD/tab-widget-animation-helper.cpp
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "box-animation-helper.h"
|
||||
|
||||
#include "animations/box-animator.h"
|
||||
#include "box-animator.h"
|
||||
#include <QWidget>
|
||||
|
||||
BoxAnimationHelper::BoxAnimationHelper(QObject *parent) : AnimationHelper(parent)
|
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
|
||||
#include "button-animation-helper.h"
|
||||
#include "animations/button-animator.h"
|
||||
#include "button-animator.h"
|
||||
#include <QWidget>
|
||||
|
||||
ButtonAnimationHelper::ButtonAnimationHelper(QObject *parent) : AnimationHelper(parent)
|
File diff suppressed because it is too large
Load Diff
|
@ -46,11 +46,18 @@
|
|||
|
||||
|
||||
|
||||
class KAbstractStyleParameters
|
||||
class KAbstractStyleParameters: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
KAbstractStyleParameters(QObject *parent, bool isDark);
|
||||
|
||||
enum SpinBoxControlLayout {
|
||||
Horizontal,
|
||||
Vertical
|
||||
};
|
||||
Q_ENUM(SpinBoxControlLayout)
|
||||
|
||||
// radius
|
||||
int radius = 6;
|
||||
|
||||
|
@ -59,9 +66,9 @@ public:
|
|||
int IconButton_Distance = 8;
|
||||
|
||||
// button
|
||||
int Button_MarginHeight = 2;
|
||||
int ToolButton_MarginWidth = 10;
|
||||
int Button_MarginWidth = 16;
|
||||
int Button_MarginHeight = 0;
|
||||
int ToolButton_MarginWidth = 8;
|
||||
int Button_MarginWidth = 8;
|
||||
int Button_IconSize = 16;
|
||||
int Button_IndicatorSize = 16;
|
||||
int Button_DefaultIndicatorSize = 0;
|
||||
|
@ -72,9 +79,9 @@ public:
|
|||
QColor ColoseButtonColor = QColor(243, 34, 45);
|
||||
|
||||
// menu
|
||||
int Menu_MarginHeight = 4 + 5;
|
||||
int Menu_MarginHeight = 4 + 8;
|
||||
int Menu_Combobox_Popup_MarginHeight = 4;
|
||||
int Menu_MarginWidth = 4 + 5;
|
||||
int Menu_MarginWidth = 4 + 2;
|
||||
int Menu_MarginPanelWidth = 0;
|
||||
|
||||
// menu-item
|
||||
|
@ -117,6 +124,7 @@ public:
|
|||
// combobox
|
||||
int ComboBox_DefaultWidth = 160;
|
||||
int ComboBox_DefaultHeight = 36;
|
||||
int ComboBox_DefaultMenuItemHeight = 36;
|
||||
int ComboBox_FrameWidth = 2;
|
||||
|
||||
// spinbox
|
||||
|
@ -125,7 +133,8 @@ public:
|
|||
int SpinBox_FrameWidth = 2;
|
||||
|
||||
// tabbar
|
||||
int TabBar_DefaultWidth = 168;
|
||||
int TabBar_DefaultMinWidth = 168;
|
||||
int TabBar_DefaultMaxWidth = 248;
|
||||
int TabBar_DefaultHeight = 40;
|
||||
int TabBar_ScrollButtonWidth = 16;
|
||||
int TabBar_ScrollButtonOverlap = 2;
|
||||
|
@ -133,7 +142,26 @@ public:
|
|||
// tooltip
|
||||
int ToolTip_DefaultMargin = 8;
|
||||
|
||||
//viewItem
|
||||
int ViewItem_DefaultHeight = 36;
|
||||
|
||||
//table
|
||||
int Table_HeaderHeight = 36;
|
||||
|
||||
float m_scaleRatio4_3 = 1.0;
|
||||
float m_scaleRatio3_2 = 1.0;
|
||||
float m_scaleRatio2_1 = 1.0;
|
||||
|
||||
int m_headerDefaultSectionSizeVertical = 36;
|
||||
int m_headerDefaultSectionSizeVertical1_1 = 36;
|
||||
int m_headerDefaultSectionSizeVertical4_3 = 48;
|
||||
bool m_isTableMode = false;
|
||||
bool m_isInitial = true;
|
||||
|
||||
float m_scaleSliderDefaultLength = 1.0;
|
||||
float m_ScaleComboBoxDefaultLength = 1.0;
|
||||
float m_ScaleLineEditDefaultLength = 1.0;
|
||||
float m_scaleTabBarHeight6_5 = 1.0;
|
||||
|
||||
|
||||
QPalette defaultPalette;
|
||||
|
@ -155,15 +183,14 @@ public:
|
|||
TabWidgetParameters tabWidgetParameters;
|
||||
MenuParameters menuParameters;
|
||||
|
||||
|
||||
|
||||
QPalette setPalette(QPalette &palette);
|
||||
int getSpinBoxControlLayout();
|
||||
|
||||
virtual void initPalette(bool isDark) = 0;
|
||||
virtual void initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0;
|
||||
virtual void initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0;
|
||||
virtual void initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0;
|
||||
virtual void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0;
|
||||
virtual void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false) = 0;
|
||||
virtual void initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0;
|
||||
virtual void initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0;
|
||||
virtual void initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0;
|
||||
|
@ -176,6 +203,9 @@ public:
|
|||
virtual void initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0;
|
||||
virtual void initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0;
|
||||
virtual void initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0;
|
||||
|
||||
private:
|
||||
int m_spinBoxControlLayout = SpinBoxControlLayout::Vertical;
|
||||
};
|
||||
|
||||
|
||||
|
@ -188,7 +218,7 @@ public:
|
|||
void initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false) override;
|
||||
void initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
|
@ -213,7 +243,7 @@ public:
|
|||
void initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false) override;
|
||||
void initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
|
@ -238,7 +268,7 @@ public:
|
|||
void initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false) override;
|
||||
void initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
void initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override;
|
||||
|
|
|
@ -13,6 +13,7 @@ PKGCONFIG += gsettings-qt
|
|||
|
||||
include(../../libqt5-ukui-style/libqt5-ukui-style.pri)
|
||||
include(animations/animations.pri)
|
||||
include(widget-parameters/widget-parameters.pri)
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
|
@ -28,63 +29,21 @@ DEFINES += QT_MESSAGELOGCONTEXT
|
|||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
SOURCES += \
|
||||
box-animation-helper.cpp \
|
||||
button-animation-helper.cpp \
|
||||
checkbox-parameters.cpp \
|
||||
combobox-parameters.cpp \
|
||||
kabstract-style-parameters.cpp \
|
||||
lineedit-parameters.cpp \
|
||||
list-parameters.cpp \
|
||||
menu-parameters.cpp \
|
||||
progressbar-animation-helper.cpp \
|
||||
progressbar-animation.cpp \
|
||||
progressbar-parameters.cpp \
|
||||
pushbutton-parameters.cpp \
|
||||
qt5-ukui-style-plugin.cpp \
|
||||
qt5-ukui-style.cpp \
|
||||
radiobutton-parameters.cpp \
|
||||
scrollbar-parameters.cpp \
|
||||
shadow-helper.cpp \
|
||||
slider-parameters.cpp \
|
||||
spinbox-parameters.cpp \
|
||||
tab-widget-animation-helper.cpp \
|
||||
scrollbar-animation-helper.cpp \
|
||||
qt5-ukui-style-helper.cpp \
|
||||
table-parameters.cpp \
|
||||
tabwidget-parameters.cpp \
|
||||
toolbutton-parameters.cpp \
|
||||
tooltip-parameters.cpp \
|
||||
tree-parameters.cpp \
|
||||
view-helper.cpp
|
||||
|
||||
HEADERS += \
|
||||
box-animation-helper.h \
|
||||
button-animation-helper.h \
|
||||
checkbox-parameters.h \
|
||||
combobox-parameters.h \
|
||||
kabstract-style-parameters.h \
|
||||
lineedit-parameters.h \
|
||||
list-parameters.h \
|
||||
menu-parameters.h \
|
||||
progressbar-animation-helper.h \
|
||||
progressbar-animation.h \
|
||||
progressbar-parameters.h \
|
||||
pushbutton-parameters.h \
|
||||
qt5-ukui-style-plugin.h \
|
||||
qt5-ukui-style.h \
|
||||
radiobutton-parameters.h \
|
||||
scrollbar-parameters.h \
|
||||
shadow-helper.h \
|
||||
slider-parameters.h \
|
||||
spinbox-parameters.h \
|
||||
tab-widget-animation-helper.h \
|
||||
scrollbar-animation-helper.h \
|
||||
qt5-ukui-style-helper.h \
|
||||
table-parameters.h \
|
||||
tabwidget-parameters.h \
|
||||
toolbutton-parameters.h \
|
||||
tooltip-parameters.h \
|
||||
tree-parameters.h
|
||||
qt5-ukui-style-helper.h
|
||||
|
||||
|
||||
DISTFILES += qt5-style-ukui.json
|
||||
|
||||
unix {
|
||||
|
|
|
@ -35,26 +35,24 @@
|
|||
Qt5UKUIStylePlugin::Qt5UKUIStylePlugin(QObject *parent) :
|
||||
QStylePlugin(parent)
|
||||
{
|
||||
if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) {
|
||||
auto settings = UKUIStyleSettings::globalInstance();
|
||||
// QTimer::singleShot(1000, this, [=](){
|
||||
QString inconTheme = settings->get("iconThemeName").toString();
|
||||
if (inconTheme == "ukui-icon-theme-classical" || inconTheme == "ukui-classical") {
|
||||
HighLightEffect::setSymoblicColor(QColor(128, 128, 128, 255));
|
||||
}
|
||||
// });
|
||||
// if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) {
|
||||
// auto settings = UKUIStyleSettings::globalInstance();
|
||||
// QString inconTheme = settings->get("iconThemeName").toString();
|
||||
// if (inconTheme == "ukui-icon-theme-classical" || inconTheme == "ukui-classical") {
|
||||
// HighLightEffect::setSymoblicColor(QColor(128, 128, 128, 255));
|
||||
// }
|
||||
|
||||
connect(settings, &QGSettings::changed, this, [=](const QString &key){
|
||||
if (key == "iconThemeName") {
|
||||
QString inconTheme = settings->get("iconThemeName").toString();
|
||||
if (inconTheme == "ukui-icon-theme-classical" || inconTheme == "ukui-classical") {
|
||||
HighLightEffect::setSymoblicColor(QColor(128, 128, 128, 255));
|
||||
} else {
|
||||
HighLightEffect::setSymoblicColor(QColor(31, 32, 34, 192));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// connect(settings, &QGSettings::changed, this, [=](const QString &key){
|
||||
// if (key == "iconThemeName") {
|
||||
// QString inconTheme = settings->get("iconThemeName").toString();
|
||||
// if (inconTheme == "ukui-icon-theme-classical" || inconTheme == "ukui-classical") {
|
||||
// HighLightEffect::setSymoblicColor(QColor(128, 128, 128, 255));
|
||||
// } else {
|
||||
// HighLightEffect::setSymoblicColor(QColor(31, 32, 34, 192));
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
QStyle *Qt5UKUIStylePlugin::create(const QString &key)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -141,6 +141,7 @@ private:
|
|||
// KAbstractStyleParameters
|
||||
KAbstractStyleParameters *sp = nullptr;
|
||||
|
||||
|
||||
bool isUseDarkPalette() const;
|
||||
|
||||
QColor button_Click(const QStyleOption *option) const;
|
||||
|
|
|
@ -151,8 +151,8 @@ void Qt5UKUIStyle::viewItemLayout(const QStyleOptionViewItem *option, QRect *ch
|
|||
*textRect = QRect(QPoint(0, 0), viewItemSize(option, Qt::DisplayRole));
|
||||
*checkRect = QRect(QPoint(0, 0), viewItemSize(option, Qt::CheckStateRole));
|
||||
|
||||
int Margin_Width = 4;
|
||||
int Margin_Height = 2;
|
||||
int Margin_Width = 2;
|
||||
int Margin_Height = 0;
|
||||
|
||||
const QWidget *widget = option->widget;
|
||||
const bool hasCheck = checkRect->isValid();
|
||||
|
@ -349,3 +349,4 @@ QSize Qt5UKUIStyle::viewItemSize(const QStyleOptionViewItem *option, int role) c
|
|||
}
|
||||
return QSize(0, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#define LISTPARAMETERS_H
|
||||
|
||||
#include <QBrush>
|
||||
#include <QPen>
|
||||
|
||||
class ListParameters
|
||||
{
|
||||
|
@ -38,6 +39,8 @@ public:
|
|||
QBrush listHoverBrush;
|
||||
QBrush listSelectBrush;
|
||||
QBrush listDisableBrush;
|
||||
QPen listTextHoverPen;
|
||||
QPen listTextSelectPen;
|
||||
};
|
||||
|
||||
#endif // LISTPARAMETERS_H
|
|
@ -46,6 +46,8 @@ public:
|
|||
QBrush pushButtonCheckClickBrush;
|
||||
QBrush pushButtonCheckDisableBrush;
|
||||
|
||||
QPen pushButtonFocusPen;
|
||||
|
||||
// QColor PushButtonInactiveColor;
|
||||
|
||||
// QColor PushButtonTextDefaultColor;
|
|
@ -49,10 +49,12 @@ public:
|
|||
QBrush spinBoxUpHoverBrush;
|
||||
QBrush spinBoxUpFocusHoverBrush;
|
||||
QBrush spinBoxUpClickBrush;
|
||||
QBrush spinBoxUpDefaultBrush;
|
||||
|
||||
QBrush spinBoxDownHoverBrush;
|
||||
QBrush spinBoxDownFocusHoverBrush;
|
||||
QBrush spinBoxDownClickBrush;
|
||||
QBrush spinBoxDownDefaultBrush;
|
||||
};
|
||||
|
||||
#endif // SPINBOXPARAMETERS_H
|
|
@ -25,6 +25,7 @@
|
|||
#define TOOLBUTTONPARAMETERS_H
|
||||
|
||||
#include <QBrush>
|
||||
#include <QPen>
|
||||
|
||||
class ToolButtonParameters
|
||||
{
|
||||
|
@ -43,6 +44,8 @@ public:
|
|||
QBrush toolButtonCheckHoverBrush;
|
||||
QBrush toolButtonCheckClickBrush;
|
||||
QBrush toolButtonCheckDisableBrush;
|
||||
|
||||
QPen toolButtonFocusPen;
|
||||
};
|
||||
|
||||
#endif // TOOLBUTTONPARAMETERS_H
|
|
@ -0,0 +1,39 @@
|
|||
INCLUDEPATH += $$PWD
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/checkbox-parameters.h \
|
||||
$$PWD/combobox-parameters.h \
|
||||
$$PWD/lineedit-parameters.h \
|
||||
$$PWD/list-parameters.h \
|
||||
$$PWD/menu-parameters.h \
|
||||
$$PWD/progressbar-parameters.h \
|
||||
$$PWD/pushbutton-parameters.h \
|
||||
$$PWD/radiobutton-parameters.h \
|
||||
$$PWD/scrollbar-parameters.h \
|
||||
$$PWD/slider-parameters.h \
|
||||
$$PWD/spinbox-parameters.h \
|
||||
$$PWD/table-parameters.h \
|
||||
$$PWD/tabwidget-parameters.h \
|
||||
$$PWD/toolbutton-parameters.h \
|
||||
$$PWD/tooltip-parameters.h \
|
||||
$$PWD/tree-parameters.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/checkbox-parameters.cpp \
|
||||
$$PWD/combobox-parameters.cpp \
|
||||
$$PWD/lineedit-parameters.cpp \
|
||||
$$PWD/list-parameters.cpp \
|
||||
$$PWD/menu-parameters.cpp \
|
||||
$$PWD/progressbar-parameters.cpp \
|
||||
$$PWD/pushbutton-parameters.cpp \
|
||||
$$PWD/radiobutton-parameters.cpp \
|
||||
$$PWD/scrollbar-parameters.cpp \
|
||||
$$PWD/slider-parameters.cpp \
|
||||
$$PWD/spinbox-parameters.cpp \
|
||||
$$PWD/table-parameters.cpp \
|
||||
$$PWD/tabwidget-parameters.cpp \
|
||||
$$PWD/toolbutton-parameters.cpp \
|
||||
$$PWD/tooltip-parameters.cpp \
|
||||
$$PWD/tree-parameters.cpp
|
||||
|
||||
|
Loading…
Reference in New Issue