-
Notifications
You must be signed in to change notification settings - Fork 1
/
ImportSessionPanel.h
51 lines (39 loc) · 1.26 KB
/
ImportSessionPanel.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
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef IMPORT_SESSION_PANEL
#define IMPORT_SESSION_PANEL
#include <memory>
#include <wx/panel.h>
#include <libsigrokcxx/libsigrokcxx.hpp>
#include "LogicFeeder.h"
class wxPlotCtrl;
class wxPlotCtrlEvent;
class SessionEvent;
class ImportSessionPanel : public wxPanel
{
public:
ImportSessionPanel(wxWindow *parent, wxEvtHandler *evtHandler, wxWindowID winid,
std::shared_ptr<sigrok::Session> session,
std::shared_ptr<sigrok::Input> input,
const wxString &filePath);
~ImportSessionPanel() = default;
private:
wxPlotCtrl *plotCtrl_;
std::shared_ptr<sigrok::Session> session_;
;
size_t maxFftSize_;
bool stop_;
double fs_;
double fc_;
LogicFeederConfig feederConfig_;
wxEvtHandler *evtHandler_;
void initPlotControl();
void initCapturing(std::shared_ptr<sigrok::Session> session);
void onClose(wxCloseEvent &event);
void onPlot(wxCommandEvent &event);
void onUpdatePlot(wxUpdateUIEvent &event);
void onPlotCtrlEvent(wxPlotCtrlEvent &event);
void onSessionUpdate(SessionEvent&);
void onSessionEnded(SessionEvent&);
void initFeederAndStartSession(std::shared_ptr<sigrok::Input> input, const wxString &filePath);
DECLARE_EVENT_TABLE()
};
#endif