19
|
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
|
22 |
#include <QStringListModel>
|
19
|
23 |
#include <QStringList>
|
|
24 |
|
|
25 |
// CLASS DECLARATION
|
|
26 |
/**
|
|
27 |
* This class is used for storing tone list items.
|
22
|
28 |
* inherited from QStringListModel so that many existing functions could be used.
|
19
|
29 |
*
|
|
30 |
*/
|
22
|
31 |
class ToneFetcherModel : public QStringListModel
|
19
|
32 |
{
|
|
33 |
public:
|
|
34 |
explicit ToneFetcherModel( QObject *parent );
|
|
35 |
virtual ~ToneFetcherModel();
|
22
|
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();
|
19
|
47 |
};
|
|
48 |
|
22
|
49 |
#endif /* TONEFETCHERMODEL_H */
|