Add support for presentations

This commit is contained in:
Anton Thomasson 2021-06-12 16:54:17 +02:00
parent 71dd1452bc
commit c93d4a019f
5 changed files with 50 additions and 3 deletions

View file

@ -71,4 +71,34 @@ GalleryFilterUnion {
property: "fileName"
value: ".RTF"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".ppt"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".pptx"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".odp"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".PPT"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".PPTX"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".ODP"
}
}

View file

@ -61,6 +61,7 @@ Page {
signal noFileSelected()
Component.onCompleted: {
console.log("Selected file is", selectedFile)
IppDiscovery.discover();
if(selectedFile != "")
{
@ -315,6 +316,14 @@ Page {
highlighted: !(selectedFile == "" || canPrint)
source: "image://theme/icon-m-file-formatted"
}
HighlightImage {
height: Theme.itemSizeExtraSmall/2
width: Theme.itemSizeExtraSmall/2
visible: supported_formats.office
highlightColor: "red"
highlighted: !(selectedFile == "" || canPrint)
source: "image://theme/icon-m-file-presentation"
}
HighlightImage {
height: Theme.itemSizeExtraSmall/2
width: Theme.itemSizeExtraSmall/2

View file

@ -391,8 +391,6 @@ try {
convertPdf(tmpPdfFile.fileName(), header, targetFormat, Colors, Quality, PaperSize, HwResX, HwResY, TwoSided, Tumble,
PageRangeLow, PageRangeHigh, BackHFlip, BackVFlip);
qDebug() << "Finished";
qDebug() << "posted";
}

View file

@ -17,10 +17,13 @@ const QString Mimer::DOCX = "application/vnd.openxmlformats-officedocument.wordp
const QString Mimer::RTF = "text/rtf";
const QString Mimer::RTF_APP = "application/rtf";
const QString Mimer::ODT = "application/vnd.oasis.opendocument.text";
const QString Mimer::PPT = "application/vnd.ms-powerpoint";
const QString Mimer::PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation";
const QString Mimer::ODP = "application/vnd.oasis.opendocument.presentation";
const QString Mimer::Plaintext = "text/plain";
const QStringList Mimer::OfficeFormats = {DOC, DOCX, RTF, RTF_APP, ODT};
const QStringList Mimer::OfficeFormats = {DOC, DOCX, RTF, RTF_APP, ODT, PPT, PPTX, ODP};
Mimer::Mimer()
{

View file

@ -29,6 +29,10 @@ public:
Q_PROPERTY(const QString DOCX MEMBER DOCX CONSTANT);
Q_PROPERTY(const QString RTF MEMBER RTF CONSTANT);
Q_PROPERTY(const QString ODT MEMBER ODT CONSTANT);
Q_PROPERTY(const QString PPT MEMBER PPT CONSTANT);
Q_PROPERTY(const QString PPTX MEMBER PPTX CONSTANT);
Q_PROPERTY(const QString ODP MEMBER ODP CONSTANT);
Q_PROPERTY(const QString Plaintext MEMBER Plaintext CONSTANT);
@ -51,6 +55,9 @@ public:
static const QString RTF;
static const QString RTF_APP;
static const QString ODT;
static const QString PPT;
static const QString PPTX;
static const QString ODP;
static const QString Plaintext;