• Main Page
  • Classes
  • Files
  • File List

/home/bifh8/cs2009q3-i386/work/meegotouch-controlpanelapplets-0.20.61/src/soundsettingsapplet/qtrackedvariant.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-controlpanelsoundsettingsapplet.
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 
00020 #ifndef _Q_TRACKED_VARIANT_H_
00021 #define _Q_TRACKED_VARIANT_H_
00022 
00023 #include <QObject>
00024 #include <QString>
00025 #include <QVariant>
00026 #include <meegocontrolexport.h>
00027 
00041 class MC_EXPORT QTrackedVariant : public QObject
00042 {
00043         Q_OBJECT
00044 
00045 public:
00046         QTrackedVariant (const QString &key);
00047     ~QTrackedVariant ();
00048 
00049         void set (const QVariant &newValue);
00050         QVariant value();
00051 
00052         QString key() const;
00053     const char *keyChar () const;
00054 
00055 Q_SIGNALS:
00060         void changed();
00061 
00062 protected:
00063         virtual void emit_changed ();
00064         virtual void realSetValue (const QVariant &newValue);
00065         virtual void fetchFromBackend ();
00066 
00070         QVariant m_val;
00071 
00072 private:
00078     char  *m_KeyChar;
00079 
00080 #ifdef UNIT_TEST
00081     friend class Ut_TrackedVariantTests;
00082     friend class Ut_AlertToneDefaultsTests;
00083     friend class Ut_AlertTonePreviewTests;
00084     friend class Ut_AlertToneVolumeTests;
00085     friend class Ut_AlertToneWidgetTests;
00086     friend class Ut_ProfileintComboTests;
00087 #endif
00088 };
00089 
00090 #endif /* !_Q_TRACKED_VARIANT_H_ */

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