Towards dtk-visualization factory layer.

parent 8fee251a
......@@ -94,6 +94,7 @@ include_directories(${dtkWidgets_INCLUDE_DIRS})
include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/src)
include_directories(${CMAKE_SOURCE_DIR}/src/dtkVisualization)
include_directories(${CMAKE_SOURCE_DIR}/src/dtkVisualizationFactory)
include_directories(${CMAKE_SOURCE_DIR}/src/dtkVisualizationWidgets)
## ###################################################################
......
......@@ -13,6 +13,7 @@
### Code:
add_subdirectory(dtkVisualization)
add_subdirectory(dtkVisualizationFactory)
add_subdirectory(dtkVisualizationWidgets)
## #################################################################
......@@ -22,6 +23,7 @@ add_subdirectory(dtkVisualizationWidgets)
set(DTKVISUALIZATION_TARGETS)
set(DTKVISUALIZATION_TARGETS ${DTKVISUALIZATION_TARGETS} dtkVisualization)
set(DTKVISUALIZATION_TARGETS ${DTKVISUALIZATION_TARGETS} dtkVisualizationFactory)
set(DTKVISUALIZATION_TARGETS ${DTKVISUALIZATION_TARGETS} dtkVisualizationWidgets)
## #################################################################
......
......@@ -52,7 +52,7 @@ protected:
void resizeEvent(QResizeEvent *event);
public:
dtkVisualizationView3D *q = Q_NULLPTR;
dtkVisualizationView3D *q =Q_NULLPTR;
public:
dtkWidgetsHUD *hud;
......
## Version: $Id$
##
######################################################################
##
### Commentary:
##
######################################################################
##
### Change Log:
##
######################################################################
##
### Code:
project(dtkVisualizationFactory)
## #################################################################
## Sources
## #################################################################
set(${PROJECT_NAME}_HEADERS
dtkVisualizationFactory
dtkVisualizationFactory.h)
set(${PROJECT_NAME}_SOURCES
dtkVisualizationFactory.cpp)
## #################################################################
## Build rules
## #################################################################
add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
target_link_libraries(${PROJECT_NAME} ${VTK_LIBRARIES})
## #################################################################
## Export header file
## #################################################################
generate_export_header(${PROJECT_NAME} EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/${PROJECT_NAME}Export")
generate_export_header(${PROJECT_NAME} EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/${PROJECT_NAME}Export.h")
set(${PROJECT_NAME}_HEADERS
${${PROJECT_NAME}_HEADERS}
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}Export"
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}Export.h")
## ###################################################################
## Install rules - files
## ###################################################################
install(FILES ${${PROJECT_NAME}_HEADERS}
DESTINATION include/${PROJECT_NAME}
COMPONENT visualization-factory)
## ###################################################################
## Install rules - targets
## ###################################################################
install(TARGETS ${PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT visualization-factory
EXPORT dtkVisualizationDepends)
######################################################################
### CMakeLists.txt ends here
#include "dtkVisualizationFactory.h"
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#include "dtkVisualizationFactory.h"
dtkVisualizationFactory* dtkVisualizationFactory::New(void)
{
dtkVisualizationFactory *factory = new dtkVisualizationFactory;
factory->InitializeObjectBase();
return factory;
}
const char *dtkVisualizationFactory::GetDescription(void)
{
return "dtk visualization factory";
}
const char *dtkVisualizationFactory::GetVTKSourceVersion(void)
{
return VTK_VERSION;
}
dtkVisualizationFactory::dtkVisualizationFactory(void)
{
// this->RegisterOverride("vtkObjectBase", "dtkObjectBase", "", 1, vtkObjectFactoryCreatevtkTestPoints);
}
//
// dtkVisualizationFactory.cpp ends here
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#pragma once
#include <dtkVisualizationFactoryExport>
#include <vtkObjectFactory.h>
class DTKVISUALIZATIONFACTORY_EXPORT dtkVisualizationFactory : public vtkObjectFactory
{
public:
static dtkVisualizationFactory* New(void);
public:
const char *GetDescription(void) override;
const char *GetVTKSourceVersion(void) override;
protected:
dtkVisualizationFactory(const dtkVisualizationFactory&) = delete;
protected:
dtkVisualizationFactory& operator=(const dtkVisualizationFactory&) = delete;
private:
dtkVisualizationFactory(void);
};
//
// dtkVisualizationFactory.h ends here
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment