75 lines
1.5 KiB
C++
75 lines
1.5 KiB
C++
#ifndef SETTING_SUMMARY_H
|
|
#define SETTING_SUMMARY_H
|
|
|
|
#include <TQObject.h>
|
|
#include <RQ_OBJECT.h>
|
|
#include <TGNumberEntry.h>
|
|
#include <TGButton.h>
|
|
#include <TGComboBox.h>
|
|
#include <TThread.h>
|
|
#include <TGLabel.h>
|
|
#include <TGTextEdit.h>
|
|
#include "ClassDigitizer.h"
|
|
#include "macro.h"
|
|
|
|
class TGWindow;
|
|
class TGMainFrame;
|
|
|
|
class RegisterSetting{
|
|
RQ_OBJECT("RegisterSetting")
|
|
private:
|
|
TGMainFrame * fMain;
|
|
|
|
TGNumberEntry * boardIDEntry;
|
|
|
|
TGTextEntry * txtAddress;
|
|
TGComboBox * cbName;
|
|
|
|
TGCheckButton * bSetALLChannel;
|
|
|
|
TGTextEntry * txtValueHex[MaxNChannels];
|
|
TGTextEntry * txtValueDec[MaxNChannels];
|
|
TGTextEntry * txtValueUnit[MaxNChannels];
|
|
|
|
TGLabel * lbValueUnit;
|
|
|
|
TGLabel * txtInfo;
|
|
|
|
unsigned int value[MaxNChannels];
|
|
|
|
int textID;
|
|
|
|
int nDigi;
|
|
Digitizer ** digi;
|
|
|
|
std::string GetRegisterName(uint32_t address);
|
|
|
|
unsigned int ConvertHexToDec(const char * text);
|
|
|
|
void SetTxtValueUnit(uint32_t address, int ch);
|
|
|
|
///TThread * thread;
|
|
///static bool updateFlag;
|
|
|
|
public:
|
|
RegisterSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** digi, int nBoard, uint32_t address);
|
|
virtual ~RegisterSetting();
|
|
|
|
|
|
void CloseWindow() { delete this;}
|
|
|
|
void ChangeBoard();
|
|
void UpdateRegister();
|
|
void TypeRegisterAddress();
|
|
|
|
void ChangeValue();
|
|
void SetAllChannels();
|
|
|
|
void SendChangeSignal(); // *SIGNAL*
|
|
void LogMsg(TString msg); // *SIGNAL*
|
|
|
|
};
|
|
|
|
|
|
#endif
|