void XGUI_MenuGroupPanel::addCommand(XGUI_Command* theAction)
{
- myActions[theAction] = theAction->requestWidget(this);
- addWidget(myActions[theAction]);
+ myActions.append(theAction);
+ QWidget* aWdg = theAction->requestWidget(this);
+ myActionWidget.append(aWdg);
+ addWidget(aWdg);
}
void XGUI_MenuGroupPanel::placeWidget(QWidget* theWgt)
return;
myMaxRow = aMaxRow;
- QListIterator<QWidget*> aIt(myActions.values());
myNewRow = 0;
myNewCol = 0;
- while(aIt.hasNext()) {
- placeWidget(aIt.next());
+ foreach(QWidget* eachWidget, myActionWidget) {
+ placeWidget(eachWidget);
}
}
void placeWidget(QWidget* theWgt);
void addCommand(XGUI_Command* theAction);
- QMap<XGUI_Command*, QWidget*> myActions;
+ QList<XGUI_Command*> myActions;
+ QWidgetList myActionWidget;
+
QGridLayout* myLayout;
int myNewRow;
int myNewCol;