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