Add a dbus function to show which effect is loaded
svn path=/trunk/KDE/kdebase/workspace/; revision=815896
This commit is contained in:
parent
10af64fc67
commit
54ede72bf1
5 changed files with 39 additions and 14 deletions
10
effects.cpp
10
effects.cpp
|
@ -711,6 +711,16 @@ void EffectsHandlerImpl::toggleEffect( const QString& name )
|
|||
loadEffect( name );
|
||||
}
|
||||
|
||||
QStringList EffectsHandlerImpl::loadedModules() const
|
||||
{
|
||||
QStringList listModules;
|
||||
for(QVector< EffectPair >::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it)
|
||||
{
|
||||
listModules <<(*it).first;
|
||||
}
|
||||
return listModules;
|
||||
}
|
||||
|
||||
bool EffectsHandlerImpl::loadEffect( const QString& name )
|
||||
{
|
||||
Workspace::self()->addRepaintFull();
|
||||
|
|
|
@ -141,6 +141,7 @@ class EffectsHandlerImpl : public EffectsHandler
|
|||
void unloadEffect( const QString& name );
|
||||
void reloadEffect( const QString& name );
|
||||
bool isEffectLoaded( const QString& name );
|
||||
QStringList loadedModules() const;
|
||||
|
||||
QList<EffectWindow*> elevatedWindows() const;
|
||||
|
||||
|
|
|
@ -47,6 +47,9 @@
|
|||
<method name="reloadEffect">
|
||||
<arg name="name" type="s" direction="in"/>
|
||||
</method>
|
||||
<method name="loadedModules">
|
||||
<arg type="as" direction="out"/>
|
||||
</method>
|
||||
<method name="decorationSupportedColors">
|
||||
<arg type="ai" direction="out"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList<int>"/>
|
||||
|
|
|
@ -734,6 +734,14 @@ void Workspace::reloadEffect( const QString& name )
|
|||
static_cast<EffectsHandlerImpl*>(effects)->reloadEffect( name );
|
||||
}
|
||||
|
||||
QStringList Workspace::loadedModules() const
|
||||
{
|
||||
QStringList listModulesLoaded;
|
||||
if ( effects )
|
||||
listModulesLoaded = static_cast<EffectsHandlerImpl*>(effects)->loadedModules();
|
||||
return listModulesLoaded;
|
||||
}
|
||||
|
||||
void Workspace::slotActivateAttentionWindow()
|
||||
{
|
||||
if( attention_chain.count() > 0 )
|
||||
|
|
|
@ -213,6 +213,9 @@ class Workspace : public QObject, public KDecorationDefines
|
|||
|
||||
void unloadEffect( const QString& name );
|
||||
|
||||
QStringList loadedModules() const;
|
||||
|
||||
|
||||
/**
|
||||
* Shows the menu operations menu for the client and makes it active if
|
||||
* it's not already.
|
||||
|
|
Loading…
Reference in a new issue