Esempio n. 1
0
void GSelfOwnedThread::run()
{
	d->m_pDummy = new QObject;

	d->m_pMutex.lock();
	d->m_bDummy = true;
	d->m_pMutex.unlock();

	d->m_pWait.wakeOne();

	d->m_pMutex.lock();
	forever {
		if( d->m_bDummy ) {
			d->m_pWait.wait( &d->m_pMutex );
		} else {
			d->m_pMutex.unlock();
			break;
		}
	}

	if( beforeExec() ) {
		exec();
		afterExec();
	};
}
ChartDataCollector::ChartDataCollector(QGraphicsItem* parentItem, QObject* parentObject)
 : Report::ItemInterface(parentItem, parentObject),m_chartDataSource(FromDatabase),m_showOnlyFirstValues(-1), m_sortDirection(Unsorted),m_colorOpacity(100)
{
	m_otherValue.value=0;
	m_otherValue.key=tr("Other");
	if (reportObject())
		connect(reportObject(),SIGNAL(beforeExec()),SLOT(setupConnections()));
}