add an init() method that will be called only after the applet is completely set up for those applets that care; also allows us to do delayed init in the case of expensive set up
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712119
This commit is contained in:
parent
26d4a28aad
commit
7d3327c884
@ -376,6 +376,10 @@ Applet::~Applet()
|
||||
delete d;
|
||||
}
|
||||
|
||||
void Applet::init()
|
||||
{
|
||||
}
|
||||
|
||||
uint Applet::id() const
|
||||
{
|
||||
return d->appletId;
|
||||
|
8
applet.h
8
applet.h
@ -95,6 +95,14 @@ class PLASMA_EXPORT Applet : public Widget
|
||||
|
||||
~Applet();
|
||||
|
||||
/**
|
||||
* 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
|
||||
* set of initialization routines to go through, consider implementing it
|
||||
* in this method instead of the contsructor.
|
||||
**/
|
||||
virtual void init();
|
||||
|
||||
/**
|
||||
* @return the id of this applet
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user