Changeset View
Changeset View
Standalone View
Standalone View
qmlUiKirigami/Main.qml
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Line(s) | 51 | onFilterBy: { | |||
---|---|---|---|---|---|
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 | ||
106 | /** | ||||
107 | * makes sure that operation only occurs after the model is populated | ||||
108 | */ | ||||
109 | onRowsInserted: { | ||||
110 | if( indexForUrl(imagePathArgument) != -1) { | ||||
111 | currentImage.model = this | ||||
112 | currentImage.index = indexForUrl(imagePathArgument) | ||||
113 | imageViewer.state = "open" | ||||
114 | } | ||||
115 | } | ||||
106 | } | 116 | } | ||
107 | /* | 117 | /* | ||
108 | * filterRole is an Item property exposed by the QSortFilterProxyModel | 118 | * filterRole is an Item property exposed by the QSortFilterProxyModel | ||
109 | */ | 119 | */ | ||
110 | filterRole: Koko.Roles.MimeTypeRole | 120 | filterRole: Koko.Roles.MimeTypeRole | ||
111 | } | 121 | } | ||
112 | 122 | | |||
113 | Koko.SortModel { | 123 | Koko.SortModel { | ||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |