equal
deleted
inserted
replaced
|
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 DATACONTAINER_H |
|
19 #define DATACONTAINER_H |
|
20 |
|
21 #include <hbwidget.h> |
|
22 #include <enginewrapper.h> |
|
23 |
|
24 class DataContainer : public HbWidget |
|
25 { |
|
26 Q_OBJECT |
|
27 |
|
28 public: |
|
29 DataContainer(const EngineWrapper& engine, QGraphicsItem *parent = 0) : |
|
30 HbWidget(parent), |
|
31 mEngine(engine) |
|
32 { |
|
33 } |
|
34 |
|
35 void hideContainer() |
|
36 { |
|
37 disconnect(&mEngine, SIGNAL(samplesUpdated()), this, SLOT(samplesUpdated())); |
|
38 hide(); |
|
39 } |
|
40 |
|
41 void showContainer() |
|
42 { |
|
43 connect(&mEngine, SIGNAL(samplesUpdated()),this, SLOT(samplesUpdated())); |
|
44 show(); |
|
45 } |
|
46 |
|
47 inline const EngineWrapper& engine() const { return mEngine; } |
|
48 |
|
49 public slots: |
|
50 virtual void samplesUpdated() |
|
51 { |
|
52 update(); |
|
53 } |
|
54 |
|
55 private: |
|
56 const EngineWrapper& mEngine; |
|
57 }; |
|
58 |
|
59 #endif // DATACONTAINER_H |