54 public: |
54 public: |
55 CalenMonthGrid(QGraphicsItem *parent = NULL); |
55 CalenMonthGrid(QGraphicsItem *parent = NULL); |
56 ~CalenMonthGrid(); |
56 ~CalenMonthGrid(); |
57 void setView(CalenMonthView *view); |
57 void setView(CalenMonthView *view); |
58 void updateMonthGridModel(QList<CalenMonthData> &monthDataArray, |
58 void updateMonthGridModel(QList<CalenMonthData> &monthDataArray, |
59 int indexToBeScrolled); |
59 int indexToBeScrolled, bool isFirstTime); |
|
60 void updateMonthGridWithInActiveMonths( |
|
61 QList<CalenMonthData> &monthDataArray); |
|
62 void updateMonthGridWithEventIndicators( |
|
63 QList<CalenMonthData> &monthDataArray); |
60 void setCurrentIdex(int index); |
64 void setCurrentIdex(int index); |
61 int getCurrentIndex(); |
65 int getCurrentIndex(); |
62 |
66 |
63 protected: |
67 protected: |
64 void orientationChanged(Qt::Orientation newOrientation); |
68 void orientationChanged(Qt::Orientation newOrientation); |
65 |
69 |
66 private: |
70 private: |
|
71 void handlePrependingRows(QList<CalenMonthData > &monthDataList); |
|
72 void handleAppendingRows(QList<CalenMonthData > &monthDataList); |
|
73 void handlePanGestureFinished(); |
67 void mousePressEvent(QGraphicsSceneMouseEvent* event); |
74 void mousePressEvent(QGraphicsSceneMouseEvent* event); |
68 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); |
75 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); |
69 void setFocusToProperDay(); |
76 void setFocusToProperDay(); |
70 void setActiveDates(QDate activeDate); |
77 void setActiveDates(QDate activeDate); |
71 void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); |
78 void paint(QPainter* painter, |
|
79 const QStyleOptionGraphicsItem* option, QWidget* widget); |
72 |
80 |
73 public slots: |
81 public slots: |
74 void scrollingFinished(); |
82 void scrollingFinished(); |
75 void prependRows(); |
83 void prependRows(); |
76 void appendRows(); |
84 void appendRows(); |
78 |
86 |
79 protected slots: |
87 protected slots: |
80 void downGesture(int value); |
88 void downGesture(int value); |
81 void upGesture(int value); |
89 void upGesture(int value); |
82 void panGesture(const QPointF &delta); |
90 void panGesture(const QPointF &delta); |
83 void timerExpired(); |
|
84 |
91 |
85 private: |
92 private: |
86 QStandardItemModel *mModel; |
93 QStandardItemModel *mModel; |
87 QList<CalenMonthData> mMonthDataArray; |
94 QList<CalenMonthData> mMonthDataArray; |
88 scrollDirection mDirection; |
95 scrollDirection mDirection; |
95 bool mIgnoreItemActivated; |
102 bool mIgnoreItemActivated; |
96 QPointF mPressedPos; |
103 QPointF mPressedPos; |
97 QColor mGridLineColor; |
104 QColor mGridLineColor; |
98 QColor mGridBorderColor; |
105 QColor mGridBorderColor; |
99 QGraphicsWidget* mContentWidget; |
106 QGraphicsWidget* mContentWidget; |
|
107 QList<QString> mLocalisedDates; |
|
108 QPointF mStartPos; |
100 }; |
109 }; |
101 |
110 |
102 #endif // CALENMONTHGRID_H |
111 #endif // CALENMONTHGRID_H |
103 |
112 |
104 // End of file --Don't remove this. |
113 // End of file --Don't remove this. |