Ignore:
Timestamp:
09/21/11 21:29:43 (11 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
66ec7cb
Parents:
788182f
Message:

Cleanup daynavigatorwidget.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/daynavigatorwidget.h

    r788182f r701240f  
    2525#include <QDate>
    2626
    27 /*#include <QPainter>*/
    28 /*#include <QLabel>*/
    29 
    30 /*class QFontMetrics;*/
    31 
    32 /*class VerticalLabel : public QWidget*/
    33 /*{*/
    34 
    35 /*public:*/
    36 /*VerticalLabel(QWidget *aParent = NULL)*/
    37 /*: QWidget(aParent)*/
    38 /*, mText("")*/
    39 /*{*/
    40 /*mFont = QLabel().font();*/
    41 /*}   */
    42 
    43 /*void paintEvent(QPaintEvent *)*/
    44 /*{   */
    45 /*QPainter p(this);*/
    46 /*drawRotatedText(&p, 270, width()/2, height()/2, mText);*/
    47 /*}   */
    48 
    49 /*void drawRotatedText(QPainter *aPainter, qreal aDegrees, int x, int y, const QString &aText)*/
    50 /*{   */
    51 
    52 /*aPainter->save();*/
    53 /*aPainter->setFont(mFont);*/
    54 /*aPainter->translate(x, y); */
    55 /*aPainter->rotate(aDegrees);*/
    56 /*QFontMetrics fm(mFont);*/
    57 /*QRect r = fm.boundingRect(aText);*/
    58 /*aPainter->drawText(-r.width()/2, fm.descent()/2, aText);*/
    59 /*aPainter->restore();*/
    60 /*}   */
    61 
    62 /*void setText(const QString &aText)*/
    63 /*{*/
    64 /*mText = aText;*/
    65 /*update();*/
    66 /*}*/
    67 
    68 /*private:*/
    69 /*QString mText;*/
    70 /*QFont mFont;*/
    71 /*};*/
    72 
    73 class DayNavigatorWidget : public QWidget, private Ui::DayNavigatorWidget
    74 {
     27/** The DayNavigator widget manages three dates, the startDate, curDate and endDate.
     28Either startDate, curDate and endDate all have to be valid and startDate <= curDate <= endDate,
     29OR all three dates are invalid (representing "no date range", e.g. no conference). */
     30class DayNavigatorWidget : public QWidget, private Ui::DayNavigatorWidget {
    7531    Q_OBJECT
    7632    public:
     
    7834        ~DayNavigatorWidget() {}
    7935        void setDates(const QDate &aStartDate, const QDate &aEndDate);
     36        void setCurDate(const QDate& curDate);
    8037        QDate curDate() const {return mCurDate;}
    8138    protected:
     
    9249        QDate mEndDate;
    9350        QDate mCurDate;
    94         QFontMetrics *mFontMetrics;
    9551};
    9652
Note: See TracChangeset for help on using the changeset viewer.