Changeset View
Changeset View
Standalone View
Standalone View
wallpapers/image/imagepackage/platformcontents/phone/ui/config.qml
Show All 16 Lines | |||||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | import QtQuick 2.0 | 19 | import QtQuick 2.0 | ||
20 | 20 | | |||
21 | //We need units from it | 21 | //We need units from it | ||
22 | import org.kde.plasma.core 2.0 as Plasmacore | 22 | import org.kde.plasma.core 2.0 as Plasmacore | ||
23 | import org.kde.plasma.wallpapers.image 2.0 as Wallpaper | 23 | import org.kde.plasma.wallpapers.image 2.0 as Wallpaper | ||
24 | import org.kde.kquickcontrolsaddons 2.0 | 24 | import org.kde.kquickcontrolsaddons 2.0 | ||
25 | import QtQuick.Controls 1.0 as QtControls | 25 | import QtQuick.Controls 2.8 | ||
ngraham: `import QtQuick.Controls 2.5 as QQC2` | |||||
26 | 26 | | |||
27 | Item { | 27 | Item { | ||
28 | id: root | 28 | id: root | ||
29 | anchors { | 29 | anchors { | ||
30 | top: parent.top | 30 | top: parent.top | ||
31 | left: parent.left | 31 | left: parent.left | ||
32 | right: parent.right | 32 | right: parent.right | ||
33 | bottom: parent.bottom | 33 | bottom: parent.bottom | ||
34 | } | 34 | } | ||
35 | property string cfg_Image | 35 | property string cfg_Image | ||
36 | 36 | | |||
37 | Wallpaper.Image { | 37 | Wallpaper.Image { | ||
38 | id: imageWallpaper | 38 | id: imageWallpaper | ||
39 | targetSize: Qt.size(plasmoid.width, plasmoid.height) | 39 | targetSize: Qt.size(plasmoid.width, plasmoid.height) | ||
40 | } | 40 | } | ||
41 | 41 | | |||
42 | //Rectangle { color: "orange"; x: formAlignment; width: formAlignment; height: 20 } | 42 | //Rectangle { color: "orange"; x: formAlignment; width: formAlignment; height: 20 } | ||
43 | 43 | | |||
44 | QtControls.ScrollView { | 44 | ScrollView { | ||
45 | anchors.fill: parent | 45 | anchors.fill: parent | ||
46 | 46 | | |||
47 | frameVisible: true | 47 | frameVisible: true | ||
48 | 48 | | |||
49 | GridView { | 49 | GridView { | ||
50 | id: wallpapersGrid | 50 | id: wallpapersGrid | ||
51 | model: imageWallpaper.wallpaperModel | 51 | model: imageWallpaper.wallpaperModel | ||
52 | currentIndex: -1 | 52 | currentIndex: -1 | ||
Show All 13 Lines | |||||
66 | 66 | | |||
67 | Connections { | 67 | Connections { | ||
68 | target: imageWallpaper | 68 | target: imageWallpaper | ||
69 | onCustomWallpaperPicked: wallpapersGrid.currentIndex = 0 | 69 | onCustomWallpaperPicked: wallpapersGrid.currentIndex = 0 | ||
70 | } | 70 | } | ||
71 | } | 71 | } | ||
72 | } | 72 | } | ||
73 | 73 | | |||
74 | QtControls.Button { | 74 | Button { | ||
75 | anchors { | 75 | anchors { | ||
76 | bottom: parent.bottom | 76 | bottom: parent.bottom | ||
77 | horizontalCenter: parent.horizontalCenter | 77 | horizontalCenter: parent.horizontalCenter | ||
78 | } | 78 | } | ||
79 | iconName: "list-add" | 79 | iconName: "list-add" | ||
80 | text: i18nd("plasma_wallpaper_org.kde.image","Add Custom Wallpaper") | 80 | text: i18nd("plasma_wallpaper_org.kde.image","Add Custom Wallpaper") | ||
81 | onClicked: customWallpaperLoader.source = Qt.resolvedUrl("customwallpaper.qml") | 81 | onClicked: customWallpaperLoader.source = Qt.resolvedUrl("customwallpaper.qml") | ||
82 | } | 82 | } | ||
83 | 83 | | |||
84 | Loader { | 84 | Loader { | ||
85 | id: customWallpaperLoader | 85 | id: customWallpaperLoader | ||
86 | anchors.fill: parent | 86 | anchors.fill: parent | ||
87 | } | 87 | } | ||
88 | } | 88 | } |
import QtQuick.Controls 2.5 as QQC2