MythTV master
scheduleeditor.h
Go to the documentation of this file.
1#ifndef SCHEDULERECORDING_H_
2#define SCHEDULERECORDING_H_
3
4// MythTV
10
11// MythFrontend
12#include "schedulecommon.h"
13
14class ProgramInfo;
15class MythUIText;
16class MythUIButton;
19class MythUIStateType;
20class MythUISpinBox;
21class TV;
22
23class ScheduleEditor;
24class SchedEditChild;
25
27{
28 protected:
30 SchedOptMixin *other = nullptr);
31 void SetRule(RecordingRule *rule) { m_rule = rule; };
32 void Create(bool *err);
33 void Load(void);
34 void Save(void);
35 void RuleChanged(void);
37
47
48 private:
52 bool m_loaded {false};
53 bool m_haveRepeats {false};
54};
55
57{
58 protected:
60 StoreOptMixin *other = nullptr)
61 : m_screen(&screen), m_rule(rule), m_other(other) {}
62 void SetRule(RecordingRule *rule) { m_rule = rule; };
63 void Create(bool *err);
64 void Load(void);
65 void Save(void);
66 void RuleChanged(void);
68 void PromptForRecGroup(void);
69 void SetRecGroup(int recgroupID, QString recgroup);
70
71 static int CreateRecordingGroup(const QString &groupName);
72
80
81 private:
85 bool m_loaded {false};
86};
87
89{
90 protected:
92 PostProcMixin *other= nullptr)
93 : m_screen(&screen), m_rule(rule), m_other(other) {}
94 void SetRule(RecordingRule *rule) { m_rule = rule; };
95 void Create(bool *err);
96 void Load(void);
97 void Save(void);
98 void RuleChanged(void);
99 void TranscodeChanged(bool enable);
100
109
110 private:
114 bool m_loaded {false};
115};
116
118{
119 protected:
121 FilterOptMixin *other = nullptr)
122 : m_screen(&screen), m_rule(rule), m_other(other) {}
123 void SetRule(RecordingRule *rule) { m_rule = rule; };
124 void Create(bool *err);
125 void Load(void);
126 void Save(void);
127 void RuleChanged(void);
128 static void ToggleSelected(MythUIButtonListItem *item);
129
132
133 private:
137 bool m_loaded {false};
138
139 QStringList m_descriptions;
140};
141
143 public SchedOptMixin, public FilterOptMixin,
144 public StoreOptMixin, public PostProcMixin
145{
146 friend class SchedEditChild;
147 Q_OBJECT
148 public:
150 TV *player = nullptr);
152 TV *player = nullptr);
153 ~ScheduleEditor() override;
154
155 bool Create(void) override; // MythScreenType
156 bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
157
158 void showMenu(void);
159 void showUpcomingByRule(void);
160 void showUpcomingByTitle(void);
161
163 static void *RunScheduleEditor(ProgramInfo *proginfo, void *player = nullptr);
164
165 signals:
166 void ruleSaved(int ruleId);
167 void ruleDeleted(int ruleId);
168 void templateLoaded(void);
169
170 public slots:
171 void ShowSchedOpt(void);
172 void ShowFilters(void);
173 void ShowStoreOpt(void);
174 void ShowPostProc(void);
175 void ShowMetadataOptions(void);
176 void ShowPreviousView(void);
177 void ShowNextView(void);
178 void ShowPreview(void);
179 void Save(void);
180 void Close(void) override; // MythScreenType
181
182 protected:
183 void customEvent(QEvent *event) override; // ScheduleCommon
184 void Load(void) override; // MythScreenType
185 ProgramInfo *GetCurrentProgram(void) const override // ScheduleCommon
186 { return m_recInfo; };
187
188 protected slots:
191 static void FilterChanged(MythUIButtonListItem *item);
193 void PromptForRecGroup(void);
194 void TranscodeChanged(bool enable);
195 void ShowSchedInfo(void);
196 void ChildClosing(void);
197
198 private:
200 void LoadTemplate(const QString& name);
201 void DeleteRule(void);
202
203 void showTemplateMenu(void);
204
207
208 bool m_sendSig {false};
209
212
214
222
223 TV *m_player {nullptr};
224
225 bool m_loaded {false};
226
227 enum View : std::uint8_t
228 {
235 };
236
239};
240
242{
243 Q_OBJECT
244 public:
245 bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
246
247 protected:
248 SchedEditChild(MythScreenStack *parent, const QString &name,
249 ScheduleEditor &editor, RecordingRule &rule,
250 RecordingInfo *recinfo);
251 ~SchedEditChild() override = default;
252
253 virtual bool CreateEditChild(
254 const QString &xmlfile, const QString &winname, bool isTemplate);
255
256 signals:
257 void Closing(void);
258
259 public slots:
260 void Close(void) override; // MythScreenType
261 virtual void Save(void) = 0;
262
263 protected:
264 void Load(void) override = 0; // MythScreenType
265 void SetTextFromMaps(void);
266
270
274};
275
277{
278 Q_OBJECT
279 public:
281 RecordingRule &rule, RecordingInfo *recinfo);
282 ~SchedOptEditor() override = default;
283
284 bool Create(void) override; // MythScreenType
285 void Save(void) override; // SchedEditChild
286
287 protected:
288 void Load(void) override; // SchedEditChild
289
290 protected slots:
292
293 private:
295};
296
298{
299 Q_OBJECT
300 public:
302 RecordingRule &rule, RecordingInfo *recinfo);
303 ~SchedFilterEditor() override = default;
304
305 bool Create(void) override; // MythScreenType
306 void Save(void) override; // SchedEditChild
307
308 protected:
309 void Load(void) override; // SchedEditChild
310
311 protected slots:
312 static void ToggleSelected(MythUIButtonListItem *item);
313};
314
316{
317 Q_OBJECT
318 public:
320 RecordingRule &rule, RecordingInfo *recinfo);
321 ~StoreOptEditor() override = default;
322
323 bool Create(void) override; // MythScreenType
324 void Save(void) override; // SchedEditChild
325
326 protected:
327 void customEvent(QEvent *event) override; // MythUIType
328 void Load(void) override; // SchedEditChild
329
330 protected slots:
332 void PromptForRecGroup(void);
333};
334
336{
337 Q_OBJECT
338 public:
340 RecordingRule &rule, RecordingInfo *recinfo);
341 ~PostProcEditor() override = default;
342
343 bool Create(void) override; // MythScreenType
344 void Save(void) override; // SchedEditChild
345
346 protected:
347 void Load(void) override; // SchedEditChild
348
349 protected slots:
350 void TranscodeChanged(bool enable);
351};
352
354{
355 Q_OBJECT
356 public:
358 RecordingRule &rule, RecordingInfo *recinfo);
359 ~MetadataOptions() override;
360
361 bool Create(void) override; // MythScreenType
362 void Save(void) override; // SchedEditChild
363
364 protected:
365 void customEvent(QEvent *event) override; // MythUIType
366 void Load(void) override; // SchedEditChild
367
368 protected slots:
369 void ClearInetref();
370 void PerformQuery();
371 void SelectLocalFanart();
372 void SelectLocalCoverart();
373 void SelectLocalBanner();
374 void SelectOnlineFanart();
376 void SelectOnlineBanner();
377 void QueryComplete(MetadataLookup *lookup);
383
384 void ValuesChanged();
385
386 private:
387 void CreateBusyDialog(const QString& title);
388 static void FindImagePopup(const QString &prefix,
389 const QString &prefixAlt,
390 QObject &inst,
391 const QString &returnEvent);
392 static QStringList GetSupportedImageExtensionFilter();
393
396
397 bool CanSetArtwork(void);
398
399 // For all metadata downloads
401
402 // For image picking
405
408
412
414
417
426
428};
429
430#endif
Mixin for Filters.
static void ToggleSelected(MythUIButtonListItem *item)
FilterOptMixin * m_other
MythUIButtonList * m_activeFiltersList
FilterOptMixin(MythScreenType &screen, RecordingRule *rule, FilterOptMixin *other=nullptr)
RecordingRule * m_rule
void Create(bool *err)
MythScreenType * m_screen
QStringList m_descriptions
void RuleChanged(void)
MythUIButtonList * m_filtersList
void SetRule(RecordingRule *rule)
Select artwork and inetref for recordings.
bool Create(void) override
ArtworkMap m_artworkMap
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
MythUIButton * m_onlineFanartButton
void customEvent(QEvent *event) override
MythUIImage * m_fanart
void HandleDownloadedImages(MetadataLookup *lookup)
MythUIBusyDialog * m_busyPopup
MythUIButton * m_localCoverartButton
static QStringList GetSupportedImageExtensionFilter()
void FindNetArt(VideoArtworkType type)
void OnSearchListSelection(const RefCountHandler< MetadataLookup > &lookup)
MetadataImageDownload * m_imageDownload
MetadataOptions(MythScreenStack *parent, ScheduleEditor &editor, RecordingRule &rule, RecordingInfo *recinfo)
MythUIButton * m_inetrefClear
MythUIButton * m_localFanartButton
MythUIButton * m_queryButton
MythUISpinBox * m_seasonSpin
void OnArtworkSearchDone(MetadataLookup *lookup)
MythUIButton * m_onlineCoverartButton
bool CanSetArtwork(void)
void QueryComplete(MetadataLookup *lookup)
MythUITextEdit * m_inetrefEdit
~MetadataOptions() override
void OnImageSearchListSelection(const ArtworkInfo &info, VideoArtworkType type)
MetadataLookup * CreateLookup(MetadataType mtype)
static void FindImagePopup(const QString &prefix, const QString &prefixAlt, QObject &inst, const QString &returnEvent)
MythUISpinBox * m_episodeSpin
MetadataFactory * m_metadataFactory
MythUIButton * m_onlineBannerButton
void Save(void) override
MythUIImage * m_coverart
MythScreenStack * m_popupStack
MetadataDownload * m_imageLookup
void CreateBusyDialog(const QString &title)
MythUIButton * m_localBannerButton
MythUIImage * m_banner
Screen in which all other widgets are contained and rendered.
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
A single button widget.
Definition: mythuibutton.h:22
A checkbox widget supporting three check states - on,off,half and two conditions - selected and unsel...
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:98
A widget for offering a range of numerical values where only the the bounding values and interval are...
Definition: mythuispinbox.h:19
This widget is used for grouping other widgets for display when a particular named state is called.
A text entry and edit widget.
All purpose text widget, displays a text string.
Definition: mythuitext.h:29
Select post-processing options.
void TranscodeChanged(bool enable)
~PostProcEditor() override=default
bool Create(void) override
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
void Save(void) override
PostProcEditor(MythScreenStack *parent, ScheduleEditor &editor, RecordingRule &rule, RecordingInfo *recinfo)
Mixin for post processing.
PostProcMixin(MythScreenType &screen, RecordingRule *rule, PostProcMixin *other=nullptr)
PostProcMixin * m_other
MythScreenType * m_screen
void SetRule(RecordingRule *rule)
MythUICheckBox * m_userjob4Check
MythUICheckBox * m_transcodeCheck
MythUICheckBox * m_userjob2Check
MythUICheckBox * m_metadataLookupCheck
void RuleChanged(void)
MythUICheckBox * m_userjob1Check
void Create(bool *err)
RecordingRule * m_rule
MythUICheckBox * m_userjob3Check
MythUICheckBox * m_commflagCheck
MythUIButtonList * m_transcodeprofileList
void TranscodeChanged(bool enable)
Holds information on recordings and videos.
Definition: programinfo.h:74
Holds information on a TV Program one might wish to record.
Definition: recordinginfo.h:36
Internal representation of a recording rule, mirrors the record table.
Definition: recordingrule.h:30
SchedEditChild(MythScreenStack *parent, const QString &name, ScheduleEditor &editor, RecordingRule &rule, RecordingInfo *recinfo)
MythUIButton * m_previewButton
~SchedEditChild() override=default
void Close(void) override
MythUIButton * m_saveButton
MythUIButton * m_backButton
RecordingRule * m_recordingRule
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
ScheduleEditor * m_editor
void SetTextFromMaps(void)
virtual void Save(void)=0
RecordingInfo * m_recInfo
void Load(void) override=0
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
virtual bool CreateEditChild(const QString &xmlfile, const QString &winname, bool isTemplate)
void Closing(void)
Select schedule filters.
SchedFilterEditor(MythScreenStack *parent, ScheduleEditor &editor, RecordingRule &rule, RecordingInfo *recinfo)
static void ToggleSelected(MythUIButtonListItem *item)
void Save(void) override
~SchedFilterEditor() override=default
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
bool Create(void) override
Select schedule options.
bool Create(void) override
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
void Save(void) override
MythUIButton * m_filtersButton
void DupMethodChanged(MythUIButtonListItem *item)
SchedOptEditor(MythScreenStack *parent, ScheduleEditor &editor, RecordingRule &rule, RecordingInfo *recinfo)
~SchedOptEditor() override=default
Mixin for schedule options.
MythUISpinBox * m_startoffsetSpin
MythUISpinBox * m_prioritySpin
SchedOptMixin * m_other
MythUICheckBox * m_ruleactiveCheck
void Create(bool *err)
MythUIButtonList * m_dupmethodList
MythUISpinBox * m_endoffsetSpin
void SetRule(RecordingRule *rule)
void DupMethodChanged(MythUIButtonListItem *item)
MythUIButtonList * m_dupscopeList
MythUIButtonList * m_newrepeatList
MythScreenType * m_screen
MythUIButtonList * m_autoExtendList
RecordingRule * m_rule
SchedOptMixin(MythScreenType &screen, RecordingRule *rule, SchedOptMixin *other=nullptr)
MythUIButtonList * m_inputList
void RuleChanged(void)
Construct a recording schedule.
void TranscodeChanged(bool enable)
ScheduleEditor(MythScreenStack *parent, RecordingInfo *recinfo, TV *player=nullptr)
void ruleSaved(int ruleId)
MythUIButton * m_schedInfoButton
MythUIButtonList * m_rulesList
bool Create(void) override
MythUIButton * m_saveButton
void DupMethodChanged(MythUIButtonListItem *item)
RecordingRule * m_recordingRule
void ChildClosing(void)
void customEvent(QEvent *event) override
Q_DISABLE_COPY(ScheduleEditor)
void ShowStoreOpt(void)
void ruleDeleted(int ruleId)
void ShowSchedOpt(void)
MythUIButton * m_schedOptButton
void PromptForRecGroup(void)
MythUIButton * m_postProcButton
void DeleteRule(void)
void templateLoaded(void)
void LoadTemplate(const QString &name)
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
void showTemplateMenu(void)
void ShowPreviousView(void)
~ScheduleEditor() override
SchedEditChild * m_child
static void * RunScheduleEditor(ProgramInfo *proginfo, void *player=nullptr)
Callback.
void showUpcomingByTitle(void)
MythUIButton * m_storeOptButton
void ShowNextView(void)
void showMenu(void)
void MaxEpisodesChanged(MythUIButtonListItem *item)
void showUpcomingByRule(void)
void ShowPreview(void)
MythUIButton * m_metadataButton
MythUIButton * m_previewButton
void ShowFilters(void)
MythUIButton * m_cancelButton
ProgramInfo * GetCurrentProgram(void) const override
RecordingInfo * m_recInfo
void ShowPostProc(void)
void Close(void) override
static void FilterChanged(MythUIButtonListItem *item)
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
void ShowMetadataOptions(void)
MythUIButton * m_filtersButton
void ShowSchedInfo(void)
Select storage options.
~StoreOptEditor() override=default
StoreOptEditor(MythScreenStack *parent, ScheduleEditor &editor, RecordingRule &rule, RecordingInfo *recinfo)
void Save(void) override
void PromptForRecGroup(void)
void MaxEpisodesChanged(MythUIButtonListItem *item)
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
void customEvent(QEvent *event) override
bool Create(void) override
Mixin for storage options.
StoreOptMixin(MythScreenType &screen, RecordingRule *rule, StoreOptMixin *other=nullptr)
void SetRule(RecordingRule *rule)
MythUISpinBox * m_maxepSpin
void MaxEpisodesChanged(MythUIButtonListItem *item)
MythUIButtonList * m_recprofileList
void PromptForRecGroup(void)
void RuleChanged(void)
MythUIButtonList * m_storagegroupList
MythUIButtonList * m_maxbehaviourList
StoreOptMixin * m_other
RecordingRule * m_rule
MythScreenType * m_screen
MythUIButtonList * m_playgroupList
MythUIButtonList * m_recgroupList
MythUICheckBox * m_autoexpireCheck
static int CreateRecordingGroup(const QString &groupName)
void Create(bool *err)
void SetRecGroup(int recgroupID, QString recgroup)
Control TV playback.
Definition: tv_play.h:157
MetadataType
QMultiMap< VideoArtworkType, ArtworkInfo > ArtworkMap
VideoArtworkType
dictionary info
Definition: azlyrics.py:7