00001 #ifndef __sa_qt_sensors_h__ 00002 #define __sa_qt_sensors_h__ 00003 00004 #include "application_config.h" 00005 00006 #if __USE_QT_SENSORS__ 00007 00008 /** QtSensors related utilities. 00009 */ 00010 00011 #include "ac_app_context.h" 00012 00013 #include <qsensor.h> 00014 00015 QTM_USE_NAMESPACE 00016 00017 class ClQtEventSensorBase : 00018 public QSensor 00019 { 00020 Q_OBJECT 00021 00022 public: 00023 ClQtEventSensorBase(const QByteArray & type, 00024 ac_AppContext* aAppContext); 00025 00026 protected: 00027 ac_AppContext* iAppContext; // not owned 00028 00029 protected: 00030 LogDb* GetLogDb() const { return ac_LogDb(iAppContext); } 00031 00032 virtual const char* Name() const = 0; 00033 00034 void run(); 00035 00036 public slots: 00037 void handleActiveChanged(); 00038 void handleBusyChanged(); 00039 void handleSensorError(int errCode); 00040 virtual void handleReadingChanged() = 0; 00041 }; 00042 00043 #endif /* __USE_QT_SENSORS__ */ 00044 00045 #endif /* __sa_qt_sensors_h__ */ 00046 00047 /** 00048 00049 Copyright 2010 Helsinki Institute for Information Technology (HIIT) 00050 and the authors. All rights reserved. 00051 00052 Authors: Tero Hasu <tero.hasu@hut.fi> 00053 00054 Permission is hereby granted, free of charge, to any person 00055 obtaining a copy of this software and associated documentation files 00056 (the "Software"), to deal in the Software without restriction, 00057 including without limitation the rights to use, copy, modify, merge, 00058 publish, distribute, sublicense, and/or sell copies of the Software, 00059 and to permit persons to whom the Software is furnished to do so, 00060 subject to the following conditions: 00061 00062 The above copyright notice and this permission notice shall be 00063 included in all copies or substantial portions of the Software. 00064 00065 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00066 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00067 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00068 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 00069 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 00070 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00071 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 00072 SOFTWARE. 00073 00074 **/
ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:56 2011 by Doxygen 1.6.1