PlasmaQuick::Dialog

#include <dialog.h>

Inheritance diagram for PlasmaQuick::Dialog:

Public Types

enum  BackgroundHints { NoBackground = 0, StandardBackground = 1 }
 
enum  WindowType {
  Normal = NET::Normal, Dock = NET::Dock, DialogWindow = NET::Dialog, PopupMenu = NET::PopupMenu,
  Tooltip = NET::Tooltip, Notification = NET::Notification, OnScreenDisplay = NET::OnScreenDisplay, CriticalNotification = NET::CriticalNotification
}
 
- Public Types inherited from QQuickWindow
enum  CreateTextureOption
 
enum  NativeObjectType
 
enum  RenderStage
 
enum  SceneGraphError
 
enum  TextRenderType
 
- Public Types inherited from QWindow
enum  AncestorMode
 
enum  Visibility
 
- Public Types inherited from QSurface
enum  SurfaceClass
 
enum  SurfaceType
 

Properties

BackgroundHints backgroundHints
 
Qt::WindowFlags flags
 
bool hideOnWindowDeactivate
 
Plasma::Types::Location location
 
QQuickItem mainItem
 
QObject margins
 
bool outputOnly
 
WindowType type
 
bool visible
 
QQuickItem visualParent
 
- Properties inherited from QQuickWindow
 activeFocusItem
 
 color
 
 contentItem
 
- Properties inherited from QWindow
 active
 
 contentOrientation
 
 flags
 
 height
 
 maximumHeight
 
 maximumWidth
 
 minimumHeight
 
 minimumWidth
 
 modality
 
 opacity
 
 title
 
 visibility
 
 visible
 
 width
 
 x
 
 y
 
- Properties inherited from QObject
 objectName
 

Signals

void backgroundHintsChanged ()
 
void flagsChanged ()
 
void hideOnWindowDeactivateChanged ()
 
void locationChanged ()
 
void mainItemChanged ()
 
void outputOnlyChanged ()
 
void typeChanged ()
 
void visibleChangedProxy ()
 
void visualParentChanged ()
 
void windowDeactivated ()
 

Public Member Functions

 Dialog (QQuickItem *parent=nullptr)
 
BackgroundHints backgroundHints () const
 
bool hideOnWindowDeactivate () const
 
bool isOutputOnly () const
 
bool isVisible () const
 
Plasma::Types::Location location () const
 
QQuickItemmainItem () const
 
QObjectmargins () const
 
virtual QPoint popupPosition (QQuickItem *item, const QSize &size)
 
void setBackgroundHints (BackgroundHints hints)
 
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 (WindowType type)
 
void setVisible (bool visible)
 
void setVisualParent (QQuickItem *visualParent)
 
WindowType type () const
 
QQuickItemvisualParent () const
 
- Public Member Functions inherited from QQuickWindow
 QQuickWindow (QWindow *parent)
 
virtual QAccessibleInterfaceaccessibleRoot () const const override
 
QQuickItemactiveFocusItem () const const
 
void activeFocusItemChanged ()
 
void afterAnimating ()
 
void afterRendering ()
 
void afterRenderPassRecording ()
 
void afterSynchronizing ()
 
void beforeRendering ()
 
void beforeRenderPassRecording ()
 
void beforeSynchronizing ()
 
void beginExternalCommands ()
 
bool clearBeforeRendering () const const
 
void closing (QQuickCloseEvent *close)
 
QColor color () const const
 
void colorChanged (const QColor &)
 
QQuickItemcontentItem () const const
 
QSGImageNodecreateImageNode () const const
 
QSGNinePatchNode * createNinePatchNode () const const
 
QSGRectangleNodecreateRectangleNode () const const
 
QSGTexturecreateTextureFromId (uint id, const QSize &size, QQuickWindow::CreateTextureOptions options) const const
 
QSGTexturecreateTextureFromImage (const QImage &image) const const
 
QSGTexturecreateTextureFromImage (const QImage &image, QQuickWindow::CreateTextureOptions options) const const
 
QSGTexturecreateTextureFromNativeObject (QQuickWindow::NativeObjectType type, const void *nativeObjectPtr, int nativeLayout, const QSize &size, QQuickWindow::CreateTextureOptions options) const const
 
