28 #include <QTreeWidget>
35 using namespace YACS::HMI;
41 Invocator *procInvoc = GuiContext::getCurrent()->getInvoc();
42 list<string> commandsDone = procInvoc->
getDone();
43 list<string> commandsUndone = procInvoc->
getUndone();
45 QList<QTreeWidgetItem *> itemsDone;
46 list<string>::iterator it;
47 for(it = commandsDone.begin(); it != commandsDone.end(); ++it)
49 (*it).erase((*it).rfind(
"\n"));
50 QTreeWidgetItem *commItem =
new QTreeWidgetItem((
QTreeWidget*)0, QStringList(QString((*it).c_str())));
51 itemsDone.append(commItem);
53 treeWdUndo->insertTopLevelItems(0, itemsDone);
55 QList<QTreeWidgetItem *> itemsUndone;
56 for(it = commandsUndone.begin(); it != commandsUndone.end(); ++it)
58 (*it).erase((*it).rfind(
"\n"));
59 QTreeWidgetItem *commItem =
new QTreeWidgetItem((
QTreeWidget*)0, QStringList(QString((*it).c_str())));
60 itemsUndone.append(commItem);
62 treeWdRedo->insertTopLevelItems(0, itemsUndone);