MythTV  master
mythuiprogressbar.h
Go to the documentation of this file.
1 #ifndef MYTHUI_PROGRESSBAR_H_
2 #define MYTHUI_PROGRESSBAR_H_
3 
4 #include "mythuitype.h"
5 
13 {
14  public:
15  MythUIProgressBar(MythUIType *parent, const QString &name)
16  : MythUIType(parent, name) {}
17  ~MythUIProgressBar() override = default;
18 
19  void Reset(void) override; // MythUIType
20 
21  enum LayoutType { LayoutVertical, LayoutHorizontal };
22  enum EffectType { EffectReveal, EffectSlide, EffectAnimate };
23 
24  void Set(int start, int total, int used);
25  void SetStart(int value);
26  void SetUsed(int value);
27  void SetTotal(int value);
28  int GetUsed(void) const { return m_current; }
29  void SetVisible(bool visible) override; // MythUIType
30 
31  protected:
32  bool ParseElement(const QString &filename, QDomElement &element,
33  bool showWarnings) override; // MythUIType
34  void CopyFrom(MythUIType *base) override; // MythUIType
35  void CreateCopy(MythUIType *parent) override; // MythUIType
36  void Finalize(void) override; // MythUIType
37 
38  LayoutType m_layout {LayoutHorizontal};
39  EffectType m_effect {EffectReveal};
40 
41  int m_total {0};
42  int m_start {0};
43  int m_current {0};
44  bool m_firstdepend {true};
45 
46  void CalculatePosition(void);
47 };
48 
49 #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:1231
MythUIProgressBar
Progress bar widget.
Definition: mythuiprogressbar.h:12
MythUIType::CopyFrom
virtual void CopyFrom(MythUIType *base)
Copy this widgets state from another.
Definition: mythuitype.cpp:1174
MythUIType::Reset
virtual void Reset(void)
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuitype.cpp:72
MythUIType
The base class on which all widgets and screens are based.
Definition: mythuitype.h:85
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1108
MythUIProgressBar::LayoutVertical
@ LayoutVertical
Definition: mythuiprogressbar.h:21
MythUIProgressBar::GetUsed
int GetUsed(void) const
Definition: mythuiprogressbar.h:28
MythUIProgressBar::MythUIProgressBar
MythUIProgressBar(MythUIType *parent, const QString &name)
Definition: mythuiprogressbar.h:15
MythUIProgressBar::LayoutType
LayoutType
Definition: mythuiprogressbar.h:21
MythUIType::ParseElement
virtual bool ParseElement(const QString &filename, QDomElement &element, bool showWarnings)
Parse the xml definition of this widget setting the state of the object accordingly.
Definition: mythuitype.cpp:1240
build_compdb.filename
filename
Definition: build_compdb.py:21
MythUIType::Finalize
virtual void Finalize(void)
Perform any post-xml parsing initialisation tasks.
Definition: mythuitype.cpp:1316
mythuitype.h
MythUIProgressBar::EffectType
EffectType
Definition: mythuiprogressbar.h:22