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() override = 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, 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
MythUIImage
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:97
MUI_PUBLIC
#define MUI_PUBLIC
Definition: mythuiexp.h:9
MythUIEditBar
A narrow purpose widget used to represent cut positions and regions when editing a video.
Definition: mythuieditbar.h:16
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
MythUIEditBar::m_invregions
QList< QPair< float, float > > m_invregions
Definition: mythuieditbar.h:49
MythUIType::CopyFrom
virtual void CopyFrom(MythUIType *base)
Copy this widgets state from another.
Definition: mythuitype.cpp:1174
MythUIEditBar::MythUIEditBar
MythUIEditBar(MythUIType *parent, const QString &name)
Definition: mythuieditbar.h:19
MythUIType
The base class on which all widgets and screens are based.
Definition: mythuitype.h:85
MythUIShape
A widget for rendering primitive shapes and lines.
Definition: mythuishape.h:21
MythUIEditBar::m_images
QList< MythUIType * > m_images
Definition: mythuieditbar.h:50
MythUIEditBar::m_regions
QList< QPair< float, float > > m_regions
Definition: mythuieditbar.h:48
MythUIType::Finalize
virtual void Finalize(void)
Perform any post-xml parsing initialisation tasks.
Definition: mythuitype.cpp:1316
mythuitype.h