| 18 | #include <QMouseEvent> |
| 19 | |
| 20 | DWIDGET_USE_NAMESPACE |
| 21 | |
| 22 | BreakpointView::BreakpointView(QWidget *parent) |
| 23 | : DTreeView(parent) |
| 24 | { |
| 25 | initHeaderView(); |
| 26 | setHeader(headerView); |
| 27 | setTextElideMode(Qt::TextElideMode::ElideLeft); |
| 28 | setSelectionBehavior(QAbstractItemView::SelectionBehavior::SelectRows); |
| 29 | setSelectionMode(QAbstractItemView::ExtendedSelection); |
| 30 | setFrameStyle(QFrame::NoFrame); |
| 31 | setAlternatingRowColors(true); |
| 32 | setItemDelegate(new BaseItemDelegate(this)); |
| 33 | editService = dpfGetService(dpfservice::EditorService); |
| 34 | |
| 35 | connect(this, &QAbstractItemView::clicked, |
| 36 | this, [=](const QModelIndex &index) { |
| 37 | BreakpointModel *bpModel = static_cast<BreakpointModel *>(model()); |
| 38 | bpModel->setCurrentIndex(index.row()); |
| 39 | }); |
| 40 | } |
| 41 | |
| 42 | BreakpointView::~BreakpointView() |
| 43 | { |
nothing calls this directly
no test coverage detected