forked from thelineva/tvkaistagui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprogrammetableparser.h
46 lines (40 loc) · 1.16 KB
/
programmetableparser.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef PROGRAMMETABLEPARSER_H
#define PROGRAMMETABLEPARSER_H
#include <QList>
#include "htmlparser.h"
#include "programme.h"
class QIODevice;
class ProgrammeTableParser : public HtmlParser
{
public:
ProgrammeTableParser();
~ProgrammeTableParser();
QDate requestedDate() const;
void setRequestedDate(const QDate &date);
int requestedChannelId() const;
void setRequestedChannelId(int channelId);
void clear();
bool isValidResults() const;
bool isLoginForm() const;
QDate date(int dayOfWeek) const;
QList<Programme> programmes(int dayOfWeek) const;
QList<Programme> requestedProgrammes() const;
protected:
void startElementParsed(const QString &name);
void endElementParsed(const QString &name);
void contentParsed(const QString &content);
private:
bool parseProgrammeId(const QString &s);
bool parseTime(const QString &s);
void parseFlags();
QList<Programme> *m_programmes;
QDate m_firstDay;
QDate m_requestedDate;
int m_requestedChannelId;
Programme m_currentProgramme;
int m_x;
int m_tableDepth;
int m_dayOfWeek;
bool m_validResults;
};
#endif // PROGRAMMETABLEPARSER_H