30 #include <QHeaderView>
39 using namespace YACS::HMI;
44 setDragDropMode(QAbstractItemView::DragDrop);
47 setDropIndicatorShown(
true);
65 QTreeView::setModel(model);
72 QModelIndex ind0 = ind.sibling(ind.row(), 0);
82 setExpanded(index,
true);
83 resizeColumnToContents(0);
86 setColumnHidden(
YType,
false);
87 setColumnHidden(
YValue,
false);
88 setColumnWidth(
YType, 100);
89 setColumnWidth(
YValue, 100);
93 setColumnHidden(
YType,
true);
94 setColumnHidden(
YState,
false);
95 setColumnWidth(
YState, 100);
101 if (event->type() == QEvent::WhatsThisClicked)
103 QWhatsThisClickedEvent* clicked =
static_cast<QWhatsThisClickedEvent*
>(
event);
108 if (event->type() == QEvent::ToolTip)
110 QHelpEvent *helpEvent =
static_cast<QHelpEvent *
>(
event);
111 QModelIndex index = indexAt(helpEvent->pos());
114 QString valtip = model()->data(index, Qt::ToolTipRole).toString();
115 QToolTip::showText(helpEvent->globalPos(), valtip);
118 QToolTip::hideText();
120 return QTreeView::event(event);
125 QModelIndexList selList = selectedIndexes();
126 if (selList.isEmpty())
128 QModelIndex selected = selList.front();
129 if (selected.isValid())
132 item->
popupMenu(
this, event->globalPos());
145 DEBTRACE(
"TreeView::onCommitData " << editor);
149 string strval = val.toStdString();
161 strval =
"\"" + strval +
"\"";
180 isOk = sswitch->
setCase(strval, snode);