digiKam Developer Documentation: Digikam::DConfigDlg Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Types | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Digikam::DConfigDlg Class Reference

A dialog base class which can handle multiple pages. More...

Inheritance diagram for Digikam::DConfigDlg:

## Public Types
enum | FaceType { Auto = DConfigDlgView::Auto , Plain = DConfigDlgView::Plain , List = DConfigDlgView::List , Tree = DConfigDlgView::Tree , Tabbed = DConfigDlgView::Tabbed }

## Signals
void | currentPageChanged (DConfigDlgWdgItem *current, DConfigDlgWdgItem *before)
| This signal is emitted whenever the current page has changed.
void | pageRemoved (DConfigDlgWdgItem *page)
| This signal is emitted whenever a page has been removed.

## Public Member Functions
| DConfigDlg (QWidget *const parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags())
| Creates a new page dialog.
| ~DConfigDlg () override
| Destroys the page dialog.
void | addActionButton (QAbstractButton *const button)
| Set an action button.
void | addPage (DConfigDlgWdgItem *const item)
| Adds a new top level page to the dialog.
DConfigDlgWdgItem * | addPage (QWidget *const widget, const QString &name)
| Adds a new top level page to the dialog.
void | addSubPage (DConfigDlgWdgItem *const parent, DConfigDlgWdgItem *const item)
| Inserts a new sub page in the dialog.
DConfigDlgWdgItem * | addSubPage (DConfigDlgWdgItem *const parent, QWidget *const widget, const QString &name)
| Inserts a new sub page in the dialog.
QPushButton * | button (QDialogButtonBox::StandardButton which) const
| Returns the QPushButton corresponding to the standard button which, or 0 if the standard button doesn't exist in this dialog.
DConfigDlgWdgItem * | currentPage () const
| Returns the.
void | insertPage (DConfigDlgWdgItem *const before, DConfigDlgWdgItem *const item)
| Inserts a new page in the dialog.
DConfigDlgWdgItem * | insertPage (DConfigDlgWdgItem *const before, QWidget *const widget, const QString &name)
| Inserts a new page in the dialog.
void | removePage (DConfigDlgWdgItem *const item)
| Removes the page associated with the given.
void | setConfigGroup (const QString &group)
| Sets the config group name for restore or save dialog window size.
void | setCurrentPage (DConfigDlgWdgItem *const item)
| Sets the page which is associated with the given.
void | setFaceType (FaceType faceType)
| Sets the face type of the dialog.
void | setStandardButtons (QDialogButtonBox::StandardButtons buttons)
| Sets the collection of standard buttons displayed by this dialog.

## Protected Member Functions
| DConfigDlg (DConfigDlgPrivate &dd, DConfigDlgWdg *const widget, QWidget *const parent, Qt::WindowFlags flags=Qt::WindowFlags())
| DConfigDlg (DConfigDlgWdg *const widget, QWidget *const parent, Qt::WindowFlags flags=Qt::WindowFlags())
| This constructor can be used by subclasses to provide a custom page widget.
QDialogButtonBox * | buttonBox ()
| Returns the button box of the dialog or 0 if no button box is set.
const QDialogButtonBox * | buttonBox () const
| Returns the button box of the dialog or 0 if no button box is set.
DConfigDlgWdg * | pageWidget ()
| Returns the page widget of the dialog or 0 if no page widget is set.
const DConfigDlgWdg * | pageWidget () const
| Returns the page widget of the dialog or 0 if no page widget is set.
void | setButtonBox (QDialogButtonBox *const box)
| Set the button box of the dialog.
void | setPageWidget (DConfigDlgWdg *const widget)
| Set the page widget of the dialog.
void | showEvent (QShowEvent *) override

## Protected Attributes
DConfigDlgPrivate *const | d_ptr = nullptr

## Detailed Description

This class provides a dialog base class which handles multiple pages and allows the user to switch between these pages in different ways.

Currently, `Auto`, `Plain`, `List`, `Tree` and `Tabbed` face types are available (

See also
  DConfigDlgView).

## Member Enumeration Documentation

## ◆ FaceType

enum Digikam::DConfigDlg::FaceType

- `Auto` - A dialog with a face based on the structure of the available pages. If only a single page is added, the dialog behaves like in `Plain` mode, with multiple pages without sub pages it behaves like in `List` mode and like in `Tree` mode otherwise.
- `Plain` - A normal dialog.
- `List` - A dialog with an icon list on the left side and a representation of the contents on the right side.
- `Tree` - A dialog with a tree on the left side and a representation of the contents on the right side.
- `Tabbed` - A dialog with a tab bar above the representation of the contents.

## Constructor & Destructor Documentation

