Pages
API Documentation
On this page

PlasmaQuick::Dialog Class

Creates a Plasma themed top level window that can contain any QML component. More...

  • Header: #include <PlasmaQuick::Dialog>
  • CMake: find_package(PlasmaQuick REQUIRED)
    target_link_libraries(mytarget PRIVATE Plasma::PlasmaQuick)
  • Inherits: QQuickWindow and

List of all members, including inherited members

Properties

Public Functions

Signals

Protected Functions

Detailed Description

It can be automatically positioned relative to a visual parent The dialog will resize to the size of the main item

Property Documentation

appletInterface : QQuickItem*

This property holds a pointer to the AppletInterface used by an applet. It is null when the dialog is not used for an applet.

Access functions:

  • QQuickItem *appletInterface() const
  • void setAppletInterface(QQuickItem *appletInterface)

Notifier signal:

  • void appletInterfaceChanged()

backgroundHints : BackgroundHints

This property holds how (and if at all) the dialog should draw its own background or if it is complete responsibility of the content item to render a background. Note that in case of NoBackground it loses kwin side shadows and blur

Access functions:

  • PlasmaQuick::Dialog::BackgroundHints backgroundHints() const
  • void setBackgroundHints(PlasmaQuick::Dialog::BackgroundHints hints)

Notifier signal:

  • void backgroundHintsChanged()

flags : Qt::WindowFlags

This property holds the window flags of the window. The window flags control the window's appearance in the windowing system, whether it's a dialog, popup, or a regular window, and whether it should have a title bar, etc. Regardless to what the user sets, the flags will always have the FramelessWindowHint flag set

Access functions:

  • void setFramelessFlags(Qt::WindowFlags flags)

Notifier signal:

  • void flagsChanged()

floating : int

This property holds by how much the applet should be floating even if the location is set to a certain screen side; if this value is positive, the dialog will draw all four sides and maintain the required distance from the screen borders.

Access functions:

  • int floating() const
  • void setFloating(int floating)

Notifier signal:

  • void floatingChanged()

hideOnWindowDeactivate : bool

Whether the dialog should be hidden when the dialog loses focus.

The default value is false.

Access functions:

  • bool hideOnWindowDeactivate() const
  • void setHideOnWindowDeactivate(bool hide)

Notifier signal:

  • void hideOnWindowDeactivateChanged()

[read-only] inset : QObject* const

Margins where the dialog background actually starts, excluiding things like shadows or borders

Access functions:

  • QObject *inset() const

See also DialogMargins

location : Plasma::Types::Location

Plasma Location of the dialog window.

Useful if this dialog is a popup for a panel.

Access functions:

  • Plasma::Types::Location location() const
  • void setLocation(Plasma::Types::Location location)

Notifier signal:

  • void locationChanged()

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] margins : QObject* const

Margins of the dialog around the mainItem.

Access functions:

  • QObject *margins() const

See also DialogMargins

outputOnly : bool

Whether the dialog is output only. Default value is false. If it is true the dialog does not accept input and all pointer events are not accepted, thus the dialog is click through.

This property is currently only supported on the X11 platform. On any other platform the property has no effect.

Access functions:

  • bool isOutputOnly() const
  • void setOutputOnly(bool outputOnly)

Notifier signal:

  • void outputOnlyChanged()

type : WindowType

Type of the window

Access functions:

  • PlasmaQuick::Dialog::WindowType type() const
  • void setType(PlasmaQuick::Dialog::WindowType type)

Notifier signal:

  • void typeChanged()

visible : bool

Access functions:

  • bool isVisible() const
  • void setVisible(bool visible)

Notifier signal:

  • void visibleChangedProxy()

visualParent : QQuickItem*

The main QML item that will be displayed in the Dialog

Access functions:

  • QQuickItem *visualParent() const
  • void setVisualParent(QQuickItem *visualParent)

Notifier signal:

  • void visualParentChanged()

Member Function Documentation

[virtual protected] void Dialog::adjustGeometry(const QRect &geom)

Sets the dialog position.

Subclasses may change it. ToolTipDialog adjusts the position in an animated way.

[virtual] QPoint Dialog::popupPosition(QQuickItem *item, const QSize &size)

Returns the suggested screen position for the popup.

item The item the popup has to be positioned relatively to. If null, the popup will be positioned in the center of the window.

size The size that the popup will have, which influences the final position.

[signal] void Dialog::windowDeactivated()

Emitted when the hideOnWindowDeactivate property is true and this dialog lost focus to a window that is neither a parent dialog to nor a child dialog of this dialog.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.