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);
24 
25  bool Create() override; // MythScreenType
26  bool keyPressEvent(QKeyEvent *) 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);
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
QString m_baseTitle
Definition: customedit.h:48
void testClicked(void)
Definition: customedit.cpp:642
CustomEdit(MythScreenStack *parent, ProgramInfo *m_pginfo=nullptr)
Definition: customedit.cpp:27
MythUIButton * m_testButton
Definition: customedit.h:68
unsigned int slots[4]
Definition: element.c:38
~CustomEdit(void)
Definition: customedit.cpp:44
QString description
Definition: customedit.h:80
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
void clauseClicked(MythUIButtonListItem *item)
Definition: customedit.cpp:622
QString recordid
Definition: customedit.h:77
ProgramInfo * m_pginfo
Definition: customedit.h:47
A screen to create a fully custom recording.
Definition: customedit.h:17
MythUIButton * m_cancelButton
Definition: customedit.h:71
bool Create() override
Definition: customedit.cpp:51
void recordClicked(void)
The user clicked on the 'Record' button in the 'Custom Edit' window.
Definition: customedit.cpp:674
Q_DECLARE_METATYPE(GrabberScript *)
void storeClicked(void)
Definition: customedit.cpp:716
MythUIButtonList * m_clauseList
Definition: customedit.h:57
MythUIButton * m_storeButton
Definition: customedit.h:70
QString m_seSuffix
Definition: customedit.h:53
Holds information on recordings and videos.
Definition: programinfo.h:66
MythUIButton * m_recordButton
Definition: customedit.h:69
void ruleChanged(MythUIButtonListItem *item)
Definition: customedit.cpp:575
const MythUIButtonListItem * m_currentRuleItem
Definition: customedit.h:73
void clauseChanged(MythUIButtonListItem *item)
Definition: customedit.cpp:602
QString evaluate(QString clause)
Definition: customedit.cpp:155
A text entry and edit widget.
MythUIButtonList * m_ruleList
Definition: customedit.h:56
void scheduleCreated(int)
Definition: customedit.cpp:710
MythUITextEdit * m_subtitleEdit
Definition: customedit.h:65
void loadData(void)
Definition: customedit.cpp:102
bool m_evaluate
Definition: customedit.h:51
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
void storeRule(bool is_search, bool is_new)
Definition: customedit.cpp:830
A single button widget.
Definition: mythuibutton.h:21
QString m_exSuffix
Definition: customedit.h:54
void loadClauses(void)
Definition: customedit.cpp:221
MythUIText * m_clauseText
Definition: customedit.h:67
void deleteRule(void)
Definition: customedit.cpp:881
void textChanged(void)
Definition: customedit.cpp:591
MythUITextEdit * m_titleEdit
Definition: customedit.h:59
MythUITextEdit * m_descriptionEdit
Definition: customedit.h:62
int m_maxex
Definition: customedit.h:50
void customEvent(QEvent *event) override
Definition: customedit.cpp:901
bool checkSyntax(void)
Definition: customedit.cpp:774
Screen in which all other widgets are contained and rendered.
QString subtitle
Definition: customedit.h:79
bool keyPressEvent(QKeyEvent *) override
Key event handler.
Definition: customedit.cpp:925
QString title
Definition: customedit.h:78