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() = default;
18 
19  void Reset(void) override; // MythUIType
20 
21  enum LayoutType { LayoutVertical, LayoutHorizontal };
22  enum EffectType { EffectReveal, EffectSlide, EffectAnimate };
23 
24  void SetStart(int);
25  void SetUsed(int);
26  void SetTotal(int);
27  int GetUsed(void) { return m_current; }
28  void SetVisible(bool visible) override; // MythUIType
29 
30  protected:
31  bool ParseElement(const QString &filename, QDomElement &element,
32  bool showWarnings) override; // MythUIType
33  void CopyFrom(MythUIType *base) override; // MythUIType
34  void CreateCopy(MythUIType *parent) override; // MythUIType
35  void Finalize(void) override; // MythUIType
36 
37  LayoutType m_layout {LayoutHorizontal};
38  EffectType m_effect {EffectReveal};
39 
40  int m_total {0};
41  int m_start {0};
42  int m_current {0};
43  bool m_firstdepend {true};
44 
45  void CalculatePosition(void);
46 };
47 
48 #endif
The base class on which all widgets and screens are based.
Definition: mythuitype.h:63
virtual void CreateCopy(MythUIType *parent)
Copy the state of this widget to the one given, it must be of the same type.
virtual void SetVisible(bool visible)
const char * name
Definition: ParseText.cpp:328
MythUIProgressBar(MythUIType *parent, const QString &name)
virtual void Reset(void)
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuitype.cpp:69
#define MUI_PUBLIC
Definition: mythuiexp.h:9
virtual void CopyFrom(MythUIType *base)
Copy this widgets state from another.
Progress bar widget.
virtual bool ParseElement(const QString &filename, QDomElement &element, bool showWarnings)
Parse the xml definition of this widget setting the state of the object accordingly.
virtual void Finalize(void)
Perform any post-xml parsing initialisation tasks.