![]() |
Home · All Namespaces · All Classes |
00001 /**************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 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 systemui. 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 VOLUMEBARLOGIC_H 00020 #define VOLUMEBARLOGIC_H 00021 00022 #include <QObject> 00023 #include <dbus/dbus.h> 00024 00025 #if (HAVE_LIBRESOURCEQT && HAVE_QMSYSTEM) 00026 #include <policy/resource-set.h> 00027 #include <qmkeys.h> 00028 #endif 00029 00030 class VolumeBarWindow; 00031 00033 class VolumeBarLogic : public QObject 00034 { 00035 Q_OBJECT 00036 00037 public: 00039 VolumeBarLogic (QObject *parent = NULL); 00041 virtual ~VolumeBarLogic (); 00042 00044 quint32 volume (); 00046 quint32 maxVolume (); 00047 00048 public slots: 00052 void setVolume (quint32 value); 00058 void stepsUpdated (quint32 value, quint32 maxvalue); 00059 00060 private slots: 00062 void initValues (); 00063 00064 #if (HAVE_LIBRESOURCEQT && HAVE_QMSYSTEM) 00065 00071 void hwKeyEvent (MeeGo::QmKeys::Key key, MeeGo::QmKeys::State state); 00072 00074 void hwKeyResourceAcquired(); 00075 00077 void hwKeyResourceLost(); 00078 #endif 00079 00080 private: 00081 Q_DISABLE_COPY(VolumeBarLogic) 00082 00083 00086 void addSignalMatch (); 00087 00092 void openConnection (bool init = false); 00093 00095 void ping (); 00096 00102 static void stepsUpdatedSignal (DBusConnection *conn, DBusMessage *message, VolumeBarLogic *logic); 00103 00105 VolumeBarWindow *volumeBarWindow; 00106 00108 DBusConnection *dbus_conn; 00109 00111 quint32 currentvolume; 00113 quint32 currentmax; 00114 00115 #if (HAVE_LIBRESOURCEQT && HAVE_QMSYSTEM) 00116 00117 MeeGo::QmKeys *hwkeys; 00118 00120 ResourcePolicy::ResourceSet *hwkeyResource; 00121 #endif 00122 00123 #ifdef UNIT_TEST 00124 friend class Ut_VolumeBarLogic; 00125 #endif 00126 }; 00127 00128 #endif 00129
Copyright © 2011 Nokia Corporation | Generated on Tue Aug 30 2011 16:38:12 Doxygen 1.7.1 |
MeeGo Touch |