#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);
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()
return QList<QWidget*>();
}
-QWidget* PartSet_WidgetSketchLabel::getControl() const
-{
- return myLabel;
-}
-
void PartSet_WidgetSketchLabel::onPlaneSelected()
{
XGUI_Selection* aSelection = myWorkshop->selector()->selection();