MythTV  master
mythburn.h
Go to the documentation of this file.
1 #ifndef MYTHBURN_H_
2 #define MYTHBURN_H_
3 
4 // mythtv
5 #include <mythscreentype.h>
6 
7 // mytharchive
8 #include "archiveutil.h"
9 
10 class MythUIText;
11 class MythUIButton;
12 class MythUICheckBox;
13 class MythUIButtonList;
14 class MythUIProgressBar;
16 
18 {
19  Q_OBJECT
20 
21  public:
22  ProfileDialog(MythScreenStack *parent, ArchiveItem *archiveItem,
23  QList<EncoderProfile *> profileList)
24  : MythScreenType(parent, "functionpopup"),
25  m_archiveItem(archiveItem),
26  m_profileList(profileList) {}
27  bool Create() override; // MythScreenType
28 
29  signals:
30  void haveResult(int profile);
31 
32  private slots:
33  void save(void);
35 
36  private:
38  QList<EncoderProfile *> m_profileList;
39 
44 
48 };
49 
50 class MythBurn : public MythScreenType
51 {
52 
53  Q_OBJECT
54 
55  public:
56  MythBurn(MythScreenStack *parent,
57  MythScreenType *destinationScreen, MythScreenType *themeScreen,
58  ArchiveDestination archiveDestination, const QString& name);
59 
60  ~MythBurn(void);
61 
62  bool Create(void) override; // MythScreenType
63  bool keyPressEvent(QKeyEvent *) override; // MythScreenType
64 
65  void createConfigFile(const QString &filename);
66 
67  protected slots:
68  void handleNextPage(void);
69  void handlePrevPage(void);
70  void handleCancel(void);
71  void handleAddRecording(void);
72  void handleAddVideo(void);
73  void handleAddFile(void);
74 
75  void toggleUseCutlist(void);
76  void ShowMenu(void) override; // MythScreenType
77  void editDetails(void);
78  void editThumbnails(void);
79  void changeProfile(void);
80  void profileChanged(int profileNo);
81  void removeItem(void);
82  void selectorClosed(bool ok);
83  void editorClosed(bool ok, ArchiveItem *item);
85 
86  private:
87  void updateArchiveList(void);
88  void updateSizeBar();
89  void loadConfiguration(void);
90  void saveConfiguration(void);
91  EncoderProfile *getProfileFromName(const QString &profileName);
92  QString loadFile(const QString &filename);
93  bool isArchiveItemValid(const QString &type, const QString &filename);
94  void loadEncoderProfiles(void);
97  void runScript();
98 
102 
103  QList<ArchiveItem *> m_archiveList;
104  QList<EncoderProfile *> m_profileList;
105 
106  bool m_bCreateISO {false};
107  bool m_bDoBurn {false};
108  bool m_bEraseDvdRw {false};
109  QString m_saveFilename;
110  QString m_theme;
111 
112  bool m_moveMode {false};
113 
117 
123 
124  // size bar
130 };
131 
133 
134 class BurnMenu : public QObject
135 {
136  Q_OBJECT
137 
138  public:
139  BurnMenu(void);
140  ~BurnMenu(void) = default;
141 
142  void start(void);
143 
144  private:
145  void customEvent(QEvent *event) override; // QObject
146  void doBurn(int mode);
147 };
148 
149 #endif
150 
151 
MythUIText * m_oldSizeText
Definition: mythburn.h:42
QList< EncoderProfile * > m_profileList
Definition: mythburn.h:38
BurnMenu(void)
Definition: mythburn.cpp:1091
unsigned int slots[4]
Definition: element.c:38
MythScreenType * m_themeScreen
Definition: mythburn.h:100
QString m_saveFilename
Definition: mythburn.h:109
MythScreenType * m_destinationScreen
Definition: mythburn.h:99
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
MythUIText * m_maxsizeText
Definition: mythburn.h:126
A checkbox widget supporting three check states - on,off,half and two conditions - selected and unsel...
void haveResult(int profile)
QString m_theme
Definition: mythburn.h:110
MythUIButton * m_cancelButton
Definition: mythburn.h:116
void updateSizeBar()
Definition: mythburn.cpp:191
MythUIButton * m_okButton
Definition: mythburn.h:47
MythUICheckBox * m_enabledCheck
Definition: mythburn.h:46
void createConfigFile(const QString &filename)
Definition: mythburn.cpp:562
QString loadFile(const QString &filename)
Definition: mythburn.cpp:362
void itemClicked(MythUIButtonListItem *item)
Definition: mythburn.cpp:1006
MythUIText * m_minsizeText
Definition: mythburn.h:127
void profileChanged(MythUIButtonListItem *item)
Definition: mythburn.cpp:1062
MythUIButton * m_nextButton
Definition: mythburn.h:114
void save(void)
Definition: mythburn.cpp:1082
void editorClosed(bool ok, ArchiveItem *item)
Definition: mythburn.cpp:847
void handleCancel(void)
Definition: mythburn.cpp:355
EncoderProfile * getDefaultProfile(ArchiveItem *item)
Definition: mythburn.cpp:512
MythUIText * m_descriptionText
Definition: mythburn.h:41
MythUIText * m_currentsizeText
Definition: mythburn.h:129
void toggleUseCutlist(void)
Definition: mythburn.cpp:304
bool m_bDoBurn
Definition: mythburn.h:107
void runScript()
Definition: mythburn.cpp:904
ArchiveDestination m_archiveDestination
Definition: mythburn.h:101
ProfileDialog(MythScreenStack *parent, ArchiveItem *archiveItem, QList< EncoderProfile * > profileList)
Definition: mythburn.h:22
MythUIButton * m_prevButton
Definition: mythburn.h:115
void saveConfiguration(void)
Definition: mythburn.cpp:710
bool Create() override
Definition: mythburn.cpp:1018
void customEvent(QEvent *event) override
Definition: mythburn.cpp:1124
bool Create(void) override
Definition: mythburn.cpp:74
~BurnMenu(void)=default
ArchiveItem * m_archiveItem
Definition: mythburn.h:37
void ShowMenu(void) override
Definition: mythburn.cpp:762
void handleAddFile(void)
Definition: mythburn.cpp:989
bool m_bEraseDvdRw
Definition: mythburn.h:108
MythUIButton * m_addvideoButton
Definition: mythburn.h:121
MythBurn(MythScreenStack *parent, MythScreenType *destinationScreen, MythScreenType *themeScreen, ArchiveDestination archiveDestination, const QString &name)
Definition: mythburn.cpp:45
QList< EncoderProfile * > m_profileList
Definition: mythburn.h:104
void doBurn(int mode)
Definition: mythburn.cpp:1137
void editDetails(void)
Definition: mythburn.cpp:812
~MythBurn(void)
Definition: mythburn.cpp:61
MythUIButton * m_addfileButton
Definition: mythburn.h:122
const char * name
Definition: ParseText.cpp:328
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
QList< ArchiveItem * > m_archiveList
Definition: mythburn.h:103
MythUIText * m_newSizeText
Definition: mythburn.h:43
void loadConfiguration(void)
Definition: mythburn.cpp:650
MythUIText * m_captionText
Definition: mythburn.h:40
A single button widget.
Definition: mythuibutton.h:21
void selectorClosed(bool ok)
Definition: mythburn.cpp:959
void changeProfile(void)
Definition: mythburn.cpp:860
MythUIButtonList * m_profile_list
Definition: mythburn.h:45
MythUIButtonList * m_archiveButtonList
Definition: mythburn.h:118
bool m_moveMode
Definition: mythburn.h:112
MythUIText * m_nofilesText
Definition: mythburn.h:119
void loadEncoderProfiles(void)
Definition: mythburn.cpp:231
void handleAddVideo(void)
Definition: mythburn.cpp:965
bool keyPressEvent(QKeyEvent *) override
Key event handler.
Definition: mythburn.cpp:127
bool m_bCreateISO
Definition: mythburn.h:106
bool isArchiveItemValid(const QString &type, const QString &filename)
Definition: mythburn.cpp:473
MythUIProgressBar * m_sizeBar
Definition: mythburn.h:125
void editThumbnails(void)
Definition: mythburn.cpp:831
void setProfile(EncoderProfile *profile, ArchiveItem *item)
void handleNextPage(void)
Definition: mythburn.cpp:339
void start(void)
Definition: mythburn.cpp:1097
MythUIText * m_currentsizeErrorText
Definition: mythburn.h:128
Screen in which all other widgets are contained and rendered.
Progress bar widget.
void updateArchiveList(void)
Definition: mythburn.cpp:387
void removeItem(void)
Definition: mythburn.cpp:799
void handleAddRecording(void)
Definition: mythburn.cpp:945
void handlePrevPage(void)
Definition: mythburn.cpp:350
MythUIButton * m_addrecordingButton
Definition: mythburn.h:120
void profileChanged(int profileNo)
Definition: mythburn.cpp:881
EncoderProfile * getProfileFromName(const QString &profileName)
Definition: mythburn.cpp:701