|
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 * The header file for tone fetcher widget. |
|
16 * |
|
17 */ |
|
18 #ifndef TONEFETCHERWIDGET_H |
|
19 #define TONEFETCHERWIDGET_H |
|
20 |
|
21 #include <hbwidget.h> |
|
22 #include <QFileInfo> |
|
23 #include <QDir> |
|
24 #include <QString> |
|
25 #include "tonefetcherengine.h" |
|
26 |
|
27 class QDirModel; |
|
28 class HbListView; |
|
29 class QGraphicsLinearLayout; |
|
30 class QStandardItemModel; |
|
31 class HbAbstractViewItem; |
|
32 class ToneFetcherView; |
|
33 class ToneFetcherModel; |
|
34 class HbLabel; |
|
35 class HbProgressDialog; |
|
36 |
|
37 class ToneFetcherWidget : public HbWidget |
|
38 { |
|
39 Q_OBJECT |
|
40 |
|
41 public: |
|
42 explicit ToneFetcherWidget(HbWidget *parent, ToneFetcherView *serviceView); |
|
43 ~ToneFetcherWidget(); |
|
44 QString getCurrentItemPath(); |
|
45 void playOrPause(); |
|
46 |
|
47 signals: |
|
48 void itemClicked(const QString &item); |
|
49 void triggerToolBar(bool enable); |
|
50 |
|
51 |
|
52 private: |
|
53 void init(); |
|
54 void addFilesFromRom(); |
|
55 void initRomSoundList(); |
|
56 void addFilesFromMDE(const QStringList &uriList); |
|
57 |
|
58 private slots: |
|
59 void on_list_activated(const QModelIndex &index); |
|
60 void mdeSessionOpened(); |
|
61 void mdeSessionError(int error); |
|
62 void queryComplete(const QStringList &uriList); |
|
63 void queryError(int error ); |
|
64 void previewEvent(int event); |
|
65 void onObjectChanged(); |
|
66 void refreshFinish(); |
|
67 void refreshStart(); |
|
68 |
|
69 private: |
|
70 HbLabel *mLabel; |
|
71 HbListView *mListView; |
|
72 QGraphicsLinearLayout *mLayout; |
|
73 ToneFetcherModel *mToneModel; |
|
74 |
|
75 ToneFetcherView *mServiceView; |
|
76 ToneFetcherEngine *mServiceEngine; |
|
77 |
|
78 QFileInfoList mRomSoundList; |
|
79 QModelIndex mOldSeletedItem; |
|
80 HbProgressDialog *mWaitNote; |
|
81 }; |
|
82 #endif /* TONEFETCHERWIDGET_H */ |