akonadi
Akonadi::AgentTypeWidget Class Reference
Provides a widget that lists all available agent types. More...
#include <agenttypewidget.h>
Inherits QWidget.
Signals | |
void | currentChanged (const Akonadi::AgentType ¤t, const Akonadi::AgentType &previous) |
Public Member Functions | |
AgentFilterProxyModel * | agentFilterProxyModel () const |
AgentTypeWidget (QWidget *parent=0) | |
AgentType | currentAgentType () const |
~AgentTypeWidget () |
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(); }
Definition at line 64 of file agenttypewidget.h.
Constructor & Destructor Documentation
AgentTypeWidget::AgentTypeWidget | ( | QWidget * | parent = 0 |
) | [explicit] |
Creates a new agent type widget.
- Parameters:
-
parent The parent widget.
Definition at line 81 of file agenttypewidget.cpp.
AgentTypeWidget::~AgentTypeWidget | ( | ) |
Member Function Documentation
AgentFilterProxyModel * AgentTypeWidget::agentFilterProxyModel | ( | ) | const |
Returns the agent filter proxy model, use this to filter by agent mimetype or capabilities.
Definition at line 121 of file agenttypewidget.cpp.
AgentType AgentTypeWidget::currentAgentType | ( | ) | const |
Returns the current agent type or an invalid agent type if no agent type is selected.
Definition at line 108 of file agenttypewidget.cpp.
void Akonadi::AgentTypeWidget::currentChanged | ( | const Akonadi::AgentType & | current, | |
const Akonadi::AgentType & | previous | |||
) | [signal] |
This signal is emitted whenever the current agent type changes.
- Parameters:
-
current The current agent type. previous The previous agent type.
The documentation for this class was generated from the following files: