|
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 list model |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef TONEFETCHERMODEL_H |
|
20 #define TONEFETCHERMODEL_H |
|
21 |
|
22 #include <QStringListModel> |
|
23 #include <QStringList> |
|
24 |
|
25 // CLASS DECLARATION |
|
26 /** |
|
27 * This class is used for storing tone list items. |
|
28 * inherited from QStringListModel so that many existing functions could be used. |
|
29 * |
|
30 */ |
|
31 class ToneFetcherModel : public QStringListModel |
|
32 { |
|
33 public: |
|
34 explicit ToneFetcherModel( QObject *parent ); |
|
35 virtual ~ToneFetcherModel(); |
|
36 //from QStringListModel |
|
37 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; |
|
38 QString getPath(const QModelIndex &index) const; |
|
39 //sort the list |
|
40 void sort(); |
|
41 //sort method |
|
42 bool static caseSensitiveLessThan(const QString &s1, const QString &s2); |
|
43 //emit the signal of layoutToBeChanged(); |
|
44 void layoutToBeChanged(); |
|
45 //emit the signal of layoutChanged(); |
|
46 void layoutHasChanged(); |
|
47 }; |
|
48 |
|
49 #endif /* TONEFETCHERMODEL_H */ |