aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/templates
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-07-20 17:40:25 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-11-14 00:33:00 +0000
commit0a0902b10d3135b0697741cc9b1f5b1b318eeb1f (patch)
tree4e1eb3116bc1caa7e221970349a130864c0d24d8 /src/imports/templates
parent4cd3cd7cbec2a6713ba146b7036652f6916cab1e (diff)
Introducing Panel type
This is the base type to implement all sorts of Popups and Dialogs. Its main role is to keep the panel contents stacked on top of the application window contents and to ensure mouse and key events are forwarded or blocked depending on the visible panels modality. Currently, it only works with ApplicationWindow, which holds a QQuickOverlay. This special item is where the Panel contents gets reparented when the Panel becomes visible. It's also responsible for filtering the mouse events. Future developements may include adding a 'level' property instead of relying on the item's z value. This may or may not result into having several overlays per window. Change-Id: I18a4b8905e4d5a4a4697642b0553a1f9e86b669f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/templates')
-rw-r--r--src/imports/templates/qtlabstemplatesplugin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/imports/templates/qtlabstemplatesplugin.cpp b/src/imports/templates/qtlabstemplatesplugin.cpp
index 5a976aca..8352714a 100644
--- a/src/imports/templates/qtlabstemplatesplugin.cpp
+++ b/src/imports/templates/qtlabstemplatesplugin.cpp
@@ -49,6 +49,7 @@
#include <QtLabsTemplates/private/qquickgroupbox_p.h>
#include <QtLabsTemplates/private/qquicklabel_p.h>
#include <QtLabsTemplates/private/qquickpageindicator_p.h>
+#include <QtLabsTemplates/private/qquickpanel_p.h>
#include <QtLabsTemplates/private/qquickprogressbar_p.h>
#include <QtLabsTemplates/private/qquickradiobutton_p.h>
#include <QtLabsTemplates/private/qquickrangeslider_p.h>
@@ -93,6 +94,7 @@ void QtLabsTemplatesPlugin::registerTypes(const char *uri)
qmlRegisterType<QQuickGroupBox>(uri, 1, 0, "GroupBox");
qmlRegisterType<QQuickLabel>(uri, 1, 0, "Label");
qmlRegisterType<QQuickPageIndicator>(uri, 1, 0, "PageIndicator");
+ qmlRegisterType<QQuickPanel>(uri, 1, 0, "Panel");
qmlRegisterType<QQuickProgressBar>(uri, 1, 0, "ProgressBar");
qmlRegisterType<QQuickRadioButton>(uri, 1, 0, "RadioButton");
qmlRegisterType<QQuickRangeSlider>(uri, 1, 0, "RangeSlider");