Filter documents to supported types
This commit is contained in:
parent
234e11c256
commit
40b1be8aab
3 changed files with 22 additions and 0 deletions
|
@ -46,6 +46,7 @@ SOURCES += src/harbour-seaprint.cpp \
|
|||
|
||||
DISTFILES += qml/harbour-seaprint.qml \
|
||||
qml/components/CylinderGraph.qml \
|
||||
qml/components/DocumentFilter.notqml \
|
||||
qml/components/LargeChoiceDialog.qml \
|
||||
qml/components/SupplyItem.qml \
|
||||
qml/cover/CoverPage.qml \
|
||||
|
|
14
qml/components/DocumentFilter.notqml
Normal file
14
qml/components/DocumentFilter.notqml
Normal file
|
@ -0,0 +1,14 @@
|
|||
import QtDocGallery 5.0
|
||||
|
||||
GalleryFilterUnion {
|
||||
|
||||
GalleryEndsWithFilter {
|
||||
property: "fileName"
|
||||
value: ".pdf"
|
||||
}
|
||||
|
||||
GalleryEndsWithFilter {
|
||||
property: "fileName"
|
||||
value: ".ps"
|
||||
}
|
||||
}
|
|
@ -348,6 +348,13 @@ Page {
|
|||
DocumentPickerPage {
|
||||
allowedOrientations: Orientation.All
|
||||
|
||||
Component.onCompleted: {
|
||||
var thingy = Qt.createComponent("../components/DocumentFilter.notqml");
|
||||
if (thingy.status == Component.Ready) {
|
||||
_contentModel.contentFilter = thingy.createObject(this);
|
||||
}
|
||||
}
|
||||
|
||||
title: qsTr("Choose file")
|
||||
|
||||
onSelectedContentPropertiesChanged: {
|
||||
|
|
Loading…
Reference in a new issue