MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / resize_table_view

Method resize_table_view

DSView/pv/dock/protocoldock.cpp:521–536  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521void 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
538void ProtocolDock::item_clicked(const QModelIndex &index)
539{

Callers

nothing calls this directly

Calls 2

getDecoderStackMethod · 0.80
columnCountMethod · 0.80

Tested by

no test coverage detected