Akonadi.AgentInstanceWidget

KDE 4.9 PyKDE API Reference

- KDE's Python API

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

Author:
  Tobias Koenig <tokoe@kde.org>

## 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)
[Akonadi.AgentInstance] | selectedAgentInstances (self)
QAbstractItemView | view (self)

## Signal Documentation

currentChanged | ( | 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 Akonadi::AgentInstance&, const Akonadi::AgentInstance&)"), target_slot)`

doubleClicked | ( | 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 Akonadi::AgentInstance&)"), target_slot)`

## 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.

[Akonadi.AgentInstance] selectedAgentInstances | ( |  | self ) |

Returns the selected agent instances.

Since:
  4.5

QAbstractItemView view | ( |  | self ) |

Returns the view used in the widget.

Since:
  4.5