2013-07-10 17:11:11 -04:00
|
|
|
/****************************************************************
|
|
|
|
* RetroShare is distributed under the following license:
|
|
|
|
*
|
|
|
|
* Copyright (C) 2013 Cyril Soler
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
****************************************************************/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QTimer>
|
|
|
|
|
2013-07-14 14:48:40 -04:00
|
|
|
class RsProtectedTimer : public QTimer
|
2013-07-10 17:11:11 -04:00
|
|
|
{
|
2013-07-14 14:48:40 -04:00
|
|
|
public:
|
|
|
|
RsProtectedTimer(QObject *parent);
|
2013-07-10 17:11:11 -04:00
|
|
|
|
2013-07-14 14:48:40 -04:00
|
|
|
protected:
|
|
|
|
virtual void timerEvent(QTimerEvent *e);
|
2013-07-10 17:11:11 -04:00
|
|
|
|
2013-07-15 20:03:20 -04:00
|
|
|
private:
|
2013-07-14 14:48:40 -04:00
|
|
|
// do not use, please use setInterval, setSingleShot and connect signal timeout
|
|
|
|
static void singleShot(int /*msec*/, QObject */*receiver*/, const char */*member*/) {}
|
2013-07-15 20:03:20 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
int mInterval;
|
2013-07-10 17:11:11 -04:00
|
|
|
};
|