qreal effectiveDevicePixelRatio () const const
 
void endExternalCommands ()
 
void frameSwapped ()
 
QImage grabWindow ()
 
const QQuickWindow::GraphicsStateInfographicsStateInfo ()
 
QQmlIncubationControllerincubationController () const const
 
bool isPersistentOpenGLContext () const const
 
bool isPersistentSceneGraph () const const
 
bool isSceneGraphInitialized () const const
 
QQuickItemmouseGrabberItem () const const
 
QOpenGLContextopenglContext () const const
 
void openglContextCreated (QOpenGLContext *context)
 
void releaseResources ()
 
QSGRendererInterfacerendererInterface () const const
 
QOpenGLFramebufferObjectrenderTarget () const const
 
uint renderTargetId () const const
 
QSize renderTargetSize () const const
 
void resetOpenGLState ()
 
void sceneGraphAboutToStop ()
 
void sceneGraphError (QQuickWindow::SceneGraphError error, const QString &message)
 
void sceneGraphInitialized ()
 
void sceneGraphInvalidated ()
 
void scheduleRenderJob (QRunnable *job, QQuickWindow::RenderStage stage)
 
bool sendEvent (QQuickItem *item, QEvent *e)
 
void setClearBeforeRendering (bool enabled)
 
void setColor (const QColor &color)
 
void setPersistentOpenGLContext (bool persistent)
 
void setPersistentSceneGraph (bool persistent)
 
void setRenderTarget (QOpenGLFramebufferObject *fbo)
 
void setRenderTarget (uint fboId, const QSize &size)
 
void update ()
 
- Public Member Functions inherited from QWindow
 QWindow (QScreen *targetScreen)
 
 QWindow (QWindow *parent)
 
void activeChanged ()
 
void alert (int msec)
 
QSize baseSize () const const
 
bool close ()
 
Qt::ScreenOrientation contentOrientation () const const
 
void contentOrientationChanged (Qt::ScreenOrientation orientation)
 
void create ()
 
QCursor cursor () const const
 
void destroy ()
 
qreal devicePixelRatio () const const
 
QString filePath () const const
 
Qt::WindowFlags flags () const const
 
virtual QObjectfocusObject () const const
 
void focusObjectChanged (QObject *object)
 
virtual QSurfaceFormat format () const const override
 
QRect frameGeometry () const const
 
QMargins frameMargins () const const
 
QPoint framePosition () const const
 
QRect geometry () const const
 
int height () const const
 
void heightChanged (int arg)
 
void hide ()
 
QIcon icon () const const
 
bool isActive () const const
 
bool isAncestorOf (const QWindow *child, QWindow::AncestorMode mode) const const
 
bool isExposed () const const
 
bool isModal () const const
 
bool isTopLevel () const const
 
bool isVisible () const const
 
void lower ()
 
QPoint mapFromGlobal (const QPoint &pos) const const
 
QPoint mapToGlobal (const QPoint &pos) const const
 
QRegion mask () const const
 
int maximumHeight () const const
 
void maximumHeightChanged (int arg)
 
QSize maximumSize () const const
 
int maximumWidth () const const
 
void maximumWidthChanged (int arg)
 
int minimumHeight () const const
 
void minimumHeightChanged (int arg)
 
QSize minimumSize () const const
 
int minimumWidth () const const
 
void minimumWidthChanged (int arg)
 
Qt::WindowModality modality () const const
 
void modalityChanged (Qt::WindowModality modality)
 
qreal opacity () const const
 
void opacityChanged (qreal opacity)
 
QWindowparent (QWindow::AncestorMode mode) const const
 
QWindowparent () const const
 
QPoint position () const const
 
void raise ()
 
void reportContentOrientationChange (Qt::ScreenOrientation orientation)
 
void requestActivate ()
 
QSurfaceFormat requestedFormat () const const
 
void requestUpdate ()
 
void resize (const QSize &newSize)
 
void resize (int w, int h)
 
QScreenscreen () const const
 
void screenChanged (QScreen *screen)
 
void setBaseSize (const QSize &size)
 
void setCursor (const QCursor &cursor)
 
void setFilePath (const QString &filePath)
 
void setFlag (Qt::WindowType flag, bool on)
 
