inc/mpsettingsmanager.h
changeset 19 4e84c994a771
child 20 82baf59ce8dd
equal deleted inserted replaced
5:2a40e88564c8 19:4e84c994a771
       
     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: Music Player Settings Manager.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MPSETTINGSMANAGER_H
       
    19 #define MPSETTINGSMANAGER_H
       
    20 
       
    21 #include<QObject>
       
    22 #include <QtGlobal>
       
    23 
       
    24 class XQSettingsManager;
       
    25 class XQSettingsKey;
       
    26 
       
    27 #ifdef BUILD_MPSETTINGSMANAGER
       
    28 #define MPSETTINGSMANAGER_EXPORT Q_DECL_EXPORT
       
    29 #else
       
    30 #define MPSETTINGSMANAGER_EXPORT Q_DECL_IMPORT
       
    31 #endif
       
    32 class  MPSETTINGSMANAGER_EXPORT MpSettingsManager: public QObject
       
    33 {
       
    34     
       
    35 Q_OBJECT
       
    36 
       
    37 private:
       
    38     explicit MpSettingsManager();
       
    39     
       
    40 public:
       
    41     virtual ~MpSettingsManager();
       
    42     static MpSettingsManager *instance();
       
    43     static bool firstStartup();
       
    44     static bool shuffle();
       
    45     static bool repeat();
       
    46 
       
    47 public slots:
       
    48     void valueChanged(const XQSettingsKey& key, const QVariant& value);
       
    49     static void setShuffle(bool shuffle);
       
    50     static void setRepeat(bool repeat);
       
    51         
       
    52 signals:
       
    53     void shuffleChanged(bool shuffle);
       
    54     void repeatChanged(bool repeat);
       
    55     
       
    56 private:
       
    57     Q_DISABLE_COPY(MpSettingsManager)
       
    58     XQSettingsManager* mSettingsManager;
       
    59     bool mFirstStartup;
       
    60     bool mShuffle;
       
    61     bool mRepeat;
       
    62 };
       
    63 
       
    64 #endif    // MPSETTINGSMANAGER_H