Files
qt5-legatus-legacy/Lts/Plugins/Styles/Test/main.cpp
T
2026-08-13 18:33:10 +02:00

45 lines
1.1 KiB
C++
Executable File

#include "stylePluginTest.h"
#include <LtsWidgets/lts_combo_box.h>
#include <StyleManager/style_manager.h>
#include <NGLLogger/INGLLogger.h>
#include <nglapplication/nglapplication.h>
#include <QApplication>
#include <QDebug>
#include <QStringList>
int main(int argc, char** argv)
{
NGLApplication app(argc, argv);
app.createLogger("StyleTest", "log4cxx_styletest.props");
QStringList arguments = app.arguments();
qWarning() << "arguments" << arguments;
if (arguments.count() < 2)
{
qWarning() << "Okay.. but which style? (enter the Style Plugin's IID)";
return 1;
}
if (arguments.count() > 2)
{
qWarning() << "Please only one argument! (taking the first one)";
}
LtsUtils::StyleManager *sm = LtsUtils::StyleManager::getInstance();
if (!sm->loadStyle(arguments.at(1)))
return 1;
// create a dependency to ltswidget to be able to use their resources
QScopedPointer<LtsWidgets::LtsComboBox> d(new LtsWidgets::LtsComboBox);
StylePluginTest* test = new StylePluginTest(arguments.at(1));
test->show();
return app.exec();
}