diff options
Diffstat (limited to 'src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtBorderImage.qml')
-rw-r--r-- | src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtBorderImage.qml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtBorderImage.qml b/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtBorderImage.qml new file mode 100644 index 0000000000..c95ebd3191 --- /dev/null +++ b/src/components/qt_hmi/References/Look/plugins/com/ford/hmiframework/qml/BaseWidgets/FWdgtBorderImage.qml @@ -0,0 +1,40 @@ +// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
+import QtQuick 2.0
+import com.ford.hmiframework 1.0
+
+BorderImage {
+ property string bitmap: ""
+ property bool themed: false
+
+ onBitmapChanged: {
+ applyThemedImage();
+ }
+
+ function applyThemedImage() {
+ if (bitmap !== "") {
+ if (themed) {
+ source = FThemeProvider.resourcePath + "/" + FThemeProvider.theme + "/" + bitmap;
+ }
+ else {
+ source = FThemeProvider.resourcePath + "/" + bitmap;
+ }
+ }
+ else {
+ source = "";
+ }
+ }
+
+ Component.onCompleted: {
+ if (themed)
+ {
+ FThemeProvider.themeChanged.connect(applyThemedImage);
+ }
+ }
+
+ Component.onDestruction: {
+ if (themed)
+ {
+ FThemeProvider.themeChanged.disconnect(applyThemedImage);
+ }
+ }
+}
|