Commit e8d5cad5 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - removed debrecated method getDataSetList. CoordinateSystem Module...

[CHANGE] - removed debrecated method getDataSetList. CoordinateSystem Module does work properly now until it uses the new method
parent 1bc039d1
......@@ -85,16 +85,6 @@ public:
*/
virtual int run() = 0;
/**
* returns a vector of pointers to the loaded datasets for a given subject.
*
* \param subjectId the ID of the subject to get the list for.
* \param onlyTextures true if only textures should be returned.
*
* \return list of datasets.
*/
virtual std::vector< boost::shared_ptr< WDataSet > > getDataSetList( int subjectId, bool onlyTextures = false ) = 0;
/**
* Instruct the MainWindow to open a new custom widget.
*
......
......@@ -180,11 +180,6 @@ void WQt4Gui::slotActivateDatasetOrModuleInBrowser( boost::shared_ptr< WModule >
QCoreApplication::postEvent( m_mainWindow, new WModuleReadyEvent( module ) );
}
std::vector< boost::shared_ptr< WDataSet > > WQt4Gui::getDataSetList( int subjectId, bool onlyTextures )
{
return m_mainWindow->getDatasetBrowser()->getDataSetList( subjectId, onlyTextures );
}
boost::shared_ptr< WModule > WQt4Gui::getSelectedModule()
{
return m_mainWindow->getDatasetBrowser()->getSelectedModule();
......
......@@ -66,16 +66,6 @@ public:
*/
virtual int run();
/**
* returns a vector of pointers to the loaded datasets for a given subject.
*
* \param subjectId the ID of the subject to get the list for.
* \param onlyTextures true if only textures should be returned.
*
* \return list of datasets.
*/
virtual std::vector< boost::shared_ptr< WDataSet > > getDataSetList( int subjectId, bool onlyTextures = false );
/**
* returns a pointer to the selected module in the dataset browser
*
......
......@@ -436,33 +436,6 @@ void WQtDatasetBrowser::addTabWidgetContent( WQtDSBWidget* content )
m_tabWidget->addTab( sa, content->getName() );
}
std::vector< boost::shared_ptr< WDataSet > > WQtDatasetBrowser::getDataSetList( int subjectId, bool onlyTextures )
{
int c = getFirstSubject();
std::vector< boost::shared_ptr< WDataSet > >moduleList;
if ( m_treeWidget->invisibleRootItem()->childCount() < subjectId + c)
{
return moduleList;
}
int count = m_treeWidget->invisibleRootItem()->child( subjectId + c )->childCount();
for ( int i = 0 ; i < count ; ++i )
{
boost::shared_ptr< WMData > dm = boost::shared_dynamic_cast< WMData >( ( static_cast< WQtDatasetTreeItem* >(
m_treeWidget->invisibleRootItem()->child( subjectId + c )->child( i ) ) )->getModule() );
if ( dm->isReady()() && ( !onlyTextures || dm->getDataSet()->isTexture() ) )
{
if ( dm->getProperties2()->getProperty( "active" )->toPropBool()->get() )
{
moduleList.push_back( dm->getDataSet() );
}
}
}
return moduleList;
}
void WQtDatasetBrowser::moveTreeItemDown()
{
m_treeWidget->moveTreeItemDown();
......
......@@ -116,16 +116,6 @@ public:
*/
void addModule2( boost::shared_ptr< WModule > module, int subjectId = 0 );
/**
* Returns a vector of pointers to the loaded datasets for a given subject.
*
* \param subjectId The ID of the subject to get the list for.
* \param onlyTextures True if only textures should be returned.
*
* \return the list of datasets.
*/
std::vector< boost::shared_ptr< WDataSet > > getDataSetList( int subjectId, bool onlyTextures = false );
/**
* helper funtion to connect all qt widgets with their functions
*/
......
......@@ -263,7 +263,17 @@ osg::ref_ptr<osg::Geometry> WMCoordinateSystem::createGeometryNode()
void WMCoordinateSystem::findBoundingBox()
{
std::vector< boost::shared_ptr< WDataSet > > dsl = WKernel::getRunningKernel()->getGui()->getDataSetList( 0, true );
// TODO(schurade): getDataSetList is obsolete.
// Use
//
// std::vector< boost::shared_ptr< WDataTexture3D > > tex = WDataHandler::getDefaultSubject()->getDataTextures( true )
// for ( std::vector< boost::shared_ptr< WDataTexture3D > >::const_iterator iter = tex.begin(); iter != tex.end(); ++iter )
// {
// std::pair< wmath::WPosition, wmath::WPosition > bb = ( *iter )->getGrid()->getBoundingBox();
// ...
// }
std::vector< boost::shared_ptr< WDataSet > > dsl; // = WKernel::getRunningKernel()->getGui()->getDataSetList( 0, true );
if ( dsl.size() > 0 )
{
......
......@@ -800,7 +800,7 @@ void WMMarchingCubes::renderMesh( WTriangleMesh* mesh )
}
// NOTE: the following code should not be necessary. The update callback does this job just before the mesh is rendered
// initially. Just set the texture changed flag to true
// initially. Just set the texture changed flag to true. If this however might be needed use WSubject::getDataTextures.
m_textureChanged = true;
//std::vector< boost::shared_ptr< WDataSet > > dsl = WKernel::getRunningKernel()->getGui()->getDataSetList( 0, true );*/
//if ( dsl.size() > 0 )
......
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