• Main Page
  • Classes
  • Files
  • File List

/home/bifh8/cs2009q3-i386/work/meegotouch-controlpanelapplets-0.20.61/src/soundsettingsapplet/qprofilevalue.h

00001 /****************************************************************************
00002 **
00003 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
00004 ** All rights reserved.
00005 ** Contact: Nokia Corporation (directui@nokia.com)
00006 **
00007 ** This file is part of meegotouch-controlpanelapplets
00008 **
00009 ** If you have questions regarding the use of this file, please contact
00010 ** Nokia at directui@nokia.com.
00011 **
00012 ** This library is free software; you can redistribute it and/or
00013 ** modify it under the terms of the GNU Lesser General Public
00014 ** License version 2.1 as published by the Free Software Foundation
00015 ** and appearing in the file LICENSE.LGPL included in the packaging
00016 ** of this file.
00017 **
00018 ****************************************************************************/
00019 #ifndef _Q_PROFILE_VALUE_H_
00020 #define _Q_PROFILE_VALUE_H_
00021 
00022 #include <QPointer>
00023 #include <QFileSystemWatcher>
00024 #include <QString>
00025 #include <meegocontrolexport.h>
00026 #include "qtrackedvariant.h"
00027 
00033 class MC_EXPORT QProfileValue : public QTrackedVariant
00034 {
00035 Q_OBJECT
00036 
00037 public:
00038     QProfileValue (const QString &key, bool setAllProfiles = false);
00039     ~QProfileValue ();
00040 
00044     enum RangeType
00045     {
00046         Interval,
00047         List,
00048         Invalid
00049     };
00050 
00051     QList<QVariant> possibleValues (RangeType *p_rangeType = NULL);
00052 
00053 protected:
00054     virtual void fetchFromBackend ();
00055     virtual void realSetValue (const QVariant &newValue);
00056     virtual bool stopWatchFiles ();
00057     virtual bool startWatchFile (const QString &filename);
00058 
00059 private slots:
00060     void fileChanged (const QString &filename);
00061 
00062 private:
00063     static int nTrackedValues;
00064     static void notifyValue (
00065             const char *profile, 
00066             const char *key, 
00067             const char *val, 
00068             const char *type, 
00069             QProfileValue *self);
00070     void addNotify ();
00071     void delNotify ();
00072     QStringList getType (QString &theKey, QString &theProfile);
00073 
00074 private:
00075     bool                         m_setAllProfiles;
00076     QPointer<QFileSystemWatcher> m_FileWatcher;
00077     bool                         m_MissingFile;
00078 
00079 #ifdef UNIT_TEST
00080     friend class Ut_ProfileValueTests;
00081 #endif
00082 };
00083 
00084 #endif

Generated on Mon Jul 11 2011 12:00:31 for libMeegoControl by  doxygen 1.7.1