|
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 #ifndef IRNOWPLAYINGCONTAINER_H |
|
18 #define IRNOWPLAYINGCONTAINER_H |
|
19 |
|
20 #include <hbwidget.h> |
|
21 #include "irdocumentloader.h" |
|
22 |
|
23 class HbTextItem; |
|
24 class HbLabel; |
|
25 class HbMarqueeItem; |
|
26 |
|
27 /** |
|
28 * This class is a widget of now playing view. It displays the |
|
29 * main information of the channel server. |
|
30 */ |
|
31 |
|
32 class IRNowPlayingContainer : public HbWidget |
|
33 { |
|
34 Q_OBJECT |
|
35 |
|
36 public: |
|
37 explicit IRNowPlayingContainer(QObject *aLoaderParent, QGraphicsItem *aParent = 0); |
|
38 ~IRNowPlayingContainer(); |
|
39 |
|
40 // Methods to set station information |
|
41 void setStationName(const QString &aStationName); |
|
42 void setCategory(const QString &aCategory); |
|
43 void setSongName(const QString &aSongName); |
|
44 void setLogo(const HbIcon& aLogo); |
|
45 void setAdvImage(const HbIcon& aAdvImage); |
|
46 |
|
47 signals: |
|
48 // This signal will cause the popup of volume slider control |
|
49 void volumePressed(void); |
|
50 // This signal will cause a browser open a link to the adv. |
|
51 void advertisementPressed(void); |
|
52 |
|
53 protected: |
|
54 // Inherited methods |
|
55 void mousePressEvent(QGraphicsSceneMouseEvent *aEvent); |
|
56 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); |
|
57 |
|
58 private slots: |
|
59 void orientationChanged(Qt::Orientation aOrientation); |
|
60 |
|
61 private: |
|
62 void constructContainer(); |
|
63 void resizeContainer(Qt::Orientation aOrientation); |
|
64 |
|
65 private: |
|
66 // This loader is for XML layout. |
|
67 IRDocumentLoader iLoader; |
|
68 |
|
69 // Station information |
|
70 HbTextItem *iStationName; |
|
71 HbTextItem *iCategory; |
|
72 HbMarqueeItem *iSongName; |
|
73 HbLabel *iAdvImage; |
|
74 HbLabel *iLogo; |
|
75 }; |
|
76 |
|
77 #endif //IRNOWPLAYINGCONTAINER_H |