diff --git qt5/CMakeLists.txt qt5/CMakeLists.txt
index 837d9c2..0e9f5fa 100644
|
|
if(QTC_QT5_ENABLE_QTQUICK2) |
3 | 3 | else() |
4 | 4 | set(QTC_QT5_MODULES Qt5Core Qt5Gui Qt5Widgets Qt5Svg Qt5DBus) |
5 | 5 | endif() |
| 6 | if(QTC_QT5_ENABLE_KDE) |
| 7 | set(QTC_QT5_MODULES ${QTC_QT5_MODULES} Qt5PrintSupport) |
| 8 | endif() |
6 | 9 | |
7 | 10 | if(ENABLE_QT5 AND NOT ENABLE_QT5_DEFINED) |
8 | 11 | # ENABLE_QT5 is not defined on the command line |
… |
… |
if(ENABLE_QT5) |
66 | 69 | I18n |
67 | 70 | KDELibs4Support |
68 | 71 | KIO |
| 72 | GuiAddons |
| 73 | IconThemes |
69 | 74 | WidgetsAddons |
70 | 75 | XmlGui) |
71 | 76 | |
72 | | # add_definitions(-DQTC_QT5_ENABLE_KDE) |
| 77 | add_definitions(-DQTC_QT5_ENABLE_KDE) |
73 | 78 | include(KDEInstallDirs) |
74 | 79 | include(KDECMakeSettings) |
75 | 80 | include(KDECompilerSettings) |
diff --git qt5/style/CMakeLists.txt qt5/style/CMakeLists.txt
index 7f65f8c..de4e257 100644
|
|
add_dependencies(qtcurve-qt5 qtc_qt5_check_on_hdr qtc_qt5_check_x_on_hdr |
67 | 67 | qtc_qt5_dialog_error_hdr qtc_qt5_dialog_information_hdr |
68 | 68 | qtc_qt5_dialog_warning_hdr) |
69 | 69 | target_link_libraries(qtcurve-qt5 ${QTC_QT5_LINK_LIBS} qtcurve-utils) |
| 70 | target_link_libraries(qtcurve-qt5 |
| 71 | KF5::GuiAddons |
| 72 | KF5::IconThemes |
| 73 | KF5::KDELibs4Support |
| 74 | ) |
70 | 75 | install(TARGETS qtcurve-qt5 LIBRARY DESTINATION ${QTCURVE_STYLE_DIR}) |
71 | 76 | |
72 | 77 | if(QTC_QT5_ENABLE_KDE) |
diff --git qt5/style/qtcurve.cpp qt5/style/qtcurve.cpp
index febcfcf..89de3b6 100644
|
|
|
74 | 74 | #ifdef QTC_QT5_ENABLE_KDE |
75 | 75 | #include <KDE/KApplication> |
76 | 76 | #include <KDE/KAboutData> |
| 77 | #include <KDE/KGlobal> |
77 | 78 | #include <KDE/KGlobalSettings> |
78 | 79 | #include <KDE/KConfig> |
79 | 80 | #include <KDE/KConfigGroup> |
… |
… |
void Style::init(bool initial) |
364 | 365 | |
365 | 366 | #ifdef QTC_QT5_ENABLE_KDE |
366 | 367 | if (initial) { |
367 | | if (KGlobal::hasMainComponent()) { |
368 | | m_componentData = KGlobal::mainComponent(); |
369 | | } else { |
370 | | QString name(QApplication::applicationName()); |
| 368 | QString name(QApplication::applicationName()); |
371 | 369 | |
372 | | if(name.isEmpty()) |
373 | | name = qAppName(); |
| 370 | if(name.isEmpty()) |
| 371 | name = qAppName(); |
374 | 372 | |
375 | | if(name.isEmpty()) |
376 | | name = "QtApp"; |
377 | | } |
| 373 | if(name.isEmpty()) |
| 374 | name = "QtApp"; |
378 | 375 | } |
379 | 376 | #endif |
380 | 377 | |
diff --git qt5/style/qtcurve_api.cpp qt5/style/qtcurve_api.cpp
index 87a927f..02637d3 100644
|
|
|
67 | 67 | |
68 | 68 | #include <QDebug> |
69 | 69 | |
| 70 | #ifdef QTC_QT5_ENABLE_KDE |
| 71 | #include <QPrintDialog> |
| 72 | #include <KDE/KApplication> |
| 73 | #include <KDE/KGlobal> |
| 74 | #include <KDE/KGlobalSettings> |
| 75 | #include <KDE/KIconLoader> |
| 76 | #include <KDE/KIcon> |
| 77 | #include <KDE/KTitleWidget> |
| 78 | #include <KDE/KTabBar> |
| 79 | #include <KDE/KFileDialog> |
| 80 | #include <KDE/KAboutApplicationDialog> |
| 81 | #endif |
| 82 | |
| 83 | #include <qtcurve-utils/color.h> |
| 84 | |
70 | 85 | namespace QtCurve { |
71 | 86 | |
72 | 87 | void |
… |
… |
Style::styleHint(StyleHint hint, const QStyleOption *option, |
1883 | 1898 | if (hint >= SH_CustomBase && widget) { |
1884 | 1899 | if (widget->objectName() == "CE_CapacityBar") { |
1885 | 1900 | if (opts.boldProgress) { |
1886 | | setBold(const_cast<QWidget*>widget); |
| 1901 | setBold(const_cast<QWidget*>(widget)); |
1887 | 1902 | } |
1888 | 1903 | return CE_QtC_KCapacityBar; |
1889 | 1904 | } |
… |
… |
Style::styleHint(StyleHint hint, const QStyleOption *option, |
1895 | 1910 | |
1896 | 1911 | QPalette Style::standardPalette() const |
1897 | 1912 | { |
1898 | | #ifndef QTC_QT5_ENABLE_KDE |
1899 | 1913 | return QCommonStyle::standardPalette(); |
1900 | | #else |
1901 | | return KGlobalSettings::createApplicationPalette( |
1902 | | KSharedConfig::openConfig(m_componentData)); |
1903 | | #endif |
1904 | 1914 | } |
1905 | 1915 | |
1906 | 1916 | void |
diff --git qt5/style/qtcurve_p.h qt5/style/qtcurve_p.h
index bfc7502..91e21c2 100644
|
|
|
32 | 32 | #include <QWidget> |
33 | 33 | #include <QSplitter> |
34 | 34 | #include <QStatusBar> |
| 35 | #ifdef QTC_QT5_ENABLE_KDE |
| 36 | #include <kiconeffect.h> |
| 37 | #endif |
35 | 38 | |
36 | 39 | class QToolBar; |
37 | 40 | |
diff --git qt5/style/qtcurve_primitive.cpp qt5/style/qtcurve_primitive.cpp
index b5a3204..51653c7 100644
|
|
|
42 | 42 | #include "utils.h" |
43 | 43 | #include <common/config_file.h> |
44 | 44 | |
| 45 | #ifdef QTC_QT5_ENABLE_KDE |
| 46 | #include <KDE/KIcon> |
| 47 | #include <KDE/KTitleWidget> |
| 48 | #endif |
| 49 | |
45 | 50 | namespace QtCurve { |
46 | 51 | bool |
47 | 52 | Style::drawPrimitiveIndicatorTabClose(PrimitiveElement, |