setAttribute( Qt::WA_DeleteOnClose );
myToolMgr = new QtxActionToolMgr( this );
+
+ setCustomData(QString("VectorsMode"), QVariant(false));
}
/*! Destructor.*/
{
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();
+}
#include "SUIT.h"
#include <QMainWindow>
+#include <QMap>
+#include <QVariant>
class SUIT_Desktop;
class SUIT_ViewManager;
void setDestructiveClose( const bool );
int getId() const;
+
+ void setCustomData (const QString& name, const QVariant& data);
+
+ QVariant getCustomData (const QString & name) const;
QtxActionToolMgr* toolMgr() const;
private:
QtxActionToolMgr* myToolMgr;
+ QMap<QString, QVariant> myCustomData;
};
#endif // !defined(AFX_SUIT_VIEWWINDOW_H__82C3D51A_6F10_45B0_BCFE_3CB3EF596A4D__INCLUDED_)