AgentInstanceWidget Class Reference
from PyKDE4.akonadi import *
Inherits: QWidget → QObject
Namespace: Akonadi
Detailed Description
Provides a widget that lists all available agent instances.
The widget is listening on the dbus for changes, so the widget is updated automatically as soon as new agent instances are added to or removed from the system.
MyWidget.MyWidget( QWidget *parent ) : QWidget( parent ) { QVBoxLayout *layout = new QVBoxLayout( this ); mAgentInstanceWidget = new Akonadi.AgentInstanceWidget( this ); layout->addWidget( mAgentInstanceWidget ); connect( mAgentInstanceWidget, SIGNAL( doubleClicked( Akonadi.AgentInstance& ) ), this, SLOT( slotInstanceSelected( Akonadi.AgentInstance& ) ) ); } ... MyWidget.slotInstanceSelected( Akonadi.AgentInstance &instance ) { qDebug() << "Selected instance" << instance.name(); }
Signals | |
currentChanged (Akonadi.AgentInstance current, Akonadi.AgentInstance previous) | |
doubleClicked (Akonadi.AgentInstance current) | |
Methods | |
__init__ (self, QWidget parent=0) | |
Akonadi.AgentFilterProxyModel | agentFilterProxyModel (self) |
Akonadi.AgentInstance | currentAgentInstance (self) |
currentChanged (self, Akonadi.AgentInstance current, Akonadi.AgentInstance previous) | |
doubleClicked (self, Akonadi.AgentInstance current) |
Method Documentation
__init__ | ( | self, | ||
QWidget | parent=0 | |||
) |
Creates a new agent instance widget.
- Parameters:
-
parent The parent widget.
Akonadi.AgentFilterProxyModel agentFilterProxyModel | ( | self ) |
Returns the agent filter proxy model, use this to filter by agent mimetype or capabilities.
Akonadi.AgentInstance currentAgentInstance | ( | self ) |
Returns the current agent instance or an invalid agent instance if no agent instance is selected.
currentChanged | ( | self, | ||
Akonadi.AgentInstance | current, | |||
Akonadi.AgentInstance | previous | |||
) |
This signal is emitted whenever the current agent instance changes.
- Parameters:
-
current The current agent instance. previous The previous agent instance.
- Signal syntax:
QObject.connect(source, SIGNAL("currentChanged(const AgentInstance&, const AgentInstance&)"), target_slot)
doubleClicked | ( | self, | ||
Akonadi.AgentInstance | current | |||
) |
This signal is emitted whenever the there is a double click on an agent instance.
- Parameters:
-
current The current agent instance.
- Signal syntax:
QObject.connect(source, SIGNAL("doubleClicked(const AgentInstance&)"), target_slot)