kstars
filesource.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef FILESOURCE_H
00019 #define FILESOURCE_H
00020
00030 #include <qasyncio.h>
00031 #include <qstring.h>
00032
00033 class KStarsData;
00034 class KSFileReader;
00035
00036 class FileSource : public QDataSource {
00037
00038 public:
00041 FileSource( KStarsData *ksdata, float magnitude );
00042
00044 ~FileSource();
00045
00049 int readyToSend();
00050
00054 bool rewindable() { return false; }
00055
00061 void sendTo( QDataSink *sink, int );
00062
00065 float magnitude() { return maxMagnitude; }
00066
00067 private:
00068
00069 bool readingData;
00070
00071 KSFileReader *fileReader;
00072
00073
00074 int fileNumber, lineNumber;
00075
00076
00077 int counter;
00078
00079
00080 float maxMagnitude;
00081
00082 KStarsData *data;
00083
00096 #define maxLines 500
00097
00101 QString stringArray[ maxLines ];
00102
00103 };
00104
00105 #endif