# class AgentTypeWidget

###

Module | akonadi
Namespace | Akonadi
Class | AgentTypeWidget
Inherits | QWidget

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();
    }

Author Tobias Koenig <tokoe@kde.org>

### methods

- AgentTypeWidget (parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | 0

  Creates a new agent type widget.

  parent - The parent widget.

- agentFilterProxyModel ( )

  returns Akonadi.AgentFilterProxyModel

  Returns the agent filter proxy model, use this to filter by agent mimetype or capabilities.

- currentAgentType ( )

  returns Akonadi.AgentType

  Returns the current agent type or an invalid agent type if no agent type is selected.

- currentChanged (current, previous)

  returns Nothing
  SIGNAL ("currentChanged (const AgentType&, const AgentType&)")

  Argument | Type | Default
  --- | --- | ---
  current | Akonadi.AgentType |
  previous | Akonadi.AgentType |

  This signal is emitted whenever the current agent type changes.

  current - The current agent type.

  previous - The previous agent type.