summaryrefslogtreecommitdiffstats
path: root/src/webengine/ui_delegates_manager.h
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2015-02-12 16:20:39 +0000
committerAndras Becsi <andras.becsi@theqtcompany.com>2015-03-13 08:15:18 +0000
commit60d8d3dcd2a8337e4038a498f92a97624438b2fb (patch)
tree98ffec402ae0bc508b255a1159a9b62119a85b2a /src/webengine/ui_delegates_manager.h
parent5194fe16234cd88dccd763e5d1e497859b7c72b0 (diff)
Support HTML5 form validation feature
HTML5 provides built-in form validation that is supported by chromium. The form validation messages should be shown by the browser therefore new MessageBubble UI element has been added to Quick and Widget implementations. This patch implements chromium's form validation events and shows the messages in a MessageBubble. Change-Id: I0c8f4f102823117e2bfb16ff8a4c503635491939 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'src/webengine/ui_delegates_manager.h')
-rw-r--r--src/webengine/ui_delegates_manager.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/webengine/ui_delegates_manager.h b/src/webengine/ui_delegates_manager.h
index b43006381..f2b78f792 100644
--- a/src/webengine/ui_delegates_manager.h
+++ b/src/webengine/ui_delegates_manager.h
@@ -54,7 +54,8 @@
F(AlertDialog, alertDialog) SEPARATOR \
F(ConfirmDialog, confirmDialog) SEPARATOR \
F(PromptDialog, promptDialog) SEPARATOR \
- F(FilePicker, filePicker) SEPARATOR
+ F(FilePicker, filePicker) SEPARATOR \
+ F(MessageBubble, messageBubble) SEPARATOR
#define COMMA_SEPARATOR ,
#define SEMICOLON_SEPARATOR ;
@@ -66,6 +67,7 @@
QT_BEGIN_NAMESPACE
class QObject;
class QQmlContext;
+class QQuickItem;
class QQuickWebEngineView;
QT_END_NAMESPACE
@@ -124,11 +126,15 @@ public:
void showDialog(QSharedPointer<JavaScriptDialogController>);
void showFilePicker(WebContentsAdapterClient::FileChooserMode, const QString &defaultFileName, const QStringList &acceptedMimeTypes
, const QExplicitlySharedDataPointer<WebContentsAdapter> &);
+ void showMessageBubble(const QRect &anchor, const QString &mainText, const QString &subText);
+ void hideMessageBubble();
+ void moveMessageBubble(const QRect &anchor);
private:
bool ensureComponentLoaded(ComponentType);
QQuickWebEngineView *m_view;
+ QScopedPointer<QQuickItem> m_messageBubbleItem;
FOR_EACH_COMPONENT_TYPE(MEMBER_DECLARATION, SEMICOLON_SEPARATOR)