]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PartSet/PartSet_WidgetSketchLabel.cpp
Salome HOME
Property panel widgets redesign
[modules/shaper.git] / src / PartSet / PartSet_WidgetSketchLabel.cpp
index f3001c881b3325eeb4f240d2d84406c932a83ccd..5925437ed68ebcdf91fe921535220636c0141e50 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <ModuleBase_Operation.h>
 #include <ModuleBase_ViewerPrs.h>
+#include <ModuleBase_Tools.h>
 
 #include <GeomAlgoAPI_FaceBuilder.h>
 #include <GeomDataAPI_Point.h>
 #include <QLabel>
 #include <QTimer>
 #include <QApplication>
+#include <QVBoxLayout>
 
 
 PartSet_WidgetSketchLabel::PartSet_WidgetSketchLabel(QWidget* theParent,
                                                      const Config_WidgetAPI* theData,
                                                      const std::string& theParentId)
-    : ModuleBase_ModelWidget(theParent, theData, theParentId), myPreviewDisplayed(false)
+    : ModuleBase_ModelWidget(theParent, theData, theParentId),
+      myPreviewDisplayed(false),
+      myWorkshop(NULL)
 {
   myText = QString::fromStdString(theData->getProperty("title"));
   myLabel = new QLabel("", theParent);
@@ -54,6 +58,11 @@ PartSet_WidgetSketchLabel::PartSet_WidgetSketchLabel(QWidget* theParent,
   mySelectionTimer = new QTimer(this);
   connect(mySelectionTimer, SIGNAL(timeout()), SLOT(setSketchingMode()));
   mySelectionTimer->setSingleShot(true);
+
+  QVBoxLayout* aLayout = new QVBoxLayout(this);
+  ModuleBase_Tools::zeroMargins(aLayout);
+  aLayout->addWidget(myLabel);
+  setLayout(aLayout);
 }
 
 PartSet_WidgetSketchLabel::~PartSet_WidgetSketchLabel()
@@ -66,11 +75,6 @@ QList<QWidget*> PartSet_WidgetSketchLabel::getControls() const
   return QList<QWidget*>();
 }
 
-QWidget* PartSet_WidgetSketchLabel::getControl() const
-{
-  return myLabel;
-}
-
 void PartSet_WidgetSketchLabel::onPlaneSelected()
 {
   XGUI_Selection* aSelection = myWorkshop->selector()->selection();