/** * @RDE_HEADER@ * DDS View -> The "LogView" for DDS * $Id$ * $HeadURL$ * $Author$ */ // #include "nglsettings.h" #include "mainwindow.h" #include #include //#include #include #include #include //#include //#include //#include class CmdLineParser : public LtsCommandLineParser::LtsCommandLineParser { public: CmdLineParser() : LtsCommandLineParser::LtsCommandLineParser(ProvideCommandLineParameterOptions(LtsCommandLineParser::CreateDomainIdFromIp | LtsCommandLineParser::DomainId | LtsCommandLineParser::ExerciseId | LtsCommandLineParser::TcpConnectionUrl)) {} const char *langCode() const { return m_langCode.data(); } bool init() { setDomainId(-1); QCommandLineOption langCodeOption(QStringList() << QLatin1String("l") << QLatin1String("langCode"), QLatin1String("Language."), QLatin1String("en_US|de_DE"), QLatin1String("en_US")); addOption(langCodeOption); if (!LtsCommandLineParser::init()) return false; if (isSet(langCodeOption)) m_langCode = value(langCodeOption).toLatin1(); return true; } private: QByteArray m_langCode; }; int main(int argc, char *argv[]) { NGLApplication app(argc, argv); app.createLogger("VideoImporter", "log4cxx_videoimporter.props"); NGL::INGLLogger &logger = app.baseLogger(); QCoreApplication::setApplicationName(QLatin1String("Video Importer")); QCoreApplication::setOrganizationName(QLatin1String("RDE")); LtsPluginManager::LtsPluginLoader::getInstance()->loadPlugins(LtsPluginManager::PluginType::STYLE, nullptr , QStringList() << QStringLiteral("rme.light")); // load style plugin CmdLineParser options; if (!options.init()) return -1; // NGL::Settings settings(app.organizationName(), app.applicationName()); STARTUP_LOG(logger); // NGL::init_translator(options.langCode()); MainWindow *mw = new MainWindow(); mw->show(); app.setQuitOnLastWindowClosed(true); int retval = app.exec(); SHUTDOWN_LOG(logger); return retval; }