38 using namespace YACS::HMI;
39 using namespace YACS::ENGINE;
49 connect(le_name, SIGNAL(textChanged(
const QString&)),
this, SLOT(
onModifyName(
const QString&)));
50 connect(cb_resource, SIGNAL(activated(
const QString&)),
_advancedParams, SLOT(onModifyResource(
const QString&)));
60 DEBTRACE(
"FormContainer::FillPanel");
70 le_name->setText(
"not defined");
75 cb_resource->addItem(
"automatic");
78 list<string>
machines = QtGuiContext::getQtCurrent()->getGMain()->getMachineList();
79 list<string>::iterator itm = machines.begin();
80 for( ; itm != machines.end(); ++itm)
82 cb_resource->addItem(QString((*itm).c_str()));
89 int index = cb_resource->findText(
_properties[
"name"].c_str());
93 cb_resource->setCurrentIndex(index);
99 std::string item=
"Unknown resource ("+
_properties[
"name"]+
")";
100 cb_resource->addItem(item.c_str());
101 cb_resource->setCurrentIndex(cb_resource->count()-1);
105 cb_resource->setCurrentIndex(0);
108 if (!QtGuiContext::getQtCurrent()->isEdition())
111 le_name->setReadOnly(
true);
112 cb_resource->setEnabled(
false);
118 DEBTRACE(
"FormContainerBase::onModified");
119 Subject *sub(QtGuiContext::getQtCurrent()->getSelectedSubject());
122 YASSERT(QtGuiContext::getQtCurrent()->_mapOfEditionItem.count(sub));
123 QWidget *widget(QtGuiContext::getQtCurrent()->_mapOfEditionItem[sub]);
124 ItemEdition *item(dynamic_cast<ItemEdition*>(widget));
131 DEBTRACE(
"FormContainer::on_ch_advance_stateChanged " << state);
140 DEBTRACE(
"onModifyName " << text.toStdString());
143 string name = scont->getName();
144 if (name != text.toStdString())
152 bool ret(scont->
setName(le_name->text().toStdString()));