Akonadi.Control

KDE 4.2 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 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)
## 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.

bool restart | ( |  | ) |

Restarts the Akonadi server synchronously.

Returns:
  true if the restart was successful, false otherwise, the server state is undefined in this case.

Since:
  4.2

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

Same as restart(), but with GUI feedback.

Parameters:

  | parent | The parent widget.

Since:
  4.2

bool start | ( |  | ) |

Starts the Akonadi server synchronously if it is not already running.

Returns:
  true if the server was started successfully or was already running, false otherwise

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

Same as start(), but with GUI feedback.

Parameters:

  | parent | The parent widget.

Since:
  4.2

bool stop | ( |  | ) |

Stops the Akonadi server synchronously if it is currently running.

Returns:
  true if the server was shutdown successfully or was not running at all, false otherwise.

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.

Parameters:

  | widget | The widget depending on Akonadi being operational.

Since:
  4.2