aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-theme-engine/src/qt5ct-style
diff options
context:
space:
mode:
authorq5sys <jt@obs-sec.com>2017-07-18 16:20:54 -0400
committerq5sys <jt@obs-sec.com>2017-07-18 16:20:54 -0400
commitbc0a61342b27de6b9c658f6190481178b5d514f4 (patch)
tree810444405a451160b0036a87ae69fbd7675ea8c3 /src-qt5/core/lumina-theme-engine/src/qt5ct-style
parentrename .pri file (diff)
downloadlumina-bc0a61342b27de6b9c658f6190481178b5d514f4.tar.gz
lumina-bc0a61342b27de6b9c658f6190481178b5d514f4.tar.bz2
lumina-bc0a61342b27de6b9c658f6190481178b5d514f4.zip
update to dir structure
Diffstat (limited to 'src-qt5/core/lumina-theme-engine/src/qt5ct-style')
-rw-r--r--src-qt5/core/lumina-theme-engine/src/qt5ct-style/plugin.cpp57
-rw-r--r--src-qt5/core/lumina-theme-engine/src/qt5ct-style/qt5ct-style.pro26
-rw-r--r--src-qt5/core/lumina-theme-engine/src/qt5ct-style/qt5ct.json3
-rw-r--r--src-qt5/core/lumina-theme-engine/src/qt5ct-style/qt5ctproxystyle.cpp63
-rw-r--r--src-qt5/core/lumina-theme-engine/src/qt5ct-style/qt5ctproxystyle.h50
5 files changed, 0 insertions, 199 deletions
diff --git a/src-qt5/core/lumina-theme-engine/src/qt5ct-style/plugin.cpp b/src-qt5/core/lumina-theme-engine/src/qt5ct-style/plugin.cpp
deleted file mode 100644
index 345746f3..00000000
--- a/src-qt5/core/lumina-theme-engine/src/qt5ct-style/plugin.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2014-2017, Ilya Kotov <forkotov02@hotmail.ru>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <QStylePlugin>
-#include <QSettings>
-#include <QStyleFactory>
-#include <qt5ct/qt5ct.h>
-#include "qt5ctproxystyle.h"
-
-class Qt5CTStylePlugin : public QStylePlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QStyleFactoryInterface" FILE "qt5ct.json")
-
-public:
- QStyle *create(const QString &key);
-};
-
-QStyle *Qt5CTStylePlugin::create(const QString &key)
-{
- if (key == "qt5ct-style")
- {
- QSettings settings(Qt5CT::configFile(), QSettings::IniFormat);
- QString style = settings.value("Appearance/style", "Fusion").toString();
- if(key == style || !QStyleFactory::keys().contains(style))
- style = "Fusion";
- return new Qt5CTProxyStyle(style);
- }
- return 0;
-}
-
-#include "plugin.moc"
diff --git a/src-qt5/core/lumina-theme-engine/src/qt5ct-style/qt5ct-style.pro b/src-qt5/core/lumina-theme-engine/src/qt5ct-style/qt5ct-style.pro
deleted file mode 100644
index e6f6dc1c..00000000
--- a/src-qt5/core/lumina-theme-engine/src/qt5ct-style/qt5ct-style.pro
+++ /dev/null
@@ -1,26 +0,0 @@
-include(../../qt5ct.pri)
-
-TEMPLATE = lib
-TARGET = qt5ct-style
-QT += widgets
-
-# Input
-
-CONFIG += plugin
-
-target.path = $$PLUGINDIR/styles
-INSTALLS += target
-
-INCLUDEPATH += ../
-
-HEADERS += \
- qt5ctproxystyle.h \
- ../qt5ct/qt5ct.h
-
-SOURCES += \
- plugin.cpp \
- qt5ctproxystyle.cpp \
- ../qt5ct/qt5ct.cpp
-
-OTHER_FILES += \
- qt5ct.json
diff --git a/src-qt5/core/lumina-theme-engine/src/qt5ct-style/qt5ct.json b/src-qt5/core/lumina-theme-engine/src/qt5ct-style/qt5ct.json
deleted file mode 100644
index 3c42f2d3..00000000
--- a/src-qt5/core/lumina-theme-engine/src/qt5ct-style/qt5ct.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "Keys": [ "qt5ct-style" ]
-}
diff --git a/src-qt5/core/lumina-theme-engine/src/qt5ct-style/qt5ctproxystyle.cpp b/src-qt5/core/lumina-theme-engine/src/qt5ct-style/qt5ctproxystyle.cpp
deleted file mode 100644
index f3b33d5e..00000000
--- a/src-qt5/core/lumina-theme-engine/src/qt5ct-style/qt5ctproxystyle.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2014-2017, Ilya Kotov <forkotov02@hotmail.ru>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <QSettings>
-#include <qt5ct/qt5ct.h>
-#include "qt5ctproxystyle.h"
-
-Qt5CTProxyStyle::Qt5CTProxyStyle(const QString &key) :
- QProxyStyle(key)
-{
- QSettings settings(Qt5CT::configFile(), QSettings::IniFormat);
- m_dialogButtonsHaveIcons = settings.value("Interface/dialog_buttons_have_icons", Qt::PartiallyChecked).toInt();
- m_activateItemOnSingleClick = settings.value("Interface/activate_item_on_single_click", Qt::PartiallyChecked).toInt();
-}
-
-Qt5CTProxyStyle::~Qt5CTProxyStyle()
-{
- //qDebug("%s", Q_FUNC_INFO);
-}
-
-int Qt5CTProxyStyle::styleHint(QStyle::StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const
-{
- if(hint == QStyle::SH_DialogButtonBox_ButtonsHaveIcons)
- {
- if(m_dialogButtonsHaveIcons == Qt::Unchecked)
- return 0;
- else if(m_dialogButtonsHaveIcons == Qt::Checked)
- return 1;
- }
- else if(hint == QStyle::QStyle::SH_ItemView_ActivateItemOnSingleClick)
- {
- if(m_activateItemOnSingleClick == Qt::Unchecked)
- return 0;
- else if(m_activateItemOnSingleClick == Qt::Checked)
- return 1;
- }
- return QProxyStyle::styleHint(hint, option, widget, returnData);
-}
diff --git a/src-qt5/core/lumina-theme-engine/src/qt5ct-style/qt5ctproxystyle.h b/src-qt5/core/lumina-theme-engine/src/qt5ct-style/qt5ctproxystyle.h
deleted file mode 100644
index 842247cf..00000000
--- a/src-qt5/core/lumina-theme-engine/src/qt5ct-style/qt5ctproxystyle.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2014-2017, Ilya Kotov <forkotov02@hotmail.ru>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef QT5CTPROXYSTYLE_H
-#define QT5CTPROXYSTYLE_H
-
-#include <QProxyStyle>
-
-class Qt5CTProxyStyle : public QProxyStyle
-{
- Q_OBJECT
-public:
- explicit Qt5CTProxyStyle(const QString &key);
-
- virtual ~Qt5CTProxyStyle();
-
- int styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const;
-
-private:
- int m_dialogButtonsHaveIcons;
- int m_activateItemOnSingleClick;
-
-};
-
-#endif // QT5CTPROXYSTYLE_H
bgstack15