## ◆ DConfigDlg()

Digikam::DConfigDlg::DConfigDlg | ( | DConfigDlgWdg *const | widget,
|  | QWidget *const | parent,
|  | Qt::WindowFlags | flags = `Qt::WindowFlags()`
| ) |  |
| protected

Parameters

  widget | The DConfigDlgWdg object will be reparented to this object, so you can create it without parent and you are not allowed to delete it.
  parent | The widget parent instance
  flags | The window flags

## Member Function Documentation

## ◆ addPage() [1/2]

void Digikam::DConfigDlg::addPage | ( | DConfigDlgWdgItem *const | item | ) |

Parameters

  item | The

See also
  DConfigDlgWdgItem which describes the page.

## ◆ addPage() [2/2]

DConfigDlgWdgItem * Digikam::DConfigDlg::addPage | ( | QWidget *const | widget,
|  | const QString & | name
| ) |  |

Parameters

  widget | The widget of the page.
  name | The name which is displayed in the navigation view.

Returns
  The associated

See also
  DConfigDlgWdgItem.

## ◆ addSubPage() [1/2]

void Digikam::DConfigDlg::addSubPage | ( | DConfigDlgWdgItem *const | parent,
|  | DConfigDlgWdgItem *const | item
| ) |  |

Parameters

  parent | The new page will be insert as child of this

See also
  DConfigDlgWdgItem.

Parameters

  item | The

See also
  DConfigDlgWdgItem which describes the page.

## ◆ addSubPage() [2/2]

DConfigDlgWdgItem * Digikam::DConfigDlg::addSubPage | ( | DConfigDlgWdgItem *const | parent,
|  | QWidget *const | widget,
|  | const QString & | name
| ) |  |

Parameters

  parent | The new page will be insert as child of this

See also
  DConfigDlgWdgItem.

Parameters

  widget | The widget of the page.
  name | The name which is displayed in the navigation view.

Returns
  The associated

See also
  DConfigDlgWdgItem.

## ◆ currentPage()

DConfigDlgWdgItem * Digikam::DConfigDlg::currentPage | ( |  | ) | const

See also
  DConfigDlgWdgItem for the current page or 0 if there is no current page.

## ◆ currentPageChanged

void Digikam::DConfigDlg::currentPageChanged | ( | DConfigDlgWdgItem * | current,
|  | DConfigDlgWdgItem * | before
| ) |  |
| signal

Parameters

  current | The new current page or 0 if no current page is available.

## ◆ insertPage() [1/2]

void Digikam::DConfigDlg::insertPage | ( | DConfigDlgWdgItem *const | before,
|  | DConfigDlgWdgItem *const | item
| ) |  |

Parameters

  before | The new page will be insert before this

See also
  DConfigDlgWdgItem on the same level in hierarchy.

Parameters

  item | The

See also
  DConfigDlgWdgItem which describes the page.

## ◆ insertPage() [2/2]

DConfigDlgWdgItem * Digikam::DConfigDlg::insertPage | ( | DConfigDlgWdgItem *const | before,
|  | QWidget *const | widget,
|  | const QString & | name
| ) |  |

Parameters

  before | The new page will be insert before this

See also
  DConfigDlgWdgItem on the same level in hierarchy.

Parameters

  widget | The widget of the page.
  name | The name which is displayed in the navigation view.

Returns
  The associated

See also
  DConfigDlgWdgItem.

## ◆ pageRemoved

void Digikam::DConfigDlg::pageRemoved | ( | DConfigDlgWdgItem * | page | ) |
| signal

Parameters

  page | The page which has been removed

## ◆ removePage()

void Digikam::DConfigDlg::removePage | ( | DConfigDlgWdgItem *const | item | ) |

See also
  DConfigDlgWdgItem.

## ◆ setButtonBox()

void Digikam::DConfigDlg::setButtonBox | ( | QDialogButtonBox *const | box | ) |
| protected

Note
  the previous buttonBox will be deleted.

Parameters

  box | The QDialogButtonBox object will be reparented to this object, so you can create it without parent and you are not allowed to delete it.

## ◆ setCurrentPage()

void Digikam::DConfigDlg::setCurrentPage | ( | DConfigDlgWdgItem *const | item | ) |

See also
  DConfigDlgWdgItem to be the current page and emits the currentPageChanged() signal.

## ◆ setPageWidget()

void Digikam::DConfigDlg::setPageWidget | ( | DConfigDlgWdg *const | widget | ) |
| protected

Note
  the previous pageWidget will be deleted.

Parameters

  widget | The DConfigDlgWdg object will be reparented to this object, so you can create it without parent and you are not allowed to delete it.