void setFlags (Qt::WindowFlags flags)
 
void setFormat (const QSurfaceFormat &format)
 
void setFramePosition (const QPoint &point)
 
void setGeometry (const QRect &rect)
 
void setGeometry (int posx, int posy, int w, int h)
 
void setHeight (int arg)
 
void setIcon (const QIcon &icon)
 
bool setKeyboardGrabEnabled (bool grab)
 
void setMask (const QRegion &region)
 
void setMaximumHeight (int h)
 
void setMaximumSize (const QSize &size)
 
void setMaximumWidth (int w)
 
void setMinimumHeight (int h)
 
void setMinimumSize (const QSize &size)
 
void setMinimumWidth (int w)
 
void setModality (Qt::WindowModality modality)
 
bool setMouseGrabEnabled (bool grab)
 
void setOpacity (qreal level)
 
void setParent (QWindow *parent)
 
void setPosition (int posx, int posy)
 
void setPosition (const QPoint &pt)
 
void setScreen (QScreen *newScreen)
 
void setSizeIncrement (const QSize &size)
 
void setSurfaceType (QSurface::SurfaceType surfaceType)
 
void setTitle (const QString &)
 
void setVisibility (QWindow::Visibility v)
 
void setVisible (bool visible)
 
void setVulkanInstance (QVulkanInstance *instance)
 
void setWidth (int arg)
 
void setWindowState (Qt::WindowState state)
 
void setWindowStates (Qt::WindowStates state)
 
void setX (int arg)
 
void setY (int arg)
 
void show ()
 
void showFullScreen ()
 
void showMaximized ()
 
void showMinimized ()
 
void showNormal ()
 
virtual QSize size () const const override
 
QSize sizeIncrement () const const
 
bool startSystemMove ()
 
bool startSystemResize (Qt::Edges edges)
 
virtual QSurface::SurfaceType surfaceType () const const override
 
QString title () const const
 
Qt::WindowType type () const const
 
void unsetCursor ()
 
QWindow::Visibility visibility () const const
 
void visibilityChanged (QWindow::Visibility visibility)
 
void visibleChanged (bool arg)
 
QVulkanInstancevulkanInstance () const const
 
int width () const const
 
void widthChanged (int arg)
 
Qt::WindowState windowState () const const
 
void windowStateChanged (Qt::WindowState windowState)
 
Qt::WindowStates windowStates () const const
 
void windowTitleChanged (const QString &title)
 
WId winId () const const
 
int x () const const
 
void xChanged (int arg)
 
int y () const const
 
void yChanged (int arg)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 
- Public Member Functions inherited from QSurface
bool supportsOpenGL () const const
 
QSurface::SurfaceClass surfaceClass () const const
 
virtual QPlatformSurface * surfaceHandle () const const =0
 

Protected Member Functions

virtual void adjustGeometry (const QRect &geom)
 
void classBegin () override
 
void componentComplete () override
 
bool event (QEvent *event) override
 
void focusInEvent (QFocusEvent *ev) override
 
void focusOutEvent (QFocusEvent *ev) override
 
void hideEvent (QHideEvent *event) override
 
void resizeEvent (QResizeEvent *re) override
 
void showEvent (QShowEvent *event) override
 
- Protected Member Functions inherited from QQuickWindow
virtual void exposeEvent (QExposeEvent *) override
 
virtual void keyPressEvent (QKeyEvent *e) override
 
virtual void keyReleaseEvent (QKeyEvent *e) override
 
virtual void mouseDoubleClickEvent (QMouseEvent *event) override
 
virtual void mouseMoveEvent (QMouseEvent *event) override
 
virtual void mousePressEvent (QMouseEvent *event) override
 
virtual void mouseReleaseEvent (QMouseEvent *event) override
 
virtual void tabletEvent (QTabletEvent *event) override
 
virtual void wheelEvent (QWheelEvent *event) override
 
- Protected Member Functions inherited from QWindow
virtual void moveEvent (QMoveEvent *ev)
 
virtual bool nativeEvent (const QByteArray &eventType, void *message, long *result)
 
virtual void touchEvent (QTouchEvent *ev)
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 
- Protected Member Functions inherited from QSurface
 QSurface (QSurface::SurfaceClass type)
 

