2 * Copyright 2008 Davide Bettio <davide.bettio@kdemail.net>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Library General Public License as
6 * published by the Free Software Foundation; either version 2, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef PLASMA_CALENDAR_H
21 #define PLASMA_CALENDAR_H
23 #include <QtGui/QGraphicsWidget>
25 #include "plasmaclock_export.h"
27 #include "calendartable.h"
29 class KCalendarSystem
;
35 class CalendarPrivate
;
37 class PLASMACLOCK_EXPORT Calendar
: public QGraphicsWidget
42 explicit Calendar(QGraphicsWidget
*parent
= 0);
43 Calendar(const QDate
&, QGraphicsWidget
*parent
= 0);
46 const KCalendarSystem
*calendar () const;
48 bool setDate(const QDate
&date
);
49 const QDate
& date() const;
51 bool setCalendar(KCalendarSystem
*calendar
= 0);
53 CalendarTable
*calendarTable() const;
56 void dateChanged(const QDate
&cur
, const QDate
&old
);
57 void dateChanged(const QDate
&date
);
63 void dateUpdated(const QDate
&date
);
65 void goToWeek(int week
);
66 void goToMonth(int year
, int month
);
67 void manualDateChange();
69 void monthTriggered();
70 void showYearSpinBox();
71 void hideYearSpinBox();
74 CalendarPrivate
* const d
;