00001 #ifndef VIEWSCHEDULEDIFF_H_
00002 #define VIEWSCHEDULEDIFF_H_
00003
00004 #include <qvaluevector.h>
00005 #include <qdatetime.h>
00006 #include <qdom.h>
00007 #include "mythwidgets.h"
00008 #include "mythdialogs.h"
00009 #include "uitypes.h"
00010 #include "xmlparse.h"
00011 #include "programinfo.h"
00012
00013 struct ProgramStruct {
00014 ProgramInfo *before;
00015 ProgramInfo *after;
00016 };
00017
00018 class MPUBLIC ViewScheduleDiff : public MythDialog
00019 {
00020 Q_OBJECT
00021 public:
00022 ViewScheduleDiff(MythMainWindow *parent, const char *name, QString altTbl,
00023 int recordid = -1, QString ltitle = "");
00024 ~ViewScheduleDiff();
00025
00026 protected slots:
00027 void cursorDown(bool page = false);
00028 void cursorUp(bool page = false);
00029 void pageDown() { cursorDown(true); }
00030 void pageUp() { cursorUp(true); }
00031 void edit(void);
00032 void upcoming(void);
00033 void details(void);
00034 void statusDialog(void);
00035
00036 protected:
00037 void paintEvent(QPaintEvent *);
00038 void keyPressEvent(QKeyEvent *e);
00039
00040 private:
00041 void FillList(void);
00042 void setShowAll(bool all);
00043
00044 void updateBackground(void);
00045 void updateList(QPainter *);
00046 void updateShowLevel(QPainter *);
00047 void updateInfo(QPainter *);
00048 void updateRecStatus(QPainter *);
00049
00050 void LoadWindow(QDomElement &);
00051 void parseContainer(QDomElement &);
00052 XMLParse *theme;
00053 QDomElement xmldata;
00054
00055 QPixmap myBackground;
00056
00057 bool conflictBool;
00058 QString dateformat;
00059 QString timeformat;
00060 QString channelFormat;
00061
00062 QRect listRect;
00063 QRect infoRect;
00064 QRect showLevelRect;
00065 QRect recStatusRect;
00066 QRect fullRect;
00067
00068 int listsize;
00069
00070 bool inEvent;
00071 bool inFill;
00072 bool needFill;
00073
00074 unsigned int listPos;
00075
00076 ProgramInfo *CurrentProgram(void);
00077
00078 ProgramList recListBefore;
00079 ProgramList recListAfter;
00080
00081 QString altTable;
00082 QString m_title;
00083
00084 QValueVector<struct ProgramStruct> recList;
00085
00086 int recordid;
00087
00088 int programCnt;
00089 };
00090
00091 #endif