API reviews:

globalName(), instanceName()->pimpl

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802135
This commit is contained in:
Marco Martin 2008-04-28 16:22:01 +00:00
parent 9bee311b96
commit f06d25a00c
2 changed files with 10 additions and 30 deletions

View File

@ -221,6 +221,15 @@ public:
}
}
QString globalName() const
{
if (!appletDescription.isValid()) {
return QString();
}
return appletDescription.service()->library();
}
QString instanceName()
{
if (!appletDescription.isValid()) {
@ -550,7 +559,7 @@ KConfigGroup Applet::globalConfig() const
globalAppletConfig = KConfigGroup(KGlobal::config(), group);
}
return KConfigGroup(&globalAppletConfig, globalName());
return KConfigGroup(&globalAppletConfig, d->globalName());
}
void Applet::destroy()
@ -1096,20 +1105,6 @@ void Applet::setRemainSquare(bool square)
d->square = square;
}
QString Applet::globalName() const
{
if (!d->appletDescription.isValid()) {
return QString();
}
return d->appletDescription.service()->library();
}
QString Applet::instanceName() const
{
return d->instanceName();
}
void Applet::watchForMouseMove( QGraphicsItem * watched, bool watch )
{
if (!watched) {

View File

@ -602,21 +602,6 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget
**/
void setHasConfigurationInterface(bool hasInterface);
/**
* Returns the name of the applet.
*
* This will be the same for all instances of this applet.
**/
QString globalName() const;
/**
* Returns a name unique to the instance of this applet.
*
* Useful for being able to refer directly to a particular
* applet. Combines the global name with the applet id
**/
QString instanceName() const;
/**
* Sets whether or not this Applet is acting as a Containment
*/