summaryrefslogtreecommitdiff
path: root/core/pim/datebook/modules/weeklst/datebookweeklst.h
blob: 53bed05553be626401b5804b3600d7fe4a523caa (plain)
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
#ifndef DATEBOOKWEEKLST
#define DATEBOOKWEEKLST

#include <qpe/event.h>

#include <qwidget.h>
#include <qdatetime.h>

class DateBookDB;
class DateBookDBHoliday;
class DateBookWeekLstHeader;
class DateBookWeekLstEvent;
class DateBookWeekLstDblView;
class QVBoxLayout;
class QScrollView;

class DateBookWeekLst : public QWidget
{
    Q_OBJECT

public:
    DateBookWeekLst( bool ampm, bool onM, DateBookDBHoliday *newDB,
             QWidget *parent = 0,
             const char *name = 0 );
    ~DateBookWeekLst();
    void setDate( int y, int w );
    void setDate(const QDate &d );
    int week() const { return _week; };
    QDate date();
    QDate weekDate() const;

public slots:
    void redraw();
    void dateChanged(QDate &date);

protected slots:
    void keyPressEvent(QKeyEvent *);
    void slotClockChanged(bool);
    void setDbl(bool on);

signals:
    void showDate(int y, int m, int d);
    void addEvent(const QDateTime &start, const QDateTime &stop,
    const QString &str, const QString &location);
    void editEvent(const Event &e);
    void duplicateEvent(const Event &e);
    void removeEvent(const Event &e);
    void beamEvent(const Event &e);

private:
    DateBookDBHoliday *db;
    int startTime;
    bool ampm;
    bool bStartOnMonday;
    bool dbl;
    QDate bdate;
    int year, _week,dow;
    DateBookWeekLstHeader *header;
    QVBoxLayout *layout;
    QScrollView *scroll;
    DateBookWeekLstDblView*m_CurrentView;
    bool dateset:1;

    void getEvents();
};

#endif