Files
giesCANne/dbc/dbcsignaleditor.h
T
Collin Kidder fa57b3ec55 Added undo functionality to signal editor. CTRL-Z undoes what you just
did but undo buffer currently is deleted when signal window is closed
so undoing is limited currently.

Seemingly fixed issue where it would
constantly think you edited the open DBC file when you didn't.
2022-12-29 21:25:11 -05:00

59 lines
1.3 KiB
C++

#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