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 : ModuleBase_ModelWidget(theParent, theData)
20 QString aText = QString::fromStdString(theData->getProperty("title"));
21 myLabel = new QLabel(aText, theParent);
22 myLabel->setWordWrap(true);
23 myLabel->setIndent(5);
24 myLabel->setAlignment(Qt::AlignLeft | Qt::AlignTop);
25 QVBoxLayout* aLayout = new QVBoxLayout(this);
26 ModuleBase_Tools::zeroMargins(aLayout);
27 aLayout->addWidget(myLabel);
31 ModuleBase_WidgetLabel::~ModuleBase_WidgetLabel()
35 QList<QWidget*> ModuleBase_WidgetLabel::getControls() const
37 return QList<QWidget*>();