qt5-ukui-platformtheme/ 0000775 0001750 0001750 00000000000 13643027763 014044 5 ustar feng feng qt5-ukui-platformtheme/qt5-ukui.pro 0000664 0001750 0001750 00000000161 13641116416 016240 0 ustar feng feng TEMPLATE = subdirs
SUBDIRS += \
qt5-ukui-platformtheme \
ukui-styles \
libqt5-ukui-style \
test
qt5-ukui-platformtheme/test/ 0000775 0001750 0001750 00000000000 13643026433 015014 5 ustar feng feng qt5-ukui-platformtheme/test/highlighted-icon-button/ 0000775 0001750 0001750 00000000000 13643026433 021533 5 ustar feng feng qt5-ukui-platformtheme/test/highlighted-icon-button/main.cpp 0000664 0001750 0001750 00000001701 13641116416 023161 0 ustar feng feng /*
* Qt5-UKUI
*
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
* Authors: Yue Lan
*
*/
#include "mainwindow.h"
#include
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
qt5-ukui-platformtheme/test/highlighted-icon-button/mainwindow.cpp 0000664 0001750 0001750 00000005736 13641116416 024425 0 ustar feng feng /*
* Qt5-UKUI
*
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
* Authors: Yue Lan
*
*/
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include
#include
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
ui->comboBox->setEnabled(false);
menu = new QMenu(ui->pushButton);
menu->addAction(QIcon::fromTheme("edit-find-symbolic"), "edit-find-symbolic");
menu->addAction(QIcon::fromTheme("edit-cut-symbolic"), "edit-cut-symbolic");
menu->addAction(QIcon::fromTheme("user-trash"), "user-trash");
menu->addAction(QIcon::fromTheme("open-menu-symbolic"), "open-menu-symbolic");
ui->pushButton->setMenu(menu);
view = new QListWidget(this);
view->resize(300, 200);
view->move(100, 200);
auto item = new QListWidgetItem(QIcon::fromTheme("window-close"), "window-close", view);
item = new QListWidgetItem(QIcon::fromTheme("window-close-symbolic"), "window-close-symoblic", view);
item = new QListWidgetItem(QIcon::fromTheme("user-trash"), "user-trash", view);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_checkBox_toggled(bool checked)
{
ui->pushButton->setProperty("useIconHighlightEffect", checked);
ui->pushButton->update();
ui->toolButton->setProperty("useIconHighlightEffect", checked);
ui->toolButton->update();
view->setProperty("useIconHighlightEffect", checked);
view->viewport()->update();
menu->setProperty("useIconHighlightEffect", checked);
ui->comboBox->setEnabled(checked);
int mode = ui->comboBox->currentIndex();
ui->pushButton->setProperty("iconHighlightEffectMode", mode);
ui->pushButton->update();
ui->toolButton->setProperty("iconHighlightEffectMode", mode);
ui->toolButton->update();
view->setProperty("iconHighlightEffectMode", mode);
view->viewport()->update();
menu->setProperty("iconHighlightEffectMode", mode);
}
void MainWindow::on_comboBox_currentIndexChanged(int index)
{
int mode = index;
ui->pushButton->setProperty("iconHighlightEffectMode", mode);
ui->pushButton->update();
ui->toolButton->setProperty("iconHighlightEffectMode", mode);
ui->toolButton->update();
view->setProperty("iconHighlightEffectMode", mode);
view->viewport()->update();
}
qt5-ukui-platformtheme/test/highlighted-icon-button/mainwindow.h 0000664 0001750 0001750 00000002423 13641116416 024060 0 ustar feng feng /*
* Qt5-UKUI
*
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
* Authors: Yue Lan
*
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class QListWidget;
class QMenu;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void on_checkBox_toggled(bool checked);
void on_comboBox_currentIndexChanged(int index);
private:
Ui::MainWindow *ui;
QListWidget *view;
QMenu *menu;
};
#endif // MAINWINDOW_H
qt5-ukui-platformtheme/test/highlighted-icon-button/mainwindow.ui 0000664 0001750 0001750 00000004674 13641116416 024260 0 ustar feng feng
MainWindow
0
0
800
600
MainWindow
12
12
345
101
-
PushButton
..
36
36
-
use auto highlight icon
-
...
..
36
36
-
-
highlightOnly
-
bothDefaultAndHighlight
qt5-ukui-platformtheme/test/highlighted-icon-button/highlighted-icon-button.pro 0000664 0001750 0001750 00000001741 13641116416 026776 0 ustar feng feng 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
qt5-ukui-platformtheme/test/system-settings/ 0000775 0001750 0001750 00000000000 13643026434 020177 5 ustar feng feng qt5-ukui-platformtheme/test/system-settings/main.cpp 0000664 0001750 0001750 00000002134 13641116416 021625 0 ustar feng feng /*
* Qt5-UKUI
*
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
* Authors: Yue Lan
*
*/
#include "mainwindow.h"
#include
#include
#include
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
QFontDatabase db;
//qDebug()<