+
+//=================================================================================
+// class : SMESHGUI_strParameter
+// purpose :
+//=================================================================================
+SMESHGUI_strParameter::SMESHGUI_strParameter(const QString& theInitValue,
+ const QString& theLabel)
+ :SMESHGUI_aParameter(theLabel),
+ _initValue( theInitValue )
+{
+}
+SMESHGUI_aParameter::Type SMESHGUI_strParameter::GetType() const
+{
+ return SMESHGUI_aParameter::TEXT;
+}
+bool SMESHGUI_strParameter::GetNewInt( int & theValue ) const
+{
+ return false;
+}
+bool SMESHGUI_strParameter::GetNewDouble( double & Value ) const
+{
+ return false;
+}
+bool SMESHGUI_strParameter::GetNewText( QString & theValue ) const
+{
+ theValue = _newValue;
+ return _newValue != _initValue;
+}
+void SMESHGUI_strParameter::InitializeWidget( QWidget* theQWidget) const
+{
+ QTextEdit * anEdit = dynamic_cast< QTextEdit *>( theQWidget );
+ if ( anEdit ) {
+ anEdit->setText( _initValue );
+ }
+}
+void SMESHGUI_strParameter::TakeValue( QWidget* theQWidget)
+{
+ QTextEdit * anEdit = dynamic_cast< QTextEdit *>( theQWidget );
+ if ( anEdit )
+ _newValue = anEdit->text();
+}