PlasmaQuick::PopupPlasmaWindow Class
class PlasmaQuick::PopupPlasmaWindowStyled Plasma window that can be positioned relative to an existing Item on another window. More...
Header: | #include <PlasmaQuick/PopupPlasmaWindow> |
CMake: | find_package(PlasmaQuick REQUIRED) target_link_libraries(mytarget PRIVATE Plasma::PlasmaQuick) |
In QML: | PopupPlasmaWindow |
Inherits: | PlasmaQuick::PlasmaWindow |
Inherited By: |
Public Types
enum | RemoveBorder { Never, AtScreenEdges, AtPanelEdges } |
flags | RemoveBorders |
Properties
|
|
Public Functions
PopupPlasmaWindow(const QString &svgPrefix = QStringLiteral("dialogs/background")) | |
bool | animated() const |
Qt::Edge | effectivePopupDirection() const |
bool | floating() const |
int | margin() const |
Qt::Edge | popupDirection() const |
PlasmaQuick::PopupPlasmaWindow::RemoveBorders | removeBorderStrategy() const |
void | setAnimated(bool animated) |
void | setFloating(bool floating) |
void | setMargin(int margin) |
void | setPopupDirection(Qt::Edge popupDirection) |
void | setRemoveBorderStrategy(PlasmaQuick::PopupPlasmaWindow::RemoveBorders borders) |
void | setVisualParent(QQuickItem *parent) |
QQuickItem * | visualParent() const |
Signals
void | animatedChanged() |
void | effectivePopupDirectionChanged() |
void | floatingChanged() |
void | marginChanged() |
void | popupDirectionChanged() |
void | removeBorderStrategyChanged() |
void | visualParentChanged() |
Detailed Description
When shown the popup is placed correctly.
On Wayland this is currently an XdgTopLevel with the PlasmaShellSurface used on top. Do not rely on that implementation detail
Member Type Documentation
enum PopupPlasmaWindow::RemoveBorder
flags PopupPlasmaWindow::RemoveBorders
Constant | Value |
---|---|
PlasmaQuick::PopupPlasmaWindow::Never | 0x0 |
PlasmaQuick::PopupPlasmaWindow::AtScreenEdges | 0x1 |
PlasmaQuick::PopupPlasmaWindow::AtPanelEdges | 0x2 |
The RemoveBorders type is a typedef for QFlags<RemoveBorder>. It stores an OR combination of RemoveBorder values.
Property Documentation
animated : bool
Defines whether the popup is animated on show and close. The default is false.
Access functions:
bool | animated() const |
void | setAnimated(bool animated) |
Notifier signal:
void | animatedChanged() |
[read-only]
effectivePopupDirection : const Qt::Edge
Defines the direction the popup was placed relative to the visualParent. This property is read-only and is updated when the popup is shown. The value whilst the popup is hidden is undefined.
Access functions:
Qt::Edge | effectivePopupDirection() const |
Notifier signal:
void | effectivePopupDirectionChanged() |
floating : bool
Defines whether the popup can appaer (float) over the parent window. The default is false.
Access functions:
bool | floating() const |
void | setFloating(bool floating) |
Notifier signal:
void | floatingChanged() |
margin : int
If set provides a gap between the parent window and all screen edges
Access functions:
int | margin() const |
void | setMargin(int margin) |
Notifier signal:
void | marginChanged() |
popupDirection : Qt::Edge
Defines the default direction to place the popup relative to the visualParent.
Access functions:
Qt::Edge | popupDirection() const |
void | setPopupDirection(Qt::Edge popupDirection) |
Notifier signal:
void | popupDirectionChanged() |
removeBorderStrategy : RemoveBorders
Defines which borders should be enabled/disabled when the popup is shown. The default is to show all borders
Access functions:
PlasmaQuick::PopupPlasmaWindow::RemoveBorders | removeBorderStrategy() const |
void | setRemoveBorderStrategy(PlasmaQuick::PopupPlasmaWindow::RemoveBorders borders) |
Notifier signal:
void | removeBorderStrategyChanged() |
visualParent : QQuickItem*
The anchor item to place the popup relative to.
Access functions:
QQuickItem * | visualParent() const |
void | setVisualParent(QQuickItem *parent) |
Notifier signal:
void | visualParentChanged() |
Member Function Documentation
PopupPlasmaWindow::PopupPlasmaWindow(const QString &svgPrefix = QStringLiteral("dialogs/background"))
Constructor