Qt 4.8
Public Functions | Public Variables | List of all members
QFutureWatcherBasePrivate Class Reference

#include <qfuturewatcher_p.h>

Inheritance diagram for QFutureWatcherBasePrivate:
QObjectPrivate QFutureCallOutInterface QObjectData

Public Functions

void callOutInterfaceDisconnected ()
 
void postCallOutEvent (const QFutureCallOutEvent &callOutEvent)
 
 QFutureWatcherBasePrivate ()
 
void sendCallOutEvent (QFutureCallOutEvent *event)
 
- Public Functions inherited from QObjectPrivate
void _q_reregisterTimers (void *pointer)
 
void addConnection (int signal, Connection *c)
 
void cleanConnectionLists ()
 
void connectNotify (const char *signal)
 
void deleteChildren ()
 
void disconnectNotify (const char *signal)
 
bool isSender (const QObject *receiver, const char *signal) const
 
bool isSignalConnected (uint signalIdx) const
 Returns true if the signal with index signal_index from object sender is connected. More...
 
void moveToThread_helper ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void setParent_helper (QObject *)
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData)
 
int signalIndex (const char *signalName) const
 Returns the signal index used in the internal connectionLists vector. More...
 
virtual ~QObjectPrivate ()
 
- Public Functions inherited from QObjectData
virtual ~QObjectData ()=0
 
- Public Functions inherited from QFutureCallOutInterface
virtual ~QFutureCallOutInterface ()
 

Public Variables

bool finished
 
int maximumPendingResultsReady
 
QList< QFutureCallOutEvent * > pendingCallOutEvents
 
QAtomicInt pendingResultsReady
 
QAtomicInt resultAtConnected
 
- Public Variables inherited from QObjectPrivate
union {
   QObject *   currentChildBeingDeleted
 
   QAbstractDeclarativeData *   declarativeData
 
}; 
 
quint32 connectedSignals [2]
 
QObjectConnectionListVectorconnectionLists
 
SendercurrentSender
 
QList< QPointer< QObject > > eventFilters
 
ExtraDataextraData
 
QString objectName
 
Connectionsenders
 
QAtomicPointer< QtSharedPointer::ExternalRefCountData > sharedRefcount
 
QThreadDatathreadData
 
void * unused
 
- Public Variables inherited from QObjectData
uint blockSig: 1
 
QObjectList children
 
uint hasGuards: 1
 
uint inEventHandler: 1
 
uint inThreadChangeEvent: 1
 
uint isWidget: 1
 
QMetaObjectmetaObject
 
uint ownObjectName: 1
 
QObjectparent
 
uint pendTimer: 1
 
int postedEvents
 
QObjectq_ptr
 
uint receiveChildEvents: 1
 
uint sendChildEvents: 1
 
uint unused: 22
 
uint wasDeleted: 1
 

Additional Inherited Members

- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
- Static Public Functions inherited from QObjectPrivate
static void clearGuards (QObject *)
 
static QObjectPrivateget (QObject *o)
 
static void resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender)
 
static SendersetCurrentSender (QObject *receiver, Sender *sender)
 
static void signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result)
 

Detailed Description

Definition at line 66 of file qfuturewatcher_p.h.

Constructors and Destructors

◆ QFutureWatcherBasePrivate()

QFutureWatcherBasePrivate::QFutureWatcherBasePrivate ( )
Warning
This function is not part of the public interface.

Definition at line 437 of file qfuturewatcher.cpp.

440 { }
static int idealThreadCount()
Returns the ideal number of threads that can be run on the system.

Functions

◆ callOutInterfaceDisconnected()

void QFutureWatcherBasePrivate::callOutInterfaceDisconnected ( )
virtual

Implements QFutureCallOutInterface.

Definition at line 478 of file qfuturewatcher.cpp.

479 {
481 }
removePostedEvents
Removes all events of the given eventType that were posted using postEvent() for receiver.

◆ postCallOutEvent()

void QFutureWatcherBasePrivate::postCallOutEvent ( const QFutureCallOutEvent callOutEvent)
virtual

Implements QFutureCallOutInterface.

Definition at line 466 of file qfuturewatcher.cpp.

467 {
469 
470  if (callOutEvent.callOutType == QFutureCallOutEvent::ResultsReady) {
472  q->futureInterface().d->internal_setThrottled(true);
473  }
474 
475  QCoreApplication::postEvent(q, callOutEvent.clone());
476 }
static void postEvent(QObject *receiver, QEvent *event)
Adds the event event, with the object receiver as the receiver of the event, to an event queue and re...
QFutureCallOutEvent * clone() const
#define Q_Q(Class)
Definition: qglobal.h:2483
int fetchAndAddRelaxed(int valueToAdd)
Atomic fetch-and-add.

◆ sendCallOutEvent()

void QFutureWatcherBasePrivate::sendCallOutEvent ( QFutureCallOutEvent event)

Definition at line 483 of file qfuturewatcher.cpp.

484 {
486 
487  switch (event->callOutType) {
489  emit q->started();
490  break;
492  finished = true;
493  emit q->finished();
494  break;
497  emit q->canceled();
498  break;
500  if (q->futureInterface().isCanceled())
501  break;
502  emit q->paused();
503  break;
505  if (q->futureInterface().isCanceled())
506  break;
507  emit q->resumed();
508  break;
510  if (q->futureInterface().isCanceled())
511  break;
512 
514  q->futureInterface().setThrottled(false);
515 
516  const int beginIndex = event->index1;
517  const int endIndex = event->index2;
518 
519  emit q->resultsReadyAt(beginIndex, endIndex);
520 
521  if (int(resultAtConnected) <= 0)
522  break;
523 
524  for (int i = beginIndex; i < endIndex; ++i)
525  emit q->resultReadyAt(i);
526 
527  } break;
529  if (q->futureInterface().isCanceled())
530  break;
531 
532  emit q->progressValueChanged(event->index1);
533  if (!event->text.isNull()) // ###
534  q->progressTextChanged(event->text);
535  break;
537  emit q->progressRangeChanged(event->index1, event->index2);
538  break;
539  default: break;
540  }
541 }
#define Q_Q(Class)
Definition: qglobal.h:2483
#define emit
Definition: qobjectdefs.h:76
int fetchAndAddRelaxed(int valueToAdd)
Atomic fetch-and-add.
bool isNull() const
Returns true if this string is null; otherwise returns false.
Definition: qstring.h:505

Properties

◆ finished

bool QFutureWatcherBasePrivate::finished

Definition at line 84 of file qfuturewatcher_p.h.

Referenced by sendCallOutEvent().

◆ maximumPendingResultsReady

int QFutureWatcherBasePrivate::maximumPendingResultsReady

Definition at line 81 of file qfuturewatcher_p.h.

Referenced by postCallOutEvent(), and sendCallOutEvent().

◆ pendingCallOutEvents

QList<QFutureCallOutEvent *> QFutureWatcherBasePrivate::pendingCallOutEvents

Definition at line 79 of file qfuturewatcher_p.h.

◆ pendingResultsReady

QAtomicInt QFutureWatcherBasePrivate::pendingResultsReady

Definition at line 80 of file qfuturewatcher_p.h.

Referenced by postCallOutEvent(), and sendCallOutEvent().

◆ resultAtConnected

QAtomicInt QFutureWatcherBasePrivate::resultAtConnected

Definition at line 83 of file qfuturewatcher_p.h.

Referenced by sendCallOutEvent().


The documentation for this class was generated from the following files: