|
SILICON
|
#include <waveformViewer.hpp>
Public Types | |
| using | Sample = SILICON::waveform::Sample |
| One complete set of signal values at a simulation timestamp. | |
Signals | |
| void | timestampHovered (int sampleIndex) |
| Emitted when the pointer is nearest to a trace timestamp. | |
| void | signalSelected (int signalIndex) |
| Emitted when a signal row is selected. | |
| void | signalContextMenuRequested (int signalIndex, QPoint globalPosition) |
| Requests the display-format context menu for a signal row. | |
| void | editIntervalChanged (int signalIndex, quint64 startTime, quint64 endTime) |
| Emitted while an edit-mode interval is being adjusted. | |
| void | editIntervalSelected (int signalIndex, quint64 startTime, quint64 endTime) |
| Emitted after an edit-mode drag chooses a signal/time interval. | |
Public Member Functions | |
| Canvas (QWidget *parent=nullptr) | |
| void | setTrace (const QStringList &names, const std::vector< Sample > &samples) |
| Displays a trace using the existing input-group count. | |
| void | setTrace (const QStringList &names, const std::vector< Sample > &samples, int inputCount) |
| Displays a trace and updates signal grouping. | |
| void | setSignalFormats (const std::vector< SILICON::core::BusValueFormat > &formats) |
| Sets per-signal display formats used for bus labels. | |
| void | setPixelsPerTick (double value) |
| Changes horizontal waveform scale. | |
| void | setSelectedSampleIndex (int sampleIndex) |
| Highlights one sample timestamp, or clears selection for an invalid index. | |
| void | setSelectedSignalIndex (int signalIndex) |
| Highlights one signal row, or clears selection for an invalid index. | |
| void | setEditMode (bool enabled) |
| Enables or disables waveform interval editing gestures. | |
| void | setEditDuration (quint64 duration) |
| Sets the editable waveform time span. | |
| void | setEditSelection (int signalIndex, quint64 startTime, quint64 endTime) |
| Sets the edit interval highlighted on the canvas. | |
| void | setEditSelectionVisible (bool visible) |
| Controls whether the precise edit interval highlight is visible. | |
Protected Member Functions | |
| void | paintEvent (QPaintEvent *event) override |
| void | mouseMoveEvent (QMouseEvent *event) override |
| void | mousePressEvent (QMouseEvent *event) override |
| void | mouseReleaseEvent (QMouseEvent *event) override |
Private Member Functions | |
| quint64 | endTime () const |
| int | xForTime (quint64 time) const |
| quint64 | timeForX (int x) const |
| Converts an x-coordinate into a clamped simulation timestamp. | |
| int | yForSignalRow (int row) const |
| int | signalRowAt (QPoint position) const |
| core::BusValue | sampleValueAt (int sampleIndex, int row) const |
| int | yForScalarValue (int row, const core::BusValue &value) const |
| void | updateCanvasSize () |
| Recomputes the scrollable canvas dimensions from trace extent and zoom. | |
| void | drawScalar (QPainter &painter, int row, int x0, int x1, const core::BusValue &value) const |
| void | drawScalarTransition (QPainter &painter, int row, int x, const core::BusValue &previousValue, const core::BusValue &nextValue) const |
| void | drawBus (QPainter &painter, int row, int x0, int x1, const core::BusValue &value) const |
Private Attributes | |
| QStringList | signalNames |
| Signal labels rendered by the canvas. | |
| const std::vector< Sample > * | traceSamples = nullptr |
| Non-owning view of Viewer's sample storage. | |
| double | pixelsPerTick = 12.0 |
| int | inputSignalCount = 0 |
| int | selectedSampleIndex = -1 |
| int | selectedSignalIndex = -1 |
| bool | editMode = false |
| quint64 | editDuration = 20 |
| int | editSelectionSignalIndex = -1 |
| quint64 | editSelectionStartTime = 0 |
| quint64 | editSelectionEndTime = 1 |
| bool | editSelectionVisible = false |
| int | editDragSignalIndex = -1 |
| quint64 | editDragStartTime = 0 |
| quint64 | editDragEndTime = 0 |
| std::vector< SILICON::core::BusValueFormat > | signalFormats |
Definition at line 66 of file waveformViewer.hpp.
| using Sample = SILICON::waveform::Sample |
One complete set of signal values at a simulation timestamp.
Definition at line 70 of file waveformViewer.hpp.
|
explicit |
Definition at line 296 of file waveformViewer.cpp.
|
private |
Definition at line 759 of file waveformViewer.cpp.
|
private |
Definition at line 740 of file waveformViewer.cpp.
|
private |
Definition at line 747 of file waveformViewer.cpp.
|
signal |
Emitted while an edit-mode interval is being adjusted.
| signalIndex | Selected signal row |
| startTime | Inclusive interval start |
| endTime | Exclusive interval end |
|
signal |
Emitted after an edit-mode drag chooses a signal/time interval.
| signalIndex | Selected signal row |
| startTime | Inclusive interval start |
| endTime | Exclusive interval end |
|
nodiscardprivate |
Definition at line 426 of file waveformViewer.cpp.
|
overrideprotected |
Definition at line 640 of file waveformViewer.cpp.
|
overrideprotected |
Definition at line 684 of file waveformViewer.cpp.
|
overrideprotected |
Definition at line 706 of file waveformViewer.cpp.
|
overrideprotected |
Definition at line 480 of file waveformViewer.cpp.
|
nodiscardprivate |
Definition at line 468 of file waveformViewer.cpp.
| void setEditDuration | ( | quint64 | duration | ) |
Sets the editable waveform time span.
| duration | Inclusive upper bound for edit gestures and rendering |
Definition at line 390 of file waveformViewer.cpp.
| void setEditMode | ( | bool | enabled | ) |
Enables or disables waveform interval editing gestures.
| enabled | True to let left-button drags choose an input interval |
Definition at line 379 of file waveformViewer.cpp.
| void setEditSelection | ( | int | signalIndex, |
| quint64 | startTime, | ||
| quint64 | endTime ) |
Sets the edit interval highlighted on the canvas.
| signalIndex | Signal row whose interval is selected |
| startTime | Inclusive interval start |
| endTime | Exclusive interval end |
Definition at line 399 of file waveformViewer.cpp.
| void setEditSelectionVisible | ( | bool | visible | ) |
Controls whether the precise edit interval highlight is visible.
| visible | True while precise interval fields are being edited |
Definition at line 417 of file waveformViewer.cpp.
| void setPixelsPerTick | ( | double | value | ) |
Changes horizontal waveform scale.
| value | Pixels rendered per simulation tick |
Definition at line 345 of file waveformViewer.cpp.
| void setSelectedSampleIndex | ( | int | sampleIndex | ) |
Highlights one sample timestamp, or clears selection for an invalid index.
| sampleIndex | Sample index to highlight |
Definition at line 356 of file waveformViewer.cpp.
| void setSelectedSignalIndex | ( | int | signalIndex | ) |
Highlights one signal row, or clears selection for an invalid index.
| signalIndex | Signal row to highlight |
Definition at line 369 of file waveformViewer.cpp.
| void setSignalFormats | ( | const std::vector< SILICON::core::BusValueFormat > & | formats | ) |
Sets per-signal display formats used for bus labels.
Definition at line 325 of file waveformViewer.cpp.
| void setTrace | ( | const QStringList & | names, |
| const std::vector< Sample > & | samples ) |
Displays a trace using the existing input-group count.
| names | Ordered signal labels |
| samples | Viewer-owned sample storage observed without copying |
Definition at line 303 of file waveformViewer.cpp.
| void setTrace | ( | const QStringList & | names, |
| const std::vector< Sample > & | samples, | ||
| int | inputCount ) |
Displays a trace and updates signal grouping.
| names | Ordered signal labels |
| samples | Viewer-owned sample storage observed without copying |
| inputCount | Number of leading signals belonging to the input group |
Definition at line 308 of file waveformViewer.cpp.
|
signal |
Requests the display-format context menu for a signal row.
| signalIndex | Signal row under the pointer |
| globalPosition | Screen position where the menu should open |
|
nodiscardprivate |
Definition at line 455 of file waveformViewer.cpp.
|
signal |
Emitted when a signal row is selected.
| signalIndex | Selected signal row |
|
nodiscardprivate |
Converts an x-coordinate into a clamped simulation timestamp.
Definition at line 440 of file waveformViewer.cpp.
|
signal |
Emitted when the pointer is nearest to a trace timestamp.
| sampleIndex | Index of the nearest sample |
|
private |
Recomputes the scrollable canvas dimensions from trace extent and zoom.
Definition at line 331 of file waveformViewer.cpp.
|
nodiscardprivate |
Definition at line 435 of file waveformViewer.cpp.
|
nodiscardprivate |
Definition at line 728 of file waveformViewer.cpp.
|
nodiscardprivate |
Definition at line 447 of file waveformViewer.cpp.
|
private |
Definition at line 202 of file waveformViewer.hpp.
|
private |
Definition at line 200 of file waveformViewer.hpp.
|
private |
Definition at line 201 of file waveformViewer.hpp.
|
private |
Definition at line 195 of file waveformViewer.hpp.
|
private |
Definition at line 194 of file waveformViewer.hpp.
|
private |
Definition at line 198 of file waveformViewer.hpp.
|
private |
Definition at line 196 of file waveformViewer.hpp.
|
private |
Definition at line 197 of file waveformViewer.hpp.
|
private |
Definition at line 199 of file waveformViewer.hpp.
|
private |
Definition at line 191 of file waveformViewer.hpp.
|
private |
Definition at line 190 of file waveformViewer.hpp.
|
private |
Definition at line 192 of file waveformViewer.hpp.
|
private |
Definition at line 193 of file waveformViewer.hpp.
|
private |
Definition at line 203 of file waveformViewer.hpp.
|
private |
Signal labels rendered by the canvas.
Definition at line 181 of file waveformViewer.hpp.
Non-owning view of Viewer's sample storage.
The viewer owns the canvas and its sample vector, so this remains valid for the canvas lifetime and avoids copying the complete trace on every refresh.
Definition at line 189 of file waveformViewer.hpp.