Salome HOME
#1083 errors in parameter
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetFactory.cpp
index b5d65a2cd05145ba9206506813fc602002f2ef39..bedab8cb3d1856681c88eb3140678b9c0f70e926 100644 (file)
@@ -25,6 +25,7 @@
 #include <ModuleBase_WidgetLineEdit.h>
 #include <ModuleBase_WidgetMultiSelector.h>
 #include <ModuleBase_WidgetLabel.h>
+#include <ModuleBase_WidgetErrorLabel.h>
 #include <ModuleBase_WidgetToolbox.h>
 #include <ModuleBase_PageBase.h>
 #include <ModuleBase_PageGroupBox.h>
@@ -106,7 +107,7 @@ void ModuleBase_WidgetFactory::createWidget(ModuleBase_PageBase* thePage)
             ModuleBase_PagedContainer* aContainer = qobject_cast<ModuleBase_PagedContainer*>(aWidget);
 
             QString anIconPath = qs( myWidgetApi->getProperty( CONTAINER_PAGE_ICON ) );
-            QIcon anIcon( anIconPath );
+            QPixmap anIcon( anIconPath );
             aContainer->addPage( aPage, aPageName, aCaseId, anIcon );
           }
         } while (myWidgetApi->toNextWidget());
@@ -124,6 +125,8 @@ ModuleBase_ModelWidget* ModuleBase_WidgetFactory::createWidgetByType(const std::
 
   if (theType == WDG_INFO) {
     result = new ModuleBase_WidgetLabel(theParent, myWidgetApi, myParentId);
+  } else if (theType == WDG_ERRORINFO) {
+    result = new ModuleBase_WidgetErrorLabel(theParent, myWidgetApi, myParentId);
   } else if (theType == WDG_DOUBLEVALUE) {
     result = new ModuleBase_WidgetDoubleValue(theParent, myWidgetApi, myParentId);
   } else if (theType == WDG_INTEGERVALUE) {
@@ -150,7 +153,8 @@ ModuleBase_ModelWidget* ModuleBase_WidgetFactory::createWidgetByType(const std::
     result = new ModuleBase_WidgetToolbox(theParent, myWidgetApi, myParentId);
   } else if (theType == WDG_SWITCH) {
     result = new ModuleBase_WidgetSwitch(theParent, myWidgetApi, myParentId);
-  } else if (theType == WDG_TOOLBOX_BOX || theType == WDG_SWITCH_CASE) {
+  } else if (theType == WDG_TOOLBOX_BOX || theType == WDG_SWITCH_CASE ||
+             theType == NODE_VALIDATOR) {
     // Do nothing for "box" and "case"
     result = NULL;
   } else {