KDE 4.7 PyKDE API Reference

- KDE's Python API

# CollectionPropertiesDialog Class Reference

`from PyKDE4.akonadi import *`

Inherits: KDialog → QDialog → QWidget → QObject
Namespace: Akonadi

## Detailed Description

A generic and extensible dialog for collection properties.

This dialog allows you to show or modify the properties of a collection.

     Akonadi.Collection collection = ...

     CollectionPropertiesDialog dlg( collection, this );
     dlg.exec();

It can be extended by custom pages, which contains gui elements for custom properties.

See also:
  Akonadi.CollectionPropertiesPage

Author:
  Volker Krause <vkrause@kde.org>

## Enumerations

DefaultPage | { GeneralPage, CachePage }

## Methods

| __init__ (self, Akonadi.Collection collection, QWidget parent=0)
| __init__ (self, Akonadi.Collection collection, QStringList pages, QWidget parent=0)

## Static Methods

QString | defaultPageObjectName (Akonadi.CollectionPropertiesDialog.DefaultPage page)
| registerPage (Akonadi.CollectionPropertiesPageFactory factory)
| useDefaultPage (bool use)

## Method Documentation

__init__ | ( | self, |
|  | Akonadi.Collection | collection,
|  | QWidget | parent=0
| ) |  |  |

Creates a new collection properties dialog.

Parameters:

  | collection | The collection which properties should be shown.
  | parent | The parent widget.

__init__ | ( | self, |
|  | Akonadi.Collection | collection,
|  | QStringList | pages,
|  | QWidget | parent=0
| ) |  |  |

Creates a new collection properties dialog.

This constructor allows to specify the subset of registered pages that will be shown as well as their order. The pages have to set an objectName in their constructor to make it work. If an empty list is passed, all registered pages will be loaded. Use defaultPageObjectName() to fetch the object name for a registered default page.

Parameters:

  | collection | The collection which properties should be shown.
  | pages | The object names of the pages that shall be loaded.
  | parent | The parent widget.

Since:
  4.6

## Static Method Documentation

QString defaultPageObjectName | ( | Akonadi.CollectionPropertiesDialog.DefaultPage | page
| ) |  |  |

Returns the object name of one of the dialog's registered default pages. The object name may be used in the QStringList constructor parameter to specify which default pages should be shown.

Parameters:

  | page | the desired page

Returns:
  the page's object name

Since:
  4.7

registerPage | ( | Akonadi.CollectionPropertiesPageFactory | factory
| ) |  |  |

Register custom pages for the collection properties dialog.

Parameters:

  | factory | The properties page factory that provides the custom page.

See also:
  Akonadi.CollectionPropertiesPageFactory

useDefaultPage | ( | bool | use
| ) |  |  |

Sets whether to use default page or not.

Since:
  4.4

## Enumeration Documentation

DefaultPage

Enumerates the registered default pages which can be displayed.

Since:
  4.7

Enumerator:

  GeneralPage |
  CachePage |