Commit 27678ccd authored by WINTZ Julien's avatar WINTZ Julien

Removing tools, moving children under the apps directory. Removing

Widgets layer.
parent aed31541
### CMakeLists.txt ---
##
## Author: Julien Wintz
## Created: Mon Feb 4 10:17:21 2013 (+0100)
## Version: $Id$
##
######################################################################
##
##
### Commentary:
##
######################################################################
##
### Change Log:
##
##
######################################################################
##
### Code:
cmake_minimum_required(VERSION 2.8.11)
......@@ -121,7 +125,6 @@ include_directories(${CMAKE_SOURCE_DIR}/src/dtkDistributed)
include_directories(${CMAKE_SOURCE_DIR}/src/dtkLog)
include_directories(${CMAKE_SOURCE_DIR}/src/dtkMath)
include_directories(${CMAKE_SOURCE_DIR}/src/dtkTest)
include_directories(${CMAKE_SOURCE_DIR}/src/dtkWidgets)
## ###################################################################
## Input
......@@ -132,7 +135,6 @@ add_subdirectory(qml)
add_subdirectory(tst)
add_subdirectory(app)
add_subdirectory(doc)
add_subdirectory(tools)
## ###################################################################
## Exporting
......@@ -194,3 +196,6 @@ set(CPACK_PACKAGE_VERSION_MINOR "${dtk_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${dtk_VERSION_PATCH}")
include(CPack)
######################################################################
### CMakeLists.txt ends here
### CMakeLists.txt ---
##
## Author: Thibaud Kloczko
## Created: mer. avril 9 14:12:49 2014 (+0200)
## Version:
## Last-Updated: mer. avril 9 14:13:11 2014 (+0200)
## By: Thibaud Kloczko
## Update #: 2
######################################################################
##
## Version: $Id$
##
######################################################################
##
### Commentary:
##
######################################################################
##
### Change Log:
##
##
######################################################################
##
### Code:
add_subdirectory(dtkDoc)
\ No newline at end of file
add_subdirectory(dtkDistributedServer)
add_subdirectory(dtkDistributedSlave)
add_subdirectory(dtkDistributedDashboard)
add_subdirectory(dtkDoc)
######################################################################
### CMakeLists.txt ends here
### CMakeLists.txt ---
##
### CMakeLists.txt ---
##
## Author: Thibaud Kloczko
## Created: lun. avril 7 19:17:05 2014 (+0200)
## Version:
## Version:
## Last-Updated: mer. avril 9 14:19:02 2014 (+0200)
## By: Thibaud Kloczko
## Update #: 104
######################################################################
##
##
### Change Log:
##
##
######################################################################
get_target_property(QT5_QMAKE_EXECUTABLE Qt5::qmake LOCATION)
......
### CMakeLists.txt ---
##
## Author: Julien Wintz
## Created: mer. avril 9 12:25:30 2014 (+0200)
## Version:
## Last-Updated: mar. avril 15 10:35:16 2014 (+0200)
## By: Thibaud Kloczko
## Update #: 41
## Version: $Id$
##
######################################################################
##
##
### Commentary:
##
######################################################################
##
### Change Log:
##
##
######################################################################
##
### Code:
## #################################################################
## Essential layer
......@@ -23,7 +23,6 @@ add_subdirectory(dtkDistributed)
add_subdirectory(dtkLog)
add_subdirectory(dtkMath)
add_subdirectory(dtkTest)
add_subdirectory(dtkWidgets)
## #################################################################
## Essential target
......@@ -35,7 +34,6 @@ set(DTK_TARGETS ${DTK_TARGETS} dtkCore)
set(DTK_TARGETS ${DTK_TARGETS} dtkDistributed)
set(DTK_TARGETS ${DTK_TARGETS} dtkLog)
set(DTK_TARGETS ${DTK_TARGETS} dtkMath)
set(DTK_TARGETS ${DTK_TARGETS} dtkWidgets)
## #################################################################
## Support layer
......@@ -106,3 +104,6 @@ endif(DTK_BUILD_SUPPORT_PLOT)
## #################################################################
export(TARGETS ${DTK_TARGETS} FILE "${CMAKE_BINARY_DIR}/dtkDepends.cmake")
######################################################################
### CMakeLists.txt ends here
/* dtkCorePluginFactory.tpp ---
*
* Author: Julien Wintz
* Created: Fri Feb 8 16:20:47 2013 (+0100)
*/
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#pragma once
template <typename T> dtkCorePluginFactory<T>::dtkCorePluginFactory(void)
{
}
template <typename T> dtkCorePluginFactory<T>::~dtkCorePluginFactory(void)
......@@ -22,8 +30,8 @@ template <typename T> dtkCorePluginFactory<T>::~dtkCorePluginFactory(void)
template <typename T> void dtkCorePluginFactory<T>::record(const QString& key, creator func)
{
if (this->creators.contains(key)) {
qDebug() << "Factory already contains key" << key << ". Nothing is done";
return;
qDebug() << "Factory already contains key" << key << ". Nothing is done";
return;
}
this->creators.insert(key, func);
......@@ -35,7 +43,7 @@ template <typename T> void dtkCorePluginFactory<T>::record(const QString& key, c
template <typename T> T *dtkCorePluginFactory<T>::create(const QString& key)
{
if(!this->creators.contains(key))
return NULL;
return NULL;
return this->creators.value(key)();
}
......@@ -48,3 +56,5 @@ template <typename T> QStringList dtkCorePluginFactory<T>::keys(void)
return this->creators.keys();
}
//
// dtkCorePluginFactory_t.h ends here
/* dtkCorePluginManager.h ---
*
* Author: Julien Wintz
* Created: Mon Feb 11 12:07:50 2013 (+0100)
* Version:
* Last-Updated: jeu. avril 3 08:46:14 2014 (+0200)
* By: Thibaud Kloczko
* Update #: 54
*/
/* Change Log:
*
*/
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#pragma once
......@@ -43,13 +43,14 @@ public:
#pragma mark -
#pragma Plugin Queries
QStringList plugins(void);
protected:
dtkCorePluginManagerPrivate<T> *d;
};
// ///////////////////////////////////////////////////////////////////
#include "dtkCorePluginManager_t.h"
//
// dtkCorePluginManager.h ends here
/* dtkCorePluginManager.cpp ---
*
* Author: Julien Wintz
* Created: Mon Feb 11 12:08:44 2013 (+0100)
* Version:
* Last-Updated: jeu. avril 3 08:46:46 2014 (+0200)
* By: Thibaud Kloczko
* Update #: 66
*/
/* Change Log:
*
*/
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#pragma once
......@@ -77,7 +77,7 @@ template <typename T> bool dtkCorePluginManagerPrivate<T>::check(const QString&
template <typename T> dtkCorePluginManager<T>::dtkCorePluginManager(void) : d(new dtkCorePluginManagerPrivate<T>)
{
// dtkMetaPluginFactory::instance()->registerFactory<T>(this);
}
template <typename T> dtkCorePluginManager<T>::~dtkCorePluginManager(void)
......@@ -114,7 +114,7 @@ template <typename T> void dtkCorePluginManager<T>::scan(const QString& path)
{
if(!QLibrary::isLibrary(path))
return;
QPluginLoader *loader = new QPluginLoader(path);
d->names.insert(path, loader->metaData().value("MetaData").toObject().value("name").toVariant());
......@@ -173,3 +173,6 @@ template <typename T> QStringList dtkCorePluginManager<T>::plugins(void)
{
return d->loaders.keys();
}
//
// dtkCorePluginManager_t.h ends here
/* dtkDistributed.h ---
*
* Author: Julien Wintz
* Created: Mon Mar 25 09:21:53 2013 (+0100)
* Version:
* Last-Updated: Mon Mar 25 09:29:55 2013 (+0100)
* By: Julien Wintz
* Update #: 8
*/
/* Change Log:
*
*/
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#pragma once
......@@ -18,22 +18,6 @@ class dtkDistributedCommunicatorPlugin;
class dtkDistributedCommunicatorPluginFactory;
class dtkDistributedCommunicatorPluginManager;
// ///////////////////////////////////////////////////////////////////
// Distribution macros
// ///////////////////////////////////////////////////////////////////
#define DTK_DISTRIBUTED_BEGIN_GLOBAL \
barrier(); dtkDistributed::setMode(dtkDistributed::Global); dtkDistributedWork::worker()->setMode(dtkDistributed::mode()); if (dtkDistributedWork::worker()->master()) { time.restart();
#define DTK_DISTRIBUTED_END_GLOBAL \
qDebug() << "global section:" << time.elapsed() << "ms"; } ; barrier();
#define DTK_DISTRIBUTED_BEGIN_LOCAL \
barrier(); dtkDistributed::setMode(dtkDistributed::Local); dtkDistributedWork::worker()->setMode(dtkDistributed::mode()); time.restart();
#define DTK_DISTRIBUTED_END_LOCAL \
qDebug() << "local section:" << time.elapsed() << "ms";
// ///////////////////////////////////////////////////////////////////
// Distribution layer attributes
// ///////////////////////////////////////////////////////////////////
......@@ -66,3 +50,22 @@ namespace dtkDistributed
dtkDistributedCommunicatorPluginManager& pluginManager(void);
}
}
// ///////////////////////////////////////////////////////////////////
// Distribution macros
// ///////////////////////////////////////////////////////////////////
#define DTK_DISTRIBUTED_BEGIN_GLOBAL \
barrier(); dtkDistributed::setMode(dtkDistributed::Global); dtkDistributedWork::worker()->setMode(dtkDistributed::mode()); if (dtkDistributedWork::worker()->master()) { time.restart();
#define DTK_DISTRIBUTED_END_GLOBAL \
qDebug() << "global section:" << time.elapsed() << "ms"; } ; barrier();
#define DTK_DISTRIBUTED_BEGIN_LOCAL \
barrier(); dtkDistributed::setMode(dtkDistributed::Local); dtkDistributedWork::worker()->setMode(dtkDistributed::mode()); time.restart();
#define DTK_DISTRIBUTED_END_LOCAL \
qDebug() << "local section:" << time.elapsed() << "ms";
//
// dtkDistributed.h ends here
/* dtkMath.h ---
*
* Author: Julien Wintz
* Created: Mon Jul 15 16:14:50 2013 (+0200)
* Version:
* Last-Updated: Tue Jul 16 11:33:26 2013 (+0200)
* By: Julien Wintz
* Update #: 17
*/
/* Change Log:
*
*/
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#pragma once
#include "dtkMath.h"
#include "dtkMatrix.h"
#include <QtCore>
class dtkMatrix;
class dtkMatrixPluginFactory;
class dtkMatrixPluginManager;
namespace dtkMath
{
namespace matrix {
dtkMatrixPluginFactory& pluginFactory(void);
dtkMatrixPluginManager& pluginManager(void);
dtkMatrixPluginFactory& pluginFactory(void);
dtkMatrixPluginManager& pluginManager(void);
}
}
//
// dtkMath.h ends here
### CMakeLists.txt ---
##
## Author: Julien Wintz
## Created: Mon Apr 15 11:46:27 2013 (+0200)
## Version:
## Last-Updated: lun. avril 7 11:13:47 2014 (+0200)
## By: Nicolas Niclausse
## Update #: 58
######################################################################
##
### Change Log:
##
######################################################################
project(dtkWidgets)
## #################################################################
## Input
## #################################################################
set(${PROJECT_NAME}_HEADERS
dtkWidgetsTag.h
dtkWidgetsTagCloud.h
dtkWidgetsTagCloudController.h
dtkWidgetsTagCloudDesc.h
dtkWidgetsTagCloudItem.h
dtkWidgetsTagCloudLayout.h
dtkWidgetsTagCloudList.h
dtkWidgetsTagCloudScope.h
dtkWidgetsTagCloudScopeItem.h
dtkWidgetsTagCloudView.h)
set(${PROJECT_NAME}_SOURCES
dtkWidgetsTag.cpp
dtkWidgetsTagCloud.cpp
dtkWidgetsTagCloudController.cpp
dtkWidgetsTagCloudDesc.cpp
dtkWidgetsTagCloudItem.cpp
dtkWidgetsTagCloudLayout.cpp
dtkWidgetsTagCloudList.cpp
dtkWidgetsTagCloudScope.cpp
dtkWidgetsTagCloudScopeItem.cpp
dtkWidgetsTagCloudView.cpp)
set(${PROJECT_NAME}_SOURCES_RCC
dtkWidgetsTagCloud.qrc)
## #################################################################
## Build rules
## #################################################################
qt5_add_resources(${PROJECT_NAME}_SOURCES_QRC ${${PROJECT_NAME}_SOURCES_RCC})
add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES_QRC}
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
# target_link_libraries(${PROJECT_NAME} ...)
## ###################################################################
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Gui)
qt5_use_modules(${PROJECT_NAME} Widgets)
## ###################################################################
## Install rules - files
## ###################################################################
install(FILES ${${PROJECT_NAME}_HEADERS}
DESTINATION include/${PROJECT_NAME}
COMPONENT widgets)
## ###################################################################
## Install rules - targets
## ###################################################################
install(TARGETS ${PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT widgets
EXPORT dtkDepends)
#include "dtkWidgetsTag.h"
#include "dtkWidgetsTagCloud.h"
#include "dtkWidgetsTagCloudController.h"
#include "dtkWidgetsTagCloudDesc.h"
#include "dtkWidgetsTagCloudItem.h"
#include "dtkWidgetsTagCloudLayout.h"
#include "dtkWidgetsTagCloudList.h"
#include "dtkWidgetsTagCloudScope.h"
#include "dtkWidgetsTagCloudView.h"
#include "dtkWidgetsTagCloudLayout.h"
#include "dtkWidgetsTag.h"
/* dtkWidgetsTag.cpp ---
*
* Author: Julien Wintz
* Created: Mon Apr 15 11:52:23 2013 (+0200)
* Version:
* Last-Updated: Mon Apr 15 11:56:24 2013 (+0200)
* By: Julien Wintz
* Update #: 7
*/
/* Change Log:
*
*/
#include "dtkWidgetsTag.h"
class dtkWidgetsTagPrivate
{
public:
int count;
QString text;
QString color;
QStringList items;
};
dtkWidgetsTag::dtkWidgetsTag(void) : d(new dtkWidgetsTagPrivate)
{
}
dtkWidgetsTag::dtkWidgetsTag(QString text, int count) : d(new dtkWidgetsTagPrivate)
{
d->text = text;
d->count = count;
}
dtkWidgetsTag::dtkWidgetsTag(QString text, int count, QStringList items) : d(new dtkWidgetsTagPrivate)
{
d->text = text;
d->count = count;
d->items = items;
}
dtkWidgetsTag::dtkWidgetsTag(QString text, int count, QStringList items, QString color) : d(new dtkWidgetsTagPrivate)
{
d->text = text;
d->count = count;
d->items = items;
d->color = color;
}
dtkWidgetsTag::dtkWidgetsTag(const dtkWidgetsTag& other) : d(new dtkWidgetsTagPrivate)
{
d->text = other.d->text;
d->count = other.d->count;
d->items = other.d->items;
d->color = other.d->color;
}
dtkWidgetsTag::~dtkWidgetsTag(void)
{
delete d;
d = NULL;
}
int dtkWidgetsTag::count(void) const
{
return d->count;
}
QString dtkWidgetsTag::text(void) const
{
return d->text;
}
QStringList dtkWidgetsTag::items(void) const
{
return d->items;
}
QString dtkWidgetsTag::color(void) const
{
return d->color;
}
void dtkWidgetsTag::setCount(int count)
{
if (count > 0)
d->count = count;
else
d->count = count;
}
void dtkWidgetsTag::setText(QString text)
{
if (!text.isNull())
d->text = text;
else
d->text = "";
}
void dtkWidgetsTag::setItems(QStringList items)
{
if (!items.isEmpty())
d->items = items;
else
d->items = QStringList();
}
void dtkWidgetsTag::setColor(QString color)
{
if (!color.isNull())
d->color = color;
else
d->color = "";
}
/* dtkWidgetsTag.h ---
*
* Author: Julien Wintz
* Created: Mon Apr 15 11:51:10 2013 (+0200)
* Version:
* Last-Updated: Mon Apr 15 11:56:48 2013 (+0200)
* By: Julien Wintz
* Update #: 10
*/
/* Change Log:
*
*/
#pragma once
#include <QtWidgets>
class dtkWidgetsTagPrivate;
class dtkWidgetsTag
{
public:
dtkWidgetsTag(void);
dtkWidgetsTag(QString text, int instances);
dtkWidgetsTag(QString text, int instances, QStringList items);
dtkWidgetsTag(QString text, int instances, QStringList items, QString color);
dtkWidgetsTag(const dtkWidgetsTag& other);
~dtkWidgetsTag(void);
int count(void) const;
QString text(void) const;
QString color(void) const;
QStringList items(void) const;
void setCount(int count);
void setText(QString text);
void setColor(QString color);
void setItems(QStringList items);
protected:
dtkWidgetsTagPrivate *d;
};
#include "dtkWidgetsTagCloud.h"
/* dtkWidgetsTagCloud.cpp ---
*
* Author: Julien Wintz
* Created: Mon Apr 15 12:00:34 2013 (+0200)
* Version:
* Last-Updated: mar. avril 8 14:54:47 2014 (+0200)
* By: Thibaud Kloczko
* Update #: 33
*/
/* Change Log:
*
*/
#include "dtkWidgetsTag.h"
#include "dtkWidgetsTagCloud.h"
// /////////////////////////////////////////////////////////////////
// Helper functions
// /////////////////////////////////////////////////////////////////
bool dtkWidgetsTagAlphaLessThan(const dtkWidgetsTag &t1, const dtkWidgetsTag &t2) {
return t1.text() < t2.text();
}
bool dtkWidgetsTagNumLessThan(const dtkWidgetsTag &t1, const dtkWidgetsTag &t2) {
return t1.count() < t2.count();
}
bool dtkWidgetsTagAlphaMoreThan(const dtkWidgetsTag &t1, const dtkWidgetsTag &t2) {
return t1.text() >= t2.text();