From ac15e22fe559bbfc267d99237674fba5a879806f Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 11 Jun 2015 20:51:19 -0400 Subject: Add two new plugins for Lumina: QuickPPlugin, QuickDPlugin (panel/desktop respectively). These are QtQuick "containers" which allow the loading of user/system supplied QML scripts for non-compiled plugin support. These plugins must be single *.qml files located in /quickplugins/*.qml or ~/.lumina/quickplugins/*.qml --- .../desktop-plugins/quickcontainer/QuickDPlugin.h | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 lumina-desktop/desktop-plugins/quickcontainer/QuickDPlugin.h (limited to 'lumina-desktop/desktop-plugins/quickcontainer/QuickDPlugin.h') diff --git a/lumina-desktop/desktop-plugins/quickcontainer/QuickDPlugin.h b/lumina-desktop/desktop-plugins/quickcontainer/QuickDPlugin.h new file mode 100644 index 00000000..a59ed87f --- /dev/null +++ b/lumina-desktop/desktop-plugins/quickcontainer/QuickDPlugin.h @@ -0,0 +1,42 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2015, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +// This class is a simple container for a QtQuick plugin +//=========================================== +#ifndef _LUMINA_DESKTOP_DESKTOP_PLUGIN_QUICK_H +#define _LUMINA_DESKTOP_DESKTOP_PLUGIN_QUICK_H + +#include +#include +#include "../LDPlugin.h" + +#include + +class QuickDPlugin : public LDPlugin{ + Q_OBJECT +public: + QuickDPlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID){ + this->setLayout( new QVBoxLayout()); + this->layout()->setContentsMargins(0,0,0,0); + container = new QQuickWidget(this); + this->layout()->addWidget(container); + container->setSource(QUrl::fromLocalFile( LUtils::findQuickPluginFile(ID.section("---",0,0)) )); + } + + ~QuickDPlugin(){} + +private: + QQuickWidget *container; + +private slots: + void statusChange(QQuickWidget::Status status){ + if(status == QQuickWidget::Error){ + qDebug() << "Quick Widget Error:" << this->ID(); + } + } + +}; +#endif -- cgit