|
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 TSDEVICEDIALOGCONTAINER_H |
|
18 #define TSDEVICEDIALOGCONTAINER_H |
|
19 |
|
20 #include <QObject> |
|
21 #include <HbDeviceDialogInterface> |
|
22 #include <QValueSpacePublisher> |
|
23 #include <QValueSpaceSubscriber> |
|
24 |
|
25 #include "tsdocumentloader.h" |
|
26 |
|
27 QTM_USE_NAMESPACE |
|
28 |
|
29 class QAbstractListModel; |
|
30 |
|
31 class TsDeviceDialogContainer : public QObject, |
|
32 public HbDeviceDialogInterface |
|
33 { |
|
34 Q_OBJECT |
|
35 public: |
|
36 explicit TsDeviceDialogContainer(QAbstractListModel *model, |
|
37 QObject *parent = 0); |
|
38 ~TsDeviceDialogContainer(); |
|
39 |
|
40 public: |
|
41 virtual bool setDeviceDialogParameters(const QVariantMap ¶meters); |
|
42 virtual int deviceDialogError() const; |
|
43 virtual void closeDeviceDialog(bool byClient); |
|
44 virtual HbPopup *deviceDialogWidget() const; |
|
45 virtual QObject *signalSender() const; |
|
46 |
|
47 signals: |
|
48 void deviceDialogClosed(); |
|
49 |
|
50 public slots: |
|
51 void changeOrientation(Qt::Orientation orientation); |
|
52 |
|
53 private slots: |
|
54 void notifyDialogClosed(); |
|
55 void switchViewOnModelChange(); |
|
56 void handleDismissRequest(); |
|
57 |
|
58 private: |
|
59 TsDocumentLoader mLoader; |
|
60 QValueSpacePublisher mVisibilityPublisher; |
|
61 QValueSpaceSubscriber mDismissRequestSubscriber; |
|
62 |
|
63 Q_DISABLE_COPY(TsDeviceDialogContainer) |
|
64 }; |
|
65 |
|
66 #endif // TSDEVICEDIALOGCONTAINER_H |