timelabel.h
author Dmitriy Morozov <dmitriy@mrzv.org>
Sat, 27 Nov 2010 09:58:18 -0800
changeset 7 a01d4a949adf
parent 0 7726fefc58a4
permissions -rw-r--r--
Switched to Ipe's own PageSelector instead of the internal PageDialog (requires Ipe 7.0.13)

#ifndef TIMELABEL_H
#define TIMELABEL_H

#include <QLabel>
#include <QTime>
#include <QTimer>

class TimeLabel: public QLabel
{
    Q_OBJECT

    public:
                TimeLabel(QWidget* parent);
        void    mouseDoubleClickEvent(QMouseEvent* event);
        void    toggleCounting();
        void    toggleCountdown();
        void    setTime();

    private:
        QTimer* timer;
        QTime   time;
        bool    counting;
        bool    countingDown;

    private slots:
        void    countTime();
        
};

#endif