00001 #ifndef BRMDEMODLG_H 00002 #define BRMDEMODLG_H 00003 00004 #include <QtGui> 00005 #include <pthread.h> 00006 #include "ui_BRMDemoDlg.h" 00007 #include "FEUITable.h" 00008 #include "FEDetectReaderDlg.h" 00009 #include "FEReadTagsThread.h" 00010 00011 #include "../../../../fedm-classlib/src/FedmIscCore.h" 00012 00013 00014 class QMenu; 00015 class QSignalMapper; 00016 00017 class BRMDemoDlg : public QMainWindow 00018 { 00019 Q_OBJECT 00020 QSignalMapper *mapper; 00021 public: 00022 BRMDemoDlg(); 00023 ~BRMDemoDlg(); 00024 00025 /* The static callback helper function below must know of the actual instance 00026 to trigger onProtocolEvent(). setGetClassInstance() does the trick to save 00027 the pointer to the current instance which we need by the static callback function 00028 protCallBackHelper */ 00029 static BRMDemoDlg* setGetClassInstance(BRMDemoDlg* classInstance); 00030 /* This static helper function is called by the FEISC_PRT_EVENT event. 00031 It triggers the onProtocolEvent signal which can then be used to update the ui. */ 00032 static void protCallBackHelper(int iMsg,int iLen); 00033 signals: 00034 void onProtocolEvent(int iMsg,int iLen); 00035 00036 public slots: 00037 void displayProtocol(int iMsg,int iLen); 00038 // signals triggered by thread 00039 void displayData(); 00040 void displayError(int); 00041 00042 void startButtonClicked(); 00043 void clearTagList(); 00044 void initReader(); 00045 void showAbout(); 00046 00047 private: 00048 Ui::BRMDemoDlg ui; 00049 int m_iListItem; 00050 void setupMenuBar(); 00051 void OnDataProt21(); 00052 void OnDataProt22(); 00053 void GetISOMfrCode(unsigned char ucMfr, char* sMfr); 00054 FEDetectReaderDlg detectReaderDlg; 00055 FEUITable* tagTable; 00056 FEReadTagsThread *m_readTagsThread; 00057 FEDM_ISCReaderModule* m_iscReader; 00058 FEDM_TASK_INIT m_taskInit; 00059 00060 protected: 00061 void resizeEvent(QResizeEvent *event); 00062 }; 00063 00064 #endif