MythTV  master
customedit.h
Go to the documentation of this file.
1 #ifndef CUSTOMEDIT_H_
2 #define CUSTOMEDIT_H_
3 
4 #include "mythplayer.h"
5 #include "programinfo.h"
6 #include "mythscreentype.h"
7 
8 class MythUITextEdit;
9 class MythUIButton;
10 class MythUIButtonList;
12 
17 class CustomEdit : public MythScreenType
18 {
19  Q_OBJECT
20  public:
21 
22  explicit CustomEdit(MythScreenStack *parent, ProgramInfo *m_pginfo = nullptr);
23  ~CustomEdit(void) override;
24 
25  bool Create() override; // MythScreenType
26  bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
27  void customEvent(QEvent *event) override; // MythUIType
28 
29  protected slots:
31  void textChanged(void);
34  void testClicked(void);
35  void recordClicked(void);
36  void storeClicked(void);
37  void scheduleCreated(int ruleID);
38 
39  private:
40  void loadData(void);
41  void loadClauses(void);
42  bool checkSyntax(void);
43  void storeRule(bool is_search, bool is_new);
44  void deleteRule(void);
45  QString evaluate(QString clause);
46 
47  ProgramInfo *m_pginfo {nullptr};
48  QString m_baseTitle;
49 
50  int m_maxex {0};
51  bool m_evaluate {true};
52 
53  QString m_seSuffix;
54  QString m_exSuffix;
55 
58 
60 
61  // Contains the SQL statement
63 
64  // Contains the additional SQL tables
66 
72 
74 };
75 
77  QString recordid;
78  QString title;
79  QString subtitle;
80  QString description;
81 };
82 
84 
85 #endif
CustomEdit::m_seSuffix
QString m_seSuffix
Definition: customedit.h:53
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(GrabberScript *)
CustomEdit::m_ruleList
MythUIButtonList * m_ruleList
Definition: customedit.h:56
CustomRuleInfo::title
QString title
Definition: customedit.h:78
slots
std::array< unsigned int, 4 > slots
Definition: element.cpp:38
CustomEdit::storeRule
void storeRule(bool is_search, bool is_new)
Definition: customedit.cpp:837
CustomEdit::ruleChanged
void ruleChanged(MythUIButtonListItem *item)
Definition: customedit.cpp:583
CustomEdit::m_currentRuleItem
const MythUIButtonListItem * m_currentRuleItem
Definition: customedit.h:73
CustomEdit::clauseChanged
void clauseChanged(MythUIButtonListItem *item)
Definition: customedit.cpp:610
CustomEdit::m_maxex
int m_maxex
Definition: customedit.h:50
CustomEdit::checkSyntax
bool checkSyntax(void)
Definition: customedit.cpp:781
MythScreenStack
Definition: mythscreenstack.h:16
MythUITextEdit
A text entry and edit widget.
Definition: mythuitextedit.h:33
CustomEdit::~CustomEdit
~CustomEdit(void) override
Definition: customedit.cpp:44
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
CustomEdit::m_descriptionEdit
MythUITextEdit * m_descriptionEdit
Definition: customedit.h:62
CustomEdit::m_exSuffix
QString m_exSuffix
Definition: customedit.h:54
CustomEdit::deleteRule
void deleteRule(void)
Definition: customedit.cpp:888
mythplayer.h
CustomEdit::customEvent
void customEvent(QEvent *event) override
Definition: customedit.cpp:908
CustomRuleInfo
Definition: customedit.h:76
CustomEdit::loadClauses
void loadClauses(void)
Definition: customedit.cpp:229
CustomRuleInfo::description
QString description
Definition: customedit.h:80
CustomEdit::m_clauseText
MythUIText * m_clauseText
Definition: customedit.h:67
CustomEdit::m_titleEdit
MythUITextEdit * m_titleEdit
Definition: customedit.h:59
CustomEdit::textChanged
void textChanged(void)
Definition: customedit.cpp:599
MythUIButtonListItem
Definition: mythuibuttonlist.h:28
CustomEdit::CustomEdit
CustomEdit(MythScreenStack *parent, ProgramInfo *m_pginfo=nullptr)
Definition: customedit.cpp:27
programinfo.h
CustomRuleInfo::recordid
QString recordid
Definition: customedit.h:77
CustomEdit::m_baseTitle
QString m_baseTitle
Definition: customedit.h:48
CustomEdit::m_testButton
MythUIButton * m_testButton
Definition: customedit.h:68
MythUIButton
A single button widget.
Definition: mythuibutton.h:22
CustomEdit::m_cancelButton
MythUIButton * m_cancelButton
Definition: customedit.h:71
CustomEdit::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: customedit.cpp:932
CustomEdit
A screen to create a fully custom recording.
Definition: customedit.h:18
CustomEdit::testClicked
void testClicked(void)
Definition: customedit.cpp:650
CustomEdit::Create
bool Create() override
Definition: customedit.cpp:51
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:68
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:29
CustomEdit::m_pginfo
ProgramInfo * m_pginfo
Definition: customedit.h:47
CustomEdit::m_storeButton
MythUIButton * m_storeButton
Definition: customedit.h:70
CustomEdit::clauseClicked
void clauseClicked(MythUIButtonListItem *item)
Definition: customedit.cpp:630
CustomEdit::recordClicked
void recordClicked(void)
The user clicked on the 'Record' button in the 'Custom Edit' window.
Definition: customedit.cpp:682
CustomRuleInfo::subtitle
QString subtitle
Definition: customedit.h:79
CustomEdit::m_evaluate
bool m_evaluate
Definition: customedit.h:51
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:144
CustomEdit::storeClicked
void storeClicked(void)
Definition: customedit.cpp:724
CustomEdit::evaluate
QString evaluate(QString clause)
Definition: customedit.cpp:155
mythscreentype.h
CustomEdit::m_clauseList
MythUIButtonList * m_clauseList
Definition: customedit.h:57
CustomEdit::m_subtitleEdit
MythUITextEdit * m_subtitleEdit
Definition: customedit.h:65
CustomEdit::loadData
void loadData(void)
Definition: customedit.cpp:102
CustomEdit::m_recordButton
MythUIButton * m_recordButton
Definition: customedit.h:69
CustomEdit::scheduleCreated
void scheduleCreated(int ruleID)
Definition: customedit.cpp:718