1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
#ifndef DBCSIGNALEDITOR_H
#define DBCSIGNALEDITOR_H
#include <QDialog>
#include "dbchandler.h"
#include "utility.h"
namespace Ui {
class DBCSignalEditor;
}
class DBCSignalEditor : public QDialog
{
Q_OBJECT
public:
explicit DBCSignalEditor(QWidget *parent = 0);
void setMessageRef(DBC_MESSAGE *msg);
void setFileIdx(int idx);
void setSignalRef(DBC_SIGNAL *sig);
void showEvent(QShowEvent*);
~DBCSignalEditor();
void refreshView();
signals:
void updatedTreeInfo(DBC_SIGNAL *sig);
private slots:
void bitfieldLeftClicked(int bit);
void bitfieldRightClicked(int bit);
void onValuesCellChanged(int row,int col);
void onCustomMenuValues(QPoint);
void deleteCurrentValue();
private:
Ui::DBCSignalEditor *ui;
DBCHandler *dbcHandler;
DBC_MESSAGE *dbcMessage;
DBC_SIGNAL *currentSignal;
QList<DBC_SIGNAL> undoBuffer;
DBCFile *dbcFile;
bool inhibitCellChanged;
bool inhibitMsgProc;
void fillSignalForm(DBC_SIGNAL *sig);
void fillValueTable(DBC_SIGNAL *sig);
void generateUsedBits();
void refreshBitGrid();
void closeEvent(QCloseEvent *event);
bool eventFilter(QObject *obj, QEvent *event);
void readSettings();
void writeSettings();
void pushToUndoBuffer();
void popFromUndoBuffer();
};
#endif // DBCSIGNALEDITOR_H
|