MCPcopy Create free account
hub / github.com/IENT/YUView / updateStreamInfo

Method updateStreamInfo

YUViewLib/src/ui/widgets/BitstreamAnalysisWidget.cpp:94–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void BitstreamAnalysisWidget::updateStreamInfo()
95{
96 this->ui.streamInfoTreeWidget->clear();
97 this->ui.streamInfoTreeWidget->addTopLevelItems(this->parser->getStreamInfo());
98 this->ui.streamInfoTreeWidget->expandAll();
99
100 DEBUG_ANALYSIS("BitstreamAnalysisWidget::updateStreamInfo comboBox entries "
101 << this->ui.showStreamComboBox->count() << " parser->getNrStreams "
102 << this->parser->getNrStreams());
103 auto nrSelections = this->parser->getNrStreams();
104 if (this->parser->getNrStreams() > 1)
105 nrSelections += 1;
106 if (this->ui.showStreamComboBox->count() != int(nrSelections))
107 {
108 this->ui.showStreamComboBox->clear();
109 if (nrSelections == 1)
110 {
111 this->ui.showStreamComboBox->addItem("Show stream 0");
112 this->ui.showStreamComboBox->setEnabled(false);
113 }
114 else
115 {
116 this->ui.showStreamComboBox->setEnabled(true);
117 this->ui.showStreamComboBox->addItem("Show all streams");
118 for (unsigned i = 0; i < this->parser->getNrStreams(); i++)
119 {
120 QString info = this->parser->getShortStreamDescription(i);
121 this->ui.showStreamComboBox->addItem(QString("Stream %1 - ").arg(i) + info);
122 }
123 }
124 }
125}
126
127void BitstreamAnalysisWidget::backgroundParsingDone(QString error)
128{

Callers 1

Calls 4

clearMethod · 0.45
getStreamInfoMethod · 0.45
getNrStreamsMethod · 0.45

Tested by

no test coverage detected