-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcamerapanel.h
37 lines (28 loc) · 1.04 KB
/
camerapanel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
///////////////////////////////////////////////////////////////////////////////
// Name: camerapanel.h
// Purpose: Displays a bitmap and camera status
// Author: PB
// Created: 2021-11-18
// Copyright: (c) 2021 PB
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef CAMERAPANEL_H
#define CAMERAPANEL_H
#include <wx/wx.h>
class CameraPanel : public wxPanel
{
public:
enum Status { Connecting, Receiving, Error };
CameraPanel(wxWindow* parent, const wxString& cameraName,
bool drawPaintTime = false, Status status = Connecting);
void SetBitmap(const wxBitmap& bitmap, Status status = Receiving);
wxString GetCameraName() const { return m_cameraName; }
Status GetStatus() const { return m_status; }
private:
wxBitmap m_bitmap;
wxString m_cameraName;
bool m_drawPaintTime;
Status m_status{Connecting};
void OnPaint(wxPaintEvent&);
};
#endif // #ifndef CAMERAPANEL_H