peripheralwidget.h
41 lines
| 995 B
| text/x-c
|
CLexer
/ src / peripheralwidget.h
Jeandet Alexis
|
r5 | #ifndef PERIPHERALWIDGET_H | ||
#define PERIPHERALWIDGET_H | ||||
#include <QWidget> | ||||
#include <QGroupBox> | ||||
#include <QVBoxLayout> | ||||
#include <QList> | ||||
#include <QTimer> | ||||
#include "registerwidget.h" | ||||
class peripheralWidget : public QWidget | ||||
{ | ||||
Q_OBJECT | ||||
public: | ||||
explicit peripheralWidget(const QString& name,qint32 baseAddress, QWidget *parent = 0); | ||||
signals: | ||||
void writeRegSig(qint32 address,qint32 value); | ||||
qint32 readRegSig(qint32 address); | ||||
public slots: | ||||
void blinkCursor(); | ||||
void addRegister(const QString& name,qint32 address); | ||||
protected: | ||||
void mousePressEvent(QMouseEvent *event); | ||||
void mouseMoveEvent(QMouseEvent *event); | ||||
void mouseReleaseEvent(QMouseEvent *event); | ||||
void keyPressEvent(QKeyEvent * event); | ||||
void paintEvent(QPaintEvent* event); | ||||
private: | ||||
void up(); | ||||
void down(); | ||||
QString p_name; | ||||
QString p_header; | ||||
qint32 p_baseAddress; | ||||
QList<registerWidget*> registersWdgts; | ||||
int selectedReg; | ||||
QTimer* p_timer; | ||||
}; | ||||
#endif // PERIPHERALWIDGET_H | ||||