emailuis/nmhswidget/inc/nmhswidgettitlerow.h
branchRCL_3
changeset 24 d189ee25cf9d
equal deleted inserted replaced
23:dcf0eedfc1a3 24:d189ee25cf9d
       
     1 /*
       
     2  * Copyright (c) 2010 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 NMHSWIDGETTITLEROW_H_
       
    19 #define NMHSWIDGETTITLEROW_H_
       
    20 
       
    21 #include <hbwidget.h>
       
    22 
       
    23 //FORWARD DECLARATIONS:
       
    24 class HbLabel;
       
    25 class HbPushButton;
       
    26 class HbFrameItem;
       
    27 class HbDocumentLoader;
       
    28 
       
    29 class NmHsWidgetTitleRow : public HbWidget
       
    30 {
       
    31     Q_OBJECT
       
    32   
       
    33 public:
       
    34     NmHsWidgetTitleRow(QGraphicsItem *parent = 0, Qt::WindowFlags flags = 0);
       
    35     ~NmHsWidgetTitleRow();
       
    36     QPainterPath shape() const;
       
    37     qreal containerHeight();
       
    38     bool setupUI(HbDocumentLoader &loader); 
       
    39     void setAccountIcon(const QString& accountIconName );
       
    40     void setExpandCollapseIcon(const bool& expand);
       
    41     void gestureEvent(QGestureEvent *event);
       
    42     
       
    43 private:
       
    44     bool loadDocML(HbDocumentLoader &loader);
       
    45     bool setupGraphics();
       
    46     void updateData();
       
    47     void setHighlighedFontsColor( bool pressed );
       
    48     void showHighlight( bool pressed );
       
    49     
       
    50 public slots: 
       
    51     void updateAccountName(const QString& accountName );
       
    52     void updateUnreadCount(const int& unreadCount );
       
    53 
       
    54 signals:
       
    55     void expandCollapseButtonPressed();
       
    56     void mailboxLaunchTriggered();
       
    57     
       
    58 protected:
       
    59     bool event( QEvent *event );
       
    60     
       
    61 private:
       
    62     HbWidget *mContainer;
       
    63     HbLabel *mMailboxIcon;
       
    64     HbLabel *mMailboxInfo;
       
    65     HbLabel *mUnreadCountLabel;
       
    66     HbPushButton *mCollapseExpIconLabel;
       
    67     QString mAccountName;
       
    68     int mUnreadCount;
       
    69     HbFrameItem* mBackgroundLayoutItem;
       
    70 };
       
    71 
       
    72 #endif // NMHSWIDGETTITLEROW_H_