Exemplo n.º 1
0
SingleTimer::SingleTimer() : _finishing(0), _inited(false) {
	QTimer::setSingleShot(true);
	if (App::app()) {
		connect(App::app(), SIGNAL(adjustSingleTimers()), this, SLOT(adjust()));
		_inited = true;
	}
}
Exemplo n.º 2
0
SingleTimer::SingleTimer(QObject *parent) : QTimer(parent) {
	QTimer::setSingleShot(true);
	if (App::app()) {
		connect(App::app(), SIGNAL(adjustSingleTimers()), this, SLOT(adjust()));
		_inited = true;
	}
}
Exemplo n.º 3
0
void SingleTimer::start(int msec) {
	_finishing = getms(true) + (msec < 0 ? 0 : uint64(msec));
	if (!_inited && App::app()) {
		connect(App::app(), SIGNAL(adjustSingleTimers()), this, SLOT(adjust()));
		_inited = true;
	}
	QTimer::start(msec);
}