From 0dd893f0dab3ed9f6d478a6e69f02f9ef8027b6a Mon Sep 17 00:00:00 2001 From: dmv Date: Thu, 9 Jul 2009 09:33:52 +0000 Subject: [PATCH] 0020082: EDF 869 GEOM : Edges Orientation indicator/reverse --- src/SUIT/SUIT_ViewWindow.cxx | 22 ++++++++++++++++++++++ src/SUIT/SUIT_ViewWindow.h | 7 +++++++ 2 files changed, 29 insertions(+) diff --git a/src/SUIT/SUIT_ViewWindow.cxx b/src/SUIT/SUIT_ViewWindow.cxx index cb7045eee..8c507dafd 100755 --- a/src/SUIT/SUIT_ViewWindow.cxx +++ b/src/SUIT/SUIT_ViewWindow.cxx @@ -54,6 +54,8 @@ SUIT_ViewWindow::SUIT_ViewWindow( SUIT_Desktop* theDesktop ) setAttribute( Qt::WA_DeleteOnClose ); myToolMgr = new QtxActionToolMgr( this ); + + setCustomData(QString("VectorsMode"), QVariant(false)); } /*! Destructor.*/ @@ -241,3 +243,23 @@ int SUIT_ViewWindow::getId() const { return int(long(this)); } + +/*! + Assign custom data to the view window. + \param name castom data name + \param value custom data value +*/ +void SUIT_ViewWindow::setCustomData(const QString& name, const QVariant& value) +{ + myCustomData[name] = value; +} + +/*! + Get custom data assigned to the view window. + \param name castom data name + \return custom data assigned to the window +*/ +QVariant SUIT_ViewWindow::getCustomData(const QString& name) const +{ + return myCustomData.contains( name ) ? myCustomData[name] : QVariant(); +} diff --git a/src/SUIT/SUIT_ViewWindow.h b/src/SUIT/SUIT_ViewWindow.h index 8fcf5102d..5c508cbe8 100755 --- a/src/SUIT/SUIT_ViewWindow.h +++ b/src/SUIT/SUIT_ViewWindow.h @@ -27,6 +27,8 @@ #include "SUIT.h" #include +#include +#include class SUIT_Desktop; class SUIT_ViewManager; @@ -56,6 +58,10 @@ public: void setDestructiveClose( const bool ); int getId() const; + + void setCustomData (const QString& name, const QVariant& data); + + QVariant getCustomData (const QString & name) const; QtxActionToolMgr* toolMgr() const; @@ -85,6 +91,7 @@ protected: private: QtxActionToolMgr* myToolMgr; + QMap myCustomData; }; #endif // !defined(AFX_SUIT_VIEWWINDOW_H__82C3D51A_6F10_45B0_BCFE_3CB3EF596A4D__INCLUDED_) -- 2.39.2