Skip to content

Improve main window workflow with ID filtering, resizable splitters, and simple send panel toggle - #1092

Open
minoseigenheer wants to merge 12 commits into
collin80:QT6WIPfrom
minoseigenheer:pr/only-99b99a3
Open

Improve main window workflow with ID filtering, resizable splitters, and simple send panel toggle#1092
minoseigenheer wants to merge 12 commits into
collin80:QT6WIPfrom
minoseigenheer:pr/only-99b99a3

Conversation

@minoseigenheer

@minoseigenheer minoseigenheer commented May 20, 2026

Copy link
Copy Markdown

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:

  • A search field above the filter list for CAN ID filtering.
  • Real-time filtering of the main frame table based on typed hex ID fragments.
  • Real-time filtering of filter-list entries so non-matching items are hidden.
  • Small UI adjustment to allow a narrower filter panel.

User impact:

  • Faster isolation of relevant frames during high-traffic captures.
  • Immediate feedback while typing, with no restart required.

Commit 2: d8c3836 — Fix search filter bar not filtering frame table

What this commit fixes:

  • Previously, m_searchFilter was only checked during a full sendRefresh() rebuild, so the search bar had no effect on the live frame table during capture or in overwrite mode.
  • Applies the hex ID filter in all code paths that populate filteredFrames: addFrame() (normal and overwrite), and recalcOverwrite().

User impact:

  • The filter bar now correctly hides non-matching frames during live capture and in overwrite mode, not just after a manual refresh.

Commit 3: f870e35 — Add resizable main splitters and toggle for simple send panel

What this commit adds:

  • Replaces the fixed main layout with nested splitters.
  • Persists and restores splitter sizes via QSettings.
  • Adds a settings checkbox to show or hide the simple send panel.
  • Applies panel visibility changes immediately at runtime, without restart.

User impact:

  • Better control of screen space on different monitor sizes.
  • Layout preferences are remembered across app launches.
  • Cleaner workflow for users who want to hide the simple send panel.

Commit 4: ec2817e — Fix splitterLeft default size and save/restore on restart

What this commit fixes:

  • splitterLeft size restore in readSettings() ran before insertWidget() reorganized the widget hierarchy, so Qt fell back to a 50/50 split and ignored saved sizes.
  • Defers the restore/default logic via QTimer::singleShot(0) so it runs after the window has real geometry and the final layout is in place.
  • Default split is now 75 % frame table / 25 % send panel.
  • Moves splitterLeft save outside the SaveRestorePositions guard so the send-panel height is always persisted and correctly restored on the next launch.

User impact:

  • Splitter position is now reliably saved and restored across restarts.

Commit 5: 36c85da — canframemodel: add Column::DataDec to sort switch

What this commit adds:

  • Adds the DataDec column to the sort switch in CommFrameModel, enabling correct sorting of the decimal data column.

Commit 6: 6e49b7d — Add crop log to frame range feature

What this commit adds:

  • Allows cropping the loaded frame log to a user-defined start/end frame range directly from the main window, discarding frames outside the range.

User impact:

  • Faster analysis by trimming captures to only the relevant section without needing an external tool.

Commit 7: 3aeb50b — Add batch ID filter toggle (Space key) and setFilterStatesBatch

What this commit adds:

  • Multi-select support in the ID filter list: selecting multiple entries and pressing Space toggles all of them on/off in a single operation.
  • New CommFrameModel::setFilterStatesBatch() method that applies multiple filter-state changes with a single sendRefresh() call, avoiding repeated redraws.

User impact:

  • Quickly enable or disable a group of CAN IDs in the filter list without clicking each one individually.

Commit 8: 5c3a14f — Add Frame Search window

What this commit adds:

  • A dedicated Frame Search dialog (RE Tools → Frame Search) for searching frames by ID, length, direction, and signal value.
  • Interactive bit-field picker (CANDataGrid) with Intel/Motorola byte-order support.
  • DBC signal picker (Node → Message → Signal) with a "Copy Signal Parameters" shortcut.
  • Value filter modes: any change, or a specific value match with scale/bias decoding.
  • Previous/Next navigation that jumps the main frame table to each matching frame.

User impact:

  • Efficiently hunt for specific signal transitions or values across large captures without manually scrolling the frame table.

Commit 9: 7726684 — Search window: fix filtered-table search, 64-bit precision, manual bits, no-value filter

What this commit fixes/adds:

  • Filtered-table search: search now operates on filteredFrames (the currently visible rows) so results and navigation correctly reflect the active ID/length/direction filters.
  • 64-bit precision: "any change" detection now uses exact int64_t comparison instead of lossy double conversion, preventing missed changes in signals wider than 53 bits.
  • Manual bit edit clears DBC signal: editing the start bit or data length manually now clears the previously loaded DBC signal association, avoiding silent mismatches.
  • No-value filter mode: adds a "No filter" radio button that matches every frame passing the ID/length/direction filters, regardless of payload content.
  • Stale search results are automatically cleared when the active filter set changes.

User impact:

  • Search results are always consistent with what is visible in the frame table.
  • No silent precision bugs for wide signals.
  • Simpler workflow when you only need to find frames by ID/direction without caring about payload values.

- 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
@minoseigenheer minoseigenheer changed the title Add resizable main splitters and toggle for simple send panel Improve main window workflow with ID filtering, resizable splitters, and simple send panel toggle May 20, 2026
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.
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant