2015-10-04 16:07:14 -04:00
|
|
|
#pragma once
|
|
|
|
|
2015-10-05 02:21:08 -04:00
|
|
|
#include <map>
|
|
|
|
#include <vector>
|
2015-10-04 16:07:14 -04:00
|
|
|
|
|
|
|
#include "SDRDevicesForm.h"
|
|
|
|
#include "SoapySDRThread.h"
|
|
|
|
#include "SDREnumerator.h"
|
2016-01-20 00:43:31 -05:00
|
|
|
#include "SDRDeviceAdd.h"
|
2015-10-04 16:07:14 -04:00
|
|
|
|
|
|
|
class SDRDevicesDialog: public devFrame {
|
|
|
|
public:
|
|
|
|
SDRDevicesDialog( wxWindow* parent );
|
|
|
|
|
2015-10-05 02:21:08 -04:00
|
|
|
void OnClose( wxCloseEvent& event );
|
2015-10-04 16:07:14 -04:00
|
|
|
void OnDeleteItem( wxTreeEvent& event );
|
|
|
|
void OnSelectionChanged( wxTreeEvent& event );
|
|
|
|
void OnAddRemote( wxMouseEvent& event );
|
|
|
|
void OnUseSelected( wxMouseEvent& event );
|
2015-10-05 02:21:08 -04:00
|
|
|
void OnTreeDoubleClick( wxMouseEvent& event );
|
|
|
|
void OnDeviceTimer( wxTimerEvent& event );
|
2016-01-17 21:54:22 -05:00
|
|
|
void OnRefreshDevices( wxMouseEvent& event );
|
2016-01-18 20:46:56 -05:00
|
|
|
void OnPropGridChanged( wxPropertyGridEvent& event );
|
2016-01-19 18:38:18 -05:00
|
|
|
void OnPropGridFocus( wxFocusEvent& event );
|
2015-10-05 02:21:08 -04:00
|
|
|
|
2015-10-04 16:07:14 -04:00
|
|
|
private:
|
2016-01-20 00:43:31 -05:00
|
|
|
void doRefreshDevices();
|
|
|
|
|
2015-11-03 00:53:39 -05:00
|
|
|
SDRDeviceInfo *getSelectedDevice(wxTreeItemId selId);
|
|
|
|
wxPGProperty *addArgInfoProperty(wxPropertyGrid *pg, SoapySDR::ArgInfo arg);
|
|
|
|
|
2016-01-13 21:59:47 -05:00
|
|
|
bool refresh, failed;
|
2015-10-05 02:21:08 -04:00
|
|
|
std::map<std::string, std::vector<SDRDeviceInfo *>* > devs;
|
2015-10-04 16:07:14 -04:00
|
|
|
std::vector<SDRDeviceInfo *>::iterator devs_i;
|
|
|
|
std::map<wxTreeItemId, SDRDeviceInfo *> devItems;
|
|
|
|
std::map<wxTreeItemId, SDRDeviceInfo *>::iterator devItems_i;
|
|
|
|
SDRDeviceInfo *dev = NULL;
|
2015-11-04 02:04:52 -05:00
|
|
|
std::vector<wxPGProperty *> props;
|
2016-01-18 20:46:56 -05:00
|
|
|
std::map<std::string, wxPGProperty *> devSettings;
|
|
|
|
wxTreeItemId selId;
|
2016-01-19 18:38:18 -05:00
|
|
|
wxTreeItemId editId;
|
2016-01-20 00:43:31 -05:00
|
|
|
SDRDeviceAddDialog *devAddDialog;
|
2015-10-04 16:07:14 -04:00
|
|
|
};
|