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 void customEvent(QEvent *event) override; // ScheduleCommon
158
159 void showMenu(void);
160 void showUpcomingByRule(void);
161 void showUpcomingByTitle(void);
162
164 static void *RunScheduleEditor(ProgramInfo *proginfo, void *player = nullptr);
165
166 signals:
167 void ruleSaved(int ruleId);
168 void ruleDeleted(int ruleId);
169 void templateLoaded(void);
170
171 public slots:
172 void ShowSchedOpt(void);
173 void ShowFilters(void);
174 void ShowStoreOpt(void);
175 void ShowPostProc(void);
176 void ShowMetadataOptions(void);
177 void ShowPreviousView(void);
178 void ShowNextView(void);
179 void ShowPreview(void);
180 void Save(void);
181
182 protected slots:
185 static void FilterChanged(MythUIButtonListItem *item);
187 void PromptForRecGroup(void);
188 void TranscodeChanged(bool enable);
189 void ShowSchedInfo(void);
190 void ChildClosing(void);
191 void Close(void) override; // MythScreenType
192
193 private:
195 void Load(void) override; // MythScreenType
196 void LoadTemplate(const QString& name);
197 void DeleteRule(void);
198
199 void showTemplateMenu(void);
200
201 ProgramInfo *GetCurrentProgram(void) const override // ScheduleCommon
202 { return m_recInfo; };
203
206
207 bool m_sendSig {false};
208
211
213
221
222 TV *m_player {nullptr};
223
224 bool m_loaded {false};
225
226 enum View : std::uint8_t
227 {
234 };
235
238};
239
241{
242 Q_OBJECT
243 protected:
244 SchedEditChild(MythScreenStack *parent, const QString &name,
245 ScheduleEditor &editor, RecordingRule &rule,
246 RecordingInfo *recinfo);
247 ~SchedEditChild() override = default;
248
249 bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
250 virtual bool CreateEditChild(
251 const QString &xmlfile, const QString &winname, bool isTemplate);
252
253 signals:
254 void Closing(void);
255
256 public slots:
257 void Close(void) override; // MythScreenType
258 void Load(void) override = 0; // MythScreenType
259 virtual void Save(void) = 0;
260
261 protected:
262 void SetTextFromMaps(void);
263
267
271};
272
274{
275 Q_OBJECT
276 public:
278 RecordingRule &rule, RecordingInfo *recinfo);
279 ~SchedOptEditor() override = default;
280
281 bool Create(void) override; // MythScreenType
282
283 protected slots:
285
286 private:
287 void Load(void) override; // SchedEditChild
288 void Save(void) override; // SchedEditChild
289
291};
292
294{
295 Q_OBJECT
296 public:
298 RecordingRule &rule, RecordingInfo *recinfo);
299 ~SchedFilterEditor() override = default;
300
301 bool Create(void) override; // MythScreenType
302
303 protected slots:
304 static void ToggleSelected(MythUIButtonListItem *item);
305
306 private:
307 void Load(void) override; // SchedEditChild
308 void Save(void) override; // SchedEditChild
309};
310
312{
313 Q_OBJECT
314 public:
316 RecordingRule &rule, RecordingInfo *recinfo);
317 ~StoreOptEditor() override = default;
318
319 bool Create(void) override; // MythScreenType
320 void customEvent(QEvent *event) override; // MythUIType
321
322 protected slots:
324 void PromptForRecGroup(void);
325
326 private:
327 void Load(void) override; // SchedEditChild
328 void Save(void) override; // SchedEditChild
329};
330
332{
333 Q_OBJECT
334 public:
336 RecordingRule &rule, RecordingInfo *recinfo);
337 ~PostProcEditor() override = default;
338
339 bool Create(void) override; // MythScreenType
340
341 protected slots:
342 void TranscodeChanged(bool enable);
343
344 private:
345 void Load(void) override; // SchedEditChild
346 void Save(void) override; // SchedEditChild
347};
348
350{
351 Q_OBJECT
352 public:
354 RecordingRule &rule, RecordingInfo *recinfo);
355 ~MetadataOptions() override;
356
357 bool Create(void) override; // MythScreenType
358
359 protected slots:
360 void ClearInetref();
361 void PerformQuery();
362 void SelectLocalFanart();
363 void SelectLocalCoverart();
364 void SelectLocalBanner();
365 void SelectOnlineFanart();
367 void SelectOnlineBanner();
368 void QueryComplete(MetadataLookup *lookup);
374
375 void ValuesChanged();
376
377 private:
378 void Load(void) override; // SchedEditChild
379 void Save(void) override; // SchedEditChild
380
381 void CreateBusyDialog(const QString& title);
382 static void FindImagePopup(const QString &prefix,
383 const QString &prefixAlt,
384 QObject &inst,
385 const QString &returnEvent);
386 static QStringList GetSupportedImageExtensionFilter();
387
390
391 bool CanSetArtwork(void);
392
393 void customEvent(QEvent *event) override; // MythUIType
394
395 // For all metadata downloads
397
398 // For image picking
401
404
408
410
413
422
424};
425
426#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
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:23
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
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:68
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
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
bool Create(void) override
Select schedule options.
bool Create(void) override
void Load(void) override
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
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:156
MetadataType
QMultiMap< VideoArtworkType, ArtworkInfo > ArtworkMap
VideoArtworkType
dictionary info
Definition: azlyrics.py:7