AgentTypeWidget Class Reference
from PyKDE4.akonadi import *
Inherits: QWidget → QObject
Namespace: Akonadi
Detailed Description
Provides a widget that lists all available agent types.
The widget is listening on the dbus for changes, so the widget is updated automatically as soon as new agent types are added to or removed from the system.
MyWidget.MyWidget( QWidget *parent ) : QWidget( parent ) { QVBoxLayout *layout = new QVBoxLayout( this ); mAgentTypeWidget = new Akonadi.AgentTypeWidget( this ); layout->addWidget( mAgentTypeWidget ); connect( mAgentTypeWidget, SIGNAL( currentChanged( Akonadi.AgentType&, Akonadi.AgentType& ) ), this, SLOT( slotTypeChanged( Akonadi.AgentType& ) ) ); } ... MyWidget.slotTypeChanged( Akonadi.AgentType ¤t, Akonadi.AgentType& ) { qDebug() << "New selected type:" << current.name(); }
Signals | |
currentChanged (Akonadi.AgentType current, Akonadi.AgentType previous) | |
Methods | |
__init__ (self, QWidget parent=0) | |
Akonadi.AgentFilterProxyModel | agentFilterProxyModel (self) |
Akonadi.AgentType | currentAgentType (self) |
currentChanged (self, Akonadi.AgentType current, Akonadi.AgentType previous) |
Method Documentation
__init__ | ( | self, | ||
QWidget | parent=0 | |||
) |
Creates a new agent type 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.AgentType currentAgentType | ( | self ) |
Returns the current agent type or an invalid agent type if no agent type is selected.
currentChanged | ( | self, | ||
Akonadi.AgentType | current, | |||
Akonadi.AgentType | previous | |||
) |
This signal is emitted whenever the current agent type changes.
- Parameters:
-
current The current agent type. previous The previous agent type.
- Signal syntax:
QObject.connect(source, SIGNAL("currentChanged(const AgentType&, const AgentType&)"), target_slot)