radioapp/radiowidgets/inc/radiofadinglabel.h
branchRCL_3
changeset 19 cce62ebc198e
equal deleted inserted replaced
18:1a6714c53019 19:cce62ebc198e
       
     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 #ifndef RADIOFADINGLABEL_H
       
    19 #define RADIOFADINGLABEL_H
       
    20 
       
    21 // System includes
       
    22 #include <HbLabel>
       
    23 #include <HbEffect>
       
    24 
       
    25 // User includes
       
    26 #include "radiowidgetsexport.h"
       
    27 
       
    28 class WIDGETS_DLL_EXPORT RadioFadingLabel : public HbLabel
       
    29 {
       
    30     Q_OBJECT
       
    31 
       
    32 public:
       
    33 
       
    34     RadioFadingLabel( QGraphicsItem* parent = 0 );
       
    35 
       
    36     void setFadingEnabled( bool fading );
       
    37 
       
    38     void setTextWithoutFading( const QString& newText );
       
    39 
       
    40 public slots:
       
    41 
       
    42     void setText( const QString& newText );
       
    43 
       
    44 private slots:
       
    45 
       
    46     void effectFinished( HbEffect::EffectStatus status );
       
    47 
       
    48 private:
       
    49 
       
    50     void startEffect( const QString& effectName, const char* slot = 0 );
       
    51 
       
    52     QString trimHtml( const QString& text );
       
    53 
       
    54 private: // data
       
    55 
       
    56     QString     mTextHolder;
       
    57 
       
    58     bool        mFadingEnabled;
       
    59 
       
    60 };
       
    61 
       
    62 #endif // RADIOFADINGLABEL_H