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 : std::uint8_t { LayoutVertical, LayoutHorizontal };
22 enum EffectType : std::uint8_t { 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
Progress bar widget.
int GetUsed(void) const
MythUIProgressBar(MythUIType *parent, const QString &name)
~MythUIProgressBar() override=default
The base class on which all widgets and screens are based.
Definition: mythuitype.h:86
virtual void SetVisible(bool visible)
virtual void CopyFrom(MythUIType *base)
Copy this widgets state from another.
virtual void Finalize(void)
Perform any post-xml parsing initialisation tasks.
virtual void CreateCopy(MythUIType *parent)
Copy the state of this widget to the one given, it must be of the same type.
virtual void Reset(void)
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuitype.cpp:73
virtual bool ParseElement(const QString &filename, QDomElement &element, bool showWarnings)
Parse the xml definition of this widget setting the state of the object accordingly.
#define MUI_PUBLIC
Definition: mythuiexp.h:9