Commit b927ef8e authored by Bob Obara's avatar Bob Obara

ENH: Massive Restructuring and renamed to SMTK

parent 1f0e61a1
......@@ -24,12 +24,12 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
// .SECTION Description
// .SECTION See Also
#ifndef __slctk_attribute_PublicPointerDefs_h
#define __slctk_attribute_PublicPointerDefs_h
#ifndef __smtk_attribute_PublicPointerDefs_h
#define __smtk_attribute_PublicPointerDefs_h
@POINTER_TYPE_HEADERS@
namespace slctk
namespace smtk
{
template <typename T, typename U>
inline @POINTER_NAMESPACE@::shared_ptr<T> dynamicCastPointer(const @POINTER_NAMESPACE@::shared_ptr<U> &r)
......@@ -136,7 +136,7 @@ namespace slctk
};
*/
// These are used internally by SLCTK
// These are used internally by SMTK
namespace internal
{
template <typename T>
......@@ -165,4 +165,4 @@ namespace slctk
};
};
};
#endif /* __slctk_attribute_PublicPointerDefs_h */
#endif /* __smtk_attribute_PublicPointerDefs_h */
......@@ -8,7 +8,7 @@
# Utility to build a kit name from the current directory.
function(ms_get_kit_name kitvar)
string(REPLACE "${Slctk_SOURCE_DIR}/" "" dir_prefix ${CMAKE_CURRENT_SOURCE_DIR})
string(REPLACE "${SMTK_SOURCE_DIR}/" "" dir_prefix ${CMAKE_CURRENT_SOURCE_DIR})
string(REPLACE "/" "_" kit "${dir_prefix}")
set(${kitvar} "${kit}" PARENT_SCOPE)
# Optional second argument to get dir_prefix.
......@@ -28,7 +28,7 @@ function(ms_add_header_test name dir_prefix)
string(REPLACE "${CMAKE_CURRENT_BINARY_DIR}" "" header "${header}")
get_filename_component(headername ${header} NAME_WE)
set(src ${CMAKE_CURRENT_BINARY_DIR}/TestBuild_${name}_${headername}${suffix})
configure_file(${Slctk_SOURCE_DIR}/CMake/TestBuild.cxx.in ${src} @ONLY)
configure_file(${SMTK_SOURCE_DIR}/CMake/TestBuild.cxx.in ${src} @ONLY)
set(cxxfiles ${cxxfiles} ${src})
endforeach (header)
......@@ -47,27 +47,27 @@ endfunction(ms_add_header_test)
# Declare a list of header files. Will make sure the header files get
# compiled and show up in an IDE. Also makes sure we install the headers
# into the include folder
function(slctk_public_headers)
function(smtk_public_headers)
ms_get_kit_name(name dir_prefix)
ms_add_header_test("${name}" "${dir_prefix}" ${ARGN})
install (FILES ${ARGN} DESTINATION include/${dir_prefix})
endfunction(slctk_public_headers)
endfunction(smtk_public_headers)
# Declare a list of header files. Will make sure the header files get
# compiled and show up in an IDE.
function(slctk_private_headers)
function(smtk_private_headers)
ms_get_kit_name(name dir_prefix)
ms_add_header_test("${name}" "${dir_prefix}" ${ARGN})
endfunction(slctk_private_headers)
endfunction(smtk_private_headers)
# Declare a library as needed to be installed
function(slctk_install_library target)
install(TARGETS ${target} DESTINATION lib EXPORT Slctk-targets)
endfunction(slctk_install_library)
function(smtk_install_library target)
install(TARGETS ${target} DESTINATION lib EXPORT SMTK-targets)
endfunction(smtk_install_library)
#setup include directories as target properties
function(slctk_set_includes target)
function(smtk_set_includes target)
#attach the current build and source directory
set(full_includes ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
......@@ -78,19 +78,33 @@ function(slctk_set_includes target)
#set up a property on the passed in target
set_property(TARGET ${target} PROPERTY SAVED_INCLUDE_DIRS ${full_includes})
endfunction(slctk_set_includes)
endfunction(smtk_set_includes)
#read the include directory proptery for a target and create a variable
#in the callers scope with the name past names as the variable includes_var_name
function(slctk_get_includes target includes_var_name)
function(smtk_get_includes target includes_var_name)
get_property(saved_includes TARGET ${target} PROPERTY SAVED_INCLUDE_DIRS)
set(${includes_var_name} ${saved_includes} PARENT_SCOPE)
endfunction(slctk_get_includes)
endfunction(smtk_get_includes)
#generate an export header and create an install target for it
function(slctk_export_header target file)
function(smtk_export_header target file)
ms_get_kit_name(name dir_prefix)
generate_export_header(${target} EXPORT_FILE_NAME ${file})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${file} DESTINATION include/${dir_prefix})
endfunction(slctk_export_header)
endfunction(smtk_export_header)
# Builds a source file and an executable that does nothing other than
# compile the given header files.
function(ms_prepend_string prefix result)
set(names ${ARGN})
set(newNames "")
foreach (name ${ARGN})
set(newName "${prefix}/${name}")
set(newNames ${newNames} ${newName})
endforeach (name)
message("NewNames = ${newNames}")
set(${result} ${newNames} PARENT_SCOPE)
endfunction(ms_prepend_string)
cmake_minimum_required (VERSION 2.8)
project(Slctk)
project(SMTK)
# include some cmake code that builds automatic header tests
# and can targets for unit tests
include(CMake/SlctkMacros.cmake)
include(CMake/SMTKMacros.cmake)
# include export header so that we can easily expose symbols
# in dynamic libraries
......@@ -12,7 +12,7 @@ include(GenerateExportHeader)
# Include mechanism for determining shared and weak pointer support
include(CMake/SharedPtr.cmake)
option(BUILD_SHARED_LIBS "Build Slctk using shared libraries" OFF)
option(BUILD_SHARED_LIBS "Build SMTK using shared libraries" OFF)
determineSharedPtrType(POINTER_NAMESPACE POINTER_TYPE_HEADERS)
......@@ -27,19 +27,19 @@ endif()
configure_file(
${PROJECT_SOURCE_DIR}/CMake/PublicPointerDefs.h.in
${PROJECT_BINARY_DIR}/PublicPointerDefs.h
${PROJECT_BINARY_DIR}/smtk/PublicPointerDefs.h
@ONLY)
install (FILES ${PROJECT_BINARY_DIR}/PublicPointerDefs.h
DESTINATION include/attribute)
install (FILES ${PROJECT_BINARY_DIR}/smtk/PublicPointerDefs.h
DESTINATION include/smtk)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${Slctk_SOURCE_DIR}/CMake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${SMTK_SOURCE_DIR}/CMake)
option(Slctk_ENABLE_TESTING "Enable Testing" ON)
#option(Slctk_ENABLE_EXAMPLES "Enable Examples" ON)
option(SMTK_ENABLE_TESTING "Enable Testing" ON)
#option(SMTK_ENABLE_EXAMPLES "Enable Examples" ON)
#turn on ctest if we want testing
if (Slctk_ENABLE_TESTING)
if (SMTK_ENABLE_TESTING)
enable_testing()
include(CTest)
endif()
......@@ -62,17 +62,12 @@ mark_as_advanced(
EXECUTABLE_OUTPUT_PATH
LIBRARY_OUTPUT_PATH)
#add this directory so we can include files like: <slctk/internal/Test.h>
#add this directory so we can include files like: <smtk/internal/Test.h>
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
#add the actual code
add_subdirectory(attribute)
#add the examples code
if(Slctk_ENABLE_EXAMPLES)
add_subdirectory(Examples)
endif()
#Build the actual code
add_subdirectory(smtk)
# set up sources to build
set(QAttrLibSrcs
Qt/qtUIManager.cxx
Qt/qtAttribute.cxx
Qt/qtSection.cxx
Qt/qtGroupSection.cxx
Qt/qtRootSection.cxx
Qt/qtAttributeSection.cxx
Qt/qtInstancedSection.cxx
Qt/qtModelEntitySection.cxx
Qt/qtSimpleExpressionSection.cxx
Qt/qtFileItem.cxx
Qt/qtAttributeRefItem.cxx
Qt/qtTableWidget.cxx
Qt/qtAssociationWidget.cxx
Qt/qtReferencesWidget.cxx
Qt/qtItem.cxx
Qt/qtComboItem.cxx
Qt/qtInputsItem.cxx
Qt/qtGroupItem.cxx
)
set(QAttrLibUIs
Qt/qtAttributeAssociation.ui
)
set(QAttrLibMocHeaders
Qt/qtUIManager.h
Qt/qtAttribute.h
Qt/qtSection.h
Qt/qtGroupSection.h
Qt/qtRootSection.h
Qt/qtAttributeSection.h
Qt/qtInstancedSection.h
Qt/qtModelEntitySection.h
Qt/qtSimpleExpressionSection.h
Qt/qtFileItem.h
Qt/qtAttributeRefItem.h
Qt/qtTableWidget.h
Qt/qtAssociationWidget.h
Qt/qtReferencesWidget.h
Qt/qtItem.h
Qt/qtComboItem.h
Qt/qtInputsItem.h
Qt/qtGroupItem.h
)
#Build the actual code
add_subdirectory(attribute)
get_directory_property(AttributeSrcs DIRECTORY attribute DEFINITION AttributeSrcs)
ms_prepend_string("attribute" AttributeSrcs ${AttributeSrcs})
message("Attribute Source = ${AttributeSrcs}")
get_directory_property(AttributeHeaders DIRECTORY attribute DEFINITION AttributeHeaders)
ms_prepend_string("attribute" AttributeHeaders ${AttributeHeaders})
source_group("attribute_Source" FILES ${AttributeSrcs})
source_group("attribute_Header" FILES ${AttributeHeaders})
add_subdirectory(model)
get_directory_property(ModelSrcs DIRECTORY model DEFINITION ModelSrcs)
ms_prepend_string("model" ModelSrcs ${ModelSrcs})
get_directory_property(ModelHeaders DIRECTORY model DEFINITION ModelHeaders)
ms_prepend_string("model" ModelHeaders ${ModelHeaders})
source_group("model_Source" FILES ${ModelSrcs})
source_group("model_Header" FILES ${ModelHeaders})
set(smtk_headers ${AttributeHeaders} ${ModelHeaders})
set(smtk_srcs ${AttributeSrcs} ${ModelSrcs})
# Option to build Qt ui compoments for attributes
option(SMTK_BUILD_QT "Build Qt GUI" OFF)
#add the Qt GUI code
if(SMTK_BUILD_QT)
find_package(Qt4 REQUIRED)
if(NOT QT4_FOUND)
message(FATAL_ERROR "QT4 libraries are missing")
endif()
INCLUDE(${QT_USE_FILE})
add_subdirectory(Qt)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Qt)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/Qt)
set (smtkQtDepends ${QT_LIBRARIES})
get_directory_property(QAttrLibSrcs DIRECTORY Qt DEFINITION QAttrLibSrcs)
ms_prepend_string("Qt" QAttrLibSrcs ${QAttrLibSrcs})
get_directory_property(QAttrLibMocHeaders DIRECTORY Qt DEFINITION QAttrLibMocHeaders)
ms_prepend_string("Qt" QAttrLibMocHeaders ${QAttrLibMocHeaders})
get_directory_property(QAttrLibUIs DIRECTORY Qt DEFINITION QAttrLibUIs)
ms_prepend_string("Qt" QAttrLibUIs ${QAttrLibUIs})
qt4_wrap_cpp(QAttrLibMocSrcs ${QAttrLibMocHeaders})
qt4_wrap_ui(UI_BUILT_SOURCES ${QAttrLibUIs})
source_group("Qt_Source" FILES ${QAttrLibSrcs} ${QAttrLibUIs})
source_group("Qt_Generated" FILES ${QAttrLibMocSrcs} ${UI_BUILT_SOURCES})
source_group("Qt_Header" FILES ${QAttrLibMocHeaders})
set(smtk_headers ${smtk_headers} ${QAttrLibMocHeaders})
set(smtk_srcs ${smtk_srcs}
${QAttrLibSrcs}
${QAttrLibMocSrcs}
${UI_BUILT_SOURCES}
)
endif()
IF(BUILD_SHARED_LIBS)
SET(LIBTYPE SHARED)
ELSE(BUILD_SHARED_LIBS)
SET(LIBTYPE STATIC)
ENDIF()
add_library(SMTKCore ${LIBTYPE}
${smtk_srcs} ${smtk_headers}
)
target_link_libraries(SMTKCore ${smtkQtDepends})
smtk_set_includes(SMTKCore ${SMTK_Attribute_INCLUDE_DIRS})
#create the export header symbol exporting
smtk_export_header(SMTKCore SMTKCoreExports.h)
#install the library
smtk_install_library(SMTKCore)
#setup the exports for the library when used from a build tree
export(PACKAGE SMTKCore)
export(TARGETS SMTKCore FILE SMTKCore-exports.cmake)
#add the examples code
if(SMTK_ENABLE_EXAMPLES)
add_subdirectory(Examples)
endif()
# set up sources to build
set(QAttrLibSrcs
qtUIManager.cxx
qtAttribute.cxx
qtSection.cxx
qtGroupSection.cxx
qtRootSection.cxx
qtAttributeSection.cxx
qtInstancedSection.cxx
qtModelEntitySection.cxx
qtSimpleExpressionSection.cxx
qtFileItem.cxx
qtAttributeRefItem.cxx
qtTableWidget.cxx
qtAssociationWidget.cxx
qtReferencesWidget.cxx
qtItem.cxx
qtComboItem.cxx
qtInputsItem.cxx
qtGroupItem.cxx
)
set(QAttrLibUIs
qtAttributeAssociation.ui
)
set(QAttrLibMocHeaders
qtUIManager.h
qtAttribute.h
qtSection.h
qtGroupSection.h
qtRootSection.h
qtAttributeSection.h
qtInstancedSection.h
qtModelEntitySection.h
qtSimpleExpressionSection.h
qtFileItem.h
qtAttributeRefItem.h
qtTableWidget.h
qtAssociationWidget.h
qtReferencesWidget.h
qtItem.h
qtComboItem.h
qtInputsItem.h
qtGroupItem.h
)
#install the headers
smtk_public_headers(${QAttrLibMocHeaders})
......@@ -20,20 +20,20 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "qtAssociationWidget.h"
#include "smtk/Qt/qtAssociationWidget.h"
#include "qtUIManager.h"
#include "qtTableWidget.h"
#include "qtAttribute.h"
#include "qtItem.h"
#include "smtk/Qt/qtUIManager.h"
#include "smtk/Qt/qtTableWidget.h"
#include "smtk/Qt/qtAttribute.h"
#include "smtk/Qt/qtItem.h"
#include "attribute/ModelEntitySection.h"
#include "attribute/Attribute.h"
#include "attribute/Definition.h"
#include "attribute/ItemDefinition.h"
#include "attribute/Manager.h"
#include "attribute/ValueItem.h"
#include "attribute/ValueItemDefinition.h"
#include "smtk/attribute/ModelEntitySection.h"
#include "smtk/attribute/Attribute.h"
#include "smtk/attribute/Definition.h"
#include "smtk/attribute/ItemDefinition.h"
#include "smtk/attribute/Manager.h"
#include "smtk/attribute/ValueItem.h"
#include "smtk/attribute/ValueItemDefinition.h"
#include <QGridLayout>
#include <QComboBox>
......@@ -54,7 +54,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
namespace Ui { class qtAttributeAssociation; }
using namespace slctk::attribute;
using namespace smtk::attribute;
//----------------------------------------------------------------------------
class qtAssociationWidgetInternals : public Ui::qtAttributeAssociation
......@@ -106,7 +106,7 @@ void qtAssociationWidget::showAdvanced(int checked)
//----------------------------------------------------------------------------
void qtAssociationWidget::showEntityAssociation(
slctk::ModelItemPtr entity, QString& category)
smtk::ModelItemPtr entity, QString& category)
{
}
......@@ -124,18 +124,18 @@ void qtAssociationWidget::onAvailableListSelectionChanged(
}
//-----------------------------------------------------------------------------
slctk::AttributePtr qtAssociationWidget::getSelectedAttribute(
smtk::AttributePtr qtAssociationWidget::getSelectedAttribute(
QListWidget* theList)
{
return this->getAttributeFromItem(this->getSelectedItem(theList));
}
//-----------------------------------------------------------------------------
slctk::AttributePtr qtAssociationWidget::getAttributeFromItem(
smtk::AttributePtr qtAssociationWidget::getAttributeFromItem(
QListWidgetItem * item)
{
Attribute* rawPtr = item ?
static_cast<Attribute*>(item->data(Qt::UserRole).value<void *>()) : NULL;
return rawPtr ? rawPtr->pointer() : slctk::AttributePtr();
return rawPtr ? rawPtr->pointer() : smtk::AttributePtr();
}
//-----------------------------------------------------------------------------
QListWidgetItem *qtAssociationWidget::getSelectedItem(QListWidget* theList)
......@@ -145,13 +145,13 @@ QListWidgetItem *qtAssociationWidget::getSelectedItem(QListWidget* theList)
}
//----------------------------------------------------------------------------
QListWidgetItem* qtAssociationWidget::addAttributeRefListItem(
QListWidget* theList, slctk::AttributeItemPtr refItem)
QListWidget* theList, smtk::AttributeItemPtr refItem)
{
QString txtLabel(refItem->attribute()->name().c_str());
txtLabel.append(" : ").append(refItem->owningItem()->name().c_str());
QListWidgetItem* item = new QListWidgetItem(txtLabel,
theList, slctk_USER_DATA_TYPE);
theList, smtk_USER_DATA_TYPE);
QVariant vdata;
vdata.setValue((void*)(refItem.get()));
item->setData(Qt::UserRole, vdata);
......
......@@ -24,23 +24,23 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
// .SECTION See Also
// qtSection
#ifndef __slctk_attribute_qtAssociationWidget_h
#define __slctk_attribute_qtAssociationWidget_h
#ifndef __smtk_attribute_qtAssociationWidget_h
#define __smtk_attribute_qtAssociationWidget_h
#include <QWidget>
#include "AttributeExports.h"
#include "PublicPointerDefs.h"
#include "smtk/SMTKCoreExports.h"
#include "smtk/PublicPointerDefs.h"
class qtAssociationWidgetInternals;
class QListWidgetItem;
class QListWidget;
class ModelEntity;
namespace slctk
namespace smtk
{
namespace attribute
{
class SLCTKATTRIBUTE_EXPORT qtAssociationWidget : public QWidget
class SMTKCORE_EXPORT qtAssociationWidget : public QWidget
{
Q_OBJECT
......@@ -50,7 +50,7 @@ namespace slctk
public slots:
virtual void showAdvanced(int show);
virtual void showEntityAssociation(slctk::ModelItemPtr entity, QString& category);
virtual void showEntityAssociation(smtk::ModelItemPtr entity, QString& category);
void onCurrentListSelectionChanged(QListWidgetItem * , QListWidgetItem * );
void onAvailableListSelectionChanged(QListWidgetItem * , QListWidgetItem * );
......@@ -62,10 +62,10 @@ namespace slctk
protected:
virtual void initWidget( );
QListWidgetItem* getSelectedItem(QListWidget* theLis);
slctk::AttributePtr getSelectedAttribute(QListWidget* theLis);
slctk::AttributePtr getAttributeFromItem(QListWidgetItem * item);
smtk::AttributePtr getSelectedAttribute(QListWidget* theLis);
smtk::AttributePtr getAttributeFromItem(QListWidgetItem * item);
virtual QListWidgetItem* addAttributeRefListItem(QListWidget* theList,
slctk::AttributeItemPtr refItem);
smtk::AttributeItemPtr refItem);
private:
......@@ -73,7 +73,7 @@ namespace slctk
}; // class
}; // namespace attribute
}; // namespace slctk
}; // namespace smtk
#endif
......@@ -19,42 +19,42 @@ PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "qtAttribute.h"
#include "qtUIManager.h"
#include "qtComboItem.h"
#include "qtGroupItem.h"
#include "qtInputsItem.h"
#include "qtFileItem.h"
#include "qtAttributeRefItem.h"
#include "attribute/Attribute.h"
#include "attribute/Definition.h"
#include "attribute/DoubleItem.h"
#include "attribute/DoubleItemDefinition.h"
#include "attribute/DirectoryItem.h"
#include "attribute/DirectoryItemDefinition.h"
#include "attribute/FileItem.h"
#include "attribute/FileItemDefinition.h"
#include "attribute/GroupItem.h"
#include "attribute/GroupItemDefinition.h"
#include "attribute/IntItem.h"
#include "attribute/IntItemDefinition.h"
#include "attribute/ValueItem.h"
#include "attribute/ValueItemDefinition.h"
#include "smtk/Qt/qtAttribute.h"
#include "smtk/Qt/qtUIManager.h"
#include "smtk/Qt/qtComboItem.h"
#include "smtk/Qt/qtGroupItem.h"
#include "smtk/Qt/qtInputsItem.h"
#include "smtk/Qt/qtFileItem.h"
#include "smtk/Qt/qtAttributeRefItem.h"
#include "smtk/attribute/Attribute.h"
#include "smtk/attribute/Definition.h"
#include "smtk/attribute/DoubleItem.h"
#include "smtk/attribute/DoubleItemDefinition.h"
#include "smtk/attribute/DirectoryItem.h"
#include "smtk/attribute/DirectoryItemDefinition.h"
#include "smtk/attribute/FileItem.h"
#include "smtk/attribute/FileItemDefinition.h"
#include "smtk/attribute/GroupItem.h"
#include "smtk/attribute/GroupItemDefinition.h"
#include "smtk/attribute/IntItem.h"
#include "smtk/attribute/IntItemDefinition.h"
#include "smtk/attribute/ValueItem.h"
#include "smtk/attribute/ValueItemDefinition.h"
#include <QPointer>
#include <QFrame>
#include <QLabel>
#include <QVBoxLayout>
using namespace slctk::attribute;
using namespace smtk::attribute;
//----------------------------------------------------------------------------
class qtAttributeInternals
{
public:
qtAttributeInternals(slctk::AttributePtr dataObject, QWidget* p)
qtAttributeInternals(smtk::AttributePtr dataObject, QWidget* p)
{
this->ParentWidget = p;
this->DataObject = dataObject;
......@@ -62,13 +62,13 @@ public:
~qtAttributeInternals()
{
}
slctk::WeakAttributePtr DataObject;
smtk::WeakAttributePtr DataObject;
QPointer<QWidget> ParentWidget;
QList<slctk::attribute::qtItem*> Items;
QList<smtk::attribute::qtItem*> Items;
};
//----------------------------------------------------------------------------
qtAttribute::qtAttribute(slctk::AttributePtr dataObject, QWidget* p)
qtAttribute::qtAttribute(smtk::AttributePtr dataObject, QWidget* p)
{
this->Internals = new qtAttributeInternals(dataObject, p);
this->Widget = NULL;
......@@ -142,7 +142,7 @@ void qtAttribute::updateItemsData()
this->clearItems();
QLayout* layout = this->Widget->layout();
qtItem* qItem = NULL;
slctk::AttributePtr att = this->getObject();
smtk::AttributePtr att = this->getObject();
std::size_t i, n = att->numberOfItems();
for (i = 0; i < n; i++)
{
......@@ -156,7 +156,7 @@ void qtAttribute::updateItemsData()
}
//----------------------------------------------------------------------------
slctk::AttributePtr qtAttribute::getObject()
smtk::AttributePtr qtAttribute::getObject()
{
return this->Internals->DataObject.lock();
}
......@@ -168,7 +168,7 @@ QWidget* qtAttribute::parentWidget()
}
//----------------------------------------------------------------------------
qtItem* qtAttribute::createItem(slctk::AttributeItemPtr item, QWidget* pW)
qtItem* qtAttribute::createItem(smtk::AttributeItemPtr item, QWidget* pW)
{
if(!qtUIManager::instance()->passItemAdvancedCheck(
item->definition()->advanceLevel()))
......@@ -179,29 +179,29 @@ qtItem* qtAttribute::createItem(slctk::AttributeItemPtr item, QWidget* pW)
qtItem* aItem = NULL;
switch (item->type())
{
case slctk::attribute::Item::ATTRIBUTE_REF: // This is always inside valueItem ???
// aItem = qtAttribute::createAttributeRefItem(slctk::dynamicCastPointer<AttributeRefItem>(item), pW);
case smtk::attribute::Item::ATTRIBUTE_REF: // This is always inside valueItem ???
// aItem = qtAttribute::createAttributeRefItem(smtk::dynamicCastPointer<AttributeRefItem>(item), pW);
break;
case slctk::attribute::Item::DOUBLE:
case slctk::attribute::Item::INT:
case slctk::attribute::Item::STRING:
aItem = qtAttribute::createValueItem(slctk::dynamicCastPointer<ValueItem>(item), pW);
case smtk::attribute::Item::DOUBLE:
case smtk::attribute::Item::INT:
case smtk::attribute::Item::STRING:
aItem = qtAttribute::createValueItem(smtk::dynamicCastPointer<ValueItem>(item), pW);
break;
case slctk::attribute::Item::DIRECTORY:
aItem = qtAttribute::createDirectoryItem(slctk::dynamicCastPointer<DirectoryItem>(item), pW);
case smtk::attribute::Item::DIRECTORY:
aItem = qtAttribute::createDirectoryItem(smtk::dynamicCastPointer<DirectoryItem>(item), pW);
break;
case slctk::attribute::Item::FILE:
aItem = qtAttribute::createFileItem(slctk::dynamicCastPointer<FileItem>(item), pW);
case smtk::attribute::Item::FILE:
aItem = qtAttribute::createFileItem(smtk::dynamicCastPointer<FileItem>(item), pW);
break;
case slctk::attribute::Item::GROUP:
aItem = qtAttribute::createGroupItem(slctk::dynamicCastPointer<GroupItem>(item), pW);
case smtk::attribute::Item::GROUP:
aItem = qtAttribute::createGroupItem(smtk::dynamicCastPointer<GroupItem>(item), pW);
break;
case slctk::attribute::Item::VOID:
case smtk::attribute::Item::VOID:
// Nothing to do!
break;
default:
//this->m_errorStatus << "Error: Unsupported Item Type: " <<
// slctk::attribute::Item::type2String(item->type()) << "\n";
// smtk::attribute::Item::type2String(item->type()) << "\n";
break;
}
return aItem;
......@@ -209,14 +209,14 @@ qtItem* qtAttribute::createItem(slctk::AttributeItemPtr item, QWidget* pW)
//----------------------------------------------------------------------------
qtItem* qtAttribute::createAttributeRefItem(
slctk::AttributeRefItemPtr item, QWidget* pW)
smtk::AttributeRefItemPtr item, QWidget* pW)