calendarui/views/dayview/inc/calendayhourelement.h
changeset 57 bb2d3e476f29
parent 55 2c54b51f39c4
child 81 ce92091cbd61
equal deleted inserted replaced
55:2c54b51f39c4 57:bb2d3e476f29
     1 /*
     1 /*
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3  * All rights reserved.
     4 * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     8  *
     9 * Initial Contributors:
     9  * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10  * Nokia Corporation - initial contribution.
    11 *
    11  *
    12 * Contributors:
    12  * Contributors:
    13 *
    13  *
    14 * Description:  Day view control of calendar
    14  * Description:  Day view control of calendar
    15 *
    15  *
    16 */
    16  */
    17 
    17 
    18 #ifndef CALENDAYHOURELEMENT_H
    18 #ifndef CALENDAYHOURELEMENT_H
    19 #define CALENDAYHOURELEMENT_H
    19 #define CALENDAYHOURELEMENT_H
    20 
    20 
    21 //System includes
    21 // System includes
    22 #include <QTime>
    22 #include <QTime>
    23 #include <QPen>
    23 #include <QPen>
    24 #include <hbwidget.h>
    24 #include <HbWidget>
    25 
    25 
    26 //User includes
    26 // User includes
    27 
    27 
    28 
    28 
    29 //Forward declarations
    29 // Forward declarations
    30 class CalenDayHourScrollArea;
    30 class CalenDayHourScrollArea;
    31 
    31 
    32 class CalenDayHourElement : public HbWidget
    32 class CalenDayHourElement : public HbWidget
    33 {
    33 {
    34 	Q_OBJECT
    34 	Q_OBJECT
    35 
    35 
    36 public:
    36 public:
    37     
    37 
    38     /**
    38     CalenDayHourElement(const QTime &time, QGraphicsItem *parent = 0);
    39      * Constructor.
       
    40      */
       
    41     CalenDayHourElement(const QTime &time, QGraphicsItem *parent=0);
       
    42     
       
    43     /**
       
    44      * Destructor.
       
    45      */
       
    46     virtual ~CalenDayHourElement();
    39     virtual ~CalenDayHourElement();
    47 
    40 
    48     void setTime(const QTime &time);
    41     void setTime(const QTime &time);
    49     
       
    50     QTime time() const;
    42     QTime time() const;
    51     
    43 
    52     /**
    44     void paint(QPainter * painter, const QStyleOptionGraphicsItem * option,
    53      * 
    45         QWidget * widget);
    54      */
       
    55     void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget);
       
    56 
    46 
    57 private:
    47 private:
    58     
    48 
    59     CalenDayHourScrollArea *mContainer;
    49     const CalenDayHourScrollArea *mContainer;
    60     QTime mHour;
    50     QTime mHour;
    61     QColor mHourLineColor;
    51     QColor mHourLineColor;
    62     qreal mUnitInPixels;
    52     qreal mUnitInPixels;
    63 };
    53 };
    64 
    54