14#include <QSignalBlocker>
26 [[nodiscard]]
bool isDiagramDocument(
const ProjectSession& session)
43 this->window = std::make_unique<QDialog>(
window);
44 this->window->setWindowTitle(tr(
"Waveform"));
45 this->window->setModal(
false);
46 this->window->resize(900, 420);
48 auto* layout =
new QVBoxLayout(this->window.get());
49 layout->setContentsMargins(0, 0, 0, 0);
51 layout->addWidget(this->
viewer);
53 callbacks.connect(this->window.get(), &QDialog::finished, [
this] {
54 setTraceActionChecked(false);
55 this->viewer->setEditMode(false);
78 [
this](
bool enabled) {
toggle(enabled); });
90 window->setVisible(enabled);
94 scene.setInteractionMode(DiagramScene::InteractionMode::SIMULATION_MODE);
114 if (switchedDocument)
115 viewer->resetTrace({}, 0, {});
133 viewer->setEditMode(
false);
134 scene.setInteractionMode(DiagramScene::InteractionMode::NORMAL_MODE);
Graphics scene for the circuit diagram editor.
void setIoInteractionsEnabled(bool enabled)
Enables or disables user-triggered IO interactions in simulation mode.
void waveformTraceReset(QStringList signalNames, int inputCount, QList< int > signalWidths)
Emitted when interactive waveform signals should be rebuilt.
void simulateEditedWaveform(qulonglong duration, std::vector< Sample > inputSnapshots)
Simulates the circuit using an edited input waveform.
void waveformTraceSnapshots(QList< QPair< qulonglong, std::vector< BusValue > > > snapshots)
Emitted when a completed simulation job produced multiple waveform states.
void activeDocumentChanged(const QString &path, SILICON::project::DocumentCategory category)
Emitted after a document was loaded and made visible.
constexpr DocumentCategory categoryOf(const DocumentType type)
std::optional< DocumentType > documentTypeForPath(const std::string_view path)
std::string activeDocumentPath