X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetLabel.cpp;h=3abae6c7b704c9062981fd4ee87f8da1b9b25afc;hb=2413ba5e387ebc030eb89aaad917991844ae518d;hp=e5b090be644c03ef47d544c0180eeaea837a170a;hpb=a7f44a41bdf29e7bd978ff3b8c8bd514d1223be7;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetLabel.cpp b/src/ModuleBase/ModuleBase_WidgetLabel.cpp index e5b090be6..3abae6c7b 100644 --- a/src/ModuleBase/ModuleBase_WidgetLabel.cpp +++ b/src/ModuleBase/ModuleBase_WidgetLabel.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: ModuleBase_WidgetLabel.cpp // Created: 03 Dec 2014 // Author: Vitaly SMETANNIKOV @@ -5,19 +7,26 @@ #include "ModuleBase_WidgetLabel.h" #include +#include #include +#include ModuleBase_WidgetLabel::ModuleBase_WidgetLabel(QWidget* theParent, - const Config_WidgetAPI* theData, - const std::string& theParentId) + const Config_WidgetAPI* theData, + const std::string& theParentId) : ModuleBase_ModelWidget(theParent, theData, theParentId) { QString aText = QString::fromStdString(theData->getProperty("title")); myLabel = new QLabel(aText, theParent); myLabel->setWordWrap(true); myLabel->setIndent(5); + myLabel->setAlignment(Qt::AlignLeft | Qt::AlignTop); + QVBoxLayout* aLayout = new QVBoxLayout(this); + ModuleBase_Tools::zeroMargins(aLayout); + aLayout->addWidget(myLabel); + setLayout(aLayout); } ModuleBase_WidgetLabel::~ModuleBase_WidgetLabel() @@ -29,7 +38,3 @@ QList ModuleBase_WidgetLabel::getControls() const return QList(); } -QWidget* ModuleBase_WidgetLabel::getControl() const -{ - return myLabel; -}