36 using namespace YACS::HMI;
38 EditionSwitch::EditionSwitch(
Subject* subject,
47 _tvSwitch->sb_select->setMinimum(INT_MIN);
48 _tvSwitch->sb_select->setMaximum(INT_MAX);
49 connect(
_tvSwitch->sb_select, SIGNAL(valueChanged(
const QString &)),
68 DEBTRACE(
"EditionSwitch::synchronize");
73 QModelIndex parentIndex = schemaItem->
modelIndex();
74 _tvSwitch->tv_nodes->setRootIndex(parentIndex);
75 int numRows = model->
rowCount(parentIndex);
76 for (
int row = 0; row < numRows; ++row)
78 QModelIndex index = model->
index(row, 0, parentIndex);
82 if (dynamic_cast<SubjectNode*>(sub))
84 _tvSwitch->tv_nodes->setRowHidden(row, hidden);
93 DEBTRACE(
"EditionSwitch::onModifySelect " << text.toStdString());
96 sswitch->setSelect(text.toStdString());
109 istringstream ss(val);
124 DEBTRACE(
"EditionSwitch::onCommitData " << editor);
136 bool isOk = sswitch->
setCase(val.toStdString(), snode);