blob: c95ebd3191b085a407ee008fc7496a2d14d6a12c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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);
}
}
}
|