calendarui/views/dayview/inc/calendayitem.h
changeset 58 ef813d54df51
parent 50 579cc610882e
equal deleted inserted replaced
50:579cc610882e 58:ef813d54df51
    17 
    17 
    18 #ifndef CALENDAYITEM_H
    18 #ifndef CALENDAYITEM_H
    19 #define CALENDAYITEM_H
    19 #define CALENDAYITEM_H
    20 
    20 
    21 //System includes
    21 //System includes
       
    22 #include <QDateTime>
    22 #include <hbabstractviewitem.h>
    23 #include <hbabstractviewitem.h>
    23 #include <hbtextitem.h>
    24 #include <hbtextitem.h>
    24 #include <hbframeitem.h>
    25 #include <hbframeitem.h>
    25 
    26 
    26 //Forward declarations
    27 //Forward declarations
    27 class AgendaEntry;
    28 class AgendaEntry;
    28 class CalenDayStatusStrip;
    29 class CalenDayStatusStrip;
       
    30 class CalenDayContainer;
    29 
    31 
    30 
    32 
    31 class CalenDayItem : public HbAbstractViewItem
    33 class CalenDayItem : public HbAbstractViewItem
    32 {
    34 {
    33     Q_OBJECT
    35     Q_OBJECT
    34     Q_PROPERTY( bool eventDescription READ hasEventDescription )
    36     Q_PROPERTY( bool eventDescription READ hasEventDescription )
    35     Q_PROPERTY( bool backgroundFrame READ hasBackgroundFrame )
    37     Q_PROPERTY( bool backgroundFrame READ hasBackgroundFrame )
    36     
    38     
    37 public:
    39 public:
    38     CalenDayItem();
    40     CalenDayItem(const CalenDayContainer *container);
    39     virtual ~CalenDayItem();
    41     virtual ~CalenDayItem();
    40     HbAbstractViewItem * createItem();
    42     HbAbstractViewItem * createItem();
    41     void updateChildItems();
    43     void updateChildItems();
    42     bool hasEventDescription() const { return mEventDesc->isVisible();}
    44     bool hasEventDescription() const { return mEventDesc->isVisible(); }
    43     bool hasBackgroundFrame() const { return mBg->isVisible();}
    45     bool hasBackgroundFrame() const { return mBg->isVisible(); }
    44 
    46     const CalenDayContainer *container() const { return mContainer; }
       
    47     
    45 protected:
    48 protected:
    46     void resizeEvent(QGraphicsSceneResizeEvent *event);
    49     void resizeEvent(QGraphicsSceneResizeEvent *event);
    47 
    50 
    48 private:
    51 private:
    49     CalenDayItem(const CalenDayItem &source);
    52     CalenDayItem(const CalenDayItem &source);
    50 	void setDescription(const AgendaEntry &entry, bool allDayEvent);
    53 	void setDescription(const AgendaEntry &entry, bool allDayEvent);
    51     void setStatusStrip(const AgendaEntry &entry, bool allDayEvent);
    54     void setStatusStrip(const AgendaEntry &entry, bool allDayEvent);
    52 
    55 
    53     bool mUpdated;
    56     bool mUpdated;
       
    57     qreal mEventDescMinWidth;
       
    58     qreal mFrameMinWidth;
       
    59 
    54     HbFrameItem *mBg;
    60     HbFrameItem *mBg;
    55     HbTextItem *mEventDesc;
    61     HbTextItem *mEventDesc;
       
    62 
    56     CalenDayStatusStrip *mColorStripe;
    63     CalenDayStatusStrip *mColorStripe;
    57     qreal mEventDescMinWidth;
    64     const CalenDayContainer *mContainer;
    58     qreal mFrameMinWidth; 
       
    59     
       
    60 };
    65 };
    61 
    66 
    62 #endif // CALENDAYITEM_H
    67 #endif // CALENDAYITEM_H