add widgetexplorer button in testcontainment

This commit is contained in:
Sebastian Kügler 2013-03-21 05:44:38 +01:00
parent 12f481e50a
commit 60fda41cfe
2 changed files with 17 additions and 0 deletions

View File

@ -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")

View File

@ -271,6 +271,7 @@ QList<QObject *> 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()]++;
}