Mixxx

ControlObjectThread Class Reference

#include <controlobjectthread.h>

Inheritance diagram for ControlObjectThread:
Collaboration diagram for ControlObjectThread:

List of all members.

Public Slots

void slotSet (double v)
void slotParentDead ()

Signals

void valueChanged (double)

Public Member Functions

 ControlObjectThread (ControlObject *pControlObject, QObject *pParent=NULL)
virtual ~ControlObjectThread ()
double get ()
virtual bool setExtern (double v)
void add (double v)
void sub (double v)
void emitValueChanged ()
ControlObjectgetControlObject ()

Static Public Member Functions

static bool update ()

Protected Attributes

double m_dValue
QMutex m_dataMutex
ControlObjectm_pControlObject

Static Protected Attributes

static QMutex m_sqMutex

Detailed Description

Author:
Tue Haste Andersen

This class is used to store a control value as used by an EngineObject. ControlEngine is thread safe, and sends a user event to a ControlObject whenever it's value is changed. setExtern is used for external threads to set it's value.

Definition at line 39 of file controlobjectthread.h.


Constructor & Destructor Documentation

ControlObjectThread::ControlObjectThread ( ControlObject pControlObject,
QObject *  pParent = NULL 
)

Definition at line 27 of file controlobjectthread.cpp.

Here is the call graph for this function:

ControlObjectThread::~ControlObjectThread ( ) [virtual]

Definition at line 43 of file controlobjectthread.cpp.

Here is the call graph for this function:


Member Function Documentation

void ControlObjectThread::add ( double  v)

Adds a value to the value property of the ControlEngine. Notification in a similar way to set. Thread safe, blocking.

Definition at line 125 of file controlobjectthread.cpp.

void ControlObjectThread::emitValueChanged ( )

Called from update();

Definition at line 120 of file controlobjectthread.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

double ControlObjectThread::get ( )

Returns the value of the object

Definition at line 52 of file controlobjectthread.cpp.

Here is the caller graph for this function:

ControlObject * ControlObjectThread::getControlObject ( )

Definition at line 155 of file controlobjectthread.cpp.

Here is the caller graph for this function:

bool ControlObjectThread::setExtern ( double  v) [virtual]

Setting the value from an external controller. This happen when a ControlObject has changed and its value is syncronized with this object. Thread safe, non blocking. Returns true if successful, otherwise false. Thread safe, non blocking.

Reimplemented in ControlObjectThreadMain, and ControlObjectThreadWidget.

Definition at line 70 of file controlobjectthread.cpp.

Here is the caller graph for this function:

void ControlObjectThread::slotParentDead ( ) [slot]

Definition at line 148 of file controlobjectthread.cpp.

Here is the caller graph for this function:

void ControlObjectThread::slotSet ( double  v) [slot]

The value is changed by the engine, and the corresponding ControlObject is updated. Thread safe, blocking.

Definition at line 61 of file controlobjectthread.cpp.

Here is the caller graph for this function:

void ControlObjectThread::sub ( double  v)

Subtracts a value to the value property. Notification in a similar way to set. Thread safe, blocking.

Definition at line 134 of file controlobjectthread.cpp.

bool ControlObjectThread::update ( ) [static]

Updates the object with changes from the corresponding ControlObject, and emits valueChagned signal. Returns true if this it was updated

Definition at line 101 of file controlobjectthread.cpp.

Here is the call graph for this function:

void ControlObjectThread::valueChanged ( double  ) [signal]

Here is the caller graph for this function:


Member Data Documentation

Mutex controlling access to non-static members

Definition at line 85 of file controlobjectthread.h.

double ControlObjectThread::m_dValue [protected]

The actual value of the object

Definition at line 81 of file controlobjectthread.h.

Pointer to corresponding ControlObject

Definition at line 87 of file controlobjectthread.h.

QMutex ControlObjectThread::m_sqMutex [static, protected]

Mutex controlling access to static members

Definition at line 83 of file controlobjectthread.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines