| 519 | } |
| 520 | |
| 521 | void ProtocolDock::resize_table_view(data::DecoderModel* decoder_model) |
| 522 | { |
| 523 | if (decoder_model->getDecoderStack()) { |
| 524 | for (int i = 0; i < decoder_model->columnCount(QModelIndex()) - 1; i++) { |
| 525 | _table_view->resizeColumnToContents(i); |
| 526 | if (_table_view->columnWidth(i) > 200) |
| 527 | _table_view->setColumnWidth(i, 200); |
| 528 | } |
| 529 | int top_row = _table_view->rowAt(0); |
| 530 | int bom_row = _table_view->rowAt(_table_view->height()); |
| 531 | if (bom_row >= top_row && top_row >= 0) { |
| 532 | for (int i = top_row; i <= bom_row; i++) |
| 533 | _table_view->resizeRowToContents(i); |
| 534 | } |
| 535 | } |
| 536 | } |
| 537 | |
| 538 | void ProtocolDock::item_clicked(const QModelIndex &index) |
| 539 | { |
nothing calls this directly
no test coverage detected