From 53d1c709717fe63d4c1585dce6c0205fa7575c90 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Wed, 7 Sep 2016 14:06:57 +0200 Subject: remove obsolete custon theme since we are now using the kirigami theme --- framework/CMakeLists.txt | 2 -- framework/theme/CMakeLists.txt | 14 ----------- framework/theme/colorpalette.cpp | 45 ------------------------------------ framework/theme/colorpalette.h | 47 ------------------------------------- framework/theme/qmldir | 3 --- framework/theme/themeplugin.cpp | 50 ---------------------------------------- framework/theme/themeplugin.h | 31 ------------------------- framework/theme/unit.cpp | 29 ----------------------- framework/theme/unit.h | 38 ------------------------------ 9 files changed, 259 deletions(-) delete mode 100644 framework/theme/CMakeLists.txt delete mode 100644 framework/theme/colorpalette.cpp delete mode 100644 framework/theme/colorpalette.h delete mode 100644 framework/theme/qmldir delete mode 100644 framework/theme/themeplugin.cpp delete mode 100644 framework/theme/themeplugin.h delete mode 100644 framework/theme/unit.cpp delete mode 100644 framework/theme/unit.h (limited to 'framework') diff --git a/framework/CMakeLists.txt b/framework/CMakeLists.txt index 4fecaf14..95be342d 100644 --- a/framework/CMakeLists.txt +++ b/framework/CMakeLists.txt @@ -41,7 +41,5 @@ add_subdirectory(actions) add_subdirectory(settings) # Domain specific domain logic add_subdirectory(domain) -# Theme specfic things like colors -add_subdirectory(theme) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/framework/theme/CMakeLists.txt b/framework/theme/CMakeLists.txt deleted file mode 100644 index 319e3d39..00000000 --- a/framework/theme/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -set(themeplugin_SRCS - themeplugin.cpp - colorpalette.cpp - unit.cpp -) - -add_library(themeplugin SHARED ${themeplugin_SRCS}) - -qt5_use_modules(themeplugin Core Quick Qml) - -target_link_libraries(themeplugin) - -install(TARGETS themeplugin DESTINATION ${QML_INSTALL_DIR}/org/kube/framework/theme) -install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kube/framework/theme) diff --git a/framework/theme/colorpalette.cpp b/framework/theme/colorpalette.cpp deleted file mode 100644 index a321a292..00000000 --- a/framework/theme/colorpalette.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2016 Michael Bohlender - - 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 2 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, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#include "colorpalette.h" - -ColorPalette::ColorPalette(QObject *parent) : QObject(parent), m_background("#fcfcfc"), m_selected("#3daee9"), m_read("#232629"), m_border("#232629") -{ - -} - -QString ColorPalette::background() const -{ - return m_background; -} - -QString ColorPalette::read() const -{ - return m_read; -} - -QString ColorPalette::selected() const -{ - return m_selected; -} - -QString ColorPalette::border() const -{ - return m_border; -} - diff --git a/framework/theme/colorpalette.h b/framework/theme/colorpalette.h deleted file mode 100644 index a06783f3..00000000 --- a/framework/theme/colorpalette.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright (C) 2016 Michael Bohlender - - 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 2 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, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#include -#include - -class ColorPalette : public QObject -{ - Q_OBJECT - - Q_PROPERTY (QString background READ background NOTIFY themeChanged) - Q_PROPERTY (QString selected READ background NOTIFY themeChanged) - Q_PROPERTY (QString read READ read NOTIFY themeChanged) - Q_PROPERTY (QString border READ border NOTIFY themeChanged) - -public: - explicit ColorPalette(QObject *parent = Q_NULLPTR); - - QString background() const; - QString selected() const; - QString read() const; - QString border() const; - -signals: - void themeChanged(); - -private: - QString m_background; - QString m_selected; - QString m_read; - QString m_border; -}; diff --git a/framework/theme/qmldir b/framework/theme/qmldir deleted file mode 100644 index 489a71ca..00000000 --- a/framework/theme/qmldir +++ /dev/null @@ -1,3 +0,0 @@ -module org.kube.framework.theme - -plugin themeplugin diff --git a/framework/theme/themeplugin.cpp b/framework/theme/themeplugin.cpp deleted file mode 100644 index ad9d0e1b..00000000 --- a/framework/theme/themeplugin.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2016 Michael Bohlender - - 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 2 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, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#include "themeplugin.h" - -#include -#include - -#include "colorpalette.h" -#include "unit.h" - -static QObject *colorpaletteInstace(QQmlEngine *engine, QJSEngine *scriptEngine) -{ - Q_UNUSED(engine); - Q_UNUSED(scriptEngine); - - return new ColorPalette; -} - -static QObject *unitInstace(QQmlEngine *engine, QJSEngine *scriptEngine) -{ - Q_UNUSED(engine); - Q_UNUSED(scriptEngine); - - return new Unit; -} - -void ThemePlugin::registerTypes (const char *uri) -{ - Q_ASSERT(uri == QLatin1String("org.kube.framework.theme")); - - qmlRegisterSingletonType(uri, 1, 0, "ColorPalette", colorpaletteInstace); - qmlRegisterSingletonType(uri, 1, 0, "Unit", unitInstace); - -} diff --git a/framework/theme/themeplugin.h b/framework/theme/themeplugin.h deleted file mode 100644 index d8ae43c1..00000000 --- a/framework/theme/themeplugin.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (C) 2016 Michael Bohlender - - 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 2 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, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#pragma once - -#include -#include - -class ThemePlugin : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") - -public: - virtual void registerTypes(const char *uri); -}; \ No newline at end of file diff --git a/framework/theme/unit.cpp b/framework/theme/unit.cpp deleted file mode 100644 index 1f3803cb..00000000 --- a/framework/theme/unit.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2016 Michael Bohlender - - 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 2 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, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#include "unit.h" - -Unit::Unit(QObject *parent) : QObject(parent), m_size(5) -{ - -} - -int Unit::size() const -{ - return m_size; -} \ No newline at end of file diff --git a/framework/theme/unit.h b/framework/theme/unit.h deleted file mode 100644 index bd9b58f0..00000000 --- a/framework/theme/unit.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2016 Michael Bohlender - - 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 2 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, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#include - - -class Unit : public QObject -{ - Q_OBJECT - Q_PROPERTY (int size READ size NOTIFY unitChanged) - - -public: - explicit Unit(QObject *parent = Q_NULLPTR); - - int size() const; - -signals: - void unitChanged(); - -private: - int m_size; -}; -- cgit v1.2.3