KDE 4.4 PyKDE API Reference

- KDE's Python API

# Control Class Reference

`from PyKDE4.akonadi import *`

Inherits: QObject
Namespace: Akonadi.Control

## Detailed Description

Provides methods to control the Akonadi server process.

This class provides high-level methods to control the Akonadi server. These methods are synchronously (ie. use a sub-eventloop) and can show dialogs. For more low-level methods see Akonadi.ServerManager.

While the Akonadi server normally is started by the KDE session manager, it is not guaranteed that your application is running inside a KDE session. Therefore it is recommended to execute Akonadi.Control.start() during startup to ensure the Akonadi server is running.

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)
bool | restart (self)
bool | restart (self, QWidget parent)
bool | start (self)
bool | start (self, QWidget parent)
bool | stop (self)
bool | stop (self, QWidget parent)
| widgetNeedsAkonadi (self, QWidget widget)

## Method Documentation

__init__ | ( |  | self ) |

Creates the control object.

bool restart | ( |  | self ) |

Same as restart(), but with GUI feedback.

Parameters:

  | parent | The parent widget.

Since:
  4.2

bool restart | ( | self, |
|  | QWidget | parent
| ) |  |  |

Same as restart(), but with GUI feedback.

Parameters:

  | parent | The parent widget.

Since:
  4.2

bool start | ( |  | self ) |

Same as start(), but with GUI feedback.

Parameters:

  | parent | The parent widget.

Since:
  4.2

bool start | ( | self, |
|  | QWidget | parent
| ) |  |  |

Same as start(), but with GUI feedback.

Parameters:

  | parent | The parent widget.

Since:
  4.2

bool stop | ( |  | self ) |

Same as stop(), but with GUI feedback.

Parameters:

  | parent | The parent widget.

Since:
  4.2

bool stop | ( | self, |
|  | QWidget | parent
| ) |  |  |

Same as stop(), but with GUI feedback.

Parameters:

  | parent | The parent widget.

Since:
  4.2

widgetNeedsAkonadi | ( | self, |
|  | QWidget | widget
| ) |  |  |

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

Parameters:

  | widget | The widget depending on Akonadi being operational.

Since:
  4.2