Provide look&feel package by ShellCorona

REVIEW: 115256
This commit is contained in:
Martin Klapetek 2014-01-23 16:23:28 +01:00
parent fc30bc6b52
commit c0f53545eb
2 changed files with 17 additions and 0 deletions

View File

@ -44,6 +44,7 @@
#include "scripting/desktopscriptengine.h"
#include "widgetexplorer/widgetexplorer.h"
#include "configview.h"
#include "shellpluginloader.h"
static const int s_configSyncDelay = 10000; // 10 seconds
@ -78,6 +79,7 @@ public:
QHash<QString, QHash<int, Plasma::Containment *> > desktopContainments;
QAction *addPanelAction;
QMenu *addPanelsMenu;
Plasma::Package lookNFeelPackage;
QTimer waitingPanelsTimer;
QTimer appConfigSyncTimer;
@ -645,6 +647,17 @@ void ShellCorona::insertContainment(const QString &activity, int screenNum, Plas
});
}
Plasma::Package ShellCorona::lookAndFeelPackage() const
{
if (!d->lookNFeelPackage.isValid()) {
d->lookNFeelPackage = ShellPluginLoader::self()->loadPackage("Plasma/LookAndFeel");
//TODO: make loading from config once we have some UI for setting the package
d->lookNFeelPackage.setPath("org.kde.lookandfeel");
}
return d->lookNFeelPackage;
}
// Desktop corona handler

View File

@ -23,6 +23,8 @@
#include "plasma/corona.h"
#include <Plasma/Package>
namespace Plasma
{
class Applet;
@ -64,6 +66,8 @@ public:
KActivities::Controller *activityController();
Plasma::Package lookAndFeelPackage() const;
public Q_SLOTS:
/**
* Request saving applicationConfig on disk, it's event compressed, not immediate