diff options
author | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2015-04-14 14:21:24 +0300 |
---|---|---|
committer | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2015-06-17 12:32:58 +0300 |
commit | 85b64c67f4b948c3d3aefee237b7606a41ccccba (patch) | |
tree | 935b90025260e567621cc244197f915f5be2abfe /src/virtualkeyboard/styles/styles_plugin.h | |
parent | 60309fd67daa902c3d06e834cbefed19abbdd9be (diff) |
Add SVG image provider to Styles module
With SVG image provider, it is possible to request the SVG images
scaled to specified size using the URL parameters.
In normal case, like with the QML Image, this would not be necessary,
since the Image allows setting the sourceSize property, thus allowing
to scale the SVG to desired size.
However, in special cases, such as with BorderImage, the sourceSize is
not available for modification, thus makes it impossible to leverage
SVG scaling capabilities.
With this change, the SVG images can be fetched from the new image
provider available at image://qtvkbsvg URL and with the desired
size given as URL parameters, for example:
"image://qtvkbsvg/path/to/resource/mySvg.svg?width=123&height=456"
It is also possible to give only one dimension, in which case the
other dimension is calculated by the image provider from the design
aspect ratio of the SVG image.
Change-Id: Ided3035d0d414462b2c3eeaba0b8543a4c5ceea9
Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
Diffstat (limited to 'src/virtualkeyboard/styles/styles_plugin.h')
-rw-r--r-- | src/virtualkeyboard/styles/styles_plugin.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/virtualkeyboard/styles/styles_plugin.h b/src/virtualkeyboard/styles/styles_plugin.h index 97240d2d..733161c5 100644 --- a/src/virtualkeyboard/styles/styles_plugin.h +++ b/src/virtualkeyboard/styles/styles_plugin.h @@ -28,6 +28,7 @@ class StylesPlugin : public QQmlExtensionPlugin public: void registerTypes(const char *uri); + void initializeEngine(QQmlEngine *engine, const char *uri); }; #endif // STYLES_PLUGIN_H |