All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Public Member Functions | Protected Member Functions | List of all members
ThreadWithAsyncProgressWindow Class Referenceabstract

Inherits AlertWindow, QuasiModalComponent, and AsyncUpdater.

Inherited by ExternalResourceCollector, MonolithExporter, PresetLoadingThread, ProjectDownloader, SampleResolver, and UpdateChecker.

Public Member Functions

virtual ~ThreadWithAsyncProgressWindow ()
virtual void run ()=0
virtual void threadFinished ()=0
void runThread ()
void runSynchronous ()
bool threadShouldExit () const
void showStatusMessage (const String &message)
void setProgress (double progressValue)
virtual void resultButtonClicked (const String &)

Protected Member Functions

 ThreadWithAsyncProgressWindow (const String &title, bool synchronous=false)
void addBasicComponents (bool addOkButton=true)

Detailed Description

An replacement for the ThreadWithProgressWindow with the following differences:

In order to use it, subclass it and overwrite the two callbacks run() and threadFinished().

Then simply create a instance and call its method 'setModalComponentOfMainEditor()'

Constructor & Destructor Documentation

This stops the thread. In order to avoid killing, check threadShouldExit() regularly in your run() method.

ThreadWithAsyncProgressWindow ( const String &  title,
bool  synchronous = false 

Creates a new instance with the given title.

Don't forget to call 'addBasicComponents' after you added your stuff.

Member Function Documentation

void addBasicComponents ( bool  addOkButton = true)

Call this method in your constructor after you created all custom methods.

virtual void resultButtonClicked ( const String &  )

If you want to use a button for anything else than starting or cancelling, you can override this method and do whatever you need.

The name is the same String that you specified with 'addButton()'

virtual void run ( )
pure virtual

Overwrite this method and do your thing.

void runSynchronous ( )

Starts the task synchronously.

void runThread ( )

Starts the thread.

void setProgress ( double  progressValue)

Sets the progressbar during job execution.

void showStatusMessage ( const String &  message)

Shows a status message during job execution.

virtual void threadFinished ( )
pure virtual

This will be called after the thread has finished its task.

It is called from the message loop so you can do some interface stuff without caring about the MessageManagerLock.

bool threadShouldExit ( ) const

Checks if the thread should exist.

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.