Commit 37123b17 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[CHANGE] - renamed m_properties2 to m_properties in all modules

parent f0054591
......@@ -24,4 +24,4 @@
#include "WPreferences.h"
WProperties2 WPreferences::m_preferences;
WProperties WPreferences::m_preferences;
......@@ -32,7 +32,7 @@
#include <boost/program_options.hpp>
#include "../common/WIOTools.h"
#include "WProperties2.h"
#include "WProperties.h"
#include "WLogger.h"
/**
......@@ -50,7 +50,7 @@ public:
template< typename T> static bool getPreference( std::string prefName, T* retVal );
protected:
private:
static WProperties2 m_preferences; //!< Structure for caching the preferences.
static WProperties m_preferences; //!< Structure for caching the preferences.
};
template< typename T > bool WPreferences::getPreference( std::string prefName, T* retVal )
......
......@@ -30,25 +30,25 @@
#include "WLogger.h"
#include "exceptions/WPropertyUnknown.h"
#include "WProperties2.h"
#include "WProperties.h"
WProperties2::WProperties2():
WProperties::WProperties():
m_propAccess( m_properties.getAccessObject() )
{
}
WProperties2::~WProperties2()
WProperties::~WProperties()
{
}
void WProperties2::addProperty( boost::shared_ptr< WPropertyBase > prop )
void WProperties::addProperty( boost::shared_ptr< WPropertyBase > prop )
{
m_propAccess->beginWrite();
m_propAccess->get().push_back( prop );
m_propAccess->endWrite();
}
boost::shared_ptr< WPropertyBase > WProperties2::findProperty( std::string name )
boost::shared_ptr< WPropertyBase > WProperties::findProperty( std::string name )
{
boost::shared_ptr< WPropertyBase > result = boost::shared_ptr< WPropertyBase >();
......@@ -68,12 +68,12 @@ boost::shared_ptr< WPropertyBase > WProperties2::findProperty( std::string name
return result;
}
bool WProperties2::existsProperty( std::string name )
bool WProperties::existsProperty( std::string name )
{
return ( findProperty( name ) != boost::shared_ptr< WPropertyBase >() );
}
boost::shared_ptr< WPropertyBase > WProperties2::getProperty( std::string name )
boost::shared_ptr< WPropertyBase > WProperties::getProperty( std::string name )
{
boost::shared_ptr< WPropertyBase > p = findProperty( name );
if ( p == boost::shared_ptr< WPropertyBase >() )
......@@ -84,7 +84,7 @@ boost::shared_ptr< WPropertyBase > WProperties2::getProperty( std::string name )
return p;
}
WProperties2::PropertySharedContainerType::WSharedAccess WProperties2::getAccessObject()
WProperties::PropertySharedContainerType::WSharedAccess WProperties::getAccessObject()
{
return m_properties.getAccessObject();
}
......@@ -95,12 +95,12 @@ WProperties2::PropertySharedContainerType::WSharedAccess WProperties2::getAccess
// boost::shared_ptr< WPropertyVariable< T > > addProperty( std::string name, std::string description, const T& initial, bool hide = false );
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
WPropBool WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_BOOL& initial, bool hide )
WPropBool WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_BOOL& initial, bool hide )
{
return addProperty< WPVBaseTypes::PV_BOOL >( name, description, initial, hide );
}
WPropInt WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_INT& initial, bool hide )
WPropInt WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_INT& initial, bool hide )
{
WPropInt p = addProperty< WPVBaseTypes::PV_INT >( name, description, initial, hide );
p->setMin( 0 );
......@@ -108,7 +108,7 @@ WPropInt WProperties2::addProperty( std::string name, std::string description, c
return p;
}
WPropDouble WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE& initial, bool hide )
WPropDouble WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE& initial, bool hide )
{
WPropDouble p = addProperty< WPVBaseTypes::PV_DOUBLE >( name, description, initial, hide );
p->setMin( 0.0 );
......@@ -116,29 +116,29 @@ WPropDouble WProperties2::addProperty( std::string name, std::string description
return p;
}
WPropString WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_STRING& initial, bool hide )
WPropString WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_STRING& initial, bool hide )
{
return addProperty< WPVBaseTypes::PV_STRING >( name, description, initial, hide );
}
WPropFilename WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_PATH& initial, bool hide )
WPropFilename WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_PATH& initial, bool hide )
{
WPropFilename p = addProperty< WPVBaseTypes::PV_PATH >( name, description, initial, hide );
p->addConstraint( WPVFilename::PropertyConstraint::create( PC_NOTEMPTY ) );
return p;
}
WPropSelection WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_SELECTION& initial, bool hide )
WPropSelection WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_SELECTION& initial, bool hide )
{
return addProperty< WPVBaseTypes::PV_SELECTION >( name, description, initial, hide );
}
WPropPosition WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_POSITION& initial, bool hide )
WPropPosition WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_POSITION& initial, bool hide )
{
return addProperty< WPVBaseTypes::PV_POSITION >( name, description, initial, hide );
}
WPropColor WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_COLOR& initial, bool hide )
WPropColor WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_COLOR& initial, bool hide )
{
return addProperty< WPVBaseTypes::PV_COLOR >( name, description, initial, hide );
}
......@@ -150,13 +150,13 @@ WPropColor WProperties2::addProperty( std::string name, std::string description,
// boost::shared_ptr< WCondition > condition, bool hide = false );
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
WPropBool WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_BOOL& initial,
WPropBool WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_BOOL& initial,
boost::shared_ptr< WCondition > condition, bool hide )
{
return addProperty< WPVBaseTypes::PV_BOOL >( name, description, initial, condition, hide );
}
WPropInt WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_INT& initial,
WPropInt WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_INT& initial,
boost::shared_ptr< WCondition > condition, bool hide )
{
WPropInt p = addProperty< WPVBaseTypes::PV_INT >( name, description, initial, condition, hide );
......@@ -165,7 +165,7 @@ WPropInt WProperties2::addProperty( std::string name, std::string description, c
return p;
}
WPropDouble WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE& initial,
WPropDouble WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE& initial,
boost::shared_ptr< WCondition > condition, bool hide )
{
WPropDouble p = addProperty< WPVBaseTypes::PV_DOUBLE >( name, description, initial, condition, hide );
......@@ -174,13 +174,13 @@ WPropDouble WProperties2::addProperty( std::string name, std::string description
return p;
}
WPropString WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_STRING& initial,
WPropString WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_STRING& initial,
boost::shared_ptr< WCondition > condition, bool hide )
{
return addProperty< WPVBaseTypes::PV_STRING >( name, description, initial, condition, hide );
}
WPropFilename WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_PATH& initial,
WPropFilename WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_PATH& initial,
boost::shared_ptr< WCondition > condition, bool hide )
{
WPropFilename p = addProperty< WPVBaseTypes::PV_PATH >( name, description, initial, condition, hide );
......@@ -188,19 +188,19 @@ WPropFilename WProperties2::addProperty( std::string name, std::string descripti
return p;
}
WPropSelection WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_SELECTION& initial,
WPropSelection WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_SELECTION& initial,
boost::shared_ptr< WCondition > condition, bool hide )
{
return addProperty< WPVBaseTypes::PV_SELECTION >( name, description, initial, condition, hide );
}
WPropPosition WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_POSITION& initial,
WPropPosition WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_POSITION& initial,
boost::shared_ptr< WCondition > condition, bool hide )
{
return addProperty< WPVBaseTypes::PV_POSITION >( name, description, initial, condition, hide );
}
WPropColor WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_COLOR& initial,
WPropColor WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_COLOR& initial,
boost::shared_ptr< WCondition > condition, bool hide )
{
return addProperty< WPVBaseTypes::PV_COLOR >( name, description, initial, condition, hide );
......@@ -213,13 +213,13 @@ WPropColor WProperties2::addProperty( std::string name, std::string description,
// WPropertyBase::PropertyChangeNotifierType notifier, bool hide = false );
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
WPropBool WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_BOOL& initial,
WPropBool WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_BOOL& initial,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
return addProperty< WPVBaseTypes::PV_BOOL >( name, description, initial, notifier, hide );
}
WPropInt WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_INT& initial,
WPropInt WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_INT& initial,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
WPropInt p = addProperty< WPVBaseTypes::PV_INT >( name, description, initial, notifier, hide );
......@@ -228,7 +228,7 @@ WPropInt WProperties2::addProperty( std::string name, std::string description, c
return p;
}
WPropDouble WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE& initial,
WPropDouble WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE& initial,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
WPropDouble p = addProperty< WPVBaseTypes::PV_DOUBLE >( name, description, initial, notifier, hide );
......@@ -237,13 +237,13 @@ WPropDouble WProperties2::addProperty( std::string name, std::string description
return p;
}
WPropString WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_STRING& initial,
WPropString WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_STRING& initial,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
return addProperty< WPVBaseTypes::PV_STRING >( name, description, initial, notifier, hide );
}
WPropFilename WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_PATH& initial,
WPropFilename WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_PATH& initial,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
WPropFilename p = addProperty< WPVBaseTypes::PV_PATH >( name, description, initial, notifier, hide );
......@@ -251,19 +251,19 @@ WPropFilename WProperties2::addProperty( std::string name, std::string descripti
return p;
}
WPropSelection WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_SELECTION& initial,
WPropSelection WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_SELECTION& initial,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
return addProperty< WPVBaseTypes::PV_SELECTION >( name, description, initial, notifier, hide );
}
WPropPosition WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_POSITION& initial,
WPropPosition WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_POSITION& initial,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
return addProperty< WPVBaseTypes::PV_POSITION >( name, description, initial, notifier, hide );
}
WPropColor WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_COLOR& initial,
WPropColor WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_COLOR& initial,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
return addProperty< WPVBaseTypes::PV_COLOR >( name, description, initial, notifier, hide );
......@@ -278,14 +278,14 @@ WPropColor WProperties2::addProperty( std::string name, std::string description,
// WPropertyBase::PropertyChangeNotifierType notifier, bool hide = false );
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
WPropBool WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_BOOL& initial,
WPropBool WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_BOOL& initial,
boost::shared_ptr< WCondition > condition,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
return addProperty< WPVBaseTypes::PV_BOOL >( name, description, initial, condition, notifier, hide );
}
WPropInt WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_INT& initial,
WPropInt WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_INT& initial,
boost::shared_ptr< WCondition > condition,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
......@@ -295,7 +295,7 @@ WPropInt WProperties2::addProperty( std::string name, std::string description, c
return p;
}
WPropDouble WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE& initial,
WPropDouble WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_DOUBLE& initial,
boost::shared_ptr< WCondition > condition,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
......@@ -305,14 +305,14 @@ WPropDouble WProperties2::addProperty( std::string name, std::string description
return p;
}
WPropString WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_STRING& initial,
WPropString WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_STRING& initial,
boost::shared_ptr< WCondition > condition,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
return addProperty< WPVBaseTypes::PV_STRING >( name, description, initial, condition, notifier, hide );
}
WPropFilename WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_PATH& initial,
WPropFilename WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_PATH& initial,
boost::shared_ptr< WCondition > condition,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
......@@ -321,21 +321,21 @@ WPropFilename WProperties2::addProperty( std::string name, std::string descripti
return p;
}
WPropSelection WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_SELECTION& initial,
WPropSelection WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_SELECTION& initial,
boost::shared_ptr< WCondition > condition,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
return addProperty< WPVBaseTypes::PV_SELECTION >( name, description, initial, condition, notifier, hide );
}
WPropPosition WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_POSITION& initial,
WPropPosition WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_POSITION& initial,
boost::shared_ptr< WCondition > condition,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
return addProperty< WPVBaseTypes::PV_POSITION >( name, description, initial, condition, notifier, hide );
}
WPropColor WProperties2::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_COLOR& initial,
WPropColor WProperties::addProperty( std::string name, std::string description, const WPVBaseTypes::PV_COLOR& initial,
boost::shared_ptr< WCondition > condition,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
......
......@@ -22,8 +22,8 @@
//
//---------------------------------------------------------------------------
#ifndef WPROPERTIES2_H
#define WPROPERTIES2_H
#ifndef WPROPERTIES_H
#define WPROPERTIES_H
#include <map>
#include <string>
......@@ -42,7 +42,7 @@
* class to manage properties of an object and to provide convinience methods for easy access and manipulation. It also allows
* thread safe iteration on its elements.
*/
class WProperties2
class WProperties
{
public:
......@@ -76,12 +76,12 @@ public:
/**
* standard constructor
*/
WProperties2();
WProperties();
/**
* destructor
*/
virtual ~WProperties2();
virtual ~WProperties();
/**
* Simply insert the specified property to the list.
......@@ -765,7 +765,7 @@ private:
};
template< typename T>
boost::shared_ptr< WPropertyVariable< T > > WProperties2::addProperty( std::string name, std::string description, const T& initial, bool hide )
boost::shared_ptr< WPropertyVariable< T > > WProperties::addProperty( std::string name, std::string description, const T& initial, bool hide )
{
boost::shared_ptr< WPropertyVariable< T > > p = boost::shared_ptr< WPropertyVariable< T > >(
new WPropertyVariable< T >( name, description, initial )
......@@ -776,7 +776,7 @@ boost::shared_ptr< WPropertyVariable< T > > WProperties2::addProperty( std::stri
}
template< typename T>
boost::shared_ptr< WPropertyVariable< T > > WProperties2::addProperty( std::string name, std::string description, const T& initial,
boost::shared_ptr< WPropertyVariable< T > > WProperties::addProperty( std::string name, std::string description, const T& initial,
boost::shared_ptr< WCondition > condition, bool hide )
{
boost::shared_ptr< WPropertyVariable< T > > p = boost::shared_ptr< WPropertyVariable< T > >(
......@@ -788,7 +788,7 @@ boost::shared_ptr< WPropertyVariable< T > > WProperties2::addProperty( std::stri
}
template< typename T>
boost::shared_ptr< WPropertyVariable< T > > WProperties2::addProperty( std::string name, std::string description, const T& initial,
boost::shared_ptr< WPropertyVariable< T > > WProperties::addProperty( std::string name, std::string description, const T& initial,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
boost::shared_ptr< WPropertyVariable< T > > p = boost::shared_ptr< WPropertyVariable< T > >(
......@@ -800,7 +800,7 @@ boost::shared_ptr< WPropertyVariable< T > > WProperties2::addProperty( std::stri
}
template< typename T>
boost::shared_ptr< WPropertyVariable< T > > WProperties2::addProperty( std::string name, std::string description, const T& initial,
boost::shared_ptr< WPropertyVariable< T > > WProperties::addProperty( std::string name, std::string description, const T& initial,
boost::shared_ptr< WCondition > condition,
WPropertyBase::PropertyChangeNotifierType notifier, bool hide )
{
......@@ -812,4 +812,4 @@ boost::shared_ptr< WPropertyVariable< T > > WProperties2::addProperty( std::stri
return p;
}
#endif // WPROPERTIES2_H
#endif // WPROPERTIES_H
......@@ -247,7 +247,7 @@ void WMainWindow::moduleSpecificSetup( boost::shared_ptr< WModule > module )
// nav slices use separate buttons for slice on/off switching
if ( module->getName() == "Navigation Slices" )
{
boost::shared_ptr< WPropertyBase > prop = module->getProperties2()->findProperty( "showAxial" );
boost::shared_ptr< WPropertyBase > prop = module->getProperties()->findProperty( "showAxial" );
if ( !prop )
{
WLogger::getLogger()->
......@@ -263,7 +263,7 @@ void WMainWindow::moduleSpecificSetup( boost::shared_ptr< WModule > module )
m_permanentToolBar->addWidget( button );
}
prop = module->getProperties2()->findProperty( "showCoronal" );
prop = module->getProperties()->findProperty( "showCoronal" );
if ( !prop )
{
WLogger::getLogger()->
......@@ -279,7 +279,7 @@ void WMainWindow::moduleSpecificSetup( boost::shared_ptr< WModule > module )
m_permanentToolBar->addWidget( button );
}
prop = module->getProperties2()->findProperty( "showSagittal" );
prop = module->getProperties()->findProperty( "showSagittal" );
if ( !prop )
{
WLogger::getLogger()->
......@@ -296,7 +296,7 @@ void WMainWindow::moduleSpecificSetup( boost::shared_ptr< WModule > module )
}
// now setup the nav widget sliders
prop = module->getProperties2()->findProperty( "Axial Slice" );
prop = module->getProperties()->findProperty( "Axial Slice" );
if ( !prop )
{
WLogger::getLogger()->
......@@ -311,7 +311,7 @@ void WMainWindow::moduleSpecificSetup( boost::shared_ptr< WModule > module )
}
}
prop = module->getProperties2()->findProperty( "Coronal Slice" );
prop = module->getProperties()->findProperty( "Coronal Slice" );
if ( !prop )
{
WLogger::getLogger()->
......@@ -326,7 +326,7 @@ void WMainWindow::moduleSpecificSetup( boost::shared_ptr< WModule > module )
}
}
prop = module->getProperties2()->findProperty( "Sagittal Slice" );
prop = module->getProperties()->findProperty( "Sagittal Slice" );
if ( !prop )
{
WLogger::getLogger()->
......
......@@ -315,7 +315,7 @@ void WQtDatasetBrowser::selectTreeItem()
m_mainWindow->getCompatiblesToolBar()->clearButtons();
boost::shared_ptr< WModule > module;
boost::shared_ptr< WProperties2 > props;
boost::shared_ptr< WProperties > props;
if ( m_treeWidget->selectedItems().size() != 0 )
{
......@@ -325,14 +325,14 @@ void WQtDatasetBrowser::selectTreeItem()
break;
case DATASET:
module = ( static_cast< WQtDatasetTreeItem* >( m_treeWidget->selectedItems().at( 0 ) ) )->getModule();
props = module->getProperties2();
props = module->getProperties();
createCompatibleButtons( module );
break;
case MODULEHEADER:
break;
case MODULE:
module = ( static_cast< WQtModuleTreeItem* >( m_treeWidget->selectedItems().at( 0 ) ) )->getModule();
props = module->getProperties2();
props = module->getProperties();
createCompatibleButtons( module );
break;
case ROIHEADER:
......@@ -353,7 +353,7 @@ void WQtDatasetBrowser::selectRoiTreeItem()
m_mainWindow->getCompatiblesToolBar()->clearButtons();
boost::shared_ptr< WModule > module;
boost::shared_ptr< WProperties2 > props;
boost::shared_ptr< WProperties > props;
if ( m_roiTreeWidget->selectedItems().size() != 0 )
{
......@@ -379,17 +379,17 @@ void WQtDatasetBrowser::selectRoiTreeItem()
}
void WQtDatasetBrowser::buildPropTab( boost::shared_ptr< WProperties2 > props )
void WQtDatasetBrowser::buildPropTab( boost::shared_ptr< WProperties > props )
{
WQtDSBWidget* tab = new WQtDSBWidget( "Settings" );
if ( props.get() )
{
WProperties2::PropertyAccessType propAccess = props->getAccessObject();
WProperties::PropertyAccessType propAccess = props->getAccessObject();
propAccess->beginRead();
// iterate all properties. This Locks the properties set -> use endIteration to unlock
for ( WProperties2::PropertyConstIterator iter = propAccess->get().begin(); iter != propAccess->get().end(); ++iter )
for ( WProperties::PropertyConstIterator iter = propAccess->get().begin(); iter != propAccess->get().end(); ++iter )
{
if ( !( *iter )->isHidden() )
{
......@@ -458,13 +458,13 @@ void WQtDatasetBrowser::changeTreeItem()
if ( m_treeWidget->selectedItems().size() == 1 && m_treeWidget->selectedItems().at( 0 )->type() == DATASET )
{
boost::shared_ptr< WModule > module =( static_cast< WQtDatasetTreeItem* >( m_treeWidget->selectedItems().at( 0 ) ) )->getModule();
module->getProperties2()->getProperty( "active" )->toPropBool()->set( m_treeWidget->selectedItems().at( 0 )->checkState( 0 ) );
module->getProperties()->getProperty( "active" )->toPropBool()->set( m_treeWidget->selectedItems().at( 0 )->checkState( 0 ) );
}
else if ( m_treeWidget->selectedItems().size() == 1 && m_treeWidget->selectedItems().at( 0 )->type() == MODULE )
{
boost::shared_ptr< WModule > module =( static_cast< WQtModuleTreeItem* >( m_treeWidget->selectedItems().at( 0 ) ) )->getModule();
module->getProperties2()->getProperty( "active" )->toPropBool()->set( m_treeWidget->selectedItems().at( 0 )->checkState( 0 ) );
module->getProperties()->getProperty( "active" )->toPropBool()->set( m_treeWidget->selectedItems().at( 0 )->checkState( 0 ) );
}
}
......
......@@ -205,7 +205,7 @@ private slots:
*
* \param props
*/
void buildPropTab( boost::shared_ptr< WProperties2 > props );
void buildPropTab( boost::shared_ptr< WProperties > props );
/**
......
......@@ -32,7 +32,7 @@ WQtDatasetTreeItem::WQtDatasetTreeItem( QTreeWidgetItem * parent, boost::shared_
: WQtTreeItem( parent, DATASET, module )
{
// replace the name by the filename
boost::shared_ptr< WPropertyBase > p = module->getProperties2()->findProperty( "filename" );
boost::shared_ptr< WPropertyBase > p = module->getProperties()->findProperty( "filename" );
m_name = "Dataset";
if ( p.get() )
{
......
......@@ -40,7 +40,7 @@ WQtTreeItem::WQtTreeItem( QTreeWidgetItem * parent, WTreeItemType type, boost::s
m_module = module;
m_name = module->getName();
if ( module->getProperties2()->getProperty( "active" )->toPropBool()->get() )
if ( module->getProperties()->getProperty( "active" )->toPropBool()->get() )
{
this->setCheckState( 0, Qt::Checked );
}
......
......@@ -63,7 +63,7 @@ void WBatchLoader::threadMain()
WModuleFactory::getModuleFactory()->getPrototypeByName( "Data Module" )
);
boost::shared_ptr< WPropertyBase > p = mod->getProperties2()->findProperty( "filename" );
boost::shared_ptr< WPropertyBase > p = mod->getProperties()->findProperty( "filename" );
if ( p.get() )
{
p->toPropFilename()->set( *iter );
......
......@@ -64,8 +64,8 @@ WModule::WModule():
m_moduleState()
{
// initialize members
m_properties2 = boost::shared_ptr< WProperties2 >( new WProperties2() );
m_active = m_properties2->addProperty( "active", "Determines whether the module should be activated.", true, true );
m_properties = boost::shared_ptr< WProperties >( new WProperties() );
m_active = m_properties->addProperty( "active", "Determines whether the module should be activated.", true, true );
m_active->getCondition()->subscribeSignal( boost::bind( &WModule::activate, this ) );
// the isReadyOrCrashed condition set needs to be set up here
......@@ -325,9 +325,9 @@ void WModule::notifyDataChange( boost::shared_ptr< WModuleConnector > /*input*/,
// By default this callback does nothing. Overwrite it in your module.
}