interruptibletime.h 447 Bytes
#ifndef INTERRUPTIBLETIME_H
#define INTERRUPTIBLETIME_H

#include <QObject>
#include <QTime>

class InterruptibleTime : public QObject
{
    Q_OBJECT
public:
    explicit InterruptibleTime(QObject *parent = 0);

    int elapsed();
    bool isValid();
    bool isNull();

signals:

public slots:
    void start();
    void pause();
    void resume();
    int restart();

private:
    QTime time;
    int elapsed_;
};

#endif // INTERRUPTIBLETIME_H