X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpBaseQtApplication%2FMainWindow.h;h=a29ad0fcb194c0311c8502d6e2e89893518a1e7b;hb=311164ff7e79547705a332fc7ee41651090fca6f;hp=a8bf7bc205f15670559c79159336e4fca86180f7;hpb=84d74813c987aaa92eed8579e2122f67c0d5159d;p=cpPlugins.git diff --git a/lib/cpBaseQtApplication/MainWindow.h b/lib/cpBaseQtApplication/MainWindow.h index a8bf7bc..a29ad0f 100644 --- a/lib/cpBaseQtApplication/MainWindow.h +++ b/lib/cpBaseQtApplication/MainWindow.h @@ -74,21 +74,8 @@ namespace cpBaseQtApplication ); virtual ~MainWindow( ); - /* TODO - void updateEnvironment( ); - void updateFilter( const std::string& name ); - void showData( const std::string& name, const std::string& port ); - void showData( - cpPlugins::BaseObjects::DataObject* data, const std::string& name - ); - void hideData( const std::string& name, const std::string& port ); - void hideData( const std::string& name ); - void dataProperties( const std::string& name, const std::string& port ); - void dataProperties( const std::string& name ); - */ - - TWorkspace* workspace( const std::string& wname ); - const TWorkspace* workspace( const std::string& wname ) const; + TWorkspace* workspace( ); + const TWorkspace* workspace( ) const; Pipeline::Canvas* canvas( ); const Pipeline::Canvas* canvas( ) const; @@ -102,11 +89,15 @@ namespace cpBaseQtApplication const cpExtensions::QT::ActorsWidgetInterface* viewer( ) const; void setViewer( cpExtensions::QT::ActorsWidgetInterface* v ); - /* TODO - protected: - void _configure( PluginsNavigator* nav, TMPR* mpr, Editor* edt ); - void _updatePlugins( ); - */ + protected: + template< class _TViewer > + _TViewer* _configureViewer( QWidget* w ) + { + _TViewer* v = dynamic_cast< _TViewer* >( w ); + if( v == NULL ) + v = new _TViewer( ); + return( v ); + } protected slots: void _loadPlugins( const std::string& filename ); @@ -114,57 +105,24 @@ namespace cpBaseQtApplication void _loadPluginsFromPath( const std::string& path ); void _loadPluginsFromPath( ); - void _clearWorkspaces( ); - - virtual void _addWorkspace( const std::string& name ); - void _addWorkspace( ); + void _clearWorkspace( ); - void _saveWorkspace( const std::string& wname, const std::string& fname ); - void _saveWorkspace( const std::string& wname, bool force ); + void _saveWorkspace( const std::string& fname ); void _saveWorkspace( ); void _loadWorkspace( const std::string& fname ); void _loadWorkspace( ); - /* TODO - void _loadWorkspace( const std::string& filename ); - void _loadWorkspace( ); - void _saveWorkspace( const std::string& filename ); - void _saveWorkspace( ); - void _showPlugins( ); - void _addEnvironmentPaths( const std::string& envs ); - void _addEnvironmentPaths( ); - void _actorsProperties( ); - */ - - /* TODO - void _ClearWorkspace( ); - void _LoadPlugins( const std::string& filename ); - void _LoadPluginsFromPath( const std::string& path ); - - void _LoadWorkspace( const std::string& filename ); - void _SaveWorkspace( const std::string& filename ); - - void _BackgroundProperties( unsigned int i ); - void _DataProperties( const std::string& actor ); - - void _AddEnviromentPaths( ); - void _LoadPlugins( ); - void _LoadPluginsFromPath( ); - void _ShowPlugins( ); - void _LoadWorkspace( ); - void _SaveWorkspace( ); - void _DataProperties( - const std::string& filter_name, const std::string& output_name - ); - */ + void _actorsProperties( ); protected: - Blocker m_Blocker; - std::string m_RunPath; - TPlugins::Pointer m_Plugins; - std::string m_LastSaveFileName; - std::map< std::string, TWorkspace::Pointer > m_Workspaces; + Blocker m_Blocker; + std::string m_RunPath; + TPlugins::Pointer m_Plugins; + std::string m_LastSaveFileName; + TWorkspace::Pointer m_Workspace; + + std::string m_BaseWindowTitle; Pipeline::Canvas* m_Canvas; Plugins::Navigator* m_Navigator;