# class AgentInstanceWidget

###

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

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

Author Tobias Koenig <tokoe@kde.org>

### methods

- AgentInstanceWidget (parent)

  returns ctor

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

  Creates a new agent instance widget.

  parent - The parent widget.

- agentFilterProxyModel ( )

  returns Akonadi.AgentFilterProxyModel

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

- currentAgentInstance ( )

  returns Akonadi.AgentInstance

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

- currentChanged (current, previous)

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

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

  This signal is emitted whenever the current agent instance changes.

  current - The current agent instance.

  previous - The previous agent instance.

- doubleClicked (current)

  returns Nothing
  SIGNAL ("doubleClicked (const AgentInstance&)")

  Argument | Type | Default
  --- | --- | ---
  current | Akonadi.AgentInstance |

  This signal is emitted whenever the there is a double click on an agent instance.

  current - The current agent instance.