PlasmaQuick::PlasmaWindow Class

class PlasmaQuick::PlasmaWindow

Creates a QQuickWindow themed in a Plasma style with background. More...

Header: #include <PlasmaQuick/PlasmaWindow>
CMake: find_package(PlasmaQuick REQUIRED)
target_link_libraries(mytarget PRIVATE Plasma::PlasmaQuick)
In QML: Window
Inherits: QQuickWindow
Inherited By:

PlasmaQuick::PopupPlasmaWindow

Public Types

enum BackgroundHints { StandardBackground, SolidBackground }

Properties

Public Functions

PlasmaQuick::PlasmaWindow::BackgroundHints backgroundHints() const
Qt::Edges borders()
qreal bottomPadding() const
qreal leftPadding() const
QQuickItem *mainItem() const
QMargins padding() const
qreal rightPadding() const
void setBackgroundHints(PlasmaQuick::PlasmaWindow::BackgroundHints hints)
void setBorders(Qt::Edges bordersToShow)
void setMainItem(QQuickItem *mainItem)
qreal topPadding() const

Signals

Detailed Description

Member Type Documentation

enum PlasmaWindow::BackgroundHints

ConstantValueDescription
PlasmaQuick::PlasmaWindow::StandardBackground0The standard background from the theme is drawn
PlasmaQuick::PlasmaWindow::SolidBackground1The solid version of the background is preferred

Property Documentation

backgroundHints : BackgroundHints

Defines the background used for the window

Access functions:

PlasmaQuick::PlasmaWindow::BackgroundHints backgroundHints() const
void setBackgroundHints(PlasmaQuick::PlasmaWindow::BackgroundHints hints)

Notifier signal:

void backgroundHintsChanged()

[read-only] borders : const Qt::Edges

Tells what borders are enabled of its background

Access functions:

Qt::Edges borders()

Notifier signal:

void bordersChanged()

[read-only] bottomPadding : const qreal

Access functions:

qreal bottomPadding() const

Notifier signal:

[read-only] leftPadding : const qreal

Access functions:

qreal leftPadding() const

Notifier signal:

void paddingChanged()

mainItem : QQuickItem*

The main QML item that will be displayed in the Dialog

Access functions:

QQuickItem *mainItem() const
void setMainItem(QQuickItem *mainItem)

Notifier signal:

void mainItemChanged()

[read-only] rightPadding : const qreal

Access functions:

qreal rightPadding() const

Notifier signal:

[read-only] topPadding : const qreal

Access functions:

qreal topPadding() const

Notifier signal:

Member Function Documentation

QMargins PlasmaWindow::padding() const

Returns the padding that are placed around the mainItem When setting size hints on the window this should be factored in.

void PlasmaWindow::setBorders(Qt::Edges bordersToShow)

Changes which rounded corners are shown on the window. Margins remain the same The default is all borders

See also borders().

void PlasmaWindow::setMainItem(QQuickItem *mainItem)

The main QML item that will be displayed in the Dialog

Note: Setter function for property mainItem.

See also mainItem().