MythTV  master
mythuieditbar.h
Go to the documentation of this file.
1 #ifndef MYTHUI_EDITBAR_H_
2 #define MYTHUI_EDITBAR_H_
3 
4 #include "mythuitype.h"
5 
6 class MythUIImage;
7 class MythUIShape;
8 
17 {
18  public:
19  MythUIEditBar(MythUIType *parent, const QString &name)
20  : MythUIType(parent, name) {}
21  ~MythUIEditBar() = default;
22 
23  void SetTotal(double total);
24  void SetEditPosition(double position);
25  void SetEditPosition(long long position);
26  void AddRegion(double start, double end);
27  void SetTotal(long long total);
28  void AddRegion(long long start, long long end);
29  void ClearRegions(void);
30  void Display(void);
31  void ReleaseImages(void);
32 
33  protected:
34  void CopyFrom(MythUIType *base) override; // MythUIType
35  void CreateCopy(MythUIType *parent) override; // MythUIType
36  void Finalize(void) override; // MythUIType
37 
38  private:
39 
40  void AddBar(MythUIShape *shape, MythUIImage *image, const QRect &area);
41  void AddMark(MythUIShape *shape, MythUIImage *image, int start, bool left);
42  MythUIType* GetNew(MythUIShape *shape, MythUIImage *image);
43  void CalcInverseRegions(void);
44  void ClearImages(void);
45 
46  float m_editPosition {0.0F};
47  double m_total {1.0};
48  QList<QPair<float,float> > m_regions;
49  QList<QPair<float,float> > m_invregions;
50  QList<MythUIType*> m_images;
51 };
52 
53 #endif
QList< QPair< float, float > > m_regions
Definition: mythuieditbar.h:48
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:97
QList< MythUIType * > m_images
Definition: mythuieditbar.h:50
The base class on which all widgets and screens are based.
Definition: mythuitype.h:63
MythUIEditBar(MythUIType *parent, const QString &name)
Definition: mythuieditbar.h:19
virtual void CreateCopy(MythUIType *parent)
Copy the state of this widget to the one given, it must be of the same type.
A widget for rendering primitive shapes and lines.
Definition: mythuishape.h:21
const char * name
Definition: ParseText.cpp:328
QList< QPair< float, float > > m_invregions
Definition: mythuieditbar.h:49
#define MUI_PUBLIC
Definition: mythuiexp.h:9
virtual void CopyFrom(MythUIType *base)
Copy this widgets state from another.
A narrow purpose widget used to represent cut positions and regions when editing a video.
Definition: mythuieditbar.h:16
virtual void Finalize(void)
Perform any post-xml parsing initialisation tasks.