Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
David Thompson
SMTK
Commits
b927ef8e
Commit
b927ef8e
authored
Jan 03, 2013
by
Bob Obara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: Massive Restructuring and renamed to SMTK
parent
1f0e61a1
Changes
137
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
1285 additions
and
1098 deletions
+1285
-1098
CMake/PublicPointerDefs.h.in
CMake/PublicPointerDefs.h.in
+5
-5
CMake/SMTKMacros.cmake
CMake/SMTKMacros.cmake
+29
-15
CMakeLists.txt
CMakeLists.txt
+13
-18
attribute/Qt/CMakeLists.txt
attribute/Qt/CMakeLists.txt
+0
-49
smtk/CMakeLists.txt
smtk/CMakeLists.txt
+87
-0
smtk/Qt/CMakeLists.txt
smtk/Qt/CMakeLists.txt
+53
-0
smtk/Qt/qtAssociationWidget.cxx
smtk/Qt/qtAssociationWidget.cxx
+19
-19
smtk/Qt/qtAssociationWidget.h
smtk/Qt/qtAssociationWidget.h
+11
-11
smtk/Qt/qtAttribute.cxx
smtk/Qt/qtAttribute.cxx
+50
-50
smtk/Qt/qtAttribute.h
smtk/Qt/qtAttribute.h
+15
-15
smtk/Qt/qtAttributeAssociation.ui
smtk/Qt/qtAttributeAssociation.ui
+0
-0
smtk/Qt/qtAttributeRefItem.cxx
smtk/Qt/qtAttributeRefItem.cxx
+14
-14
smtk/Qt/qtAttributeRefItem.h
smtk/Qt/qtAttributeRefItem.h
+7
-7
smtk/Qt/qtAttributeSection.cxx
smtk/Qt/qtAttributeSection.cxx
+75
-74
smtk/Qt/qtAttributeSection.h
smtk/Qt/qtAttributeSection.h
+21
-21
smtk/Qt/qtComboItem.cxx
smtk/Qt/qtComboItem.cxx
+8
-8
smtk/Qt/qtComboItem.h
smtk/Qt/qtComboItem.h
+7
-7
smtk/Qt/qtFileItem.cxx
smtk/Qt/qtFileItem.cxx
+14
-14
smtk/Qt/qtFileItem.h
smtk/Qt/qtFileItem.h
+7
-7
smtk/Qt/qtGroupItem.cxx
smtk/Qt/qtGroupItem.cxx
+11
-11
smtk/Qt/qtGroupItem.h
smtk/Qt/qtGroupItem.h
+7
-7
smtk/Qt/qtGroupSection.cxx
smtk/Qt/qtGroupSection.cxx
+7
-7
smtk/Qt/qtGroupSection.h
smtk/Qt/qtGroupSection.h
+9
-9
smtk/Qt/qtInputsItem.cxx
smtk/Qt/qtInputsItem.cxx
+22
-22
smtk/Qt/qtInputsItem.h
smtk/Qt/qtInputsItem.h
+7
-7
smtk/Qt/qtInstancedSection.cxx
smtk/Qt/qtInstancedSection.cxx
+9
-9
smtk/Qt/qtInstancedSection.h
smtk/Qt/qtInstancedSection.h
+7
-7
smtk/Qt/qtItem.cxx
smtk/Qt/qtItem.cxx
+11
-11
smtk/Qt/qtItem.h
smtk/Qt/qtItem.h
+26
-26
smtk/Qt/qtModelEntitySection.cxx
smtk/Qt/qtModelEntitySection.cxx
+31
-31
smtk/Qt/qtModelEntitySection.h
smtk/Qt/qtModelEntitySection.h
+11
-11
smtk/Qt/qtReferencesWidget.cxx
smtk/Qt/qtReferencesWidget.cxx
+20
-20
smtk/Qt/qtReferencesWidget.h
smtk/Qt/qtReferencesWidget.h
+11
-11
smtk/Qt/qtRootSection.cxx
smtk/Qt/qtRootSection.cxx
+8
-8
smtk/Qt/qtRootSection.h
smtk/Qt/qtRootSection.h
+9
-9
smtk/Qt/qtSection.cxx
smtk/Qt/qtSection.cxx
+14
-14
smtk/Qt/qtSection.h
smtk/Qt/qtSection.h
+11
-11
smtk/Qt/qtSimpleExpressionSection.cxx
smtk/Qt/qtSimpleExpressionSection.cxx
+73
-73
smtk/Qt/qtSimpleExpressionSection.h
smtk/Qt/qtSimpleExpressionSection.h
+19
-19
smtk/Qt/qtTableWidget.cxx
smtk/Qt/qtTableWidget.cxx
+1
-1
smtk/Qt/qtTableWidget.h
smtk/Qt/qtTableWidget.h
+2
-2
smtk/Qt/qtUIManager.cxx
smtk/Qt/qtUIManager.cxx
+100
-100
smtk/Qt/qtUIManager.h
smtk/Qt/qtUIManager.h
+27
-27
smtk/attribute/Attribute.cxx
smtk/attribute/Attribute.cxx
+21
-21
smtk/attribute/Attribute.h
smtk/attribute/Attribute.h
+34
-34
smtk/attribute/AttributeReader.cxx
smtk/attribute/AttributeReader.cxx
+6
-6
smtk/attribute/AttributeReader.h
smtk/attribute/AttributeReader.h
+6
-6
smtk/attribute/AttributeRefItem.cxx
smtk/attribute/AttributeRefItem.cxx
+7
-7
smtk/attribute/AttributeRefItem.h
smtk/attribute/AttributeRefItem.h
+13
-13
smtk/attribute/AttributeRefItemDefinition.cxx
smtk/attribute/AttributeRefItemDefinition.cxx
+9
-9
smtk/attribute/AttributeRefItemDefinition.h
smtk/attribute/AttributeRefItemDefinition.h
+14
-14
smtk/attribute/AttributeSection.cxx
smtk/attribute/AttributeSection.cxx
+2
-2
smtk/attribute/AttributeSection.h
smtk/attribute/AttributeSection.h
+8
-8
smtk/attribute/AttributeWriter.cxx
smtk/attribute/AttributeWriter.cxx
+3
-3
smtk/attribute/AttributeWriter.h
smtk/attribute/AttributeWriter.h
+6
-6
smtk/attribute/CMakeLists.txt
smtk/attribute/CMakeLists.txt
+86
-0
smtk/attribute/Definition.cxx
smtk/attribute/Definition.cxx
+14
-14
smtk/attribute/Definition.h
smtk/attribute/Definition.h
+27
-27
smtk/attribute/DirectoryItem.cxx
smtk/attribute/DirectoryItem.cxx
+5
-5
smtk/attribute/DirectoryItem.h
smtk/attribute/DirectoryItem.h
+9
-9
smtk/attribute/DirectoryItemDefinition.cxx
smtk/attribute/DirectoryItemDefinition.cxx
+8
-8
smtk/attribute/DirectoryItemDefinition.h
smtk/attribute/DirectoryItemDefinition.h
+10
-10
smtk/attribute/DoubleItem.cxx
smtk/attribute/DoubleItem.cxx
+3
-3
smtk/attribute/DoubleItem.h
smtk/attribute/DoubleItem.h
+7
-7
smtk/attribute/DoubleItemDefinition.cxx
smtk/attribute/DoubleItemDefinition.cxx
+7
-7
smtk/attribute/DoubleItemDefinition.h
smtk/attribute/DoubleItemDefinition.h
+8
-8
smtk/attribute/FileItem.cxx
smtk/attribute/FileItem.cxx
+5
-5
smtk/attribute/FileItem.h
smtk/attribute/FileItem.h
+9
-9
smtk/attribute/FileItemDefinition.cxx
smtk/attribute/FileItemDefinition.cxx
+8
-8
smtk/attribute/FileItemDefinition.h
smtk/attribute/FileItemDefinition.h
+10
-10
smtk/attribute/GroupItem.cxx
smtk/attribute/GroupItem.cxx
+11
-11
smtk/attribute/GroupItem.h
smtk/attribute/GroupItem.h
+14
-14
smtk/attribute/GroupItemDefinition.cxx
smtk/attribute/GroupItemDefinition.cxx
+9
-9
smtk/attribute/GroupItemDefinition.h
smtk/attribute/GroupItemDefinition.h
+16
-16
smtk/attribute/GroupSection.cxx
smtk/attribute/GroupSection.cxx
+2
-2
No files found.
CMake/PublicPointerDefs.h.in
View file @
b927ef8e
...
...
@@ -24,12 +24,12 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
// .SECTION Description
// .SECTION See Also
#ifndef __s
lc
tk_attribute_PublicPointerDefs_h
#define __s
lc
tk_attribute_PublicPointerDefs_h
#ifndef __s
m
tk_attribute_PublicPointerDefs_h
#define __s
m
tk_attribute_PublicPointerDefs_h
@POINTER_TYPE_HEADERS@
namespace s
lc
tk
namespace s
m
tk
{
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 S
LC
TK
// These are used internally by S
M
TK
namespace internal
{
template <typename T>
...
...
@@ -165,4 +165,4 @@ namespace slctk
};
};
};
#endif /* __s
lc
tk_attribute_PublicPointerDefs_h */
#endif /* __s
m
tk_attribute_PublicPointerDefs_h */
CMake/S
lctk
Macros.cmake
→
CMake/S
MTK
Macros.cmake
View file @
b927ef8e
...
...
@@ -8,7 +8,7 @@
# Utility to build a kit name from the current directory.
function
(
ms_get_kit_name kitvar
)
string
(
REPLACE
"
${
S
lctk
_SOURCE_DIR
}
/"
""
dir_prefix
${
CMAKE_CURRENT_SOURCE_DIR
}
)
string
(
REPLACE
"
${
S
MTK
_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
(
${
S
lctk
_SOURCE_DIR
}
/CMake/TestBuild.cxx.in
${
src
}
@ONLY
)
configure_file
(
${
S
MTK
_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
(
s
lc
tk_public_headers
)
function
(
s
m
tk_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
(
s
lc
tk_public_headers
)
endfunction
(
s
m
tk_public_headers
)
# Declare a list of header files. Will make sure the header files get
# compiled and show up in an IDE.
function
(
s
lc
tk_private_headers
)
function
(
s
m
tk_private_headers
)
ms_get_kit_name
(
name dir_prefix
)
ms_add_header_test
(
"
${
name
}
"
"
${
dir_prefix
}
"
${
ARGN
}
)
endfunction
(
s
lc
tk_private_headers
)
endfunction
(
s
m
tk_private_headers
)
# Declare a library as needed to be installed
function
(
s
lc
tk_install_library target
)
install
(
TARGETS
${
target
}
DESTINATION lib EXPORT S
lctk
-targets
)
endfunction
(
s
lc
tk_install_library
)
function
(
s
m
tk_install_library target
)
install
(
TARGETS
${
target
}
DESTINATION lib EXPORT S
MTK
-targets
)
endfunction
(
s
m
tk_install_library
)
#setup include directories as target properties
function
(
s
lc
tk_set_includes target
)
function
(
s
m
tk_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
(
s
lc
tk_set_includes
)
endfunction
(
s
m
tk_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
(
s
lc
tk_get_includes target includes_var_name
)
function
(
s
m
tk_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
(
s
lc
tk_get_includes
)
endfunction
(
s
m
tk_get_includes
)
#generate an export header and create an install target for it
function
(
s
lc
tk_export_header target file
)
function
(
s
m
tk_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
)
CMakeLists.txt
View file @
b927ef8e
cmake_minimum_required
(
VERSION 2.8
)
project
(
S
lctk
)
project
(
S
MTK
)
# include some cmake code that builds automatic header tests
# and can targets for unit tests
include
(
CMake/S
lctk
Macros.cmake
)
include
(
CMake/S
MTK
Macros.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 S
lctk
using shared libraries"
OFF
)
option
(
BUILD_SHARED_LIBS
"Build S
MTK
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
}
${
S
lctk
_SOURCE_DIR
}
/CMake
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
${
S
MTK
_SOURCE_DIR
}
/CMake
)
option
(
S
lctk
_ENABLE_TESTING
"Enable Testing"
ON
)
#option(S
lctk
_ENABLE_EXAMPLES "Enable Examples" ON)
option
(
S
MTK
_ENABLE_TESTING
"Enable Testing"
ON
)
#option(S
MTK
_ENABLE_EXAMPLES "Enable Examples" ON)
#turn on ctest if we want testing
if
(
S
lctk
_ENABLE_TESTING
)
if
(
S
MTK
_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: <s
lc
tk/internal/Test.h>
#add this directory so we can include files like: <s
m
tk/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
)
attribute/Qt/CMakeLists.txt
deleted
100644 → 0
View file @
1f0e61a1
# 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
)
smtk/CMakeLists.txt
0 → 100644
View file @
b927ef8e
#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
()
smtk/Qt/CMakeLists.txt
0 → 100644
View file @
b927ef8e
# 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
}
)
attribute
/Qt/qtAssociationWidget.cxx
→
smtk
/Qt/qtAssociationWidget.cxx
View file @
b927ef8e
...
...
@@ -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
s
lc
tk
::
attribute
;
using
namespace
s
m
tk
::
attribute
;
//----------------------------------------------------------------------------
class
qtAssociationWidgetInternals
:
public
Ui
::
qtAttributeAssociation
...
...
@@ -106,7 +106,7 @@ void qtAssociationWidget::showAdvanced(int checked)
//----------------------------------------------------------------------------
void
qtAssociationWidget
::
showEntityAssociation
(
s
lc
tk
::
ModelItemPtr
entity
,
QString
&
category
)
s
m
tk
::
ModelItemPtr
entity
,
QString
&
category
)
{
}
...
...
@@ -124,18 +124,18 @@ void qtAssociationWidget::onAvailableListSelectionChanged(
}
//-----------------------------------------------------------------------------
s
lc
tk
::
AttributePtr
qtAssociationWidget
::
getSelectedAttribute
(
s
m
tk
::
AttributePtr
qtAssociationWidget
::
getSelectedAttribute
(
QListWidget
*
theList
)
{
return
this
->
getAttributeFromItem
(
this
->
getSelectedItem
(
theList
));
}
//-----------------------------------------------------------------------------
s
lc
tk
::
AttributePtr
qtAssociationWidget
::
getAttributeFromItem
(
s
m
tk
::
AttributePtr
qtAssociationWidget
::
getAttributeFromItem
(
QListWidgetItem
*
item
)
{
Attribute
*
rawPtr
=
item
?
static_cast
<
Attribute
*>
(
item
->
data
(
Qt
::
UserRole
).
value
<
void
*>
())
:
NULL
;
return
rawPtr
?
rawPtr
->
pointer
()
:
s
lc
tk
::
AttributePtr
();
return
rawPtr
?
rawPtr
->
pointer
()
:
s
m
tk
::
AttributePtr
();
}
//-----------------------------------------------------------------------------
QListWidgetItem
*
qtAssociationWidget
::
getSelectedItem
(
QListWidget
*
theList
)
...
...
@@ -145,13 +145,13 @@ QListWidgetItem *qtAssociationWidget::getSelectedItem(QListWidget* theList)
}
//----------------------------------------------------------------------------
QListWidgetItem
*
qtAssociationWidget
::
addAttributeRefListItem
(
QListWidget
*
theList
,
s
lc
tk
::
AttributeItemPtr
refItem
)
QListWidget
*
theList
,
s
m
tk
::
AttributeItemPtr
refItem
)
{
QString
txtLabel
(
refItem
->
attribute
()
->
name
().
c_str
());
txtLabel
.
append
(
" : "
).
append
(
refItem
->
owningItem
()
->
name
().
c_str
());
QListWidgetItem
*
item
=
new
QListWidgetItem
(
txtLabel
,
theList
,
s
lc
tk_USER_DATA_TYPE
);
theList
,
s
m
tk_USER_DATA_TYPE
);
QVariant
vdata
;
vdata
.
setValue
((
void
*
)(
refItem
.
get
()));
item
->
setData
(
Qt
::
UserRole
,
vdata
);
...
...
attribute
/Qt/qtAssociationWidget.h
→
smtk
/Qt/qtAssociationWidget.h
View file @
b927ef8e
...
...
@@ -24,23 +24,23 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
// .SECTION See Also
// qtSection
#ifndef __s
lc
tk_attribute_qtAssociationWidget_h
#define __s
lc
tk_attribute_qtAssociationWidget_h
#ifndef __s
m
tk_attribute_qtAssociationWidget_h
#define __s
m
tk_attribute_qtAssociationWidget_h
#include <QWidget>
#include "
Attribut
eExports.h"
#include "PublicPointerDefs.h"
#include "
smtk/SMTKCor
eExports.h"
#include "
smtk/
PublicPointerDefs.h"
class
qtAssociationWidgetInternals
;
class
QListWidgetItem
;
class
QListWidget
;
class
ModelEntity
;
namespace
s
lc
tk
namespace
s
m
tk
{
namespace
attribute
{
class
S
LCTKATTRIBUT
E_EXPORT
qtAssociationWidget
:
public
QWidget
class
S
MTKCOR
E_EXPORT
qtAssociationWidget
:
public
QWidget
{
Q_OBJECT
...
...
@@ -50,7 +50,7 @@ namespace slctk
public
slots
:
virtual
void
showAdvanced
(
int
show
);
virtual
void
showEntityAssociation
(
s
lc
tk
::
ModelItemPtr
entity
,
QString
&
category
);
virtual
void
showEntityAssociation
(
s
m
tk
::
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
);
s
lc
tk
::
AttributePtr
getSelectedAttribute
(
QListWidget
*
theLis
);
s
lc
tk
::
AttributePtr
getAttributeFromItem
(
QListWidgetItem
*
item
);
s
m
tk
::
AttributePtr
getSelectedAttribute
(
QListWidget
*
theLis
);
s
m
tk
::
AttributePtr
getAttributeFromItem
(
QListWidgetItem
*
item
);
virtual
QListWidgetItem
*
addAttributeRefListItem
(
QListWidget
*
theList
,
s
lc
tk
::
AttributeItemPtr
refItem
);
s
m
tk
::
AttributeItemPtr
refItem
);
private:
...
...
@@ -73,7 +73,7 @@ namespace slctk
};
// class
};
// namespace attribute
};
// namespace s
lc
tk
};
// namespace s
m
tk
#endif
attribute
/Qt/qtAttribute.cxx
→
smtk
/Qt/qtAttribute.cxx
View file @
b927ef8e
...
...
@@ -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
s
lc
tk
::
attribute
;
using
namespace
s
m
tk
::
attribute
;
//----------------------------------------------------------------------------
class
qtAttributeInternals
{
public:
qtAttributeInternals
(
s
lc
tk
::
AttributePtr
dataObject
,
QWidget
*
p
)
qtAttributeInternals
(
s
m
tk
::
AttributePtr
dataObject
,
QWidget
*
p
)
{
this
->
ParentWidget
=
p
;
this
->
DataObject
=
dataObject
;
...
...
@@ -62,13 +62,13 @@ public:
~
qtAttributeInternals
()
{
}
s
lc
tk
::
WeakAttributePtr
DataObject
;
s
m
tk
::
WeakAttributePtr
DataObject
;
QPointer
<
QWidget
>
ParentWidget
;
QList
<
s
lc
tk
::
attribute
::
qtItem
*>
Items
;
QList
<
s
m
tk
::
attribute
::
qtItem
*>
Items
;