1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModuleBase_WidgetLabel.cpp
4 // Created: 03 Dec 2014
5 // Author: Vitaly SMETANNIKOV
7 #include "ModuleBase_WidgetLabel.h"
9 #include <Config_WidgetAPI.h>
10 #include <ModuleBase_Tools.h>
13 #include <QVBoxLayout>
16 ModuleBase_WidgetLabel::ModuleBase_WidgetLabel(QWidget* theParent,
17 const Config_WidgetAPI* theData,
18 const std::string& theParentId)
19 : ModuleBase_ModelWidget(theParent, theData, theParentId)
21 QString aText = QString::fromStdString(theData->getProperty("title"));
22 myLabel = new QLabel(aText, theParent);
23 myLabel->setWordWrap(true);
24 myLabel->setIndent(5);
25 myLabel->setAlignment(Qt::AlignLeft | Qt::AlignTop);
26 QVBoxLayout* aLayout = new QVBoxLayout(this);
27 ModuleBase_Tools::zeroMargins(aLayout);
28 aLayout->addWidget(myLabel);
32 ModuleBase_WidgetLabel::~ModuleBase_WidgetLabel()
36 QList<QWidget*> ModuleBase_WidgetLabel::getControls() const
38 return QList<QWidget*>();