make it possible to get at the package structures using Theme::packageStructure() and Applet::packageStructure() without having to export the package definitions from the library itself.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=775272
This commit is contained in:
parent
322faacbe7
commit
cf89bd58d1
@ -334,6 +334,11 @@ Applet::~Applet()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PackageStructure Applet::packageStructure()
|
||||||
|
{
|
||||||
|
return PlasmoidStructure();
|
||||||
|
}
|
||||||
|
|
||||||
void Applet::init()
|
void Applet::init()
|
||||||
{
|
{
|
||||||
if (d->script && !d->script->init()) {
|
if (d->script && !d->script->init()) {
|
||||||
|
6
applet.h
6
applet.h
@ -29,6 +29,7 @@
|
|||||||
#include <kgenericfactory.h>
|
#include <kgenericfactory.h>
|
||||||
|
|
||||||
#include <plasma/configxml.h>
|
#include <plasma/configxml.h>
|
||||||
|
#include <plasma/packagestructure.h>
|
||||||
#include <plasma/plasma.h>
|
#include <plasma/plasma.h>
|
||||||
#include <plasma/widgets/widget.h>
|
#include <plasma/widgets/widget.h>
|
||||||
|
|
||||||
@ -100,6 +101,11 @@ class PLASMA_EXPORT Applet : public Widget
|
|||||||
|
|
||||||
~Applet();
|
~Applet();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a package structure representing a Theme
|
||||||
|
*/
|
||||||
|
static PackageStructure packageStructure();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is called once the applet is loaded and added to a Corona.
|
* This method is called once the applet is loaded and added to a Corona.
|
||||||
* If the applet requires a QGraphicsScene or has an particularly intensive
|
* If the applet requires a QGraphicsScene or has an particularly intensive
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
#include <KSharedConfig>
|
#include <KSharedConfig>
|
||||||
#include <KStandardDirs>
|
#include <KStandardDirs>
|
||||||
|
|
||||||
|
#include "plasma/packages_p.h"
|
||||||
|
|
||||||
namespace Plasma
|
namespace Plasma
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -111,6 +113,11 @@ Theme::~Theme()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PackageStructure Theme::packageStructure()
|
||||||
|
{
|
||||||
|
return ThemePackageStructure();
|
||||||
|
}
|
||||||
|
|
||||||
void Theme::setApplication(const QString &appname)
|
void Theme::setApplication(const QString &appname)
|
||||||
{
|
{
|
||||||
if (d->app != appname) {
|
if (d->app != appname) {
|
||||||
|
6
theme.h
6
theme.h
@ -27,6 +27,7 @@
|
|||||||
#include <KDE/KSharedConfig>
|
#include <KDE/KSharedConfig>
|
||||||
|
|
||||||
#include <plasma/plasma_export.h>
|
#include <plasma/plasma_export.h>
|
||||||
|
#include <plasma/packagestructure.h>
|
||||||
|
|
||||||
namespace Plasma
|
namespace Plasma
|
||||||
{
|
{
|
||||||
@ -63,6 +64,11 @@ class PLASMA_EXPORT Theme : public QObject
|
|||||||
explicit Theme( QObject* parent = 0 );
|
explicit Theme( QObject* parent = 0 );
|
||||||
~Theme();
|
~Theme();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a package structure representing a Theme
|
||||||
|
*/
|
||||||
|
static PackageStructure packageStructure();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the application the theme setting is associated with. This
|
* Sets the application the theme setting is associated with. This
|
||||||
* allows for individual applications that use libplasma to have the
|
* allows for individual applications that use libplasma to have the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user