mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-23 17:13:44 +08:00
5f80ca6359
* undo/redo
* display command list to rolling the state backwards or forward
* update detailview after rolling states
* add * to title bar to indicate dbc has changed
* fix signal pointer address changed after removed
* cleanup
* fix id error
* clear undo stack after dbc file changed
* cleanup
* use map
* cleanup
* typo
old-commit-hash: 7c922eafe9
57 lines
1.4 KiB
C++
57 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <QScrollArea>
|
|
#include <QTabBar>
|
|
#include <QToolBar>
|
|
#include <QUndoStack>
|
|
|
|
#include "tools/cabana/binaryview.h"
|
|
#include "tools/cabana/chartswidget.h"
|
|
#include "tools/cabana/historylog.h"
|
|
#include "tools/cabana/signaledit.h"
|
|
|
|
class EditMessageDialog : public QDialog {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
EditMessageDialog(const QString &msg_id, const QString &title, int size, QWidget *parent);
|
|
|
|
QLineEdit *name_edit;
|
|
QSpinBox *size_spin;
|
|
};
|
|
|
|
class DetailWidget : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
DetailWidget(ChartsWidget *charts, QWidget *parent);
|
|
void setMessage(const QString &message_id);
|
|
void dbcMsgChanged(int show_form_idx = -1);
|
|
QUndoStack *undo_stack = nullptr;
|
|
|
|
private:
|
|
void updateChartState(const QString &id, const Signal *sig, bool opened);
|
|
void showTabBarContextMenu(const QPoint &pt);
|
|
void addSignal(int start_bit, int size, bool little_endian);
|
|
void resizeSignal(const Signal *sig, int from, int to);
|
|
void saveSignal(const Signal *sig, const Signal &new_sig);
|
|
void removeSignal(const Signal *sig);
|
|
void editMsg();
|
|
void removeMsg();
|
|
void showForm();
|
|
void updateState();
|
|
|
|
QString msg_id;
|
|
QLabel *name_label, *time_label, *warning_label;
|
|
QWidget *warning_widget;
|
|
QWidget *signals_container;
|
|
QTabBar *tabbar;
|
|
QToolBar *toolbar;
|
|
QAction *remove_msg_act;
|
|
HistoryLog *history_log;
|
|
BinaryView *binary_view;
|
|
QScrollArea *scroll;
|
|
ChartsWidget *charts;
|
|
QList<SignalEdit *> signal_list;
|
|
};
|