Enable format filters

This commit is contained in:
Anton Thomasson 2021-04-10 14:42:54 +02:00
parent 9231d9e081
commit 0346a9cc13
3 changed files with 47 additions and 17 deletions

View file

@ -45,21 +45,11 @@ SOURCES += src/harbour-seaprint.cpp \
ppm2pwg/bytestream/bytestream.cpp ppm2pwg/bytestream/bytestream.cpp
DISTFILES += qml/harbour-seaprint.qml \ DISTFILES += qml/harbour-seaprint.qml \
qml/components/CylinderGraph.qml \
qml/components/DocumentFilter.notqml \
qml/components/LargeChoiceDialog.qml \
qml/components/SettingsColumn.qml \
qml/components/SupplyItem.qml \
qml/cover/CoverPage.qml \ qml/cover/CoverPage.qml \
qml/components/*.qml \ qml/components/*qml \
qml/pages/*.qml \ qml/pages/*.qml \
qml/pages/*.js \ qml/pages/*.js \
qml/pages/*svg \ qml/pages/*svg \
qml/pages/BusyPage.qml \
qml/pages/DebugPage.qml \
qml/pages/DetailsPage.qml \
qml/pages/NagScreen.qml \
qml/pages/SettingsPage.qml \
rpm/harbour-seaprint.changes.in \ rpm/harbour-seaprint.changes.in \
rpm/harbour-seaprint.changes.run.in \ rpm/harbour-seaprint.changes.run.in \
rpm/harbour-seaprint.spec \ rpm/harbour-seaprint.spec \

View file

@ -21,4 +21,44 @@ GalleryFilterUnion {
property: "fileName" property: "fileName"
value: ".PS" value: ".PS"
} }
GalleryEndsWithFilter {
property: "fileName"
value: ".odt"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".doc"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".docx"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".rtf"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".ODT"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".DOC"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".DOCX"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".RTF"
}
} }

View file

@ -406,12 +406,12 @@ Page {
DocumentPickerPage { DocumentPickerPage {
allowedOrientations: Orientation.All allowedOrientations: Orientation.All
// Component.onCompleted: { Component.onCompleted: {
// var thingy = Qt.createComponent("../components/DocumentFilter.notqml"); var thingy = Qt.createComponent("../components/DocumentFilter.notqml");
// if (thingy.status == Component.Ready) { if (thingy.status == Component.Ready) {
// _contentModel.contentFilter = thingy.createObject(this); _contentModel.contentFilter = thingy.createObject(this);
// } }
// } }
title: qsTr("Choose file") title: qsTr("Choose file")