KDE 4.9 PyKDE API Reference

- KDE's Python API

# Control Class Reference

`from PyKDE4.akonadi import *`

Inherits: QObject
Namespace: Akonadi

## Detailed Description

Provides methods to control the Akonadi server process.

This class provides synchronous methods (ie. use a sub-eventloop) to control the Akonadi service. For asynchronous methods see Akonadi.ServerManager.

The most important method in here is widgetNeedsAkonadi(). It is recommended to call it with every top-level widget of your application as argument, assuming your application relies on Akonadi being operational of course.

While the Akonadi server automatically started by Akonadi.Session on first use, it might be necessary for some use-cases to guarantee a running Akonadi service at some point. This can be done using start().

Example:

     if ( !Akonadi.Control.start() ) {
       qDebug() << "Unable to start Akonadi server, exit application";
       return 1;
     } else {
       ...
     }

Author:
  Volker Krause <vkrause@kde.org>

See also:
  Akonadi.ServerManager

## Methods
| __init__ (self)
## Static Methods
bool | restart ()
bool | restart (QWidget parent)
bool | start ()
bool | start (QWidget parent)
bool | stop ()
bool | stop (QWidget parent)
| widgetNeedsAkonadi (QWidget widget)

## Method Documentation

__init__ | ( |  | self ) |

Creates the control object.

## Static Method Documentation

bool restart | ( |  | ) |

Same as restart(), but with GUI feedback.

Parameters:

  | parent | The parent widget.

Since:
  4.2

bool restart | ( | QWidget | parent
| ) |  |  |

Same as restart(), but with GUI feedback.

Parameters:

  | parent | The parent widget.

Since:
  4.2

bool start | ( |  | ) |

Same as start(), but with GUI feedback.

Parameters:

  | parent | The parent widget.

Since:
  4.2

bool start | ( | QWidget | parent
| ) |  |  |

Same as start(), but with GUI feedback.

Parameters:

  | parent | The parent widget.

Since:
  4.2

bool stop | ( |  | ) |

Same as stop(), but with GUI feedback.

Parameters:

  | parent | The parent widget.

Since:
  4.2

bool stop | ( | QWidget | parent
| ) |  |  |

Same as stop(), but with GUI feedback.

Parameters:

  | parent | The parent widget.

Since:
  4.2

widgetNeedsAkonadi | ( | QWidget | widget
| ) |  |  |

Disable the given widget when Akonadi is not operational and show an error overlay (given enough space). Cascading use is automatically detected and resolved.

Parameters:

  | widget | The widget depending on Akonadi being operational.

Since:
  4.2