Filter documents to supported types

This commit is contained in:
Anton Thomasson 2021-02-13 20:43:03 +01:00
parent 234e11c256
commit 40b1be8aab
3 changed files with 22 additions and 0 deletions

View file

@ -46,6 +46,7 @@ SOURCES += src/harbour-seaprint.cpp \
DISTFILES += qml/harbour-seaprint.qml \ DISTFILES += qml/harbour-seaprint.qml \
qml/components/CylinderGraph.qml \ qml/components/CylinderGraph.qml \
qml/components/DocumentFilter.notqml \
qml/components/LargeChoiceDialog.qml \ qml/components/LargeChoiceDialog.qml \
qml/components/SupplyItem.qml \ qml/components/SupplyItem.qml \
qml/cover/CoverPage.qml \ qml/cover/CoverPage.qml \

View file

@ -0,0 +1,14 @@
import QtDocGallery 5.0
GalleryFilterUnion {
GalleryEndsWithFilter {
property: "fileName"
value: ".pdf"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".ps"
}
}

View file

@ -348,6 +348,13 @@ Page {
DocumentPickerPage { DocumentPickerPage {
allowedOrientations: Orientation.All 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") title: qsTr("Choose file")
onSelectedContentPropertiesChanged: { onSelectedContentPropertiesChanged: {