50 #include <QPushButton>
63 using namespace YACS::HMI;
68 ItemEditionBase::ItemEditionBase(
Subject* subject)
95 _type =
"Control Link";
100 switch (sub->getTypeCode()->kind())
110 default:
_type =
"None or Unknown";
116 _type =
"Salome Component";
121 _type = sub->getLabelForHuman();
131 DEBTRACE(
"ItemEditionBase::select " << isSelected);
156 DEBTRACE(
"ItemEdition::ItemEdition " << name);
162 connect(
_wid->pb_apply, SIGNAL(clicked()),
this, SLOT(
onApply()));
163 connect(
_wid->pb_cancel, SIGNAL(clicked()),
this, SLOT(
onCancel()));
169 connect(
_wid->le_name, SIGNAL(textChanged(
const QString&)),
171 _wid->le_name->setReadOnly(
true);
200 DEBTRACE(
"ItemEdition::select " << isSelected);
217 string name =
_wid->le_name->text().toStdString();
219 bool nameEdited =
false;
246 for (
int i= 0;
i< name.size();
i++)
248 unsigned char a = (
unsigned char)(name[
i]);
249 if ( ((a >=
'0') && (a <=
'9'))
250 || ((a >=
'A') && (a <=
'Z'))
251 || ((a >=
'a') && (a <=
'z'))
255 DEBTRACE(name <<
" " << nameFiltered);
266 DEBTRACE(
"ItemEdition::setEdited " << isEdited);
287 model->
setData(index, QVariant());
290 _wid->pb_apply->setEnabled(isEdited);
291 _wid->pb_cancel->setEnabled(isEdited);
430 DEBTRACE(
"ItemEdition::update() ADD, type not handled:" << type);
442 DEBTRACE(
"ItemEdition::update() ADDLINK, type not handled:" << type);
454 DEBTRACE(
"ItemEdition::update() ADDCONTROLLINK, type not handled:" << type);
474 DEBTRACE(
"ItemEditionRoot::ItemEditionRoot")