diff options
author | Ken Moore <ken@pcbsd.org> | 2015-06-11 20:51:19 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-06-11 20:51:19 -0400 |
commit | ac15e22fe559bbfc267d99237674fba5a879806f (patch) | |
tree | fdb4cce3eeb5ecefcd3f61c9f3cdd40c99723ca3 /lumina-desktop/panel-plugins/quickcontainer | |
parent | Oops, forgot to save/commit the new fields in the luminaDesktop.conf gile. (diff) | |
download | lumina-ac15e22fe559bbfc267d99237674fba5a879806f.tar.gz lumina-ac15e22fe559bbfc267d99237674fba5a879806f.tar.bz2 lumina-ac15e22fe559bbfc267d99237674fba5a879806f.zip |
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 <Lumina Share>/quickplugins/*.qml or ~/.lumina/quickplugins/*.qml
Diffstat (limited to 'lumina-desktop/panel-plugins/quickcontainer')
-rw-r--r-- | lumina-desktop/panel-plugins/quickcontainer/QuickPPlugin.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/lumina-desktop/panel-plugins/quickcontainer/QuickPPlugin.h b/lumina-desktop/panel-plugins/quickcontainer/QuickPPlugin.h new file mode 100644 index 00000000..7c887803 --- /dev/null +++ b/lumina-desktop/panel-plugins/quickcontainer/QuickPPlugin.h @@ -0,0 +1,44 @@ +//=========================================== +// 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_PANEL_PLUGIN_QUICK_H +#define _LUMINA_DESKTOP_PANEL_PLUGIN_QUICK_H + +#include <QQuickWidget> +#include <QVBoxLayout> +#include "../LPPlugin.h" + +#include <LuminaUtils.h> +#include <QDebug> + +class QuickPPlugin : public LPPlugin{ + Q_OBJECT +public: + QuickPPlugin(QWidget* parent, QString ID, bool horizontal) : LPPlugin(parent, ID){ + this->setLayout( new QVBoxLayout()); + this->layout()->setContentsMargins(0,0,0,0); + container = new QQuickWidget(this); + this->layout()->addWidget(container); + horizontal = true; //just to silence compiler warning + container->setSource(QUrl::fromLocalFile( LUtils::findQuickPluginFile(ID.section("---",0,0)) )); + } + + ~QuickPPlugin(){} + +private: + QQuickWidget *container; + +private slots: + void statusChange(QQuickWidget::Status status){ + if(status == QQuickWidget::Error){ + qDebug() << "Quick Widget Error:" << this->type(); + } + } + +}; +#endif |