don't load from plasma-appletsrc by default, provide a convenience

method for that however (e.g. mirror the saveApplets methods)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696806
This commit is contained in:
Aaron J. Seigo 2007-08-05 22:44:07 +00:00
parent 05d103abfa
commit 61b1dccc3d
2 changed files with 10 additions and 3 deletions

View File

@ -75,7 +75,6 @@ Corona::Corona(QObject *parent)
: QGraphicsScene(parent), : QGraphicsScene(parent),
d(new Private) d(new Private)
{ {
loadApplets("plasma-appletsrc");
//setViewport(new QGLWidget(QGLFormat(QGL::StencilBuffer | QGL::AlphaChannel))); //setViewport(new QGLWidget(QGLFormat(QGL::StencilBuffer | QGL::AlphaChannel)));
} }
@ -83,7 +82,6 @@ Corona::Corona(const QRectF & sceneRect, QObject * parent )
: QGraphicsScene(sceneRect, parent), : QGraphicsScene(sceneRect, parent),
d(new Private) d(new Private)
{ {
loadApplets("plasma-appletsrc");
//setViewport(new QGLWidget(QGLFormat(QGL::StencilBuffer | QGL::AlphaChannel))); //setViewport(new QGLWidget(QGLFormat(QGL::StencilBuffer | QGL::AlphaChannel)));
} }
@ -91,7 +89,6 @@ Corona::Corona(qreal x, qreal y, qreal width, qreal height, QObject * parent)
: QGraphicsScene(x, y, width, height, parent), : QGraphicsScene(x, y, width, height, parent),
d(new Private) d(new Private)
{ {
loadApplets("plasma-appletsrc");
//setViewport(new QGLWidget(QGLFormat(QGL::StencilBuffer | QGL::AlphaChannel))); //setViewport(new QGLWidget(QGLFormat(QGL::StencilBuffer | QGL::AlphaChannel)));
} }
@ -205,6 +202,11 @@ void Corona::loadApplets(const QString& config)
} }
} }
void Corona::loadApplets()
{
loadApplets("plasma-appletsrc");
}
Applet* Corona::addApplet(const QString& name, const QStringList& args, uint id, const QRectF& geometry) Applet* Corona::addApplet(const QString& name, const QStringList& args, uint id, const QRectF& geometry)
{ {
Applet* applet = Applet::loadApplet(name, id, args); Applet* applet = Applet::loadApplet(name, id, args);

View File

@ -91,6 +91,11 @@ public:
void loadApplets(const QString &config); void loadApplets(const QString &config);
public Q_SLOTS: public Q_SLOTS:
/**
* Load applets from the default config file
*/
void loadApplets();
/** /**
* Save applets to the default config file * Save applets to the default config file
*/ */