2 * Copyright (C) 2010 Ixonos Plc.
4 * This file is part of fosdem-schedule.
6 * fosdem-schedule is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation, either version 2 of the License, or (at your option)
11 * fosdem-schedule is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * You should have received a copy of the GNU General Public License along with
17 * fosdem-schedule. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef DAYNAVIGATORWIDGET_H
20 #define DAYNAVIGATORWIDGET_H
22 #include "ui_daynavigatorwidget.h"
26 /*#include <QPainter>*/
29 /*class QFontMetrics;*/
31 /*class VerticalLabel : public QWidget*/
35 /*VerticalLabel(QWidget *aParent = NULL)*/
36 /*: QWidget(aParent)*/
39 /*mFont = QLabel().font();*/
42 /*void paintEvent(QPaintEvent *)*/
45 /*drawRotatedText(&p, 270, width()/2, height()/2, mText);*/
48 /*void drawRotatedText(QPainter *aPainter, qreal aDegrees, int x, int y, const QString &aText)*/
52 /*aPainter->setFont(mFont);*/
53 /*aPainter->translate(x, y); */
54 /*aPainter->rotate(aDegrees);*/
55 /*QFontMetrics fm(mFont);*/
56 /*QRect r = fm.boundingRect(aText);*/
57 /*aPainter->drawText(-r.width()/2, fm.descent()/2, aText);*/
58 /*aPainter->restore();*/
61 /*void setText(const QString &aText)*/
72 class DayNavigatorWidget : public QWidget, private Ui::DayNavigatorWidget
76 DayNavigatorWidget(QWidget *aParent = NULL);
77 ~DayNavigatorWidget() {}
78 void setDates(const QDate &aStartDate, const QDate &aEndDate);
80 void paintEvent(QPaintEvent *);
82 void prevDayButtonClicked();
83 void nextDayButtonClicked();
85 void dateChanged(const QDate &aDate);
90 QFontMetrics *mFontMetrics;
93 #endif /* DAYNAVIGATORWIDGET_H */