00001 #ifndef CUSTOMPRIORITY_H_ 00002 #define CUSTOMPRIORITY_H_ 00003 00004 #include "programinfo.h" 00005 00006 #include "mythscreentype.h" 00007 00008 class MythUITextEdit; 00009 class MythUIButton; 00010 class MythUIButtonList; 00011 class MythUIButtonListItem; 00012 class MythUISpinBox; 00013 00014 class CustomPriority : public MythScreenType 00015 { 00016 Q_OBJECT 00017 public: 00018 explicit CustomPriority(MythScreenStack *parent, 00019 ProgramInfo *proginfo = NULL); 00020 ~CustomPriority(); 00021 00022 bool Create(); 00023 00024 protected slots: 00025 void ruleChanged(MythUIButtonListItem *item); 00026 00027 void textChanged(); 00028 00029 void addClicked(void); 00030 void testClicked(void); 00031 void installClicked(void); 00032 void deleteClicked(void); 00033 00034 private: 00035 void loadData(void); 00036 void loadExampleRules(void); 00037 bool checkSyntax(void); 00038 void testSchedule(void); 00039 00040 ProgramInfo *m_pginfo; 00041 00042 MythUIButtonList *m_ruleList; 00043 MythUIButtonList *m_clauseList; 00044 00045 MythUITextEdit *m_titleEdit; 00046 MythUITextEdit *m_descriptionEdit; 00047 00048 MythUISpinBox *m_prioritySpin; 00049 00050 MythUIButton *m_addButton; 00051 MythUIButton *m_testButton; 00052 MythUIButton *m_installButton; 00053 MythUIButton *m_deleteButton; 00054 MythUIButton *m_cancelButton; 00055 }; 00056 00057 struct RuleInfo { 00058 QString title; 00059 QString priority; 00060 QString description; 00061 }; 00062 00063 Q_DECLARE_METATYPE(RuleInfo) 00064 00065 #endif
1.6.3