Changeset 701240f in confclerk_git for src/gui/daynavigatorwidget.h
- Timestamp:
- 09/21/11 21:29:43 (11 years ago)
- Branches:
- master, qt5
- Children:
- 66ec7cb
- Parents:
- 788182f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/daynavigatorwidget.h
r788182f r701240f 25 25 #include <QDate> 26 26 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. 28 Either startDate, curDate and endDate all have to be valid and startDate <= curDate <= endDate, 29 OR all three dates are invalid (representing "no date range", e.g. no conference). */ 30 class DayNavigatorWidget : public QWidget, private Ui::DayNavigatorWidget { 75 31 Q_OBJECT 76 32 public: … … 78 34 ~DayNavigatorWidget() {} 79 35 void setDates(const QDate &aStartDate, const QDate &aEndDate); 36 void setCurDate(const QDate& curDate); 80 37 QDate curDate() const {return mCurDate;} 81 38 protected: … … 92 49 QDate mEndDate; 93 50 QDate mCurDate; 94 QFontMetrics *mFontMetrics;95 51 }; 96 52
Note: See TracChangeset
for help on using the changeset viewer.