From 3426729a7406664a08604ff1423fdb43314282b9 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 11 Nov 2026 17:31:29 +0000 Subject: [PATCH] Initial repo creation. --- .gitmodules | 3 +++ LICENSE | 17 +++++++++++++++++ README.md | 24 ++++++++++++++++++++++++ TTK-BasePlugin.cpp | 23 +++++++++++++++++++++++ TTK-BasePlugin.h | 23 +++++++++++++++++++++++ TTK-BasePlugin.json | 1 + TTK-BasePlugin.pro | 8 ++++++++ interface | 1 + 8 files changed, 100 insertions(+) create mode 100644 .gitmodules create mode 100644 LICENSE create mode 100644 README.md create mode 100644 TTK-BasePlugin.cpp create mode 100644 TTK-BasePlugin.h create mode 100644 TTK-BasePlugin.json create mode 100644 TTK-BasePlugin.pro create mode 160000 interface diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..f2caaa0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "interface"] + path = interface + url = https://git.teslos.co.uk/Triplehx3/TTK-Interface.git diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3a63ecb --- /dev/null +++ b/LICENSE @@ -0,0 +1,17 @@ +GNU GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 + +Copyright (C) 2026 Teslos + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should receive a copy of the GNU General Public License +along with this program. If not, see . \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..8f4a3be --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# Teslos Tool Kit Base Plugin + +A simple Qt6 / C++ pligun applet for TTK for demonstration purposes. + +**Please note that you must have TTK installed for this to be of any use!** + +## Build + +```bash +git clone https://git.teslos.co.uk/Triplehx3/TTK-BasePlugin.git +cd TTK-BasePlugin +git submodule update --init --recursive +mkdir build +cd build +qmake6 .. +make +``` + +Or simply open the TTK-BasePlugin.pro file in the cloned directory inside Qt Creator. + +copy libTTK-BasePlugin.so to /usr/lib/ttk/plugins + +## License +This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details. \ No newline at end of file diff --git a/TTK-BasePlugin.cpp b/TTK-BasePlugin.cpp new file mode 100644 index 0000000..2b52231 --- /dev/null +++ b/TTK-BasePlugin.cpp @@ -0,0 +1,23 @@ +#include "TTK-BasePlugin.h" + +QString BasePlugin::pname() +{ + return "Base Plugin"; +} + +QString BasePlugin::pdesc() +{ + return "Simple base plugin."; +} + +QWidget* BasePlugin::pcontent() +{ + QWidget *test = new QWidget(); + test->setWindowTitle(tr("Base Plugin")); + test->resize(400, 300); + QVBoxLayout *mainLayout = new QVBoxLayout; + test->setLayout(mainLayout); + QIcon icon = QIcon(":/images/smile.png"); + test->setWindowIcon(icon); + return test; +} diff --git a/TTK-BasePlugin.h b/TTK-BasePlugin.h new file mode 100644 index 0000000..74057f6 --- /dev/null +++ b/TTK-BasePlugin.h @@ -0,0 +1,23 @@ +#ifndef BASEPLUGIN_H +#define BASEPLUGIN_H + +#include + +#include +#include +#include +#include + +class BasePlugin : public QObject, public Interface +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.ttk.interface/1.0" FILE "TTK-BasePlugin.json") + Q_INTERFACES(Interface) + +public: + QString pname() override; + QString pdesc() override; + QWidget *pcontent() override; + +}; +#endif diff --git a/TTK-BasePlugin.json b/TTK-BasePlugin.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/TTK-BasePlugin.json @@ -0,0 +1 @@ +{} diff --git a/TTK-BasePlugin.pro b/TTK-BasePlugin.pro new file mode 100644 index 0000000..777500f --- /dev/null +++ b/TTK-BasePlugin.pro @@ -0,0 +1,8 @@ +TEMPLATE = lib +CONFIG += plugin +QT += widgets +HEADERS = interface/interface.h TTK-BasePlugin.h +SOURCES = TTK-BasePlugin.cpp +TARGET = $$qtLibraryTarget(TTK-BasePlugin) +QMAKE_CXXFLAGS += -Wno-sfinae-incomplete + diff --git a/interface b/interface new file mode 160000 index 0000000..a60b998 --- /dev/null +++ b/interface @@ -0,0 +1 @@ +Subproject commit a60b998305bbff133ec53c3fd2e62a802b4481bf