KGameThemeSelector Class

Theme selection widget. More...

Header: #include <KGameThemeSelector>
Inherits: QWidget

Public Types

enum Option { DefaultBehavior, EnableNewStuffDownload }
flags Options

Public Functions

KGameThemeSelector(KGameThemeProvider *provider, KGameThemeSelector::Options options = DefaultBehavior, QWidget *parent = nullptr)

Public Slots

void showAsDialog(const QString &caption = QString())

Detailed Description

This widget allows the user to change the theme selection of a KGameThemeProvider. Selections are immediately applied to allow the user to quickly preview themes. In simple cases, the widget can be used standalone with the showAsDialog() method.

K_GLOBAL_STATIC_WITH_ARGS(KGameThemeSelector, selector, (provider))
...
selector->showAsDialog();

Member Type Documentation

enum KGameThemeSelector::Option
flags KGameThemeSelector::Options

Flags which control the behavior of KGameThemeSelector.

ConstantValueDescription
KGameThemeSelector::DefaultBehavior0 
KGameThemeSelector::EnableNewStuffDownload1 << 0Enable downloading of additional themes with KNewStuff. This requires a KNS config file to be installed for this app.

The Options type is a typedef for QFlags<Option>. It stores an OR combination of Option values.

Member Function Documentation

[explicit] KGameThemeSelector::KGameThemeSelector(KGameThemeProvider *provider, KGameThemeSelector::Options options = DefaultBehavior, QWidget *parent = nullptr)

Constructs a KGameThemeSelector with provider, options, and a parent.

[slot] void KGameThemeSelector::showAsDialog(const QString &caption = QString())