  #include "tools/cabana/dbcmanager.h"
  #include "tools/cabana/streams/abstractstream.h"
  #include "tools/cabana/util.h"
  
  using namespace dbcmanager;
  
  class HeaderView : public QHeaderView {
  public:
    HeaderView(Qt::Orientation orientation, QWidget *parent = nullptr) : QHeaderView(orientation, parent) {}
    QSize sectionSizeFromContents(int logicalIndex) const override;
    void paintSection(QPainter *painter, const QRect &rect, int logicalIndex) const;
 
</s> remove using namespace dbcmanager;
 </s> add  </s> remove struct MessageId {
  uint8_t source;
  uint32_t address;

  QString toString() const {
    return QString("%1:%2").arg(source).arg(address, 1, 16);
  }

  bool operator==(const MessageId &other) const {
    return source == other.source && address == other.address;
  }

  bool operator!=(const MessageId &other) const {
    return !(*this == other);
  }

  bool operator<(const MessageId &other) const {
    return std::pair{source, address} < std::pair{other.source, other.address};
  }

  bool operator>(const MessageId &other) const {
    return std::pair{source, address} > std::pair{other.source, other.address};
  }
};

uint qHash(const MessageId &item);
Q_DECLARE_METATYPE(MessageId);

namespace dbcmanager {

typedef QList<std::pair<QString, QString>> ValueDescription;

struct Signal {
  QString name;
  int start_bit, msb, lsb, size;
  bool is_signed;
  double factor, offset;
  bool is_little_endian;
  QString min, max, unit;
  QString comment;
  ValueDescription val_desc;
};

struct Msg {
  QString name;
  uint32_t size;

  std::vector<const Signal*> getSignals() const;
  const Signal *sig(const QString &sig_name) const {
    auto it = std::find_if(sigs.begin(), sigs.end(), [&](auto &s) { return s.name == sig_name; });
    return it != sigs.end() ? &(*it) : nullptr;
  }

private:
  QList<Signal> sigs;
  friend class DBCManager;
};
 </s> add #include "tools/cabana/dbc.h" </s> remove   AddSigCommand(const MessageId &id, const Signal &sig, QUndoCommand *parent = nullptr);
 </s> add   AddSigCommand(const MessageId &id, const cabana::Signal &sig, QUndoCommand *parent = nullptr); </s> remove   RemoveSigCommand(const MessageId &id, const Signal *sig, QUndoCommand *parent = nullptr);
 </s> add   RemoveSigCommand(const MessageId &id, const cabana::Signal *sig, QUndoCommand *parent = nullptr); </s> remove   EditSignalCommand(const MessageId &id, const Signal *sig, const Signal &new_sig, QUndoCommand *parent = nullptr);
 </s> add   EditSignalCommand(const MessageId &id, const cabana::Signal *sig, const cabana::Signal &new_sig, QUndoCommand *parent = nullptr);
  #include "tools/cabana/dbcmanager.h"
  #include "tools/cabana/streams/abstractstream.h"
  #include "tools/cabana/util.h"
  


  class HeaderView : public QHeaderView {
  public:
    HeaderView(Qt::Orientation orientation, QWidget *parent = nullptr) : QHeaderView(orientation, parent) {}
    QSize sectionSizeFromContents(int logicalIndex) const override;
    void paintSection(QPainter *painter, const QRect &rect, int logicalIndex) const;
keep keep keep keep replace replace keep keep keep keep keep
 cabana: refactor Msg and Signal into dbc.cc (#27552) 
tools/cabana/historylog.h