| 14 | #include <limits> |
| 15 | |
| 16 | ExtTestCaseTable::ExtTestCaseTable(QWidget * /*parent*/) { |
| 17 | clear(); |
| 18 | |
| 19 | horizontalHeader()->setMinimumHeight(25); |
| 20 | horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); |
| 21 | horizontalHeader()->setContextMenuPolicy(Qt::CustomContextMenu); |
| 22 | |
| 23 | verticalHeader()->hide(); |
| 24 | |
| 25 | setEditTriggers(QAbstractItemView::NoEditTriggers); |
| 26 | |
| 27 | connect(this, &QTableWidget::itemSelectionChanged, this, &ExtTestCaseTable::whenItemSelectionChanged); |
| 28 | connect(this, &QTableWidget::itemClicked, this, [this](QTableWidgetItem *item) { |
| 29 | if (! item->column()) { |
| 30 | int p = item->row(); |
| 31 | QTableWidgetSelectionRange range(p, 0, p + rowSpan(p, 0) - 1, this->columnCount() - 1); |
| 32 | this->setRangeSelected(range, true); |
| 33 | } |
| 34 | }); |
| 35 | |
| 36 | isCanModify = false; |
| 37 | isCanAddSub = true; |
| 38 | isCanAddCase = false; |
| 39 | isCanRemove = false; |
| 40 | isCanUp = false; |
| 41 | isCanDown = false; |
| 42 | isCanMerge = false; |
| 43 | isCanSplit = false; |
| 44 | noDfs = false; |
| 45 | |
| 46 | clear(); |
| 47 | setRowCount(0); |
| 48 | setColumnCount(3); |
| 49 | setHorizontalHeaderLabels({tr("Informations"), tr("Input"), tr("Output")}); |
| 50 | } |
| 51 | |
| 52 | auto ExtTestCaseTable::canModify() const -> bool { return isCanModify; } |
| 53 |
nothing calls this directly
no outgoing calls
no test coverage detected