2014-06-29 04:24:26 +08:00
|
|
|
#ifndef SELFCAMVIEW_H
|
|
|
|
#define SELFCAMVIEW_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
#include <QHBoxLayout>
|
2014-06-30 05:41:47 +08:00
|
|
|
#include <QTimer>
|
|
|
|
#include <QLabel>
|
|
|
|
#include "camera.h"
|
2014-06-29 04:24:26 +08:00
|
|
|
|
|
|
|
class QCloseEvent;
|
|
|
|
class QShowEvent;
|
2014-06-30 05:41:47 +08:00
|
|
|
class QPainter;
|
2014-06-29 04:24:26 +08:00
|
|
|
|
|
|
|
class SelfCamView : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2014-06-30 05:41:47 +08:00
|
|
|
SelfCamView(Camera* Cam, QWidget *parent=0);
|
2014-06-29 04:24:26 +08:00
|
|
|
~SelfCamView();
|
|
|
|
|
2014-06-30 05:41:47 +08:00
|
|
|
private slots:
|
|
|
|
void updateDisplay();
|
|
|
|
|
2014-06-29 04:24:26 +08:00
|
|
|
private:
|
|
|
|
void closeEvent(QCloseEvent*);
|
|
|
|
void showEvent(QShowEvent*);
|
2014-06-30 05:41:47 +08:00
|
|
|
void paint(QPainter *painter);
|
2014-06-29 04:24:26 +08:00
|
|
|
|
|
|
|
private:
|
2014-06-30 05:41:47 +08:00
|
|
|
QLabel *displayLabel;
|
2014-06-29 04:24:26 +08:00
|
|
|
QHBoxLayout* mainLayout;
|
2014-06-30 05:41:47 +08:00
|
|
|
Camera* cam;
|
|
|
|
QTimer updateDisplayTimer;
|
2014-06-29 04:24:26 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SELFCAMVIEW_H
|