Changeset View
Changeset View
Standalone View
Standalone View
qmlUiKirigami/Main.qml
Show First 20 Lines • Show All 96 Lines • ▼ Show 20 Line(s) | 56 | switch( value){ | |||
---|---|---|---|---|---|
97 | } | 97 | } | ||
98 | } | 98 | } | ||
99 | } | 99 | } | ||
100 | } | 100 | } | ||
101 | 101 | | |||
102 | Koko.SortModel { | 102 | Koko.SortModel { | ||
103 | id: imageFolderModel | 103 | id: imageFolderModel | ||
104 | sourceModel: Koko.ImageFolderModel { | 104 | sourceModel: Koko.ImageFolderModel { | ||
105 | url: imagePathArgument == "" ? "" : imagePathArgument[imagePathArgument.length -1] | 105 | /** | ||
106 | * imagePathArgument[0] sets the column 0 of the pageStack to reflect either a foreign path or ~/Pictures | ||||
107 | */ | ||||
108 | url: imagePathArgument == "" ? "" : imagePathArgument[0] | ||||
106 | /** | 109 | /** | ||
107 | * makes sure that operation only occurs after the model is populated | 110 | * makes sure that operation only occurs after the model is populated | ||
108 | */ | 111 | */ | ||
109 | onRowsInserted: { | 112 | onRowsInserted: { | ||
110 | if( indexForUrl(imagePathArgument[imagePathArgument.length -1]) != -1) { | 113 | if( indexForUrl(imagePathArgument[imagePathArgument.length -1]) != -1) { | ||
111 | currentImage.model = this | 114 | currentImage.model = this | ||
112 | currentImage.index = indexForUrl(imagePathArgument[imagePathArgument.length -1]) | 115 | currentImage.index = indexForUrl(imagePathArgument[imagePathArgument.length -1]) | ||
113 | } | 116 | } | ||
▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines |