-
Notifications
You must be signed in to change notification settings - Fork 0
/
calendar.h
executable file
·90 lines (75 loc) · 2 KB
/
calendar.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#include <QtGui>
#include <QNetworkReply>
#include <QNetworkAccessManager>
#include <QtNetwork>
#include "vcalparser.h"
#include "eventmodel.h"
#include "eventtableview.h"
#include "task.h"
#include "tevent.h"
#include "ttodo.h"
#include "eventdelegate.h"
#include "statusindicator.h"
#include "contextmenu.h"
#ifndef CALENDAR_H
#define CALENDAR_H
class Calendar : public QMainWindow
{
Q_OBJECT
public:
Calendar(QWidget *parent = 0);
~Calendar();
void initNetwork();
void defineSettings(const QString which);
void setupConfigLayouts();
public slots:
void authenticate(QNetworkReply* reply, QAuthenticator* auth);
void configSettings();
void configNetwork();
void fetchCalendarData();
void getData();
void outputError(QNetworkReply::NetworkError error);
void outputError(QString message);
void saveCalendarData();
void saveCalendarData(QNetworkReply *reply);
void saveSettings();
void showEventInfo(const QModelIndex & index);
void showTodoInfo(int row, int col);
void transmissionStats(const qint64 done, const qint64 total);
void viewUpdatedCalendar();
signals:
void listPopulated();
void configChanged();
void visibleRow(int row);
void authLoop();
private:
void checkSettings();
void populateList();
void prepareTable();
void viewCalendar();
EventTableView *m_events;
QTableWidget *m_todos;
QTabWidget *m_tabs;
QStackedWidget *stackedWidget;
QNetworkAccessManager *networkManager;
QNetworkReply *networkReply;
VCalParser *parser;
EventModel *eventModel;
QSettings *settings;
QString location;
QFile calendar;
QTextStream data;
int m_nextItemRow;
int m_currentEventRow;
int authRetries;
QWidget *m_configDialog, *m_netDialog, *m_mainWidget;
QLineEdit *urlscheme, *hostname, *port, *path, *username, *password, *proxyHost, *proxyPort;
QPushButton *saveSettingsBtn, *saveNetworkBtn, *abortSettingsBtn, *abortNetworkBtn;
QCheckBox *useProxy, *useTodos;
StatusIndicator *status;
ContextMenu *menu;
#ifdef Q_OS_SYMBIAN
bool bDefaultIapSet;
#endif
};
#endif // CALENDAR_H