diff --git a/plugins/plugins.pro b/plugins/plugins.pro index 2857a61..09d0bcd 100644 --- a/plugins/plugins.pro +++ b/plugins/plugins.pro @@ -7,6 +7,7 @@ SUBDIRS += absenceplugin \ profileplugin \ presenceplugin \ reportsplugin \ + sketchplugin \ updaterplugin \ weatherplugin \ webradioplugin diff --git a/plugins/sketchplugin/sketchplugin.cpp b/plugins/sketchplugin/sketchplugin.cpp new file mode 100644 index 0000000..1e7b643 --- /dev/null +++ b/plugins/sketchplugin/sketchplugin.cpp @@ -0,0 +1,26 @@ +#include "sketchplugin.h" + +#include +#include +#include +#include + +SketchPlugin::SketchPlugin(QObject *parent) : + ZeiterfassungPlugin(parent) +{ + qDebug() << "called"; + + static auto dir = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(QStringLiteral("translations")); + + if(m_translator.load(QLocale(), QStringLiteral("sketchplugin"), QStringLiteral("_"), dir)) + { + if(!QCoreApplication::installTranslator(&m_translator)) + { + qWarning() << "could not install translation sketchplugin"; + } + } + else + { + qWarning() << "could not load translation sketchplugin"; + } +} diff --git a/plugins/sketchplugin/sketchplugin.h b/plugins/sketchplugin/sketchplugin.h new file mode 100644 index 0000000..471d06c --- /dev/null +++ b/plugins/sketchplugin/sketchplugin.h @@ -0,0 +1,21 @@ +#pragma once + +#include +#include + +#include "zeiterfassungplugin.h" + +class MainWindow; + +class Q_DECL_EXPORT SketchPlugin : public ZeiterfassungPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "dbsoftware.zeiterfassung.plugin/1.0" FILE "sketchplugin.json") + Q_INTERFACES(ZeiterfassungPlugin) + +public: + explicit SketchPlugin(QObject *parent = Q_NULLPTR); + +private: + QTranslator m_translator; +}; diff --git a/plugins/sketchplugin/sketchplugin.json b/plugins/sketchplugin/sketchplugin.json new file mode 100644 index 0000000..e69de29 diff --git a/plugins/sketchplugin/sketchplugin.pro b/plugins/sketchplugin/sketchplugin.pro new file mode 100644 index 0000000..6929490 --- /dev/null +++ b/plugins/sketchplugin/sketchplugin.pro @@ -0,0 +1,20 @@ +QT += core network gui widgets + +TARGET = sketchplugin + +DBLIBS += core gui + +HEADERS += sketchplugin.h + +SOURCES += sketchplugin.cpp + +FORMS += + +RESOURCES += sketchplugin_resources.qrc + +TRANSLATIONS += translations/sketchplugin_en.ts \ + translations/sketchplugin_de.ts + +OTHER_FILES += sketchplugin.json + +include(../plugin.pri) diff --git a/plugins/sketchplugin/sketchplugin_resources.qrc b/plugins/sketchplugin/sketchplugin_resources.qrc new file mode 100644 index 0000000..b69afa7 --- /dev/null +++ b/plugins/sketchplugin/sketchplugin_resources.qrc @@ -0,0 +1,4 @@ + + + + diff --git a/plugins/sketchplugin/translations/sketchplugin_de.ts b/plugins/sketchplugin/translations/sketchplugin_de.ts new file mode 100644 index 0000000..1552582 --- /dev/null +++ b/plugins/sketchplugin/translations/sketchplugin_de.ts @@ -0,0 +1,4 @@ + + + + diff --git a/plugins/sketchplugin/translations/sketchplugin_en.ts b/plugins/sketchplugin/translations/sketchplugin_en.ts new file mode 100644 index 0000000..bc6d6e7 --- /dev/null +++ b/plugins/sketchplugin/translations/sketchplugin_en.ts @@ -0,0 +1,4 @@ + + + +