PlasmaQuick::Dialog Class
class PlasmaQuick::DialogHeader: | #include <Dialog> |
CMake: | find_package(PlasmaQuick REQUIRED) target_link_libraries(mytarget PRIVATE Plasma::PlasmaQuick) |
Inherits: | QQuickWindow and |
Public Functions
QQuickItem * | appletInterface() const |
PlasmaQuick::Dialog::BackgroundHints | backgroundHints() const |
int | floating() const |
bool | hideOnWindowDeactivate() const |
QObject * | inset() const |
bool | isOutputOnly() const |
bool | isVisible() const |
Plasma::Types::Location | location() const |
QQuickItem * | mainItem() const |
QObject * | margins() const |
virtual QPoint | popupPosition(QQuickItem *item, const QSize &size) |
void | setAppletInterface(QQuickItem *appletInterface) |
void | setBackgroundHints(PlasmaQuick::Dialog::BackgroundHints hints) |
void | setFloating(int floating) |
void | setFramelessFlags(Qt::WindowFlags flags) |
void | setHideOnWindowDeactivate(bool hide) |
void | setLocation(Plasma::Types::Location location) |
void | setMainItem(QQuickItem *mainItem) |
void | setOutputOnly(bool outputOnly) |
void | setType(PlasmaQuick::Dialog::WindowType type) |
void | setVisible(bool visible) |
void | setVisualParent(QQuickItem *visualParent) |
PlasmaQuick::Dialog::WindowType | type() const |
QQuickItem * | visualParent() const |
Signals
void | appletInterfaceChanged() |
void | backgroundHintsChanged() |
void | flagsChanged() |
void | floatingChanged() |
void | hideOnWindowDeactivateChanged() |
void | locationChanged() |
void | mainItemChanged() |
void | outputOnlyChanged() |
void | typeChanged() |
void | visibleChangedProxy() |
void | visualParentChanged() |
void | windowDeactivated() |
Protected Functions
virtual void | adjustGeometry(const QRect &geom) |
Detailed Description
Dialog creates a Plasma themed top level window that can contain any QML component.
It can be automatically positioned relative to a visual parent The dialog will resize to the size of the main item
@code{.qml} import QtQuick 2.0 import org.kde.plasma.core as PlasmaCore Item { PlasmaCore.Dialog { visible: true mainItem: Item { width: 500 height: 500
Text { anchors.centerIn: parent color: "red" text: "text" } } } } @endcode
<b>Import Statement</b> @code import org.kde.plasma.core @endcode @version 2.0
Member Function Documentation
[virtual protected]
void Dialog::adjustGeometry(const QRect &geom)
set 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 @param item the item the popup has to be positioned relatively to. if null, the popup will be positioned in the center of the window @param size the size that the popup will have, which influences the final position
[signal]
void Dialog::windowDeactivated()
Emitted when the @see hideOnWindowDeactivate property is @c true and this dialog lost focus to a window that is neither a parent dialog to nor a child dialog of this dialog.