phoneuis/bubblemanager2/bubblecore/src/bubbleheadingwidget.h
changeset 37 ba76fc04e6c2
child 46 bc5a64e5bc3c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/bubblemanager2/bubblecore/src/bubbleheadingwidget.h	Fri Jun 04 10:19:18 2010 +0100
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2009 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: Bubble heading widget
+*
+*/
+
+#ifndef BUBBLEHEADINGWIDGET_H
+#define BUBBLEHEADINGWIDGET_H
+
+#include <hbwidget.h>
+
+class HbIconItem;
+class HbTextItem;
+class HbFontSpec;
+class BubbleHeader;
+
+class BubbleHeadingWidget : public HbWidget
+{
+    Q_OBJECT
+    Q_PROPERTY(int lines READ lineCount WRITE setLineCount)
+    Q_PROPERTY(QString layoutOption READ layout WRITE setLayout)
+
+public:
+    BubbleHeadingWidget(QGraphicsItem* item=0);
+    virtual ~BubbleHeadingWidget();
+
+    int lineCount() const;
+    void setLineCount(int count);
+
+    QString layout() const;
+    void setLayout(const QString& layout);
+
+    void reset();
+    void readBubbleHeader(const BubbleHeader& header);
+    void updateTimerDisplayNow();
+
+private:
+    void createPrimitives();
+    void updatePrimitives();
+
+protected:
+    void polishEvent();
+    void changeEvent(QEvent *event);
+    void showEvent(QShowEvent *event);
+
+private:
+    int lines;
+    QString layoutOption;
+
+    const BubbleHeader* mHeader;
+
+    // primitives
+    //BubbleAnimIconItem* mStatusIcon;
+    HbIconItem* mStatusIcon;
+    HbIconItem* mNumberTypeIcon;
+    HbIconItem* mCipheringIcon;
+    HbTextItem* mText1;
+    HbTextItem* mText2;
+    HbTextItem* mText3;
+    int mCallTimerTextLine;
+    HbFontSpec* mCliFont;
+    HbFontSpec* mTextFont;
+};
+
+#endif // BUBBLEHEADINGWIDGET_H