• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

FileSource Class Reference

FileSource is an asynchronous class for reloading star data while running the program. More...

#include <filesource.h>

Inheritance diagram for FileSource:

Inheritance graph
[legend]

List of all members.


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.

Author:
Thomas Kabelmann
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 (  ) 

destructor

Definition at line 47 of file filesource.cpp.


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:
  • filesource.h
  • filesource.cpp

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal