]> SALOME platform Git repositories - modules/hydro.git/blob - src/HYDROData/HYDROData_VisualState.cxx
Salome HOME
1) Improved visibility management
[modules/hydro.git] / src / HYDROData / HYDROData_VisualState.cxx
1 #include <HYDROData_VisualState.h>
2
3 #include <TDataStd_AsciiString.hxx>
4
5 IMPLEMENT_STANDARD_HANDLE(HYDROData_VisualState, HYDROData_Object)
6 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_VisualState, HYDROData_Object)
7
8 HYDROData_VisualState::HYDROData_VisualState()
9 {
10 }
11
12 HYDROData_VisualState::~HYDROData_VisualState()
13 {
14 }
15
16 void HYDROData_VisualState::SetState( const QString& theState )
17 {
18   TCollection_AsciiString aString;
19   Handle(TDataStd_AsciiString) aState;
20   if( !myLab.FindAttribute( TDataStd_AsciiString::GetID(), aState ) )
21     aState = TDataStd_AsciiString::Set( myLab, aString );
22   aString.AssignCat( theState.toLatin1().constData() );
23   aState->Set( aString );
24 }
25
26 QString HYDROData_VisualState::GetState() const
27 {
28   Handle(TDataStd_AsciiString) aState;
29   if( !myLab.FindAttribute( TDataStd_AsciiString::GetID(), aState ) )
30     return QString();
31   return QString( aState->Get().ToCString() );
32 }