emailuis/nmhswidget/inc/nmhswidgettitlerow.h
author hgs
Thu, 14 Oct 2010 17:33:43 +0300
changeset 76 38bf5461e270
parent 62 a8c646b56683
permissions -rw-r--r--
201041

/*
 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
 *
 * Contributors:
 *
 * Description: 
 *
 */

#ifndef NMHSWIDGETTITLEROW_H_
#define NMHSWIDGETTITLEROW_H_

#include <hbwidget.h>
#include <hbeffect.h>

//FORWARD DECLARATIONS:
class HbLabel;
class HbPushButton;
class HbFrameItem;
class HbDocumentLoader;

class NmHsWidgetTitleRow : public HbWidget
{
    Q_OBJECT
  
public:
    NmHsWidgetTitleRow(QGraphicsItem *parent = 0, Qt::WindowFlags flags = 0);
    ~NmHsWidgetTitleRow();
    QPainterPath shape() const;
    qreal containerHeight();
    bool setupUI(HbDocumentLoader &loader); 
    void setAccountIcon(const QString& accountIconName );
    void setExpandCollapseIcon(const bool& expand);
    void gestureEvent(QGestureEvent *event);
    
private:
    bool loadDocML(HbDocumentLoader &loader);
    bool setupGraphics();
    void updateData();
    void setFontsColor();
    
public slots: 
    void updateAccountName(const QString& accountName );
    void updateUnreadCount(const int& unreadCount );
    
private slots:
    void hideHighlight(const HbEffect::EffectStatus &status);

signals:
    void expandCollapseButtonPressed();
    void mailboxLaunchTriggered();
    
protected:
    bool event( QEvent *event );
    
private:
    HbWidget *mContainer;
    HbLabel *mMailboxIcon;
    HbLabel *mMailboxInfo;
    HbLabel *mUnreadCountLabel;
    HbPushButton *mCollapseExpIconLabel;
    QString mAccountName;
    int mUnreadCount;
    HbFrameItem* mBackgroundLayoutItem;
};

#endif // NMHSWIDGETTITLEROW_H_