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 | 105 | url: imagePathArgument[imagePathArgument.length -1] | ||
106 | /** | 106 | /** | ||
107 | * makes sure that operation only occurs after the model is populated | 107 | * makes sure that operation only occurs after the model is populated | ||
108 | */ | 108 | */ | ||
109 | onRowsInserted: { | 109 | onRowsInserted: { | ||
110 | if( indexForUrl(imagePathArgument) != -1) { | 110 | if( indexForUrl(imagePathArgument[imagePathArgument.length -1]) != -1) { | ||
111 | currentImage.model = this | 111 | currentImage.model = this | ||
112 | currentImage.index = indexForUrl(imagePathArgument) | 112 | currentImage.index = indexForUrl(imagePathArgument[imagePathArgument.length -1]) | ||
113 | } | 113 | } | ||
114 | } | 114 | } | ||
115 | } | 115 | } | ||
116 | /* | 116 | /* | ||
117 | * filterRole is an Item property exposed by the QSortFilterProxyModel | 117 | * filterRole is an Item property exposed by the QSortFilterProxyModel | ||
118 | */ | 118 | */ | ||
119 | filterRole: Koko.Roles.MimeTypeRole | 119 | filterRole: Koko.Roles.MimeTypeRole | ||
120 | } | 120 | } | ||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |