|
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 PERFMONDATAPOPUPDIALOG_P_H |
|
19 #define PERFMONDATAPOPUPDIALOG_P_H |
|
20 |
|
21 #include <QObject> |
|
22 #include <QVariantMap> |
|
23 |
|
24 #include <hbdevicedialoginterface.h> |
|
25 #include <hbdevicedialog.h> |
|
26 #include <hbnotificationdialog.h> |
|
27 |
|
28 class PerfMonDataPopupWidget; |
|
29 |
|
30 class PerfMonDataPopupDialog : public HbDialog, public HbDeviceDialogInterface |
|
31 { |
|
32 Q_OBJECT |
|
33 Q_PROPERTY(Location location READ location WRITE setLocation) |
|
34 Q_PROPERTY(QStringList lines READ lines WRITE setLines) |
|
35 |
|
36 Q_ENUMS(Location) |
|
37 |
|
38 public: |
|
39 enum Location |
|
40 { |
|
41 LocationTopRight = 0, |
|
42 LocationBottomMiddle |
|
43 }; |
|
44 |
|
45 public: |
|
46 PerfMonDataPopupDialog(const QVariantMap ¶meters); |
|
47 virtual ~PerfMonDataPopupDialog(); |
|
48 |
|
49 bool setDeviceDialogParameters(const QVariantMap ¶meters); |
|
50 int deviceDialogError() const; |
|
51 void closeDeviceDialog(bool byClient); |
|
52 HbPopup *deviceDialogWidget() const; |
|
53 |
|
54 protected: |
|
55 // void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, |
|
56 // QWidget *widget=0); |
|
57 |
|
58 protected: |
|
59 void hideEvent(QHideEvent *event); |
|
60 void showEvent(QShowEvent *event); |
|
61 void mousePressEvent(QGraphicsSceneMouseEvent *event); |
|
62 |
|
63 signals: |
|
64 void deviceDialogClosed(); |
|
65 void deviceDialogData(QVariantMap data); |
|
66 |
|
67 private slots: |
|
68 void reposition(); |
|
69 |
|
70 private: |
|
71 Location location() const; |
|
72 void setLocation(Location location); |
|
73 |
|
74 QStringList lines() const; |
|
75 void setLines(const QStringList &lines); |
|
76 |
|
77 private: |
|
78 Q_DISABLE_COPY(PerfMonDataPopupDialog) |
|
79 |
|
80 int mLastError; |
|
81 bool mShowEventReceived; |
|
82 |
|
83 Location mLocation; |
|
84 |
|
85 PerfMonDataPopupWidget *mWidget; |
|
86 }; |
|
87 |
|
88 #endif // PERFMONDATAPOPUPDIALOG_P_H |