QString aCaseId = qs(myWidgetApi->getProperty(_ID));
ModuleBase_PageBase* aPage = new ModuleBase_PageWidget(aWidget);
createWidget(aPage);
- QWidget* aCasePageWidget = dynamic_cast<QWidget*>(aPage);
- if (aWdgType == WDG_SWITCH) {
- ModuleBase_WidgetSwitch* aSwitch = qobject_cast<ModuleBase_WidgetSwitch*>(aWidget);
- aSwitch->addPage(aCasePageWidget, aPageName);
- } else if (aWdgType == WDG_TOOLBOX) {
- ModuleBase_WidgetToolbox* aToolbox = qobject_cast<ModuleBase_WidgetToolbox*>(aWidget);
- aToolbox->addPage(aPage, aPageName, aCaseId);
+ if (aWdgType == WDG_SWITCH || aWdgType == WDG_TOOLBOX) {
+ ModuleBase_PagedContainer* aContainer = qobject_cast<ModuleBase_PagedContainer*>(aWidget);
+ aContainer->addPage(aPage, aPageName, aCaseId);
}
} while (myWidgetApi->toNextWidget());
}
} else if (theType == WDG_BOOLVALUE) {
result = new ModuleBase_WidgetBoolValue(theParent, myWidgetApi, myParentId);
- } else if (theType == WDG_DOUBLEVALUE_EDITOR) {
- result = new ModuleBase_WidgetEditor(theParent, myWidgetApi, myParentId);
-
} else if (theType == WDG_FILE_SELECTOR) {
result = new ModuleBase_WidgetFileSelector(theParent, myWidgetApi, myParentId);
} else if (theType == WDG_SWITCH) {
result = new ModuleBase_WidgetSwitch(theParent, myWidgetApi, myParentId);
- return result;
} else if (theType == WDG_TOOLBOX_BOX || theType == WDG_SWITCH_CASE) {
// Do nothing for "box" and "case"