aboutsummaryrefslogtreecommitdiff
path: root/lumina-screenshot/main.cpp
diff options
context:
space:
mode:
authorKris Moore <kris@pcbsd.org>2014-09-04 11:42:13 -0400
committerKris Moore <kris@pcbsd.org>2014-09-04 11:42:13 -0400
commit71737f70949bd25f9aa8bc4e7d03039ba83c6cb1 (patch)
treeab29e864d1ae59d10cc6875af9541e3ad306b2fb /lumina-screenshot/main.cpp
parentInitial commit (diff)
downloadlumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.tar.gz
lumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.tar.bz2
lumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.zip
Initial import of the lumina code from pcbsd git repo
Diffstat (limited to 'lumina-screenshot/main.cpp')
-rw-r--r--lumina-screenshot/main.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/lumina-screenshot/main.cpp b/lumina-screenshot/main.cpp
new file mode 100644
index 00000000..12258548
--- /dev/null
+++ b/lumina-screenshot/main.cpp
@@ -0,0 +1,29 @@
+#include <QTranslator>
+#include <QtGui/QApplication>
+#include <QDebug>
+#include <QFile>
+
+#include "MainUI.h"
+
+#ifndef PREFIX
+#define PREFIX QString("/usr/local")
+#endif
+
+int main(int argc, char ** argv)
+{
+ QApplication a(argc, argv);
+ a.setApplicationName("Take Screenshot");
+ QTranslator translator;
+ QLocale mylocale;
+ QString langCode = mylocale.name();
+
+ if ( ! QFile::exists(PREFIX + "/share/Lumina-DE/i18n/lumina-screenshot_" + langCode + ".qm" ) ) langCode.truncate(langCode.indexOf("_"));
+ translator.load( QString("lumina-screenshot_") + langCode, PREFIX + "/share/i18n/Lumina-DE/" );
+ a.installTranslator( &translator );
+ qDebug() << "Locale:" << langCode;
+
+ MainUI w;
+ w.show();
+
+ return a.exec();
+}
bgstack15