Commit e22da282 authored by Jan Möbius's avatar Jan Möbius

Added Pluginfunctions to get and set encoded views

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7041 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 1d8435db
...@@ -145,6 +145,41 @@ unsigned int activeExaminer( ) { ...@@ -145,6 +145,41 @@ unsigned int activeExaminer( ) {
return activeExaminer_; return activeExaminer_;
} }
QString getEncodedExaminerView() {
return getEncodedExaminerView(activeExaminer());
}
/// Get the encoded view for the given
QString getEncodedExaminerView(int _viewerId) {
QString view;
if ( _viewerId < 0 || _viewerId >= (int)examiner_widgets_.size() ) {
std::cerr << "Requested unknown viewer with id : " << _viewerId << std::endl;
examiner_widgets_[activeExaminer()]->encodeView ( view );
return view;
}
examiner_widgets_[_viewerId]->encodeView ( view );
return view;
}
void setEncodedExaminerView( QString _view ) {
setEncodedExaminerView( activeExaminer() , _view );
}
void setEncodedExaminerView(int _viewerId , QString _view ) {
if ( _viewerId < 0 || _viewerId >= (int)examiner_widgets_.size() ) {
std::cerr << "Requested unknown viewer with id : " << _viewerId << std::endl;
examiner_widgets_[activeExaminer()]->decodeView ( _view );
}
examiner_widgets_[_viewerId]->decodeView ( _view );
}
void setRootNode( SeparatorNode* _root_node ) { void setRootNode( SeparatorNode* _root_node ) {
PluginFunctions::root_node_ = _root_node; PluginFunctions::root_node_ = _root_node;
} }
......
...@@ -197,6 +197,22 @@ void setActiveExaminer( const unsigned int _id ); ...@@ -197,6 +197,22 @@ void setActiveExaminer( const unsigned int _id );
DLLEXPORT DLLEXPORT
unsigned int activeExaminer(); unsigned int activeExaminer();
/// Get the encoded view for the active examiner
DLLEXPORT
QString getEncodedExaminerView();
/// Get the encoded view for the given
DLLEXPORT
QString getEncodedExaminerView(int _viewerId);
/// Set the encoded view for the active examiner
DLLEXPORT
void setEncodedExaminerView( QString _view );
/// Set the encoded view for the given
DLLEXPORT
void setEncodedExaminerView(int _viewerId , QString _view );
/** /**
* Set center of scene * Set center of scene
*/ */
......
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