24
|
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 |
|
|
18 |
// System includes
|
|
19 |
#include <QVariant>
|
|
20 |
|
|
21 |
// User includes
|
|
22 |
#include "radiosettings.h"
|
|
23 |
#include "radiosettings_p.h"
|
|
24 |
#include "radio_global.h"
|
|
25 |
|
|
26 |
namespace RadioSetting
|
|
27 |
{
|
|
28 |
enum TMtvSettingType
|
|
29 |
{
|
|
30 |
EFlags = 0,
|
|
31 |
ESomething
|
|
32 |
};
|
|
33 |
}
|
|
34 |
|
|
35 |
/*!
|
|
36 |
*
|
|
37 |
*/
|
|
38 |
RadioSettings::RadioSettings() :
|
|
39 |
d_ptr( new RadioSettingsPrivate( this ) )
|
|
40 |
{
|
|
41 |
}
|
|
42 |
|
|
43 |
/*!
|
|
44 |
*
|
|
45 |
*/
|
|
46 |
RadioSettings::~RadioSettings()
|
|
47 |
{
|
|
48 |
delete d_ptr;
|
|
49 |
}
|
|
50 |
|
|
51 |
/*!
|
|
52 |
* \reimp
|
|
53 |
*/
|
|
54 |
bool RadioSettings::isFirstTimeStart()
|
|
55 |
{
|
|
56 |
Q_D( RadioSettings );
|
|
57 |
return d->isFirstTimeStart();
|
|
58 |
}
|
|
59 |
|
|
60 |
/*!
|
|
61 |
* \reimp
|
|
62 |
*/
|
|
63 |
bool RadioSettings::showFavorites() const
|
|
64 |
{
|
|
65 |
Q_D( const RadioSettings );
|
|
66 |
return d->isFlagSet( RadioSettingsPrivate::EShowFavorites );
|
|
67 |
}
|
|
68 |
|
|
69 |
/*!
|
|
70 |
* \reimp
|
|
71 |
*/
|
|
72 |
void RadioSettings::setShowFavorites( bool showFavorites )
|
|
73 |
{
|
|
74 |
Q_D( RadioSettings );
|
|
75 |
if ( d->isFlagSet( RadioSettingsPrivate::EShowFavorites ) != showFavorites ) {
|
|
76 |
d->toggleFlag( RadioSettingsPrivate::EShowFavorites );
|
|
77 |
}
|
|
78 |
}
|
|
79 |
|
|
80 |
/*!
|
|
81 |
* \reimp
|
|
82 |
*/
|
|
83 |
bool RadioSettings::toggleShowFavorites()
|
|
84 |
{
|
|
85 |
Q_D( RadioSettings );
|
|
86 |
d->toggleFlag( RadioSettingsPrivate::EShowFavorites );
|
|
87 |
return d->isFlagSet( RadioSettingsPrivate::EShowFavorites );
|
|
88 |
}
|