00001 #ifndef CHANNELRECPRIORITY_H_ 00002 #define CHANNELRECPRIORITY_H_ 00003 00004 #include <qdatetime.h> 00005 #include <qdom.h> 00006 #include "mythwidgets.h" 00007 #include "mythdialogs.h" 00008 #include "uitypes.h" 00009 #include "xmlparse.h" 00010 #include "programinfo.h" 00011 #include "channeleditor.h" 00012 00013 class ChannelInfo; 00014 00015 class ChannelRecPriority : public MythDialog 00016 { 00017 Q_OBJECT 00018 public: 00019 enum SortType 00020 { 00021 byChannel, 00022 byRecPriority, 00023 }; 00024 00025 ChannelRecPriority(MythMainWindow *parent, const char *name = 0); 00026 ~ChannelRecPriority(); 00027 00028 protected slots: 00029 void cursorDown(bool page = false); 00030 void cursorUp(bool page = false); 00031 void pageDown() { cursorDown(true); } 00032 void pageUp() { cursorUp(true); } 00033 void edit(); 00034 void upcoming(); 00035 void changeRecPriority(int howMuch); 00036 void applyChannelRecPriorityChange(QString, const QString&); 00037 00038 void saveRecPriority(void); 00039 00040 protected: 00041 void paintEvent(QPaintEvent *); 00042 void keyPressEvent(QKeyEvent *e); 00043 00044 private: 00045 void FillList(void); 00046 void SortList(); 00047 QMap<QString, ChannelInfo> channelData; 00048 QMap<QString, QString> origRecPriorityData; 00049 QMap<int, bool> visMap; 00050 00051 void updateBackground(void); 00052 void updateList(QPainter *); 00053 void updateInfo(QPainter *); 00054 00055 void LoadWindow(QDomElement &); 00056 void parseContainer(QDomElement &); 00057 XMLParse *theme; 00058 QDomElement xmldata; 00059 00060 ChannelInfo *curitem; 00061 00062 QPixmap myBackground; 00063 QPixmap *bgTransBackup; 00064 00065 bool pageDowner; 00066 00067 int inList; 00068 int inData; 00069 int listCount; 00070 int dataCount; 00071 00072 QRect listRect; 00073 QRect infoRect; 00074 QRect fullRect; 00075 00076 int listsize; 00077 00078 SortType sortType; 00079 00080 QString longchannelformat; 00081 }; 00082 00083 #endif
1.5.5