• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • Marble
  • AbstractWorkerThread
Public Member Functions | Protected Member Functions | List of all members
Marble::AbstractWorkerThread Class Referenceabstract

#include <AbstractWorkerThread.h>

Inheritance diagram for Marble::AbstractWorkerThread:
Inheritance graph
[legend]

Public Member Functions

 AbstractWorkerThread (QObject *parent=0)
 
virtual ~AbstractWorkerThread ()
 
void ensureRunning ()
 

Protected Member Functions

void run ()
 
virtual void work ()=0
 
virtual bool workAvailable ()=0
 

Detailed Description

The AbstractWorkerThread is a class written for small tasks that have to run multiple times on different data asynchronously.

You should be able to use this class for many different tasks, but you'll have to think about Multi-Threading additionally. The AbstractWorkerThread runs the function work() as long as workAvailable() returns true. If there is no work available for a longer time, the thread will switch itself off. As a result you have to call ensureRunning() every time you want something to be worked on. You'll probably want to call this in your addSchedule() function.

Definition at line 36 of file AbstractWorkerThread.h.

Constructor & Destructor Documentation

Marble::AbstractWorkerThread::AbstractWorkerThread ( QObject *  parent = 0)
explicit

Definition at line 48 of file AbstractWorkerThread.cpp.

Marble::AbstractWorkerThread::~AbstractWorkerThread ( )
virtual

Definition at line 54 of file AbstractWorkerThread.cpp.

Member Function Documentation

void Marble::AbstractWorkerThread::ensureRunning ( )

Definition at line 59 of file AbstractWorkerThread.cpp.

void Marble::AbstractWorkerThread::run ( )
protected

Definition at line 70 of file AbstractWorkerThread.cpp.

virtual void Marble::AbstractWorkerThread::work ( )
protectedpure virtual

Implemented in Marble::BBCParser, and Marble::BBCItemGetter.

virtual bool Marble::AbstractWorkerThread::workAvailable ( )
protectedpure virtual

Implemented in Marble::BBCParser, and Marble::BBCItemGetter.


The documentation for this class was generated from the following files:
  • AbstractWorkerThread.h
  • AbstractWorkerThread.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:55 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal