61 lines
1.2 KiB
C++
61 lines
1.2 KiB
C++
#ifndef MEMDISPLAYANDEDIT_H
|
|
#define MEMDISPLAYANDEDIT_H
|
|
|
|
#include "SysPara.h"
|
|
|
|
#include <QWidget>
|
|
#include <QLineEdit>
|
|
#include <QLabel>
|
|
#define MEM_GRID_MAX_ROW 5
|
|
#define MEM_GRID_MAX_COL 16
|
|
namespace Ui {
|
|
class MemDisplayAndEdit;
|
|
}
|
|
|
|
class MemDisplayAndEdit : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MemDisplayAndEdit(QWidget *parent = 0);
|
|
~MemDisplayAndEdit();
|
|
|
|
void updateSysStatusToUI(void);
|
|
|
|
void bindSysPara(SysPara *SysPara);
|
|
|
|
private slots:
|
|
void on_comboBoxBaseAddress_activated(const QString &arg1);
|
|
|
|
void on_radioButtonRead_pressed();
|
|
|
|
void on_radioButtonWrite_pressed();
|
|
|
|
void on_pushButtonEdit_pressed();
|
|
|
|
void on_pushButtonLastPage_pressed();
|
|
|
|
void on_pushButtonNextPage_pressed();
|
|
void onLineEditEditingFinished();
|
|
|
|
|
|
void on_lineEditDec_editingFinished();
|
|
|
|
void on_lineEditHex_editingFinished();
|
|
|
|
private:
|
|
Ui::MemDisplayAndEdit *ui;
|
|
SysPara* sysPara = nullptr;
|
|
|
|
QLineEdit *memLineEdit[MEM_GRID_MAX_ROW*MEM_GRID_MAX_COL];
|
|
QLabel *rowLabel[MEM_GRID_MAX_ROW];
|
|
|
|
bool editFlag; //是否当前处于编辑模式
|
|
bool writeMemMode; //是否当前处于写地址模式
|
|
int writeMemBaseAddr;
|
|
int readMemBaseAddr;
|
|
|
|
};
|
|
|
|
#endif // MEMDISPLAYANDEDIT_H
|