aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-pdf/main.cpp
blob: f6bb9839be9f65dab4823e06c3dd3e59961a3ac4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#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();
  QApplication a(argc, argv);
  LUtils::LoadTranslation(&a, "l-pdf");
  //LuminaThemeEngine theme(&a);


  //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;
      //QObject::connect(&theme, SIGNAL(updateIcons()), &w, SLOT(UpdateIcons()) );
  if(!path.isEmpty()){  w.loadFile(path); }
  w.show();
  int retCode = a.exec();
  return retCode;
}
bgstack15