2017-05-22 15:11:07 +08:00
|
|
|
#ifndef APPSNAPSHOT_H
|
|
|
|
#define APPSNAPSHOT_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
2017-05-22 17:17:29 +08:00
|
|
|
#include <QDebug>
|
|
|
|
#include <QTimer>
|
2017-05-22 15:11:07 +08:00
|
|
|
|
|
|
|
class AppSnapshot : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-05-22 17:17:29 +08:00
|
|
|
explicit AppSnapshot(const WId wid, QWidget *parent = 0);
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void fetchSnapshot();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void paintEvent(QPaintEvent *e);
|
|
|
|
void resizeEvent(QResizeEvent *e);
|
|
|
|
|
|
|
|
private:
|
|
|
|
const WId m_wid;
|
|
|
|
|
|
|
|
QImage m_snapshot;
|
|
|
|
|
|
|
|
QTimer *m_fetchSnapshotTimer;
|
2017-05-22 15:11:07 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // APPSNAPSHOT_H
|