MythTV  master
mythuisimpletext.h
Go to the documentation of this file.
1 #ifndef MYTHUI_SIMPLE_TEXT_H_
2 #define MYTHUI_SIMPLE_TEXT_H_
3 
4 // QT headers
5 #include <QColor>
6 
7 // Mythui headers
8 #include "mythuitype.h"
9 #include "mythfontproperties.h"
10 
11 class MythFontProperties;
12 
23 {
24  public:
25  MythUISimpleText(MythUIType *parent, const QString &name)
26  : MythUIType(parent, name) {}
27  MythUISimpleText(const QString &text, const MythFontProperties &font,
28  const QRect &rect, Qt::Alignment align,
29  MythUIType *parent, const QString &name);
30  ~MythUISimpleText() override = default;
31 
32  protected:
33  void DrawSelf(MythPainter *p, int xoffset, int yoffset,
34  int alphaMod, QRect clipRect) override; // MythUIType
35 
36  void CopyFrom(MythUIType *base) override; // MythUIType
37  void CreateCopy(MythUIType *parent) override; // MythUIType
38 
39  Qt::Alignment m_justification {Qt::AlignLeft | Qt::AlignTop};
41  QString m_message;
42 };
43 
44 #endif
MUI_PUBLIC
#define MUI_PUBLIC
Definition: mythuiexp.h:9
MythUIType::CreateCopy
virtual void CreateCopy(MythUIType *parent)
Copy the state of this widget to the one given, it must be of the same type.
Definition: mythuitype.cpp:1209
MythUIType::DrawSelf
virtual void DrawSelf(MythPainter *p, int xoffset, int yoffset, int alphaMod, QRect clipRect)
Definition: mythuitype.cpp:463
mythfontproperties.h
MythUISimpleText::~MythUISimpleText
~MythUISimpleText() override=default
hardwareprofile.config.p
p
Definition: config.py:33
MythFontProperties
Definition: mythfontproperties.h:14
MythUIType::CopyFrom
virtual void CopyFrom(MythUIType *base)
Copy this widgets state from another.
Definition: mythuitype.cpp:1152
MythUISimpleText::MythUISimpleText
MythUISimpleText(MythUIType *parent, const QString &name)
Definition: mythuisimpletext.h:25
MythUIType
The base class on which all widgets and screens are based.
Definition: mythuitype.h:64
MythUISimpleText::m_font
MythFontProperties m_font
Definition: mythuisimpletext.h:40
MythPainter
Definition: mythpainter.h:33
MythUISimpleText::m_message
QString m_message
Definition: mythuisimpletext.h:41
MythUISimpleText
Simplified text widget, displays a text string.
Definition: mythuisimpletext.h:23
mythuitype.h