From 6ddecd88e3e3ad06172c4eceae53ff632187dc24 Mon Sep 17 00:00:00 2001 From: andreidanila1 Date: Wed, 14 Aug 2024 17:29:40 +0300 Subject: [PATCH] plugingenerator: Use pdk naming instead of sdk. Signed-off-by: andreidanila1 --- tools/plugingenerator/config.json | 2 +- tools/plugingenerator/plugin_generator.py | 162 +++++++++--------- .../templates/cmakelists_template.mako | 8 +- .../pdk_cmake_func_template.mako} | 0 .../pdk_cmake_template.mako} | 36 ++-- .../templates/pdk/pdk_cmakein_template.mako | 6 + .../pdk_header_template.mako} | 6 +- .../pdk_src_template.mako} | 36 ++-- .../templates/sdk/sdk_cmakein_template.mako | 6 - 9 files changed, 131 insertions(+), 131 deletions(-) rename tools/plugingenerator/templates/{sdk/sdk_cmake_func_template.mako => pdk/pdk_cmake_func_template.mako} (100%) rename tools/plugingenerator/templates/{sdk/sdk_cmake_template.mako => pdk/pdk_cmake_template.mako} (62%) create mode 100644 tools/plugingenerator/templates/pdk/pdk_cmakein_template.mako rename tools/plugingenerator/templates/{sdk/sdk_header_template.mako => pdk/pdk_header_template.mako} (95%) rename tools/plugingenerator/templates/{sdk/sdk_src_template.mako => pdk/pdk_src_template.mako} (94%) delete mode 100644 tools/plugingenerator/templates/sdk/sdk_cmakein_template.mako diff --git a/tools/plugingenerator/config.json b/tools/plugingenerator/config.json index dcc0a46306..78f36c2d89 100644 --- a/tools/plugingenerator/config.json +++ b/tools/plugingenerator/config.json @@ -1,5 +1,5 @@ { - "sdk":{ + "pdk":{ "enable": true, "deps_path": "", "project_path": "" diff --git a/tools/plugingenerator/plugin_generator.py b/tools/plugingenerator/plugin_generator.py index c6c0a824f6..94012172f3 100644 --- a/tools/plugingenerator/plugin_generator.py +++ b/tools/plugingenerator/plugin_generator.py @@ -44,7 +44,7 @@ filesGenerated = [] directoriesGenerated = [] -sdkSupport = generatorOptions["sdk"]["enable"] +pdkSupport = generatorOptions["pdk"]["enable"] pluginDirName = generatorOptions["plugin"]["dir_name"] pluginName = generatorOptions["plugin"]["plugin_name"] pluginDisplayName = generatorOptions["plugin"]["plugin_display_name"] @@ -55,19 +55,19 @@ print("Starting file generation:") pluginsPath = os.path.join(pathToScopy, "plugins") -if sdkSupport: - sdkPath = generatorOptions["sdk"]["project_path"] - if not sdkPath: - sdkPath = os.path.join(pathToScopy, "ScopySDK") +if pdkSupport: + pdkPath = generatorOptions["pdk"]["project_path"] + if not pdkPath: + pdkPath = os.path.join(pathToScopy, "ScopyPDK") else: - sdkPath = os.path.join(sdkPath, "ScopySDK") + pdkPath = os.path.join(pdkPath, "ScopyPDK") try: - os.mkdir(sdkPath, mode) - directoriesGenerated.append(sdkPath) + os.mkdir(pdkPath, mode) + directoriesGenerated.append(pdkPath) except FileExistsError: - print(sdkPath + " directory already exists!") + print(pdkPath + " directory already exists!") - pluginsPath = os.path.join(sdkPath, "plugin") + pluginsPath = os.path.join(pdkPath, "plugin") try: os.mkdir(pluginsPath, mode) directoriesGenerated.append(pluginsPath) @@ -120,106 +120,106 @@ else: print(pluginSrcConfigPath + " file already exists!") -####################################################### sdk ################################################## -if sdkSupport: - sdkCmakeFuncFilePath = os.path.join(sdkPath, "SdkSupport.cmake") - if not os.path.exists(sdkCmakeFuncFilePath): - sdkCmakeFuncTemplate = Template( - filename="templates/sdk/sdk_cmake_func_template.mako" +####################################################### pdk ################################################## +if pdkSupport: + pdkCmakeFuncFilePath = os.path.join(pdkPath, "PdkSupport.cmake") + if not os.path.exists(pdkCmakeFuncFilePath): + pdkCmakeFuncTemplate = Template( + filename="templates/pdk/pdk_cmake_func_template.mako" ) - sdkCmakeFuncContent = sdkCmakeFuncTemplate.render() - sdkCmakeFuncFile = open(sdkCmakeFuncFilePath, "w") - sdkCmakeFuncFile.write(sdkCmakeFuncContent) - sdkCmakeFuncFile.close() - filesGenerated.append(sdkCmakeFuncFilePath) + pdkCmakeFuncContent = pdkCmakeFuncTemplate.render() + pdkCmakeFuncFile = open(pdkCmakeFuncFilePath, "w") + pdkCmakeFuncFile.write(pdkCmakeFuncContent) + pdkCmakeFuncFile.close() + filesGenerated.append(pdkCmakeFuncFilePath) else: - print(sdkCmakeFuncFilePath + " file already exists!") + print(pdkCmakeFuncFilePath + " file already exists!") - sdkCmakeFilePath = os.path.join(sdkPath, "CMakeLists.txt") - if not os.path.exists(sdkCmakeFilePath): - sdkCmakeTemplate = Template( - filename="templates/sdk/sdk_cmake_template.mako" + pdkCmakeFilePath = os.path.join(pdkPath, "CMakeLists.txt") + if not os.path.exists(pdkCmakeFilePath): + pdkCmakeTemplate = Template( + filename="templates/pdk/pdk_cmake_template.mako" ) - sdkCmakeContent = sdkCmakeTemplate.render( - deps_path=generatorOptions["sdk"]["deps_path"], + pdkCmakeContent = pdkCmakeTemplate.render( + deps_path=generatorOptions["pdk"]["deps_path"], plugin_dir=pluginDirName, plugin_name=pluginName ) - sdkCmakeFile = open(sdkCmakeFilePath, "w") - sdkCmakeFile.write(sdkCmakeContent) - sdkCmakeFile.close() - filesGenerated.append(sdkCmakeFilePath) + pdkCmakeFile = open(pdkCmakeFilePath, "w") + pdkCmakeFile.write(pdkCmakeContent) + pdkCmakeFile.close() + filesGenerated.append(pdkCmakeFilePath) else: - print(sdkCmakeFilePath + " file already exists!") + print(pdkCmakeFilePath + " file already exists!") - sdkIncludePath = os.path.join(sdkPath, "include") + pdkIncludePath = os.path.join(pdkPath, "include") try: - os.mkdir(sdkIncludePath, mode) - directoriesGenerated.append(sdkIncludePath) + os.mkdir(pdkIncludePath, mode) + directoriesGenerated.append(pdkIncludePath) except FileExistsError: - print(sdkIncludePath + " directory already exists!") + print(pdkIncludePath + " directory already exists!") - sdkHeaderFilePath = os.path.join(sdkIncludePath, "sdkwindow.h") - if not os.path.exists(sdkHeaderFilePath): - sdkHeaderTemplate = Template( - filename="templates/sdk/sdk_header_template.mako" + pdkHeaderFilePath = os.path.join(pdkIncludePath, "pdkwindow.h") + if not os.path.exists(pdkHeaderFilePath): + pdkHeaderTemplate = Template( + filename="templates/pdk/pdk_header_template.mako" ) - sdkHeaderContent = sdkHeaderTemplate.render() - sdkHeaderFile = open(sdkHeaderFilePath, "w") - sdkHeaderFile.write(sdkHeaderContent) - sdkHeaderFile.close() - filesGenerated.append(sdkHeaderFilePath) + pdkHeaderContent = pdkHeaderTemplate.render() + pdkHeaderFile = open(pdkHeaderFilePath, "w") + pdkHeaderFile.write(pdkHeaderContent) + pdkHeaderFile.close() + filesGenerated.append(pdkHeaderFilePath) else: - print(sdkHeaderFilePath + " file already exists!") + print(pdkHeaderFilePath + " file already exists!") - sdkCmakeInFilePath = os.path.join(sdkIncludePath, "sdk-util_config.h.cmakein") - if not os.path.exists(sdkCmakeInFilePath): - sdkCmakeInTemplate = Template( - filename="templates/sdk/sdk_cmakein_template.mako" + pdkCmakeInFilePath = os.path.join(pdkIncludePath, "pdk-util_config.h.cmakein") + if not os.path.exists(pdkCmakeInFilePath): + pdkCmakeInTemplate = Template( + filename="templates/pdk/pdk_cmakein_template.mako" ) - sdkCmakeInTemplate = sdkCmakeInTemplate.render() - sdkCmakeInFile = open(sdkCmakeInFilePath, "w") - sdkCmakeInFile.write(sdkCmakeInTemplate) - sdkCmakeInFile.close() - filesGenerated.append(sdkCmakeInFilePath) + pdkCmakeInTemplate = pdkCmakeInTemplate.render() + pdkCmakeInFile = open(pdkCmakeInFilePath, "w") + pdkCmakeInFile.write(pdkCmakeInTemplate) + pdkCmakeInFile.close() + filesGenerated.append(pdkCmakeInFilePath) else: - print(sdkCmakeInFilePath + " file already exists!") + print(pdkCmakeInFilePath + " file already exists!") - sdkSrcPath = os.path.join(sdkPath, "src") + pdkSrcPath = os.path.join(pdkPath, "src") try: - os.mkdir(sdkSrcPath, mode) - directoriesGenerated.append(sdkSrcPath) + os.mkdir(pdkSrcPath, mode) + directoriesGenerated.append(pdkSrcPath) except FileExistsError: - print(sdkSrcPath + " directory already exists!") + print(pdkSrcPath + " directory already exists!") - sdkSrcFilePath = os.path.join(sdkSrcPath, "main.cpp") - if not os.path.exists(sdkSrcFilePath): - sdkSrcTemplate = Template( - filename="templates/sdk/sdk_src_template.mako" + pdkSrcFilePath = os.path.join(pdkSrcPath, "main.cpp") + if not os.path.exists(pdkSrcFilePath): + pdkSrcTemplate = Template( + filename="templates/pdk/pdk_src_template.mako" ) - sdkSrcContent = sdkSrcTemplate.render() - sdkSrcFile = open(sdkSrcFilePath, "w") - sdkSrcFile.write(sdkSrcContent) - sdkSrcFile.close() - filesGenerated.append(sdkSrcFilePath) + pdkSrcContent = pdkSrcTemplate.render() + pdkSrcFile = open(pdkSrcFilePath, "w") + pdkSrcFile.write(pdkSrcContent) + pdkSrcFile.close() + filesGenerated.append(pdkSrcFilePath) - sdkResPath = os.path.join(sdkPath, "res") + pdkResPath = os.path.join(pdkPath, "res") try: - os.mkdir(sdkResPath, mode) - directoriesGenerated.append(sdkResPath) + os.mkdir(pdkResPath, mode) + directoriesGenerated.append(pdkResPath) except FileExistsError: - print(sdkResPath + " directory already exists!") - shutil.copy(pathToScopy+"/gui/res/stylesheets/default.qss",sdkResPath) - sdkResQrc = os.path.join(sdkResPath, "resources.qrc") - if not os.path.exists(sdkResQrc): - resFile = open(sdkResQrc, "w") + print(pdkResPath + " directory already exists!") + shutil.copy(pathToScopy+"/gui/res/stylesheets/default.qss",pdkResPath) + pdkResQrc = os.path.join(pdkResPath, "resources.qrc") + if not os.path.exists(pdkResQrc): + resFile = open(pdkResQrc, "w") resFile.write("\n") resFile.write(" \n") resFile.write(" default.qss\n") resFile.write(" \n") resFile.write("") resFile.close() - filesGenerated.append(sdkResQrc) + filesGenerated.append(pdkResQrc) ##################################################### Include ################################################ includePath = os.path.join(newPluginPath, "include") @@ -294,7 +294,7 @@ + str(generatorOptions["test"]["cmake_min_required"]) + ")\n\n" ) - if not sdkSupport: + if not pdkSupport: if generatorOptions["test"]["tst_pluginloader"]: testCmakeFile.write("include(ScopyTest)\n\nsetup_scopy_tests(pluginloader)") filesGenerated.append(testCmakePath) @@ -344,7 +344,7 @@ cmakeTemplate = Template(filename="templates/cmakelists_template.mako") cmakeContent = cmakeTemplate.render( - sdk_en=sdkSupport, + pdk_en=pdkSupport, scopy_module=pluginName, plugin_display_name=pluginDisplayName, plugin_description=pluginDecription, config=generatorOptions["cmakelists"] diff --git a/tools/plugingenerator/templates/cmakelists_template.mako b/tools/plugingenerator/templates/cmakelists_template.mako index a3f047b8cd..5ecb90a06a 100644 --- a/tools/plugingenerator/templates/cmakelists_template.mako +++ b/tools/plugingenerator/templates/cmakelists_template.mako @@ -66,14 +66,14 @@ target_include_directories(${"${PROJECT_NAME}"} INTERFACE ${"${CMAKE_CURRENT_SOU target_include_directories(${"${PROJECT_NAME}"} PRIVATE ${"${CMAKE_CURRENT_SOURCE_DIR}"}/include/${"${SCOPY_MODULE}"}) % if oot_en: -target_include_directories(${"${PROJECT_NAME}"} PRIVATE ${"${SDK_DEPS_INCLUDE}"}) +target_include_directories(${"${PROJECT_NAME}"} PRIVATE ${"${PDK_DEPS_INCLUDE}"}) -include(${"${CMAKE_SOURCE_DIR}"}/SdkSupport.cmake) -inlcude_dirs(${"${SDK_DEPS_INCLUDE}"}) +include(${"${CMAKE_SOURCE_DIR}"}/PdkSupport.cmake) +inlcude_dirs(${"${PDK_DEPS_INCLUDE}"}) target_link_libraries(${"${PROJECT_NAME}"} PUBLIC Qt::Widgets Qt::Core) -link_libs(${"${SDK_DEPS_LIB}"}) +link_libs(${"${PDK_DEPS_LIB}"}) % else: target_include_directories(${"${PROJECT_NAME}"} PUBLIC scopy-pluginbase scopy-gui) diff --git a/tools/plugingenerator/templates/sdk/sdk_cmake_func_template.mako b/tools/plugingenerator/templates/pdk/pdk_cmake_func_template.mako similarity index 100% rename from tools/plugingenerator/templates/sdk/sdk_cmake_func_template.mako rename to tools/plugingenerator/templates/pdk/pdk_cmake_func_template.mako diff --git a/tools/plugingenerator/templates/sdk/sdk_cmake_template.mako b/tools/plugingenerator/templates/pdk/pdk_cmake_template.mako similarity index 62% rename from tools/plugingenerator/templates/sdk/sdk_cmake_template.mako rename to tools/plugingenerator/templates/pdk/pdk_cmake_template.mako index c421b78cd0..9e7093185e 100644 --- a/tools/plugingenerator/templates/sdk/sdk_cmake_template.mako +++ b/tools/plugingenerator/templates/pdk/pdk_cmake_template.mako @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.9) # Project name -set(TARGET_NAME "ScopySDK") +set(TARGET_NAME "ScopyPDK") project(${"${TARGET_NAME}"} VERSION 0.0.1 DESCRIPTION "Project Description") @@ -11,22 +11,22 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(SDK_DEPS_PATH ${deps_path}) -if(NOT DEFINED SDK_DEPS_PATH) - message(FATAL_ERROR "SDK_DEPS_PATH is required!") +set(PDK_DEPS_PATH ${deps_path}) +if(NOT DEFINED PDK_DEPS_PATH) + message(FATAL_ERROR "PDK_DEPS_PATH is required!") else() - if(NOT EXISTS ${"${SDK_DEPS_PATH}"}) - message(FATAL_ERROR "The path=" \"${"${SDK_DEPS_PATH}"}\" " to the dependencies doesn't exist!") + if(NOT EXISTS ${"${PDK_DEPS_PATH}"}) + message(FATAL_ERROR "The path=" \"${"${PDK_DEPS_PATH}"}\" " to the dependencies doesn't exist!") endif() endif() -set(SDK_DEPS_INCLUDE ${"${SDK_DEPS_PATH}"}/usr/local/include) -if(NOT EXISTS ${"${SDK_DEPS_INCLUDE}"}) - message(FATAL_ERROR "The path=" \"${"${SDK_DEPS_INCLUDE}"}\" " to the headers doesn't exist!") +set(PDK_DEPS_INCLUDE ${"${PDK_DEPS_PATH}"}/usr/local/include) +if(NOT EXISTS ${"${PDK_DEPS_INCLUDE}"}) + message(FATAL_ERROR "The path=" \"${"${PDK_DEPS_INCLUDE}"}\" " to the headers doesn't exist!") endif() -set(SDK_DEPS_LIB ${"${SDK_DEPS_PATH}"}/usr/local/lib) -if(NOT EXISTS ${"${SDK_DEPS_LIB}"}) - message(FATAL_ERROR "The path=" \"${"${SDK_DEPS_LIB}"}\" " to the libraries doesn't exist!") +set(PDK_DEPS_LIB ${"${PDK_DEPS_PATH}"}/usr/local/lib) +if(NOT EXISTS ${"${PDK_DEPS_LIB}"}) + message(FATAL_ERROR "The path=" \"${"${PDK_DEPS_LIB}"}\" " to the libraries doesn't exist!") endif() set(PLUGIN_INSTALL_PATH ${"${CMAKE_CURRENT_BINARY_DIR}"}/plugin/${plugin_dir}/libscopy-${plugin_name}.so) @@ -37,9 +37,9 @@ find_package(Qt${"${QT_VERSION_MAJOR}"} REQUIRED COMPONENTS Widgets Core) file(GLOB SRC_LIST src/*.cpp) file(GLOB HEADER_LIST include/*.h include/*.hpp) -configure_file(include/sdk-util_config.h.cmakein ${"${CMAKE_CURRENT_SOURCE_DIR}"}/include/sdk-util_config.h @ONLY) +configure_file(include/pdk-util_config.h.cmakein ${"${CMAKE_CURRENT_SOURCE_DIR}"}/include/pdk-util_config.h @ONLY) -set(PROJECT_SOURCES ${"${SRC_LIST}"} ${"${HEADER_LIST}"} ${"${CMAKE_CURRENT_SOURCE_DIR}"}/include/sdk-util_config.h) +set(PROJECT_SOURCES ${"${SRC_LIST}"} ${"${HEADER_LIST}"} ${"${CMAKE_CURRENT_SOURCE_DIR}"}/include/pdk-util_config.h) find_path(IIO_INCLUDE_DIRS iio.h REQUIRED) find_library(IIO_LIBRARIES NAMES iio libiio REQUIRED) @@ -49,17 +49,17 @@ qt_add_resources(PROJ_RES res/resources.qrc) add_executable(${"${TARGET_NAME}"} ${"${PROJECT_SOURCES}"} ${"${PROJ_RES}"}) -include(${"${CMAKE_CURRENT_SOURCE_DIR}"}/SdkSupport.cmake) +include(${"${CMAKE_CURRENT_SOURCE_DIR}"}/PdkSupport.cmake) target_include_directories(${"${TARGET_NAME}"} PRIVATE ${"${Qt${QT_VERSION_MAJOR}_INCLUDE_DIRS}"}) target_include_directories(${"${TARGET_NAME}"} PRIVATE ${"${CMAKE_SOURCE_DIR}"}/include) target_include_directories(${"${TARGET_NAME}"} INTERFACE ${"${IIO_INCLUDE_DIRS}"}) -target_include_directories(${"${TARGET_NAME}"} PUBLIC ${"${SDK_DEPS_INCLUDE}"} ${"${IIO_INCLUDE_DIRS}"}) +target_include_directories(${"${TARGET_NAME}"} PUBLIC ${"${PDK_DEPS_INCLUDE}"} ${"${IIO_INCLUDE_DIRS}"}) -inlcude_dirs(${"${SDK_DEPS_INCLUDE}"}) +inlcude_dirs(${"${PDK_DEPS_INCLUDE}"}) # Add any extra libs to link also. -link_libs(${"${SDK_DEPS_LIB}"}) +link_libs(${"${PDK_DEPS_LIB}"}) target_link_libraries( ${"${TARGET_NAME}"} PRIVATE Qt${"${QT_VERSION_MAJOR}"}::Widgets Qt${"${QT_VERSION_MAJOR}"}::Core ${"${IIO_LIBRARIES}"} ) diff --git a/tools/plugingenerator/templates/pdk/pdk_cmakein_template.mako b/tools/plugingenerator/templates/pdk/pdk_cmakein_template.mako new file mode 100644 index 0000000000..040dd6be9c --- /dev/null +++ b/tools/plugingenerator/templates/pdk/pdk_cmakein_template.mako @@ -0,0 +1,6 @@ +#ifndef PDK_UTIL_H_CMAKEIN +#define PDK_UTIL_H_CMAKEIN + +#define PLUGIN_INSTALL_PATH "@PLUGIN_INSTALL_PATH@" + +#endif // PDK_UTIL_H_CMAKEIN diff --git a/tools/plugingenerator/templates/sdk/sdk_header_template.mako b/tools/plugingenerator/templates/pdk/pdk_header_template.mako similarity index 95% rename from tools/plugingenerator/templates/sdk/sdk_header_template.mako rename to tools/plugingenerator/templates/pdk/pdk_header_template.mako index e6db7658d1..95419368f3 100644 --- a/tools/plugingenerator/templates/sdk/sdk_header_template.mako +++ b/tools/plugingenerator/templates/pdk/pdk_header_template.mako @@ -10,12 +10,12 @@ class MainWidget; class PluginManager; -class SDKWindow : public QMainWindow +class PDKWindow : public QMainWindow { Q_OBJECT public: - SDKWindow(QWidget *parent = nullptr); - ~SDKWindow(); + PDKWindow(QWidget *parent = nullptr); + ~PDKWindow(); public Q_SLOTS: void onConnect(); diff --git a/tools/plugingenerator/templates/sdk/sdk_src_template.mako b/tools/plugingenerator/templates/pdk/pdk_src_template.mako similarity index 94% rename from tools/plugingenerator/templates/sdk/sdk_src_template.mako rename to tools/plugingenerator/templates/pdk/pdk_src_template.mako index 08359c8fb3..2130d32c3b 100644 --- a/tools/plugingenerator/templates/sdk/sdk_src_template.mako +++ b/tools/plugingenerator/templates/pdk/pdk_src_template.mako @@ -1,4 +1,4 @@ -#include "sdkwindow.h" +#include "pdkwindow.h" #include #include #include @@ -9,7 +9,7 @@ #include #include #include "gui/stylehelper.h" -#include "sdk-util_config.h" +#include "pdk-util_config.h" int main(int argc, char *argv[]) { @@ -17,21 +17,21 @@ int main(int argc, char *argv[]) QCoreApplication::setOrganizationName("ADI"); QCoreApplication::setOrganizationDomain("analog.com"); - QCoreApplication::setApplicationName("Scopy-SDK"); + QCoreApplication::setApplicationName("Scopy-PDK"); QSettings::setDefaultFormat(QSettings::IniFormat); QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); app.setStyleSheet(Util::loadStylesheetFromFile(":/default.qss")); - SDKWindow test; + PDKWindow test; test.show(); int ret = app.exec(); if(ret == 0) { - qInfo() << "SDK support finished successfully!"; + qInfo() << "PDK support finished successfully!"; } return ret; } -SDKWindow::SDKWindow(QWidget *parent) +PDKWindow::PDKWindow(QWidget *parent) : QMainWindow(parent) { setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); @@ -46,11 +46,11 @@ SDKWindow::SDKWindow(QWidget *parent) addHorizontalTab(m_mainWidget, createTabLabel("Main")); addHorizontalTab(new QWidget(), createTabLabel("About")); addHorizontalTab(m_prefPage, createTabLabel("Preferences")); - connect(m_mainWidget, &MainWidget::connected, this, &SDKWindow::onConnect); - connect(m_mainWidget, &MainWidget::disconnected, this, &SDKWindow::onDisconnect); + connect(m_mainWidget, &MainWidget::connected, this, &PDKWindow::onConnect); + connect(m_mainWidget, &MainWidget::disconnected, this, &PDKWindow::onDisconnect); } -SDKWindow::~SDKWindow() +PDKWindow::~PDKWindow() { if(m_mainWidget) { delete m_mainWidget; @@ -58,7 +58,7 @@ SDKWindow::~SDKWindow() } } -void SDKWindow::onConnect() +void PDKWindow::onConnect() { addPluginPrefPage(); QList tools = m_mainWidget->getPluginTools(); @@ -76,7 +76,7 @@ void SDKWindow::onConnect() } } -void SDKWindow::onDisconnect() +void PDKWindow::onDisconnect() { removePluginPrefPage(); for(auto t : qAsConst(m_toolList)) { @@ -86,7 +86,7 @@ void SDKWindow::onDisconnect() } } -void SDKWindow::initMainWindow() +void PDKWindow::initMainWindow() { QWidget *centralWidget = new QWidget(this); centralWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); @@ -99,12 +99,12 @@ void SDKWindow::initMainWindow() m_tabWidget = new QTabWidget(centralWidget); m_tabWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); m_tabWidget->setTabPosition(QTabWidget::TabPosition::West); - scopy::StyleHelper::BackgroundPage(m_tabWidget, "sdkTable"); + scopy::StyleHelper::BackgroundPage(m_tabWidget, "pdkTable"); lay->addWidget(m_tabWidget); } -QWidget *SDKWindow::addHorizontalTab(QWidget *w, QLabel *lbl) +QWidget *PDKWindow::addHorizontalTab(QWidget *w, QLabel *lbl) { QWidget *pane = new QWidget(m_tabWidget); pane->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); @@ -124,7 +124,7 @@ QWidget *SDKWindow::addHorizontalTab(QWidget *w, QLabel *lbl) tabbar->setTabButton(tabbar->count() - 1, QTabBar::LeftSide, lbl); return pane; } -void SDKWindow::initPreferencesPage() +void PDKWindow::initPreferencesPage() { m_prefPage = new QWidget(this); QGridLayout *lay = new QGridLayout(m_prefPage); @@ -137,7 +137,7 @@ void SDKWindow::initPreferencesPage() lay->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding), 2, 0); } -void SDKWindow::addPluginPrefPage() +void PDKWindow::addPluginPrefPage() { QWidget *pluginPref = m_mainWidget->pluginPrefPage(); if(pluginPref) { @@ -146,7 +146,7 @@ void SDKWindow::addPluginPrefPage() } } -void SDKWindow::removePluginPrefPage() +void PDKWindow::removePluginPrefPage() { QGridLayout *lay = dynamic_cast(m_prefPage->layout()); QLayoutItem *it = lay->itemAtPosition(1, 0); @@ -160,7 +160,7 @@ void SDKWindow::removePluginPrefPage() } } -QLabel *SDKWindow::createTabLabel(QString name) +QLabel *PDKWindow::createTabLabel(QString name) { QLabel *lbl = new QLabel(); scopy::StyleHelper::TabWidgetLabel(lbl, "tabWidgetLabel"); diff --git a/tools/plugingenerator/templates/sdk/sdk_cmakein_template.mako b/tools/plugingenerator/templates/sdk/sdk_cmakein_template.mako deleted file mode 100644 index 1b8ec71831..0000000000 --- a/tools/plugingenerator/templates/sdk/sdk_cmakein_template.mako +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef SDK_UTIL_H_CMAKEIN -#define SDK_UTIL_H_CMAKEIN - -#define PLUGIN_INSTALL_PATH "@PLUGIN_INSTALL_PATH@" - -#endif // SDK_UTIL_H_CMAKEIN