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
6class MythUIImage;
7class 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
A narrow purpose widget used to represent cut positions and regions when editing a video.
Definition: mythuieditbar.h:17
QList< QPair< float, float > > m_invregions
Definition: mythuieditbar.h:49
MythUIEditBar(MythUIType *parent, const QString &name)
Definition: mythuieditbar.h:19
~MythUIEditBar() override=default
QList< MythUIType * > m_images
Definition: mythuieditbar.h:50
QList< QPair< float, float > > m_regions
Definition: mythuieditbar.h:48
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:98
A widget for rendering primitive shapes and lines.
Definition: mythuishape.h:22
The base class on which all widgets and screens are based.
Definition: mythuitype.h:86
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.
#define MUI_PUBLIC
Definition: mythuiexp.h:9