radioapp/radiowidgets/src/radiobannerlabel.cpp
changeset 13 46974bebc798
child 14 63aabac4416d
equal deleted inserted replaced
0:f3d95d9c00ab 13:46974bebc798
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #include "radiobannerlabel.h"
       
    19 
       
    20 #include <qpainter.h>
       
    21 
       
    22 /*!
       
    23  *
       
    24  */
       
    25 RadioBannerLabel::RadioBannerLabel( QGraphicsItem * parent ) :
       
    26     HbLabel( parent )
       
    27 {
       
    28     QFont currentfont( font() );
       
    29     currentfont.setBold( true );
       
    30     currentfont.setPixelSize( 18 );
       
    31     setFont( currentfont );
       
    32 }
       
    33 
       
    34 /*!
       
    35  *
       
    36  */
       
    37 void RadioBannerLabel::paint( QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget )
       
    38 {
       
    39     painter->setPen(QPen(QColor(200, 200, 200, 150)));
       
    40     painter->setBrush(QBrush(QColor(200, 200, 200, 150),Qt::SolidPattern));
       
    41     painter->drawRect(option->rect);
       
    42     HbLabel::paint( painter, option, widget );
       
    43 }