superkaramba
textfilesensor.h
00001 /* 00002 * Copyright (C) 2003 Hans Karlsson <karlsson.h@home.se> 00003 * Copyright (C) 2003-2004 Adam Geitgey <adam@rootnode.org> 00004 * Copyright (c) 2005 Ryan Nickell <p0z3r@earthlink.net> 00005 * 00006 * This file is part of SuperKaramba. 00007 * 00008 * SuperKaramba is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * SuperKaramba is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with SuperKaramba; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00021 ****************************************************************************/ 00022 #ifndef TEXTFILESENSOR_H 00023 #define TEXTFILESENSOR_H 00024 00025 00026 #include <sensor.h> 00027 #include <tqfile.h> 00028 #include <tqtextstream.h> 00029 #include <tqstring.h> 00030 #include <tqtextcodec.h> 00031 #include <tqvaluevector.h> 00036 class TextFileSensor : public Sensor 00037 { 00038 00039 Q_OBJECT 00040 public: 00041 TextFileSensor( const TQString &fileName, bool rdf, int interval, const TQString &encoding=TQString::null ); 00042 00043 ~TextFileSensor(); 00044 00045 void update(); 00046 00047 private: 00048 TQTextCodec *codec; 00049 TQString fileName; 00050 bool rdf; 00051 }; 00052 00053 #endif // TEXTFILESENSOR_H