Salome HOME
Issue #273: Add copyright string
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetLabel.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModuleBase_WidgetLabel.cpp
4 // Created:     03 Dec 2014
5 // Author:      Vitaly SMETANNIKOV
6
7 #include "ModuleBase_WidgetLabel.h"
8
9 #include <Config_WidgetAPI.h>
10
11 #include <QLabel>
12
13
14 ModuleBase_WidgetLabel::ModuleBase_WidgetLabel(QWidget* theParent,
15                                                      const Config_WidgetAPI* theData,
16                                                      const std::string& theParentId)
17     : ModuleBase_ModelWidget(theParent, theData, theParentId)
18 {
19   QString aText = QString::fromStdString(theData->getProperty("title"));
20   myLabel = new QLabel(aText, theParent);
21   myLabel->setWordWrap(true);
22   myLabel->setIndent(5);
23 }
24
25 ModuleBase_WidgetLabel::~ModuleBase_WidgetLabel()
26 {
27 }
28
29 QList<QWidget*> ModuleBase_WidgetLabel::getControls() const
30 {
31   return QList<QWidget*>();
32 }
33
34 QWidget* ModuleBase_WidgetLabel::getControl() const
35 {
36   return myLabel;
37 }