#ifndef FORMSCREENSAVER_H
#define FORMSCREENSAVER_H

#include <QWidget>
#include <QTimer>
#include <QPaintEvent>

namespace Ui {
class FormScreenSaver;
}

class FormScreenSaver : public QWidget
{
    Q_OBJECT

public:
    explicit FormScreenSaver(QWidget *parent = 0);
    ~FormScreenSaver();

    void Init();
    void Exit();

protected:
    virtual void paintEvent(QPaintEvent *event);

    virtual void mousePressEvent(QMouseEvent *event);
    virtual void mouseReleaseEvent(QMouseEvent *event);
    virtual void mouseDoubleClickEvent(QMouseEvent *event);
    virtual void mouseMoveEvent(QMouseEvent *event);
    virtual void keyPressEvent(QKeyEvent *event);
    virtual void keyReleaseEvent(QKeyEvent *event);

public slots:
    void ScreenUpdate();

protected:
    int m_nScreenWidth;
    int m_nScreenHeight;
    int m_nCount;

    int* m_Color;

    QTimer m_TimerScreenSaver;

private:
    Ui::FormScreenSaver *ui;
};

#endif // FORMSCREENSAVER_H
