Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions plugins/qtosgrave/qtosgviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ QtOSGViewer::QtOSGViewer(EnvironmentBasePtr penv, std::istream& sinput, QCoreApp
// figure out window title
//

std::string name = str(boost::format("OpenRAVE %s")%OPENRAVE_VERSION_STRING);
_name = str(boost::format("OpenRAVE %s")%OPENRAVE_VERSION_STRING);
if( (OPENRAVE_VERSION_MINOR%2) || (OPENRAVE_VERSION_PATCH%2) ) {
name += " (Development Version)";
_name += " (Development Version)";
}
else {
name += " (Stable Release)";
_name += " (Stable Release)";
}
setWindowTitle(name.c_str());
setWindowTitle(_name.c_str());

if(bCreateStatusBar) {
statusBar()->showMessage(tr("Status Bar"));
Expand Down Expand Up @@ -2085,6 +2085,7 @@ void QtOSGViewer::_SetCropContainerMarginsVisible(const std::string& bodyName, c
void QtOSGViewer::SetName(const string& name)
{
_PostToGUIThread(boost::bind(&QtOSGViewer::_SetName, this, name), ViewerCommandPriority::LOW);
_name = name;
}

void QtOSGViewer::_SetName(const string& name)
Expand Down
4 changes: 4 additions & 0 deletions plugins/qtosgrave/qtosgviewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ class QtOSGViewer : public QMainWindow, public ViewerBase

/// \brief Set title of the viewer window
virtual void SetName(const string& name);
virtual inline const std::string& GetName() const {
return _name;
}

/// \brief Set User-defined text to be displayed in the viewer window
virtual void SetUserText(const string& userText);
Expand Down Expand Up @@ -422,6 +425,7 @@ public slots:
bool _PanCameraYDirectionCommand(ostream& sout, istream& sinput);
bool _SetCropContainerMarginsVisibleCommand(ostream& sout, istream& sinput);

std::string _name;
QCoreApplication* _pQtApp = nullptr; // the main application, do not delete
//@{ Message Queue
std::map<ViewerCommandPriority, list<GUIThreadFunctionPtr> > _mapGUIFunctionLists; ///< map between priority and sublist for given priority level. protected by _mutexGUIFunctions
Expand Down
Loading