Improved auto row expansion for new unique frames coming in
This commit is contained in:
+14
-9
@@ -442,8 +442,7 @@ void MainWindow::headerClicked(int logicalIndex)
|
|||||||
//ui->canFramesView->sortByColumn(logicalIndex);
|
//ui->canFramesView->sortByColumn(logicalIndex);
|
||||||
model->sortByColumn(logicalIndex);
|
model->sortByColumn(logicalIndex);
|
||||||
|
|
||||||
if(rowExpansionActive && model->getInterpretMode())
|
manageRowExpansion();
|
||||||
ui->canFramesView->resizeRowsToContents();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::expandAllRows()
|
void MainWindow::expandAllRows()
|
||||||
@@ -469,6 +468,12 @@ void MainWindow::expandAllRows()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::manageRowExpansion()
|
||||||
|
{
|
||||||
|
if(rowExpansionActive && model->getInterpretMode())
|
||||||
|
ui->canFramesView->resizeRowsToContents();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::collapseAllRows()
|
void MainWindow::collapseAllRows()
|
||||||
{
|
{
|
||||||
bool goAhead = false;
|
bool goAhead = false;
|
||||||
@@ -628,6 +633,7 @@ void MainWindow::overwriteToggled(bool state)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
rowExpansionActive = false;
|
||||||
model->setOverwriteMode(false);
|
model->setOverwriteMode(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -687,8 +693,7 @@ void MainWindow::filterListItemChanged(QListWidgetItem *item)
|
|||||||
|
|
||||||
model->setFilterState(ID, isSet);
|
model->setFilterState(ID, isSet);
|
||||||
|
|
||||||
if(rowExpansionActive && model->getInterpretMode())
|
manageRowExpansion();
|
||||||
ui->canFramesView->resizeRowsToContents();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::busFilterListItemChanged(QListWidgetItem *item)
|
void MainWindow::busFilterListItemChanged(QListWidgetItem *item)
|
||||||
@@ -703,8 +708,7 @@ void MainWindow::busFilterListItemChanged(QListWidgetItem *item)
|
|||||||
|
|
||||||
model->setBusFilterState(ID, isSet);
|
model->setBusFilterState(ID, isSet);
|
||||||
|
|
||||||
if(rowExpansionActive && model->getInterpretMode())
|
manageRowExpansion();
|
||||||
ui->canFramesView->resizeRowsToContents();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::filterSetAll()
|
void MainWindow::filterSetAll()
|
||||||
@@ -717,8 +721,7 @@ void MainWindow::filterSetAll()
|
|||||||
inhibitFilterUpdate = false;
|
inhibitFilterUpdate = false;
|
||||||
model->setAllFilters(true);
|
model->setAllFilters(true);
|
||||||
|
|
||||||
if(rowExpansionActive && model->getInterpretMode())
|
manageRowExpansion();
|
||||||
ui->canFramesView->resizeRowsToContents();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::filterClearAll()
|
void MainWindow::filterClearAll()
|
||||||
@@ -754,12 +757,14 @@ void MainWindow::tickGUIUpdate()
|
|||||||
framesPerSec = 0;
|
framesPerSec = 0;
|
||||||
|
|
||||||
ui->lbNumFrames->setText(QString::number(model->rowCount()));
|
ui->lbNumFrames->setText(QString::number(model->rowCount()));
|
||||||
if (rxFrames > 0 && /*allowCapture && */ ui->cbAutoScroll->isChecked()) ui->canFramesView->scrollToBottom();
|
if (rxFrames > 0 && /*allowCapture && */ ui->cbAutoScroll->isChecked())
|
||||||
|
ui->canFramesView->scrollToBottom();
|
||||||
ui->lbFPS->setText(QString::number(framesPerSec));
|
ui->lbFPS->setText(QString::number(framesPerSec));
|
||||||
if (rxFrames > 0)
|
if (rxFrames > 0)
|
||||||
{
|
{
|
||||||
bDirty = true;
|
bDirty = true;
|
||||||
emit framesUpdated(rxFrames); //anyone care that frames were updated?
|
emit framesUpdated(rxFrames); //anyone care that frames were updated?
|
||||||
|
manageRowExpansion();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (model->needsFilterRefresh()) updateFilterList();
|
if (model->needsFilterRefresh()) updateFilterList();
|
||||||
|
|||||||
@@ -205,6 +205,7 @@ private:
|
|||||||
void readSettings();
|
void readSettings();
|
||||||
void writeSettings();
|
void writeSettings();
|
||||||
bool eventFilter(QObject *obj, QEvent *event);
|
bool eventFilter(QObject *obj, QEvent *event);
|
||||||
|
void manageRowExpansion();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
#endif // MAINWINDOW_H
|
||||||
|
|||||||
Reference in New Issue
Block a user