|
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: Profiles model |
|
15 * |
|
16 */ |
|
17 |
|
18 // User includes |
|
19 #include "profilesmodel.h" |
|
20 #include "profilesmodel_p.h" |
|
21 #include "profileswidgetconsts.h" |
|
22 |
|
23 /*! |
|
24 \class ProfilesModelPrivate |
|
25 \profiles widget model class |
|
26 |
|
27 This class is used to create profiles widget model |
|
28 */ |
|
29 |
|
30 // ======== MEMBER FUNCTIONS ======== |
|
31 |
|
32 /*! |
|
33 Constructor |
|
34 */ |
|
35 ProfilesModel::ProfilesModel(QObject *parent/*= 0*/) |
|
36 : QObject(parent) |
|
37 { |
|
38 QT_TRAP_THROWING(dptr = ProfilesModelPrivate::NewL()); |
|
39 } |
|
40 |
|
41 /*! |
|
42 Destroyer |
|
43 */ |
|
44 ProfilesModel::~ProfilesModel() |
|
45 { |
|
46 delete dptr; |
|
47 } |
|
48 |
|
49 /*! |
|
50 Get the actived profile ID |
|
51 */ |
|
52 int ProfilesModel::activeProfileId() |
|
53 { |
|
54 return dptr->activeProfileId(); |
|
55 } |
|
56 |
|
57 /*! |
|
58 Set active profile to specified ID |
|
59 */ |
|
60 int ProfilesModel::activateProfile(int profileId) |
|
61 { |
|
62 return dptr->activateProfile(profileId); |
|
63 } |
|
64 |
|
65 /*! |
|
66 Get actived profile name |
|
67 */ |
|
68 QString ProfilesModel::activeProfileName() |
|
69 { |
|
70 return dptr->activeProfileName(); |
|
71 } |