Version: 8.3.0
YACS::HMI::NameEditor Class Reference

#include <ValueDelegate.hxx>

Inheritance diagram for YACS::HMI::NameEditor:
Collaboration diagram for YACS::HMI::NameEditor:

Public Member Functions

 NameEditor (Subject *subject, const ValueDelegate *delegate, int column=0, QWidget *parent=0)
 
virtual ~NameEditor ()
 
virtual QString GetStrValue ()
 
virtual void setData (QVariant val)
 
- Public Member Functions inherited from YACS::HMI::GenericEditor
 GenericEditor ()
 
virtual ~GenericEditor ()
 
virtual void setSubject (Subject *subject)
 
virtual void setColumn (int column)
 
virtual void setDelegate (const ValueDelegate *delegate)
 
virtual SubjectgetSubject ()
 
virtual int getColumnInSubject ()
 
virtual bool firstSetData ()
 

Additional Inherited Members

- Protected Attributes inherited from YACS::HMI::GenericEditor
Subject_subject
 
int _column
 
const ValueDelegate_delegate
 
bool _first
 

Detailed Description

Definition at line 74 of file ValueDelegate.hxx.

Constructor & Destructor Documentation

NameEditor::NameEditor ( Subject subject,
const ValueDelegate delegate,
int  column = 0,
QWidget parent = 0 
)

Definition at line 132 of file ValueDelegate.cxx.

References DEBTRACE, YACS::HMI::GenericEditor::setColumn(), YACS::HMI::GenericEditor::setDelegate(), and YACS::HMI::GenericEditor::setSubject().

136  : QLineEdit(parent), GenericEditor()
137 {
138  DEBTRACE("NameEditor::NameEditor");
139  setDelegate(delegate);
140  setSubject(subject);
141  setColumn(column);
142 }
NameEditor::~NameEditor ( )
virtual

Definition at line 144 of file ValueDelegate.cxx.

145 {
146 }

Member Function Documentation

QString NameEditor::GetStrValue ( )
virtual

Reimplemented from YACS::HMI::GenericEditor.

Definition at line 148 of file ValueDelegate.cxx.

References DEBTRACE, and YACS::HMI::ItemEdition::filterName().

149 {
150  DEBTRACE("Name::GetStrValue " << text().toStdString());
151  string filtered = ItemEdition::filterName(text().toStdString());
152  return filtered.c_str();
153 }
void NameEditor::setData ( QVariant  val)
virtual

Reimplemented from YACS::HMI::GenericEditor.

Definition at line 155 of file ValueDelegate.cxx.

References DEBTRACE, and YACS::HMI::ItemEdition::filterName().

156 {
157  DEBTRACE("NameEditor::setData " << this);
158  DEBTRACE(val.canConvert<QString>());
159  DEBTRACE(val.toString().toStdString());
160  string filtered = ItemEdition::filterName(val.toString().toStdString());
161  setText(filtered.c_str());
162 }

The documentation for this class was generated from the following files: