From 60fda41cfe799d0aae1fbb59e826ea55adbbf143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Thu, 21 Mar 2013 05:44:38 +0100 Subject: [PATCH] add widgetexplorer button in testcontainment --- .../testcontainment/contents/ui/main.qml | 12 ++++++++++++ src/shell/widgetexplorer/widgetexplorer.cpp | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/src/shell/containments/testcontainment/contents/ui/main.qml b/src/shell/containments/testcontainment/contents/ui/main.qml index b7332851b..c60e88040 100644 --- a/src/shell/containments/testcontainment/contents/ui/main.qml +++ b/src/shell/containments/testcontainment/contents/ui/main.qml @@ -199,6 +199,18 @@ Item { } } } + PlasmaCore.IconItem { + width: 24 + height: 24 + source: "list-add" + MouseArea { + anchors.fill: parent + onClicked: { + print("Add widgets ..."); + plasmoid.action("add widgets").trigger(); + } + } + } Component.onCompleted: { print("Test Containment loaded") diff --git a/src/shell/widgetexplorer/widgetexplorer.cpp b/src/shell/widgetexplorer/widgetexplorer.cpp index 6e6f6193e..984b61bc1 100644 --- a/src/shell/widgetexplorer/widgetexplorer.cpp +++ b/src/shell/widgetexplorer/widgetexplorer.cpp @@ -271,6 +271,7 @@ QList WidgetExplorer::extraActions() const // foreach (QAction *action, actions()) { // FIXME: where did actions() come from? // actionList << action; // } + qWarning() << "extraactions needs reimplementation"; return actionList; } @@ -297,6 +298,10 @@ void WidgetExplorerPrivate::initRunningApplets() QObject::connect(containment, SIGNAL(appletAdded(Plasma::Applet*)), q, SLOT(appletAdded(Plasma::Applet*))); QObject::connect(containment, SIGNAL(appletRemoved(Plasma::Applet*)), q, SLOT(appletRemoved(Plasma::Applet*))); + // FIXME: this doesn't work with private slots + // QObject::connect(containment, &Containment::appletAdded, q, &WidgetExplorerPrivate::appletAdded); + // QObject::connect(containment, &Containment::appletRemoved, q, &WidgetExplorerPrivate::appletRemoved); + foreach (Applet *applet, containment->applets()) { runningApplets[applet->pluginInfo().pluginName()]++; }