Ignore:
Timestamp:
01/22/10 13:31:10 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
49c5ad3
Parents:
806b992
Message:

day navigator widget changes

  • changed from Horizontal to Vertical
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/daynavigatorwidget.h

    r806b992 r5992909  
    55#include <QObject>
    66#include <QDate>
     7
     8/*#include <QPainter>*/
     9/*#include <QLabel>*/
     10
     11/*class QFontMetrics;*/
     12
     13/*class VerticalLabel : public QWidget*/
     14/*{*/
     15
     16/*public:*/
     17/*VerticalLabel(QWidget *aParent = NULL)*/
     18/*: QWidget(aParent)*/
     19/*, mText("")*/
     20/*{*/
     21/*mFont = QLabel().font();*/
     22/*}   */
     23
     24/*void paintEvent(QPaintEvent *)*/
     25/*{   */
     26/*QPainter p(this);*/
     27/*drawRotatedText(&p, 270, width()/2, height()/2, mText);*/
     28/*}   */
     29
     30/*void drawRotatedText(QPainter *aPainter, qreal aDegrees, int x, int y, const QString &aText)*/
     31/*{   */
     32
     33/*aPainter->save();*/
     34/*aPainter->setFont(mFont);*/
     35/*aPainter->translate(x, y); */
     36/*aPainter->rotate(aDegrees);*/
     37/*QFontMetrics fm(mFont);*/
     38/*QRect r = fm.boundingRect(aText);*/
     39/*aPainter->drawText(-r.width()/2, fm.descent()/2, aText);*/
     40/*aPainter->restore();*/
     41/*}   */
     42
     43/*void setText(const QString &aText)*/
     44/*{*/
     45/*mText = aText;*/
     46/*update();*/
     47/*}*/
     48
     49/*private:*/
     50/*QString mText;*/
     51/*QFont mFont;*/
     52/*};*/
    753
    854class DayNavigatorWidget : public QWidget, private Ui::DayNavigatorWidget
     
    1460        void setDates(const QDate &aStartDate, const QDate &aEndDate);
    1561        QDate getCurrentDate();
     62    protected:
     63        void paintEvent(QPaintEvent *);
    1664    private slots:
    1765        void prevDayButtonClicked();
     
    2371        QDate mEndDate;
    2472        QDate mCurDate;
     73        QFontMetrics *mFontMetrics;
    2574};
    2675
Note: See TracChangeset for help on using the changeset viewer.