From e3c36cc73d7cdcaa51bfb5e2b80709f636385d1f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 15 Oct 2013 08:53:04 +0200 Subject: drop designer plugins for now, no time to fix them Signed-off-by: Stanislaw Halik --- cmake/FindQxt.cmake | 155 --------------------- .../broken/qfunctionconfiguratorplugin.cpp | 118 ++++++++++++++++ .../broken/qfunctionconfiguratorplugin.h | 37 +++++ .../qfunctionconfiguratorplugin.cpp | 118 ---------------- .../qfunctionconfiguratorplugin.h | 36 ----- 5 files changed, 155 insertions(+), 309 deletions(-) delete mode 100644 cmake/FindQxt.cmake create mode 100644 qfunctionconfigurator/broken/qfunctionconfiguratorplugin.cpp create mode 100644 qfunctionconfigurator/broken/qfunctionconfiguratorplugin.h delete mode 100644 qfunctionconfigurator/qfunctionconfiguratorplugin.cpp delete mode 100644 qfunctionconfigurator/qfunctionconfiguratorplugin.h diff --git a/cmake/FindQxt.cmake b/cmake/FindQxt.cmake deleted file mode 100644 index 1ddfa0dd..00000000 --- a/cmake/FindQxt.cmake +++ /dev/null @@ -1,155 +0,0 @@ -############# -## basic FindQxt.cmake -## This is an *EXTREMELY BASIC* cmake find/config file for -## those times you have a cmake project and wish to use -## libQxt. -## -## It should be noted that at the time of writing, that -## I (mschnee) have an extremely limited understanding of the -## way Find*.cmake files work, but I have attempted to -## emulate what FindQt4.cmake and a few others do. -## -## To enable a specific component, set your QXT_USE_${modname}: -## SET(QXT_USE_QXTCORE TRUE) -## SET(QXT_USE_QXTGUI FALSE) -## Currently available components: -## QxtCore, QxtGui, QxtNetwork, QxtWeb, QxtSql -## Auto-including directories are enabled with INCLUDE_DIRECTORIES(), but -## can be accessed if necessary via ${QXT_INCLUDE_DIRS} -## -## To add the libraries to your build, TARGET_LINK_LIBRARIES(), such as... -## TARGET_LINK_LIBRARIES(YourTargetNameHere ${QXT_LIBRARIES}) -## ...or.. -## TARGET_LINK_LIBRARIES(YourTargetNameHere ${QT_LIBRARIES} ${QXT_LIBRARIES}) -################### TODO: -## The purpose of this cmake file is to find what components -## exist, regardless of how libQxt was build or configured, thus -## it should search/find all possible options. As I am not aware -## that any module requires anything special to be used, adding all -## modules to ${QXT_MODULES} below should be sufficient. -## Eventually, there should be version numbers, but -## I am still too unfamiliar with cmake to determine how to do -## version checks and comparisons. -## At the moment, this cmake returns a failure if you -## try to use a component that doesn't exist. I don't know how to -## set up warnings. -## It would be nice having a FindQxt.cmake and a UseQxt.cmake -## file like done for Qt - one to check for everything in advance - -############## - -###### setup -SET(QXT_MODULES QxtGui QxtWeb QxtZeroConf QxtNetwork QxtSql QxtBerkeley QxtCore) -SET(QXT_FOUND_MODULES) -FOREACH(mod ${QXT_MODULES}) - STRING(TOUPPER ${mod} U_MOD) - SET(QXT_${U_MOD}_INCLUDE_DIR NOTFOUND) - SET(QXT_${U_MOD}_LIB_DEBUG NOTFOUND) - SET(QXT_${U_MOD}_LIB_RELEASE NOTFOUND) - SET(QXT_FOUND_${U_MOD} FALSE) -ENDFOREACH(mod) -SET(QXT_QXTGUI_DEPENDSON QxtCore) -SET(QXT_QXTWEB_DEPENDSON QxtCore QxtNetwork) -SET(QXT_QXTZEROCONF_DEPENDSON QxtCore QxtNetwork) -SET(QXT_QXTNETWORK_DEPENDSON QxtCore) -SET(QXT_QXTQSQL_DEPENDSON QxtCore) -SET(QXT_QXTBERKELEY_DEPENDSON QxtCore) - -FOREACH(mod ${QXT_MODULES}) - STRING(TOUPPER ${mod} U_MOD) - IF(NOT ${U_MOD}_INCLUDE_DIR) - FIND_PATH(QXT_${U_MOD}_INCLUDE_DIR NAME ${mod} - PATH_SUFFIXES ${mod} include/${mod} - qxt/include/${mod} include/qxt/${mod} - Qxt/include/${mod} include/Qxt/${mod} - PATHS - ~/Library/Frameworks/ - /Library/Frameworks/ - /sw/ - /usr/local/ - /usr - /opt/local/ - /opt/csw - /opt - "C:/Program Files/libqxt/include" - "C:/Program Files (x86)/libqxt/include" - NO_DEFAULT_PATH - ) - FIND_LIBRARY(QXT_${U_MOD}_LIB_RELEASE NAME ${mod} - PATH_SUFFIXES Qxt/lib64 Qxt/lib lib64 lib lib/${CMAKE_LIBRARY_ARCHITECTURE} - PATHS - /sw - /usr/local - /usr - /opt/local - /opt/csw - /opt - "C:/Program Files/libqxt" - "C:/Program Files (x86)/libqxt" - NO_DEFAULT_PATH - ) - FIND_LIBRARY(QXT_${U_MOD}_LIB_DEBUG NAME ${mod}d - PATH_SUFFIXES Qxt/lib64 Qxt/lib lib64 lib lib/${CMAKE_LIBRARY_ARCHITECTURE} - PATHS - /sw - /usr/local - /usr - /opt/local - /opt/csw - /opt - "C:/Program Files/libqxt/" - "C:/Program Files (x86)/libqxt/" - NO_DEFAULT_PATH - ) - IF (QXT_${U_MOD}_LIB_RELEASE) - SET(QXT_FOUND_MODULES "${QXT_FOUND_MODULES} ${mod}") - ENDIF (QXT_${U_MOD}_LIB_RELEASE) - - IF (QXT_${U_MOD}_LIB_DEBUG) - SET(QXT_FOUND_MODULES "${QXT_FOUND_MODULES} ${mod}") - ENDIF (QXT_${U_MOD}_LIB_DEBUG) - ENDIF() -ENDFOREACH(mod) - -FOREACH(mod ${QXT_MODULES}) - STRING(TOUPPER ${mod} U_MOD) - IF(QXT_${U_MOD}_INCLUDE_DIR AND QXT_${U_MOD}_LIB_RELEASE) - SET(QXT_FOUND_${U_MOD} TRUE) - ENDIF(QXT_${U_MOD}_INCLUDE_DIR AND QXT_${U_MOD}_LIB_RELEASE) -ENDFOREACH(mod) - - -##### find and include -# To use a Qxt Library.... -# SET(QXT_FIND_COMPONENTS QxtCore, QxtGui) -# ...and this will do the rest -IF( QXT_FIND_COMPONENTS ) - FOREACH( component ${QXT_FIND_COMPONENTS} ) - STRING( TOUPPER ${component} _COMPONENT ) - SET(QXT_USE_${_COMPONENT}_COMPONENT TRUE) - ENDFOREACH( component ) -ENDIF( QXT_FIND_COMPONENTS ) - -SET(QXT_LIBRARIES "") -SET(QXT_INCLUDE_DIRS "") - -# like FindQt4.cmake, in order of dependence -FOREACH( module ${QXT_MODULES} ) - STRING(TOUPPER ${module} U_MOD) - IF(QXT_USE_${U_MOD} OR QXT_DEPENDS_${U_MOD}) - IF(QXT_FOUND_${U_MOD}) - STRING(REPLACE "QXT" "" qxt_module_def "${U_MOD}") - ADD_DEFINITIONS(-DQXT_${qxt_module_def}_LIB) - SET(QXT_INCLUDE_DIRS ${QXT_INCLUDE_DIRS} ${QXT_${U_MOD}_INCLUDE_DIR}) - INCLUDE_DIRECTORIES(${QXT_${U_MOD}_INCLUDE_DIR}) - SET(QXT_LIBRARIES ${QXT_LIBRARIES} ${QXT_${U_MOD}_LIB_RELEASE}) - ELSE(QXT_FOUND_${U_MOD}) - MESSAGE("Could not find Qxt Module ${module}") - RETURN() - ENDIF(QXT_FOUND_${U_MOD}) - FOREACH(dep QXT_${U_MOD}_DEPENDSON) - SET(QXT_DEPENDS_${dep} TRUE) - ENDFOREACH(dep) - ENDIF(QXT_USE_${U_MOD} OR QXT_DEPENDS_${U_MOD}) -ENDFOREACH(module) -MESSAGE(STATUS "Found Qxt Libraries:${QXT_FOUND_MODULES}") diff --git a/qfunctionconfigurator/broken/qfunctionconfiguratorplugin.cpp b/qfunctionconfigurator/broken/qfunctionconfiguratorplugin.cpp new file mode 100644 index 00000000..9bed2c9e --- /dev/null +++ b/qfunctionconfigurator/broken/qfunctionconfiguratorplugin.cpp @@ -0,0 +1,118 @@ +/* Copyright (c) 2011-2012 Stanislaw Halik + * Adapted to FaceTrackNoIR by Wim Vriend. + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + */ +#include "qfunctionconfigurator.h" + +#include +#include "qfunctionconfiguratorplugin.h" + + +QFunctionConfiguratorPlugin::QFunctionConfiguratorPlugin(QObject *parent) + : QObject(parent) +{ + initialized = false; +} + +void QFunctionConfiguratorPlugin::initialize(QDesignerFormEditorInterface *) +{ + if (initialized) + return; + + initialized = true; +} + +bool QFunctionConfiguratorPlugin::isInitialized() const +{ + return initialized; +} + +QWidget *QFunctionConfiguratorPlugin::createWidget(QWidget *parent) +{ + return new QFunctionConfigurator(parent); +} + +QString QFunctionConfiguratorPlugin::name() const +{ + return "QFunctionConfigurator"; +} + +QString QFunctionConfiguratorPlugin::group() const +{ + return "My Plugins"; +} + +QIcon QFunctionConfiguratorPlugin::icon() const +{ + return QIcon(); +} + +QString QFunctionConfiguratorPlugin::toolTip() const +{ + return QString(); +} + +QString QFunctionConfiguratorPlugin::whatsThis() const +{ + return QString(); +} + +bool QFunctionConfiguratorPlugin::isContainer() const +{ + return false; +} + +QString QFunctionConfiguratorPlugin::domXml() const +{ + return "\n" + " \n" + " \n" + " 0\n" + " 0\n" + " 161\n" + " 220\n" + " \n" + " \n" + " \n" + " \n" + " 255\n" + " 170\n" + " 0\n" + " \n" + " \n" + " \n" + " \n" + " 192\n" + " 192\n" + " 192\n" + " \n" + " \n" + " \n" + " Input Yaw (degr.)\n" + " \n" + " \n" + " Output Yaw (degr.)\n" + " \n" + " \n" + " 50\n" + " \n" + " \n" + " 180\n" + " \n" + " \n" + " 2\n" + " \n" + " \n" + " 1\n" + " \n" + "\n"; +} + +QString QFunctionConfiguratorPlugin::includeFile() const +{ + return "qfunctionconfigurator.h"; +} + +Q_EXPORT_PLUGIN2(qfunctionconfigurator, QFunctionConfiguratorPlugin) diff --git a/qfunctionconfigurator/broken/qfunctionconfiguratorplugin.h b/qfunctionconfigurator/broken/qfunctionconfiguratorplugin.h new file mode 100644 index 00000000..bc637338 --- /dev/null +++ b/qfunctionconfigurator/broken/qfunctionconfiguratorplugin.h @@ -0,0 +1,37 @@ +/* Copyright (c) 2011-2012 Stanislaw Halik + * Adapted to FaceTrackNoIR by Wim Vriend. + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + */ +#ifndef QFUNCTIONCONFIGURATORPLUGIN_H +#define QFUNCTIONCONFIGURATORPLUGIN_H + +#include + +class QFunctionConfiguratorPlugin : public QObject, public QDesignerCustomWidgetInterface +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface" FILE "analogclock.json") + Q_INTERFACES(QDesignerCustomWidgetInterface) + +public: + QFunctionConfiguratorPlugin(QObject *parent = 0); + + bool isContainer() const; + bool isInitialized() const; + QIcon icon() const; + QString domXml() const; + QString group() const; + QString includeFile() const; + QString name() const; + QString toolTip() const; + QString whatsThis() const; + QWidget *createWidget(QWidget *parent); + void initialize(QDesignerFormEditorInterface *core); + +private: + bool initialized; +}; + +#endif // QFUNCTIONCONFIGURATORPLUGIN_H diff --git a/qfunctionconfigurator/qfunctionconfiguratorplugin.cpp b/qfunctionconfigurator/qfunctionconfiguratorplugin.cpp deleted file mode 100644 index 9bed2c9e..00000000 --- a/qfunctionconfigurator/qfunctionconfiguratorplugin.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* Copyright (c) 2011-2012 Stanislaw Halik - * Adapted to FaceTrackNoIR by Wim Vriend. - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - */ -#include "qfunctionconfigurator.h" - -#include -#include "qfunctionconfiguratorplugin.h" - - -QFunctionConfiguratorPlugin::QFunctionConfiguratorPlugin(QObject *parent) - : QObject(parent) -{ - initialized = false; -} - -void QFunctionConfiguratorPlugin::initialize(QDesignerFormEditorInterface *) -{ - if (initialized) - return; - - initialized = true; -} - -bool QFunctionConfiguratorPlugin::isInitialized() const -{ - return initialized; -} - -QWidget *QFunctionConfiguratorPlugin::createWidget(QWidget *parent) -{ - return new QFunctionConfigurator(parent); -} - -QString QFunctionConfiguratorPlugin::name() const -{ - return "QFunctionConfigurator"; -} - -QString QFunctionConfiguratorPlugin::group() const -{ - return "My Plugins"; -} - -QIcon QFunctionConfiguratorPlugin::icon() const -{ - return QIcon(); -} - -QString QFunctionConfiguratorPlugin::toolTip() const -{ - return QString(); -} - -QString QFunctionConfiguratorPlugin::whatsThis() const -{ - return QString(); -} - -bool QFunctionConfiguratorPlugin::isContainer() const -{ - return false; -} - -QString QFunctionConfiguratorPlugin::domXml() const -{ - return "\n" - " \n" - " \n" - " 0\n" - " 0\n" - " 161\n" - " 220\n" - " \n" - " \n" - " \n" - " \n" - " 255\n" - " 170\n" - " 0\n" - " \n" - " \n" - " \n" - " \n" - " 192\n" - " 192\n" - " 192\n" - " \n" - " \n" - " \n" - " Input Yaw (degr.)\n" - " \n" - " \n" - " Output Yaw (degr.)\n" - " \n" - " \n" - " 50\n" - " \n" - " \n" - " 180\n" - " \n" - " \n" - " 2\n" - " \n" - " \n" - " 1\n" - " \n" - "\n"; -} - -QString QFunctionConfiguratorPlugin::includeFile() const -{ - return "qfunctionconfigurator.h"; -} - -Q_EXPORT_PLUGIN2(qfunctionconfigurator, QFunctionConfiguratorPlugin) diff --git a/qfunctionconfigurator/qfunctionconfiguratorplugin.h b/qfunctionconfigurator/qfunctionconfiguratorplugin.h deleted file mode 100644 index c854d3a2..00000000 --- a/qfunctionconfigurator/qfunctionconfiguratorplugin.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2011-2012 Stanislaw Halik - * Adapted to FaceTrackNoIR by Wim Vriend. - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - */ -#ifndef QFUNCTIONCONFIGURATORPLUGIN_H -#define QFUNCTIONCONFIGURATORPLUGIN_H - -#include - -class QFunctionConfiguratorPlugin : public QObject, public QDesignerCustomWidgetInterface -{ - Q_OBJECT - Q_INTERFACES(QDesignerCustomWidgetInterface) - -public: - QFunctionConfiguratorPlugin(QObject *parent = 0); - - bool isContainer() const; - bool isInitialized() const; - QIcon icon() const; - QString domXml() const; - QString group() const; - QString includeFile() const; - QString name() const; - QString toolTip() const; - QString whatsThis() const; - QWidget *createWidget(QWidget *parent); - void initialize(QDesignerFormEditorInterface *core); - -private: - bool initialized; -}; - -#endif // QFUNCTIONCONFIGURATORPLUGIN_H -- cgit v1.2.3