Improve main window workflow with ID filtering, resizable splitters, and simple send panel toggle - #1092
Open
minoseigenheer wants to merge 12 commits into
Open
Improve main window workflow with ID filtering, resizable splitters, and simple send panel toggle#1092minoseigenheer wants to merge 12 commits into
minoseigenheer wants to merge 12 commits into
Conversation
- Replace fixed main layout with nested splitters in the main window UI\n- Persist and restore splitter sizes via QSettings\n- Add a settings checkbox to show or hide the simple send panel\n- Wire runtime updates so the panel visibility changes without restart
Adds a QLineEdit above the filter list that filters both the main frame table and the filter list items in real time. Typing a hex ID fragment (e.g. "19B") hides non-matching rows in both the table and the list. - CommFrameModel::setSearchFilter(): applies hex filter inside sendRefresh() - MainWindow::onSearchFilterChanged(): hides non-matching QListWidget items - leSearchFilter QLineEdit added to ui/mainwindow.ui with clear button - listFilters minimum width reduced (0) to allow narrower panel
Apply m_searchFilter in all code paths that populate filteredFrames: - addFrame() non-overwrite path: skip live incoming frames whose hex ID does not match the search text - addFrame() overwrite path (new frame): same check for newly-seen IDs - recalcOverwrite(): exclude non-matching IDs when rebuilding the unique-ID table in overwrite mode Previously, only sendRefresh() (full rebuild) checked m_searchFilter, so the filter bar only affected the ID list widget and had no effect on the frame table during live capture or in overwrite mode.
- Remove splitterLeft setSizes/restoreState from readSettings() — it ran before insertWidget() reorganized the widget hierarchy, causing Qt to fall back to equal (50/50) distribution and ignoring any set sizes. - After insertWidget(0, container) in the constructor, defer the restore-or-default logic with QTimer::singleShot(0) so it runs on the first event-loop tick, when the window has real geometry and the final splitter layout is in place. Default split is 75 % frame table / 25 % send panel. - Move SplitterLeft saveState() outside the SaveRestorePositions guard in writeSettings() so the send-panel height is always persisted and correctly restored on the next launch.
…ts, no-value filter
…side-by-side layout
- List widgets use LeftToRight+wrapping layout; height auto-fits via visualItemRect after layout pass (QTimer::singleShot) and on resize via eventFilter - Removed CHANGINGONLY from filter file save/load (old files silently skipped for backward compat) - changingOnlyToggled() saves Main/ChangingOnly to QSettings - readSettings() restores cbChangingOnly on startup like overwrite mode
…lter lost after list repopulate - Apply highlight enabled state immediately after m_highlightDelegate is created: readSettings() ran before the delegate existed so the if(m_highlightDelegate) guard silently skipped setEnabled(). - Re-apply leSearchFilter text at the end of updateFilterList() so items already hidden by the typed filter stay hidden after the list is rebuilt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR combines several focused commits that improve filtering, layout flexibility, and usability in the main window.
Commit 1: 326c80c — Add ID search filter box to filter panel
What this commit adds:
User impact:
Commit 2: d8c3836 — Fix search filter bar not filtering frame table
What this commit fixes:
m_searchFilterwas only checked during a fullsendRefresh()rebuild, so the search bar had no effect on the live frame table during capture or in overwrite mode.filteredFrames:addFrame()(normal and overwrite), andrecalcOverwrite().User impact:
Commit 3: f870e35 — Add resizable main splitters and toggle for simple send panel
What this commit adds:
User impact:
Commit 4: ec2817e — Fix splitterLeft default size and save/restore on restart
What this commit fixes:
splitterLeftsize restore inreadSettings()ran beforeinsertWidget()reorganized the widget hierarchy, so Qt fell back to a 50/50 split and ignored saved sizes.QTimer::singleShot(0)so it runs after the window has real geometry and the final layout is in place.splitterLeftsave outside theSaveRestorePositionsguard so the send-panel height is always persisted and correctly restored on the next launch.User impact:
Commit 5: 36c85da — canframemodel: add Column::DataDec to sort switch
What this commit adds:
DataDeccolumn to the sort switch inCommFrameModel, enabling correct sorting of the decimal data column.Commit 6: 6e49b7d — Add crop log to frame range feature
What this commit adds:
User impact:
Commit 7: 3aeb50b — Add batch ID filter toggle (Space key) and setFilterStatesBatch
What this commit adds:
CommFrameModel::setFilterStatesBatch()method that applies multiple filter-state changes with a singlesendRefresh()call, avoiding repeated redraws.User impact:
Commit 8: 5c3a14f — Add Frame Search window
What this commit adds:
User impact:
Commit 9: 7726684 — Search window: fix filtered-table search, 64-bit precision, manual bits, no-value filter
What this commit fixes/adds:
filteredFrames(the currently visible rows) so results and navigation correctly reflect the active ID/length/direction filters.int64_tcomparison instead of lossydoubleconversion, preventing missed changes in signals wider than 53 bits.User impact: