You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.9 KiB
67 lines
1.9 KiB
#ifndef __LRF_SENSOR_WIDGET_HEADER__
|
|
#define __LRF_SENSOR_WIDGET_HEADER__
|
|
|
|
#include <time.h>
|
|
#include "../guiClass.h"
|
|
#include "../../components/base/basicEventHandler.h"
|
|
#include "../../components/base/basicEventHeap.h"
|
|
#include "../../components/object/objectLGS.h"
|
|
#include "../dialogs/SettingsLgsDialog.h"
|
|
|
|
class DeviceChooser;
|
|
class LrfSensorWidget : public QFrame, public basicEventHandler{
|
|
private:
|
|
E_LGS_STAGE m_eStatus;
|
|
E_CLIENT_WORK_MODE m_eMode;
|
|
DeviceChooser *m_pParent;
|
|
uint32_t m_nRangeMap[TH_SIZE_NODES];
|
|
bool m_bIsSelected;
|
|
|
|
QTimer *m_pStatusTimer; // 1/3 sec
|
|
QTimer *m_pLogoTimer; // 1/5 sec
|
|
QLabel *m_pLogoLabel;
|
|
QLabel *m_pNameLabel;
|
|
QLabel *m_pStatusLabel;
|
|
QPushButton *m_pBtnSettings;
|
|
QPushButton *m_pBtnRefresh;
|
|
QProgressBar *m_pProgressBar;
|
|
|
|
QPushButton *m_pBtnMasking;
|
|
QPushButton *m_pBtnAddMask;
|
|
QPushButton *m_pBtnDelMask;
|
|
QPushButton *m_pBtnUpdateMask;
|
|
QComboBox *m_pCBoxLrfID;
|
|
|
|
objectLGS *m_pDevice;
|
|
|
|
/* Gui Res*/
|
|
QPixmap *m_pGreenPixmap;
|
|
QPixmap *m_pRedPixmap;
|
|
QPixmap *m_pGrayPixmap;
|
|
QPixmap *m_pBluePixmap;
|
|
/* GUI controlls */
|
|
DialogSettingsLGS *m_pSettingsDialog;
|
|
public:
|
|
explicit LrfSensorWidget( DeviceChooser *parent = NULL );
|
|
virtual ~LrfSensorWidget();
|
|
bool attachDevice( objectLGS *dev );
|
|
bool attachRangeMap();
|
|
virtual bool dispatchEvent( basicEvent *Evt );
|
|
bool loadFromFile( char *fName );
|
|
bool saveIntoFile( char *fName );
|
|
public slots:
|
|
bool event(QEvent *event);
|
|
void setSelected( bool val );
|
|
void sensorSettings();
|
|
void refreshRangeMap();
|
|
void updateStatus();
|
|
void updateLogo();
|
|
void setStatus( E_LGS_STAGE st );
|
|
void activateMasks( void );
|
|
void disableMasks( void );
|
|
void updateMasks(void);
|
|
void addMask( void );
|
|
void delMask( void );
|
|
};
|
|
|
|
#endif
|