kstars
FileSource Class Reference
FileSource is an asynchronous class for reloading star data while running the program. More...
#include <filesource.h>

Public Member Functions | |
FileSource (KStarsData *ksdata, float magnitude) | |
float | magnitude () |
int | readyToSend () |
bool | rewindable () |
void | sendTo (QDataSink *sink, int) |
~FileSource () |
Detailed Description
FileSource is an asynchronous class for reloading star data while running the program.It's basing on QDataSource class and implements the function for reading a file step by step and send these data to an QDataSink object. KStarsData uses this class for asynchronous io.
- Version:
- 1.0
Definition at line 36 of file filesource.h.
Constructor & Destructor Documentation
FileSource::FileSource | ( | KStarsData * | ksdata, | |
float | magnitude | |||
) |
constructor needs an KStarsData object, a file name and the new magnitude
Definition at line 23 of file filesource.cpp.
FileSource::~FileSource | ( | ) |
Member Function Documentation
float FileSource::magnitude | ( | ) | [inline] |
- Returns:
- current magnitude to load (always returns maxMagnitude)
Definition at line 65 of file filesource.h.
int FileSource::readyToSend | ( | ) |
send a value indicating whether the object is ready to send data.
- Returns:
- 1 if data is ready to send; return -1 if the stream is finished.
Reimplemented from QDataSource.
Definition at line 50 of file filesource.cpp.
bool FileSource::rewindable | ( | ) | [inline] |
Is this object rewindable?
- Returns:
- false, because it's not needed to rewind.
Definition at line 54 of file filesource.h.
void FileSource::sendTo | ( | QDataSink * | sink, | |
int | ||||
) |
The function for sending data to an QDataSink object.
Here will all data operations defined. Because this function is virtual, we need a second int parameter, but we don't use it, so it's unnamed. sink
pointer to the QDataSink object which will receive the data stream
Reimplemented from QDataSource.
Definition at line 60 of file filesource.cpp.
The documentation for this class was generated from the following files: