Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#
|
||||
# CMakeLists.txt for testing the Style Plugins by visualizing one
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
# Created by Mike Wille, SLSE, 2016-05-25
|
||||
#
|
||||
|
||||
SET(styleplugintest_SRCS
|
||||
stylePluginTest.cpp
|
||||
stylePluginTest.h
|
||||
style_plugin_test_export.h
|
||||
)
|
||||
|
||||
SET(styleplugintest_UICS
|
||||
Ui/stylePluginTestUi.ui
|
||||
)
|
||||
|
||||
NGL_WRAP_UI(styleplugintest_SRCS ${styleplugintest_UICS})
|
||||
NGL_ADD_LIBRARY(WS NO_TRANSLATION stylePluginTest SHARED ${styleplugintest_SRCS} ${styleplugintest_UICS})
|
||||
NGL_TARGET_LINK_LIBRARIES(stylePluginTest
|
||||
NGLLogger
|
||||
nglapplication
|
||||
LtsUtilsGuiStyleManager
|
||||
LtsWidgets
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Widgets
|
||||
)
|
||||
|
||||
#IF(BUILD_TESTING)
|
||||
NGL_ADD_EXECUTABLE(WS NO_TRANSLATION stylePluginTestApp main.cpp)
|
||||
NGL_TARGET_LINK_LIBRARIES(stylePluginTestApp stylePluginTest)
|
||||
#ENDIF(BUILD_TESTING)
|
||||
|
||||
NGL_INSTALL_TARGET(stylePluginTest)
|
||||
|
||||
|
||||
|
||||
+1587
File diff suppressed because it is too large.
Load diff
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#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();
|
||||
}
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* StylePluginTest
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Mike Wille, SLSE, 2016-05-25
|
||||
*/
|
||||
|
||||
#include "stylePluginTest.h"
|
||||
#include "ui_stylePluginTestUi.h"
|
||||
|
||||
#include <LtsWidgets/lts_dialog_button_box.h>
|
||||
|
||||
|
||||
using namespace LtsWidgets;
|
||||
|
||||
|
||||
StylePluginTest::StylePluginTest(const QString &style, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_ui(new Ui::StylePluginTest)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_ui->label_2->setText(m_ui->label_2->text().arg(style));
|
||||
m_ui->widget->_setVisibilityForAll(true);
|
||||
}
|
||||
|
||||
StylePluginTest::~StylePluginTest()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* StylePluginTest
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Mike Wille, SLSE, 2016-05-25
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "style_plugin_test_export.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class StylePluginTest;
|
||||
}
|
||||
|
||||
|
||||
class STYLEPLUGINTEST_EXPORT StylePluginTest : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
StylePluginTest(const QString &style, QWidget *parent = nullptr);
|
||||
~StylePluginTest();
|
||||
|
||||
private:
|
||||
Ui::StylePluginTest *m_ui;
|
||||
|
||||
private slots:
|
||||
void dummy() {}
|
||||
};
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Export definitions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#ifndef STYLEPLUGINTEST_EXPORT
|
||||
# ifdef BUILD_STATIC_LIBRARIES
|
||||
# define STYLEPLUGINTEST_EXPORT
|
||||
# else
|
||||
# if defined(MAKE_STYLEPLUGINTEST_LIB)
|
||||
# define STYLEPLUGINTEST_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define STYLEPLUGINTEST_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
Reference in new issue
Block a user