Additional Inherited Members

- Static Public Member Functions inherited from QQuickWindow
bool hasDefaultAlphaBuffer ()
 
QString sceneGraphBackend ()
 
void setDefaultAlphaBuffer (bool useAlpha)
 
void setSceneGraphBackend (const QString &backend)
 
void setSceneGraphBackend (QSGRendererInterface::GraphicsApi api)
 
void setTextRenderType (QQuickWindow::TextRenderType renderType)
 
QQuickWindow::TextRenderType textRenderType ()
 
- Static Public Member Functions inherited from QWindow
QWindowfromWinId (WId id)
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QQuickWindow
 AfterRenderingStage
 
 AfterSwapStage
 
 AfterSynchronizingStage
 
 BeforeRenderingStage
 
 BeforeSynchronizingStage
 
 ContextNotAvailable
 
typedef CreateTextureOptions
 
 NativeObjectTexture
 
 NativeTextRendering
 
 NoStage
 
 QtTextRendering
 
 TextureCanUseAtlas
 
 TextureHasAlphaChannel
 
 TextureHasMipmaps
 
 TextureIsOpaque
 
 TextureOwnsGLTexture
 
- Public Attributes inherited from QWindow
 AutomaticVisibility
 
 ExcludeTransients
 
 FullScreen
 
 Hidden
 
 IncludeTransients
 
 Maximized
 
 Minimized
 
 Windowed
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Public Attributes inherited from QSurface
 MetalSurface
 
 Offscreen
 
 OpenGLSurface
 
 OpenVGSurface
 
 RasterGLSurface
 
 RasterSurface
 
 VulkanSurface
 
 Window
 

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

import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
Item {
PlasmaCore.Dialog {
visible: true
mainItem: Item {
width: 500
height: 500
Text {
anchors.centerIn: parent
color: "red"
text: "text"
}
}
}
}

Definition at line 84 of file dialog.h.

Member Enumeration Documentation

Enumerator
NoBackground 

Not drawing a background under the applet, the dialog has its own implementation.

StandardBackground 

The standard background from the theme is drawn.

Definition at line 166 of file dialog.h.

Property Documentation

Dialog::BackgroundHints PlasmaQuick::Dialog::backgroundHints
readwrite

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

Definition at line 147 of file dialog.h.

Qt::WindowFlags PlasmaQuick::Dialog::flags
readwrite

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

Definition at line 140 of file dialog.h.

bool PlasmaQuick::Dialog::hideOnWindowDeactivate
readwrite

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

The default value is false.

Definition at line 120 of file dialog.h.

Plasma::Types::Location PlasmaQuick::Dialog::location
readwrite

Plasma Location of the dialog window.

Useful if this dialog is a popup for a panel

Definition at line 108 of file dialog.h.

QQuickItem * PlasmaQuick::Dialog::mainItem
readwrite

The main QML item that will be displayed in the Dialog.

Definition at line 92 of file dialog.h.

QObject * PlasmaQuick::Dialog::margins
read

Margins of the dialog around the mainItem.

See also
DialogMargins

Definition at line 103 of file dialog.h.

bool PlasmaQuick::Dialog::outputOnly
readwrite

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.

Definition at line 130 of file dialog.h.

Dialog::WindowType PlasmaQuick::Dialog::type
readwrite

Type of the window.

Definition at line 113 of file dialog.h.

QQuickItem * PlasmaQuick::Dialog::visualParent
readwrite

The main QML item that will be displayed in the Dialog.

Definition at line 97 of file dialog.h.

Member Function Documentation

void PlasmaQuick::Dialog::adjustGeometry ( const QRect geom)
protectedvirtual

set the dialog position.

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

Definition at line 1103 of file dialog.cpp.

QPoint PlasmaQuick::Dialog::popupPosition ( QQuickItem item,
const QSize size 
)
virtual
Returns
The suggested screen position for the popup
Parameters
itemthe item the popup has to be positioned relatively to. if null, the popup will be positioned in the center of the window
sizethe size that the popup will have, which influences the final position

Definition at line 941 of file dialog.cpp.

void PlasmaQuick::Dialog::windowDeactivated ( )
signal

Emitted when the.

See also
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.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jul 1 2020 22:39:42 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.