aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-pdf/main.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-08-11 11:11:56 -0400
committerKen Moore <ken@ixsystems.com>2017-08-11 11:11:56 -0400
commit39e1e7f76724156d4f2efeec0362df0103cf327d (patch)
treebeaccde4ebc23b9167ea7f5bcd3631e8b2d183e8 /src-qt5/desktop-utils/lumina-pdf/main.cpp
parentGet lumina-pdf almost finished. (diff)
downloadlumina-39e1e7f76724156d4f2efeec0362df0103cf327d.tar.gz
lumina-39e1e7f76724156d4f2efeec0362df0103cf327d.tar.bz2
lumina-39e1e7f76724156d4f2efeec0362df0103cf327d.zip
Fix up the printing support in lumina-pdf. Now it respects almost all of the specialized options (collation, copies, reversed order, page range, landscape orientation, etc).
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/main.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-pdf/main.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/main.cpp b/src-qt5/desktop-utils/lumina-pdf/main.cpp
new file mode 100644
index 00000000..f0430fc8
--- /dev/null
+++ b/src-qt5/desktop-utils/lumina-pdf/main.cpp
@@ -0,0 +1,29 @@
+#include <QTranslator>
+#include <QApplication>
+#include <QDebug>
+#include <QFile>
+
+#include "mainUI.h"
+#include <LUtils.h>
+//#include <LuminaThemes.h>
+
+int main(int argc, char ** argv)
+{
+ //LTHEME::LoadCustomEnvSettings();
+ unsetenv("QT_AUTO_SCREEN_SCALE_FACTOR"); //need pixel-perfect geometries
+ QApplication a(argc, argv);
+ LUtils::LoadTranslation(&a, "l-pdf");
+
+ //Read the input variables
+ QString path = "";
+ for(int i=1; i<argc; i++){
+ path = LUtils::PathToAbsolute( argv[i] );
+ if(QFile::exists(path)){ break; } //already found a valid file
+ }
+
+ MainUI w;
+ if(!path.isEmpty()){ w.loadFile(path); }
+ w.show();
+ int retCode = a.exec();
+ return retCode;
+}
bgstack15