Add support for presentations
This commit is contained in:
parent
71dd1452bc
commit
c93d4a019f
5 changed files with 50 additions and 3 deletions
|
@ -71,4 +71,34 @@ GalleryFilterUnion {
|
||||||
property: "fileName"
|
property: "fileName"
|
||||||
value: ".RTF"
|
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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,7 @@ Page {
|
||||||
signal noFileSelected()
|
signal noFileSelected()
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
console.log("Selected file is", selectedFile)
|
||||||
IppDiscovery.discover();
|
IppDiscovery.discover();
|
||||||
if(selectedFile != "")
|
if(selectedFile != "")
|
||||||
{
|
{
|
||||||
|
@ -315,6 +316,14 @@ Page {
|
||||||
highlighted: !(selectedFile == "" || canPrint)
|
highlighted: !(selectedFile == "" || canPrint)
|
||||||
source: "image://theme/icon-m-file-formatted"
|
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 {
|
HighlightImage {
|
||||||
height: Theme.itemSizeExtraSmall/2
|
height: Theme.itemSizeExtraSmall/2
|
||||||
width: Theme.itemSizeExtraSmall/2
|
width: Theme.itemSizeExtraSmall/2
|
||||||
|
|
|
@ -391,8 +391,6 @@ try {
|
||||||
convertPdf(tmpPdfFile.fileName(), header, targetFormat, Colors, Quality, PaperSize, HwResX, HwResY, TwoSided, Tumble,
|
convertPdf(tmpPdfFile.fileName(), header, targetFormat, Colors, Quality, PaperSize, HwResX, HwResY, TwoSided, Tumble,
|
||||||
PageRangeLow, PageRangeHigh, BackHFlip, BackVFlip);
|
PageRangeLow, PageRangeHigh, BackHFlip, BackVFlip);
|
||||||
|
|
||||||
qDebug() << "Finished";
|
|
||||||
|
|
||||||
qDebug() << "posted";
|
qDebug() << "posted";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,10 +17,13 @@ const QString Mimer::DOCX = "application/vnd.openxmlformats-officedocument.wordp
|
||||||
const QString Mimer::RTF = "text/rtf";
|
const QString Mimer::RTF = "text/rtf";
|
||||||
const QString Mimer::RTF_APP = "application/rtf";
|
const QString Mimer::RTF_APP = "application/rtf";
|
||||||
const QString Mimer::ODT = "application/vnd.oasis.opendocument.text";
|
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 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()
|
Mimer::Mimer()
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,6 +29,10 @@ public:
|
||||||
Q_PROPERTY(const QString DOCX MEMBER DOCX CONSTANT);
|
Q_PROPERTY(const QString DOCX MEMBER DOCX CONSTANT);
|
||||||
Q_PROPERTY(const QString RTF MEMBER RTF CONSTANT);
|
Q_PROPERTY(const QString RTF MEMBER RTF CONSTANT);
|
||||||
Q_PROPERTY(const QString ODT MEMBER ODT 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);
|
Q_PROPERTY(const QString Plaintext MEMBER Plaintext CONSTANT);
|
||||||
|
|
||||||
|
@ -51,6 +55,9 @@ public:
|
||||||
static const QString RTF;
|
static const QString RTF;
|
||||||
static const QString RTF_APP;
|
static const QString RTF_APP;
|
||||||
static const QString ODT;
|
static const QString ODT;
|
||||||
|
static const QString PPT;
|
||||||
|
static const QString PPTX;
|
||||||
|
static const QString ODP;
|
||||||
|
|
||||||
static const QString Plaintext;
|
static const QString Plaintext;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue