wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
MainWindowUI.cpp
Go to the documentation of this file.
1// Copyright 2015 - 2026, GIBIS-UNIFESP and the wiRedPanda contributors
2// SPDX-License-Identifier: GPL-3.0-or-later
3
5
6#include <QtCore/QCoreApplication>
7#include <QtCore/QMetaObject>
8#include <QtGui/QIcon>
9
11{
12 if (MainWindow->objectName().isEmpty()) {
13 MainWindow->setObjectName("MainWindow");
14 }
15
16 // --- Window defaults ---
17 // 886×765 is the designed comfortable default; 150 px minimum height
18 // prevents the toolbar/menu from being completely collapsed.
19 MainWindow->resize(886, 765);
20 MainWindow->setMinimumSize(QSize(0, 150));
21 MainWindow->setWindowTitle("");
22 MainWindow->setWindowIcon(QIcon(":/Interface/Toolbar/wpanda.svg"));
23 MainWindow->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
24 // On macOS, merging the title bar and toolbar saves vertical space.
25 MainWindow->setUnifiedTitleAndToolBarOnMac(true);
26
27 actionOpen = new QAction(MainWindow);
28 actionOpen->setObjectName("actionOpen");
29 actionOpen->setIcon(QIcon(":/Interface/Toolbar/folder.svg"));
30 actionSave = new QAction(MainWindow);
31 actionSave->setObjectName("actionSave");
32 actionSave->setIcon(QIcon(":/Interface/Toolbar/save.svg"));
33 actionSaveAs = new QAction(MainWindow);
34 actionSaveAs->setObjectName("actionSaveAs");
35 actionSaveAs->setIcon(QIcon(":/Interface/Toolbar/save.svg"));
36 actionCut = new QAction(MainWindow);
37 actionCut->setObjectName("actionCut");
38 actionCut->setIcon(QIcon(":/Interface/Toolbar/cut.svg"));
39 actionCopy = new QAction(MainWindow);
40 actionCopy->setObjectName("actionCopy");
41 actionCopy->setIcon(QIcon(":/Interface/Toolbar/copy.svg"));
42 actionPaste = new QAction(MainWindow);
43 actionPaste->setObjectName("actionPaste");
44 actionPaste->setIcon(QIcon(":/Interface/Toolbar/paste.svg"));
45 actionDuplicate = new QAction(MainWindow);
46 actionDuplicate->setObjectName("actionDuplicate");
47 actionDelete = new QAction(MainWindow);
48 actionDelete->setObjectName("actionDelete");
49 QIcon icon6;
50 icon6.addFile(":/Interface/Toolbar/delete.svg", QSize(), QIcon::Normal, QIcon::On);
51 actionDelete->setIcon(icon6);
52 actionNew = new QAction(MainWindow);
53 actionNew->setObjectName("actionNew");
54 actionNew->setIcon(QIcon(":/Interface/Toolbar/new.svg"));
55 actionZoomIn = new QAction(MainWindow);
56 actionZoomIn->setObjectName("actionZoomIn");
57 actionZoomIn->setIcon(QIcon(":/Interface/Toolbar/zoomIn.svg"));
58 actionZoomOut = new QAction(MainWindow);
59 actionZoomOut->setObjectName("actionZoomOut");
60 actionZoomOut->setIcon(QIcon(":/Interface/Toolbar/zoomOut.svg"));
61 actionWires = new QAction(MainWindow);
62 actionWires->setObjectName("actionWires");
63 actionWires->setCheckable(true);
64 actionWires->setChecked(true);
65 actionWires->setIcon(QIcon(":/Interface/Toolbar/wires.svg"));
66 actionGates = new QAction(MainWindow);
67 actionGates->setObjectName("actionGates");
68 actionGates->setCheckable(true);
69 actionGates->setChecked(true);
70 actionGates->setIcon(QIcon(":/Components/Logic/nor.svg"));
71 actionAbout = new QAction(MainWindow);
72 actionAbout->setObjectName("actionAbout");
73 actionAbout->setIcon(QIcon(":/Interface/Toolbar/help.svg"));
74 actionExit = new QAction(MainWindow);
75 actionExit->setObjectName("actionExit");
76 actionExit->setIcon(QIcon(":/Interface/Toolbar/exit.svg"));
77 actionRotateRight = new QAction(MainWindow);
78 actionRotateRight->setObjectName("actionRotateRight");
79 actionRotateRight->setIcon(QIcon(":/Interface/Toolbar/rotateR.svg"));
80 actionRotateLeft = new QAction(MainWindow);
81 actionRotateLeft->setObjectName("actionRotateLeft");
82 actionRotateLeft->setIcon(QIcon(":/Interface/Toolbar/rotateL.svg"));
83 actionAboutQt = new QAction(MainWindow);
84 actionAboutQt->setObjectName("actionAboutQt");
85 actionAboutQt->setIcon(QIcon(":/Interface/Toolbar/helpQt.svg"));
86 actionSelectAll = new QAction(MainWindow);
87 actionSelectAll->setObjectName("actionSelectAll");
88 actionSelectAll->setIcon(QIcon(":/Interface/Toolbar/selectAll.svg"));
89 actionReloadFile = new QAction(MainWindow);
90 actionReloadFile->setObjectName("actionReloadFile");
91 actionReloadFile->setIcon(QIcon(":/Interface/Toolbar/reloadFile.svg"));
92 actionExportToArduino = new QAction(MainWindow);
93 actionExportToArduino->setObjectName("actionExportToArduino");
94 actionExportToArduino->setIcon(QIcon(":/Interface/Toolbar/arduino.svg"));
96 actionExportToSystemVerilog->setObjectName("actionExportToSystemVerilog");
97 actionExportToSystemVerilog->setIcon(QIcon(":/Interface/Toolbar/verilog.svg"));
98 actionResetZoom = new QAction(MainWindow);
99 actionResetZoom->setObjectName("actionResetZoom");
100 actionResetZoom->setIcon(QIcon(":/Interface/Toolbar/zoomReset.svg"));
101 actionZoomToFit = new QAction(MainWindow);
102 actionZoomToFit->setObjectName("actionZoomToFit");
103 actionZoomToFit->setIcon(QIcon(":/Interface/Dolphin/zoomRange.svg"));
104 actionExportToPdf = new QAction(MainWindow);
105 actionExportToPdf->setObjectName("actionExportToPdf");
106 actionExportToPdf->setIcon(QIcon(":/Interface/Toolbar/pdf.svg"));
107 actionPlay = new QAction(MainWindow);
108 actionPlay->setObjectName("actionPlay");
109 actionPlay->setCheckable(true);
110 // Use a two-state icon: play icon when unchecked, pause icon when checked.
111 QIcon icon22(":/Interface/Toolbar/play.svg");
112 icon22.addFile(":/Interface/Toolbar/pause.svg", QSize(), QIcon::Normal, QIcon::On);
113 actionPlay->setIcon(icon22);
114 actionRename = new QAction(MainWindow);
115 actionRename->setObjectName("actionRename");
116 actionRename->setIcon(QIcon(":/Interface/Toolbar/rename.svg"));
117 actionChangeTrigger = new QAction(MainWindow);
118 actionChangeTrigger->setObjectName("actionChangeTrigger");
119 actionChangeTrigger->setIcon(QIcon(":/Components/Input/buttonOff.svg"));
120 actionClearSelection = new QAction(MainWindow);
121 actionClearSelection->setObjectName("actionClearSelection");
122 actionClearSelection->setIcon(QIcon(":/Interface/Toolbar/clearSelection.svg"));
123 actionFastMode = new QAction(MainWindow);
124 actionFastMode->setObjectName("actionFastMode");
125 actionFastMode->setCheckable(true);
126 actionFastMode->setIcon(QIcon(":/Interface/Toolbar/fast.svg"));
127 actionLightTheme = new QAction(MainWindow);
128 actionLightTheme->setObjectName("actionLightTheme");
129 actionLightTheme->setCheckable(true);
130 actionLightTheme->setChecked(true);
131 actionDarkTheme = new QAction(MainWindow);
132 actionDarkTheme->setObjectName("actionDarkTheme");
133 actionDarkTheme->setCheckable(true);
134 actionSystemTheme = new QAction(MainWindow);
135 actionSystemTheme->setObjectName("actionSystemTheme");
136 actionSystemTheme->setCheckable(true);
137 actionWaveform = new QAction(MainWindow);
138 actionWaveform->setObjectName("actionWaveform");
139 actionWaveform->setIcon(QIcon(":/Interface/Toolbar/dolphin_icon.svg"));
140 actionExportToImage = new QAction(MainWindow);
141 actionExportToImage->setObjectName("actionExportToImage");
142 actionExportToImage->setIcon(QIcon(":/Interface/Toolbar/png.svg"));
143
144 actionMakeSelfContained = new QAction(MainWindow);
145 actionMakeSelfContained->setObjectName("actionMakeSelfContained");
146 actionFlipHorizontally = new QAction(MainWindow);
147 actionFlipHorizontally->setObjectName("actionFlipHorizontally");
148 actionFlipVertically = new QAction(MainWindow);
149 actionFlipVertically->setObjectName("actionFlipVertically");
150 actionAlignLeft = new QAction(MainWindow);
151 actionAlignLeft->setObjectName("actionAlignLeft");
152 actionAlignRight = new QAction(MainWindow);
153 actionAlignRight->setObjectName("actionAlignRight");
154 actionAlignTop = new QAction(MainWindow);
155 actionAlignTop->setObjectName("actionAlignTop");
156 actionAlignBottom = new QAction(MainWindow);
157 actionAlignBottom->setObjectName("actionAlignBottom");
159 actionAlignHorizontalCenter->setObjectName("actionAlignHorizontalCenter");
161 actionAlignVerticalCenter->setObjectName("actionAlignVerticalCenter");
163 actionDistributeHorizontally->setObjectName("actionDistributeHorizontally");
165 actionDistributeVertically->setObjectName("actionDistributeVertically");
166 actionFullscreen = new QAction(MainWindow);
167 actionFullscreen->setObjectName("actionFullscreen");
168 actionMute = new QAction(MainWindow);
169 actionMute->setObjectName("actionMute");
170 actionMute->setCheckable(true);
171 // Similarly, the mute action swaps between buzzer and mute icons.
172 QIcon icon29(":/Components/Output/Buzzer/BuzzerOff.svg");
173 icon29.addFile(":/Interface/Toolbar/mute.svg", QSize(), QIcon::Normal, QIcon::On);
174 actionMute->setIcon(icon29);
175 actionLabelsUnderIcons = new QAction(MainWindow);
176 actionLabelsUnderIcons->setObjectName("actionLabelsUnderIcons");
177 actionLabelsUnderIcons->setCheckable(true);
178 actionICPreview = new QAction(MainWindow);
179 actionICPreview->setObjectName("actionICPreview");
180 actionICPreview->setCheckable(true);
181 actionCheckForUpdates = new QAction(MainWindow);
182 actionCheckForUpdates->setObjectName("actionCheckForUpdates");
183 actionCheckForUpdates->setCheckable(true);
184 actionShowMinimap = new QAction(MainWindow);
185 actionShowMinimap->setObjectName("actionShowMinimap");
186 actionShowMinimap->setCheckable(true);
187 actionAboutThisVersion = new QAction(MainWindow);
188 actionAboutThisVersion->setObjectName("actionAboutThisVersion");
189 actionRestart = new QAction(MainWindow);
190 actionRestart->setObjectName("actionRestart");
191 actionRestart->setIcon(QIcon(":/Interface/Toolbar/reset.svg"));
193 actionBackground_Simulation->setObjectName("actionBackground_Simulation");
194 actionBackground_Simulation->setCheckable(true);
195 actionBackground_Simulation->setIcon(QIcon::fromTheme("media-playlist-repeat"));
196 actionShortcutsAndTips = new QAction(MainWindow);
197 actionShortcutsAndTips->setObjectName("actionShortcutsAndTips");
198 actionShortcutsAndTips->setIcon(QIcon::fromTheme("help-about"));
200 actionReportTranslationError->setObjectName("actionReportTranslationError");
201 actionReportTranslationError->setIcon(QIcon(":/Interface/Toolbar/help.svg"));
202 centralWidget = new QWidget(MainWindow);
203 centralWidget->setObjectName("centralWidget");
204 gridLayout_8 = new QGridLayout(centralWidget);
205 gridLayout_8->setSpacing(6);
206 gridLayout_8->setContentsMargins(11, 11, 11, 11);
207 gridLayout_8->setObjectName("gridLayout_8");
208 // --- Main horizontal splitter ---
209 // Left child = component palette + element editor; right child = canvas tabs.
210 splitter = new QSplitter(centralWidget);
211 splitter->setObjectName("splitter");
212 QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
213 sizePolicy.setHorizontalStretch(0);
214 sizePolicy.setVerticalStretch(0);
215 sizePolicy.setHeightForWidth(splitter->sizePolicy().hasHeightForWidth());
216 splitter->setSizePolicy(sizePolicy);
217 splitter->setFrameShape(QFrame::NoFrame);
218 splitter->setLineWidth(1);
219 splitter->setMidLineWidth(2);
220 splitter->setOrientation(Qt::Horizontal);
221 // Non-opaque resize prevents repainting while dragging, which is cheaper.
222 splitter->setOpaqueResize(false);
223 splitter->setHandleWidth(8);
224 // Prevent either pane from being fully collapsed by dragging.
225 splitter->setChildrenCollapsible(false);
226 // Left panel: 280–600 px wide — wide enough to show element labels
227 // but capped so it doesn't swallow too much of the canvas area.
228 leftPannel = new QWidget(splitter);
229 leftPannel->setObjectName("leftPannel");
230 leftPannel->setMinimumSize(QSize(280, 0));
231 leftPannel->setMaximumSize(QSize(600, 16777215));
232 verticalLayout_5 = new QVBoxLayout(leftPannel);
233 verticalLayout_5->setSpacing(0);
234 verticalLayout_5->setContentsMargins(11, 11, 11, 11);
235 verticalLayout_5->setObjectName("verticalLayout_5");
236 verticalLayout_5->setContentsMargins(0, 0, 0, 0);
237 gridLayout = new QGridLayout();
238 gridLayout->setSpacing(6);
239 gridLayout->setObjectName("gridLayout");
240 tabElements = new QTabWidget(leftPannel);
241 tabElements->setObjectName("tabElements");
242 sizePolicy.setHeightForWidth(tabElements->sizePolicy().hasHeightForWidth());
243 tabElements->setSizePolicy(sizePolicy);
244 tabElements->setMinimumSize(QSize(220, 0));
245 // Disabled tabs (e.g. the "search" tab that's only visible while typing)
246 // are collapsed to zero size so they don't appear as empty slots.
247 tabElements->setStyleSheet("QTabBar::tab:disabled {\n"
248" width: 0;\n"
249" height: 0;\n"
250" margin: 0;\n"
251" padding: 0;\n"
252" border: none; \n"
253"}\n"
254"\n"
255"QTabWidget::pane {\n"
256" margin: 0px 0px 0px 0px; \n"
257"}\n");
258 io = new QWidget();
259 io->setObjectName("io");
260 gridLayout_2 = new QGridLayout(io);
261 gridLayout_2->setSpacing(6);
262 gridLayout_2->setContentsMargins(11, 11, 11, 11);
263 gridLayout_2->setObjectName("gridLayout_2");
264 scrollAreaInOut = new QScrollArea(io);
265 scrollAreaInOut->setObjectName("scrollAreaInOut");
266 scrollAreaInOut->setFrameShape(QFrame::NoFrame);
267 scrollAreaInOut->setWidgetResizable(true);
268 scrollAreaWidgetContents_InOut = new QWidget();
269 scrollAreaWidgetContents_InOut->setObjectName("scrollAreaWidgetContents_InOut");
270 scrollAreaWidgetContents_InOut->setGeometry(QRect(0, 0, 260, 584));
272 verticalLayout->setSpacing(6);
273 verticalLayout->setContentsMargins(11, 11, 11, 11);
274 verticalLayout->setObjectName("verticalLayout");
275 verticalSpacer_InOut = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
276
278
280
281 gridLayout_2->addWidget(scrollAreaInOut, 0, 0, 1, 1);
282
283 tabElements->addTab(io, QIcon(":/Components/Input/buttonOff.svg"), QString());
284 gates = new QWidget();
285 gates->setObjectName("gates");
286 gridLayout_6 = new QGridLayout(gates);
287 gridLayout_6->setSpacing(6);
288 gridLayout_6->setContentsMargins(11, 11, 11, 11);
289 gridLayout_6->setObjectName("gridLayout_6");
290 scrollAreaGates = new QScrollArea(gates);
291 scrollAreaGates->setObjectName("scrollAreaGates");
292 scrollAreaGates->setFrameShape(QFrame::NoFrame);
293 scrollAreaGates->setWidgetResizable(true);
294 scrollAreaWidgetContents_Gates = new QWidget();
295 scrollAreaWidgetContents_Gates->setObjectName("scrollAreaWidgetContents_Gates");
296 scrollAreaWidgetContents_Gates->setGeometry(QRect(0, 0, 260, 584));
298 verticalLayout_2->setSpacing(6);
299 verticalLayout_2->setContentsMargins(11, 11, 11, 11);
300 verticalLayout_2->setObjectName("verticalLayout_2");
301 verticalSpacer_Gates = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
302
304
306
307 gridLayout_6->addWidget(scrollAreaGates, 0, 1, 1, 1);
308
309 tabElements->addTab(gates, QIcon(":/Components/Logic/xor.svg"), QString());
310 combinational = new QWidget();
311 combinational->setObjectName("combinational");
312 gridLayout_10 = new QGridLayout(combinational);
313 gridLayout_10->setSpacing(6);
314 gridLayout_10->setContentsMargins(11, 11, 11, 11);
315 gridLayout_10->setObjectName("gridLayout_10");
316 scrollArea_Combinational = new QScrollArea(combinational);
317 scrollArea_Combinational->setObjectName("scrollArea_Combinational");
318 scrollArea_Combinational->setFrameShape(QFrame::NoFrame);
319 scrollArea_Combinational->setWidgetResizable(true);
321 scrollAreaWidgetContents_Combinational->setObjectName("scrollAreaWidgetContents_Combinational");
322 scrollAreaWidgetContents_Combinational->setGeometry(QRect(0, 0, 260, 582));
323 QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Preferred);
324 sizePolicy1.setHorizontalStretch(0);
325 sizePolicy1.setVerticalStretch(0);
326 sizePolicy1.setHeightForWidth(scrollAreaWidgetContents_Combinational->sizePolicy().hasHeightForWidth());
327 scrollAreaWidgetContents_Combinational->setSizePolicy(sizePolicy1);
329 verticalLayout_8->setSpacing(6);
330 verticalLayout_8->setContentsMargins(11, 11, 11, 11);
331 verticalLayout_8->setObjectName("verticalLayout_8");
332 verticalSpacer_Combinational = new QSpacerItem(20, 560, QSizePolicy::Minimum, QSizePolicy::Expanding);
333
335
337
338 gridLayout_10->addWidget(scrollArea_Combinational, 0, 0, 1, 1);
339
340 tabElements->addTab(combinational, QIcon(":/Components/Logic/truthtable-rotated.svg"), QString());
341 memory = new QWidget();
342 memory->setObjectName("memory");
343 gridLayout_5 = new QGridLayout(memory);
344 gridLayout_5->setSpacing(6);
345 gridLayout_5->setContentsMargins(11, 11, 11, 11);
346 gridLayout_5->setObjectName("gridLayout_5");
347 scrollAreaMemory = new QScrollArea(memory);
348 scrollAreaMemory->setObjectName("scrollAreaMemory");
349 scrollAreaMemory->setFrameShape(QFrame::NoFrame);
350 scrollAreaMemory->setWidgetResizable(true);
351 scrollAreaWidgetContents_Memory = new QWidget();
352 scrollAreaWidgetContents_Memory->setObjectName("scrollAreaWidgetContents_Memory");
353 scrollAreaWidgetContents_Memory->setGeometry(QRect(0, 0, 260, 584));
355 verticalLayout_3->setSpacing(6);
356 verticalLayout_3->setContentsMargins(11, 11, 11, 11);
357 verticalLayout_3->setObjectName("verticalLayout_3");
358 verticalSpacer_Memory = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
359
361
363
364 gridLayout_5->addWidget(scrollAreaMemory, 0, 1, 1, 1);
365
366 tabElements->addTab(memory, QIcon(":/Components/Memory/Light/D-flipflop.svg"), QString());
367 ic = new QWidget();
368 ic->setObjectName("ic");
369 gridLayout_4 = new QGridLayout(ic);
370 gridLayout_4->setSpacing(6);
371 gridLayout_4->setContentsMargins(11, 11, 11, 11);
372 gridLayout_4->setObjectName("gridLayout_4");
373
374 int icRow = 0;
375
376 pushButtonMakeSelfContained = new QPushButton(ic);
377 pushButtonMakeSelfContained->setObjectName("pushButtonMakeSelfContained");
378 gridLayout_4->addWidget(pushButtonMakeSelfContained, icRow++, 0, 1, 1);
379
380 // --- File-based ICs section ---
381 labelFileBasedICs = new QLabel(ic);
382 labelFileBasedICs->setObjectName("labelFileBasedICs");
383 QFont boldFont;
384 boldFont.setBold(true);
385 labelFileBasedICs->setFont(boldFont);
386 gridLayout_4->addWidget(labelFileBasedICs, icRow++, 0, 1, 1);
387
388 horizontalLayout = new QHBoxLayout();
389 horizontalLayout->setSpacing(6);
390 horizontalLayout->setObjectName("horizontalLayout");
391 pushButtonAddIC = new QPushButton(ic);
392 pushButtonAddIC->setObjectName("pushButtonAddIC");
394
396 pushButtonRemoveIC->setObjectName("pushButtonRemoveIC");
397 QSizePolicy sizePolicy2(QSizePolicy::Maximum, QSizePolicy::Fixed);
398 sizePolicy2.setHorizontalStretch(0);
399 sizePolicy2.setVerticalStretch(0);
400 sizePolicy2.setHeightForWidth(pushButtonRemoveIC->sizePolicy().hasHeightForWidth());
401 pushButtonRemoveIC->setSizePolicy(sizePolicy2);
402 pushButtonRemoveIC->setIcon(QIcon(":/Interface/Toolbar/trashcan.svg"));
404
405 gridLayout_4->addLayout(horizontalLayout, icRow++, 0, 1, 1);
406
408 dropZoneFileBased->setObjectName("dropZoneFileBased");
409 auto *dropZoneFileBasedLayout = new QVBoxLayout(dropZoneFileBased);
410 dropZoneFileBasedLayout->setContentsMargins(0, 0, 0, 0);
411
412 scrollArea_Box = new QScrollArea(dropZoneFileBased);
413 scrollArea_Box->setObjectName("scrollArea_Box");
414 scrollArea_Box->setFrameShape(QFrame::NoFrame);
415 scrollArea_Box->setWidgetResizable(true);
416 scrollAreaWidgetContents_IC = new QWidget();
417 scrollAreaWidgetContents_IC->setObjectName("scrollAreaWidgetContents_IC");
419 verticalLayout_4->setSpacing(6);
420 verticalLayout_4->setContentsMargins(11, 11, 11, 11);
421 verticalLayout_4->setObjectName("verticalLayout_4");
422 verticalSpacer_IC = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
425 dropZoneFileBasedLayout->addWidget(scrollArea_Box);
426
427 gridLayout_4->addWidget(dropZoneFileBased, icRow++, 0, 1, 1);
428
429 // --- Embedded ICs section ---
430 labelEmbeddedICs = new QLabel(ic);
431 labelEmbeddedICs->setObjectName("labelEmbeddedICs");
432 labelEmbeddedICs->setFont(boldFont);
433 gridLayout_4->addWidget(labelEmbeddedICs, icRow++, 0, 1, 1);
434
435 horizontalLayoutEmbeddedIC = new QHBoxLayout();
436 horizontalLayoutEmbeddedIC->setSpacing(6);
437 horizontalLayoutEmbeddedIC->setObjectName("horizontalLayoutEmbeddedIC");
438 pushButtonAddEmbeddedIC = new QPushButton(ic);
439 pushButtonAddEmbeddedIC->setObjectName("pushButtonAddEmbeddedIC");
441
443 pushButtonRemoveEmbeddedIC->setObjectName("pushButtonRemoveEmbeddedIC");
444 pushButtonRemoveEmbeddedIC->setSizePolicy(sizePolicy2);
445 pushButtonRemoveEmbeddedIC->setIcon(QIcon(":/Interface/Toolbar/trashcan.svg"));
447
448 gridLayout_4->addLayout(horizontalLayoutEmbeddedIC, icRow++, 0, 1, 1);
449
451 dropZoneEmbedded->setObjectName("dropZoneEmbedded");
452 auto *dropZoneEmbeddedLayout = new QVBoxLayout(dropZoneEmbedded);
453 dropZoneEmbeddedLayout->setContentsMargins(0, 0, 0, 0);
454
455 scrollAreaEmbeddedIC = new QScrollArea(dropZoneEmbedded);
456 scrollAreaEmbeddedIC->setObjectName("scrollAreaEmbeddedIC");
457 scrollAreaEmbeddedIC->setFrameShape(QFrame::NoFrame);
458 scrollAreaEmbeddedIC->setWidgetResizable(true);
460 scrollAreaWidgetContents_EmbeddedIC->setObjectName("scrollAreaWidgetContents_EmbeddedIC");
462 verticalLayout_EmbeddedIC->setSpacing(6);
463 verticalLayout_EmbeddedIC->setContentsMargins(11, 11, 11, 11);
464 verticalLayout_EmbeddedIC->setObjectName("verticalLayout_EmbeddedIC");
465 verticalSpacer_EmbeddedIC = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
468 dropZoneEmbeddedLayout->addWidget(scrollAreaEmbeddedIC);
469
470 gridLayout_4->addWidget(dropZoneEmbedded, icRow++, 0, 1, 1);
471
472 // Give both scroll areas equal stretch
473 gridLayout_4->setRowStretch(3, 1);
474 gridLayout_4->setRowStretch(6, 1);
475
476 tabElements->addTab(ic, QIcon(":/Components/Logic/ic-panda.svg"), QString());
477 misc = new QWidget();
478 misc->setObjectName("misc");
479 gridLayout_3 = new QGridLayout(misc);
480 gridLayout_3->setSpacing(6);
481 gridLayout_3->setContentsMargins(11, 11, 11, 11);
482 gridLayout_3->setObjectName("gridLayout_3");
483 scrollArea_Misc = new QScrollArea(misc);
484 scrollArea_Misc->setObjectName("scrollArea_Misc");
485 scrollArea_Misc->setFrameShape(QFrame::NoFrame);
486 scrollArea_Misc->setWidgetResizable(true);
487 scrollAreaWidgetContents_Misc = new QWidget();
488 scrollAreaWidgetContents_Misc->setObjectName("scrollAreaWidgetContents_Misc");
489 scrollAreaWidgetContents_Misc->setGeometry(QRect(0, 0, 260, 584));
490 QSizePolicy sizePolicy3(QSizePolicy::Expanding, QSizePolicy::Preferred);
491 sizePolicy3.setHorizontalStretch(0);
492 sizePolicy3.setVerticalStretch(0);
493 sizePolicy3.setHeightForWidth(scrollAreaWidgetContents_Misc->sizePolicy().hasHeightForWidth());
494 scrollAreaWidgetContents_Misc->setSizePolicy(sizePolicy3);
496 verticalLayout_6->setSpacing(6);
497 verticalLayout_6->setContentsMargins(11, 11, 11, 11);
498 verticalLayout_6->setObjectName("verticalLayout_6");
499 verticalSpacer_Misc = new QSpacerItem(210, 227, QSizePolicy::Minimum, QSizePolicy::Expanding);
500
502
504
505 gridLayout_3->addWidget(scrollArea_Misc, 0, 0, 1, 1);
506
507 tabElements->addTab(misc, QIcon(":/Components/Misc/text.png"), QString());
508 search = new QWidget();
509 search->setObjectName("search");
510 gridLayout_9 = new QGridLayout(search);
511 gridLayout_9->setSpacing(6);
512 gridLayout_9->setContentsMargins(11, 11, 11, 11);
513 gridLayout_9->setObjectName("gridLayout_9");
514 scrollArea_Search = new QScrollArea(search);
515 scrollArea_Search->setObjectName("scrollArea_Search");
516 scrollArea_Search->setWidgetResizable(true);
517 scrollAreaWidgetContents_Search = new QWidget();
518 scrollAreaWidgetContents_Search->setObjectName("scrollAreaWidgetContents_Search");
519 scrollAreaWidgetContents_Search->setGeometry(QRect(0, 0, 258, 582));
521 verticalLayout_7->setSpacing(6);
522 verticalLayout_7->setContentsMargins(11, 11, 11, 11);
523 verticalLayout_7->setObjectName("verticalLayout_7");
524 verticalSpacer_Search = new QSpacerItem(20, 234, QSizePolicy::Minimum, QSizePolicy::Expanding);
525
527
529
530 gridLayout_9->addWidget(scrollArea_Search, 0, 0, 1, 1);
531
532 tabElements->addTab(search, QString());
533
534 gridLayout->addWidget(tabElements, 1, 0, 1, 3);
535
537 elementEditor->setObjectName("elementEditor");
538 QSizePolicy sizePolicy4(QSizePolicy::Preferred, QSizePolicy::Fixed);
539 sizePolicy4.setHorizontalStretch(0);
540 sizePolicy4.setVerticalStretch(0);
541 sizePolicy4.setHeightForWidth(elementEditor->sizePolicy().hasHeightForWidth());
542 elementEditor->setSizePolicy(sizePolicy4);
543 elementEditor->setMinimumSize(QSize(0, 0));
544 elementEditor->setMaximumSize(QSize(16777215, 16777215));
545
546 gridLayout->addWidget(elementEditor, 2, 0, 1, 3);
547
548 label = new QLabel(leftPannel);
549 label->setObjectName("label");
550 QSizePolicy sizePolicy5(QSizePolicy::Fixed, QSizePolicy::Preferred);
551 sizePolicy5.setHorizontalStretch(0);
552 sizePolicy5.setVerticalStretch(0);
553 sizePolicy5.setHeightForWidth(label->sizePolicy().hasHeightForWidth());
554 label->setSizePolicy(sizePolicy5);
555
556 gridLayout->addWidget(label, 0, 0, 1, 1);
557
558 lineEditSearch = new QLineEdit(leftPannel);
559 lineEditSearch->setObjectName("lineEditSearch");
560 QSizePolicy sizePolicy6(QSizePolicy::Expanding, QSizePolicy::Fixed);
561 sizePolicy6.setHorizontalStretch(0);
562 sizePolicy6.setVerticalStretch(0);
563 sizePolicy6.setHeightForWidth(lineEditSearch->sizePolicy().hasHeightForWidth());
564 lineEditSearch->setSizePolicy(sizePolicy6);
565 lineEditSearch->setClearButtonEnabled(true);
566
567 gridLayout->addWidget(lineEditSearch, 0, 1, 1, 2);
568
569 verticalLayout_5->addLayout(gridLayout);
570
571 splitter->addWidget(leftPannel);
572 // Canvas tabs — horizontal stretch = 255 so they expand to fill all remaining
573 // space after the left panel gets its share.
574 tab = new QTabWidget(splitter);
575 tab->setObjectName("tab");
576 QSizePolicy sizePolicy7(QSizePolicy::Expanding, QSizePolicy::Expanding);
577 sizePolicy7.setHorizontalStretch(255);
578 sizePolicy7.setVerticalStretch(0);
579 sizePolicy7.setHeightForWidth(tab->sizePolicy().hasHeightForWidth());
580 tab->setSizePolicy(sizePolicy7);
581 tab->setMinimumSize(QSize(570, 0));
582 tab->setMaximumSize(QSize(16777215, 16777215));
583 tab->setTabsClosable(true);
584 tab->setMovable(true); // let users drag tabs to reorder them
585 splitter->addWidget(tab);
586
587 gridLayout_8->addWidget(splitter, 0, 0, 1, 1);
588
589 MainWindow->setCentralWidget(centralWidget);
590 mainToolBar = new QToolBar(MainWindow);
591 mainToolBar->setObjectName("mainToolBar");
592 mainToolBar->setContextMenuPolicy(Qt::PreventContextMenu);
593 mainToolBar->setToolButtonStyle(Qt::ToolButtonFollowStyle);
594 MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
595 statusBar = new QStatusBar(MainWindow);
596 statusBar->setObjectName("statusBar");
597 MainWindow->setStatusBar(statusBar);
598 menuBar = new QMenuBar(MainWindow);
599 menuBar->setObjectName("menuBar");
600 menuBar->setGeometry(QRect(0, 0, 886, 20));
601 menuFile = new QMenu(menuBar);
602 menuFile->setObjectName("menuFile");
603 menuFile->setToolTipsVisible(false);
604 menuRecentFiles = new QMenu(menuFile);
605 menuRecentFiles->setObjectName("menuRecentFiles");
606 // Keep the recent-files submenu disabled until at least one entry exists;
607 // a greyed-out menu is less confusing than an empty open submenu.
608 menuRecentFiles->setEnabled(false);
609 menuRecentFiles->setIcon(QIcon(":/Interface/Toolbar/recentFiles.svg"));
610 menuEdit = new QMenu(menuBar);
611 menuEdit->setObjectName("menuEdit");
612 menuHelp = new QMenu(menuBar);
613 menuHelp->setObjectName("menuHelp");
614 menuView = new QMenu(menuBar);
615 menuView->setObjectName("menuView");
616 menuTheme = new QMenu(menuView);
617 menuTheme->setObjectName("menuTheme");
618 menuLanguage = new QMenu(menuBar);
619 menuLanguage->setObjectName("menuLanguage");
620 menuSimulation = new QMenu(menuBar);
621 menuSimulation->setObjectName("menuSimulation");
622 menuExamples = new QMenu(menuBar);
623 menuExamples->setObjectName("menuExamples");
624 menuLearn = new QMenu(menuBar);
625 menuLearn->setObjectName("menuLearn");
626 menuExercises = new QMenu(menuLearn);
627 menuExercises->setObjectName("menuExercises");
628 menuTours = new QMenu(menuLearn);
629 menuTours->setObjectName("menuTours");
630 MainWindow->setMenuBar(menuBar);
631 QWidget::setTabOrder(lineEditSearch, tabElements);
632 QWidget::setTabOrder(tabElements, scrollAreaInOut);
633 QWidget::setTabOrder(scrollAreaInOut, scrollAreaMemory);
634 QWidget::setTabOrder(scrollAreaMemory, scrollArea_Box);
635 QWidget::setTabOrder(scrollArea_Box, scrollAreaGates);
636
637 mainToolBar->addAction(actionNew);
638 mainToolBar->addAction(actionOpen);
639 mainToolBar->addAction(actionSave);
640 mainToolBar->addSeparator();
641 mainToolBar->addAction(actionRotateLeft);
642 mainToolBar->addAction(actionRotateRight);
643 mainToolBar->addAction(actionCut);
644 mainToolBar->addAction(actionCopy);
645 mainToolBar->addAction(actionPaste);
646 mainToolBar->addAction(actionDelete);
647 mainToolBar->addSeparator();
648 mainToolBar->addAction(actionZoomIn);
649 mainToolBar->addAction(actionZoomOut);
650 mainToolBar->addAction(actionResetZoom);
651 mainToolBar->addAction(actionZoomToFit);
652 mainToolBar->addSeparator();
653 mainToolBar->addAction(actionPlay);
654 mainToolBar->addAction(actionRestart);
655 mainToolBar->addAction(actionWaveform);
656 menuBar->addAction(menuFile->menuAction());
657 menuBar->addAction(menuEdit->menuAction());
658 menuBar->addAction(menuView->menuAction());
659 menuBar->addAction(menuSimulation->menuAction());
660 menuBar->addAction(menuExamples->menuAction());
661 menuBar->addAction(menuLearn->menuAction());
662 menuLearn->addMenu(menuExercises);
663 menuLearn->addMenu(menuTours);
664 menuBar->addAction(menuLanguage->menuAction());
665 menuBar->addAction(menuHelp->menuAction());
666 menuFile->addAction(actionNew);
667 menuFile->addAction(actionOpen);
668 menuFile->addSeparator();
669 menuFile->addAction(menuRecentFiles->menuAction());
670 menuFile->addAction(actionReloadFile);
671 menuFile->addSeparator();
672 menuFile->addAction(actionSave);
673 menuFile->addAction(actionSaveAs);
676 menuFile->addAction(actionExportToPdf);
677 menuFile->addAction(actionExportToImage);
678 menuFile->addSeparator();
680 menuFile->addSeparator();
681 menuFile->addAction(actionExit);
682 menuFile->addSeparator();
683 menuRecentFiles->addSeparator();
684 menuEdit->addSeparator();
685 menuEdit->addAction(actionCut);
686 menuEdit->addAction(actionCopy);
687 menuEdit->addAction(actionPaste);
688 menuEdit->addAction(actionDuplicate);
689 menuEdit->addAction(actionDelete);
690 menuEdit->addSeparator();
691 menuEdit->addAction(actionRename);
692 menuEdit->addAction(actionChangeTrigger);
693 menuEdit->addSeparator();
694 menuEdit->addAction(actionRotateLeft);
695 menuEdit->addAction(actionRotateRight);
697 menuEdit->addAction(actionFlipVertically);
698 menuEdit->addSeparator();
699 menuEdit->addAction(actionAlignLeft);
701 menuEdit->addAction(actionAlignRight);
702 menuEdit->addAction(actionAlignTop);
704 menuEdit->addAction(actionAlignBottom);
705 menuEdit->addSeparator();
708 menuEdit->addSeparator();
709 menuEdit->addAction(actionSelectAll);
710 menuEdit->addAction(actionClearSelection);
711 menuHelp->addAction(actionAbout);
712 menuHelp->addAction(actionAboutQt);
715 menuHelp->addSeparator();
717 menuHelp->addSeparator();
719 menuView->addAction(actionZoomIn);
720 menuView->addAction(actionZoomOut);
721 menuView->addAction(actionResetZoom);
722 menuView->addAction(actionZoomToFit);
723 menuView->addSeparator();
724 menuView->addAction(actionWires);
725 menuView->addAction(actionGates);
726 menuView->addSeparator();
727 menuView->addAction(actionFastMode);
728 menuView->addAction(actionShowMinimap);
729 menuView->addSeparator();
730 menuView->addAction(menuTheme->menuAction());
731 menuView->addAction(actionFullscreen);
733 menuView->addAction(actionICPreview);
734 menuTheme->addAction(actionSystemTheme);
735 menuTheme->addAction(actionLightTheme);
736 menuTheme->addAction(actionDarkTheme);
737 menuSimulation->addAction(actionPlay);
738 menuSimulation->addAction(actionRestart);
739 menuSimulation->addAction(actionWaveform);
740 menuSimulation->addAction(actionMute);
741 menuSimulation->addSeparator();
743
745
746 tabElements->setCurrentIndex(0);
747 // -1 means no tab is active yet; the first call to createNewTab() will
748 // add a tab and tabChanged(0) will be emitted to set up all connections.
749 tab->setCurrentIndex(-1);
750
751 QMetaObject::connectSlotsByName(MainWindow);
752}
753
755{
756 actionOpen->setText(QCoreApplication::translate("MainWindow", "&Open..."));
757 actionOpen->setToolTip(QCoreApplication::translate("MainWindow", "Open"));
758 actionOpen->setShortcut(QStringLiteral("Ctrl+O"));
759 actionSave->setText(QCoreApplication::translate("MainWindow", "&Save"));
760 actionSave->setShortcut(QStringLiteral("Ctrl+S"));
761 actionSaveAs->setText(QCoreApplication::translate("MainWindow", "Save &As..."));
762 actionSaveAs->setShortcut(QStringLiteral("Ctrl+Shift+S"));
763 actionCut->setText(QCoreApplication::translate("MainWindow", "Cu&t"));
764 actionCut->setShortcut(QStringLiteral("Ctrl+X"));
765 actionCopy->setText(QCoreApplication::translate("MainWindow", "&Copy"));
766 actionCopy->setShortcut(QStringLiteral("Ctrl+C"));
767 actionPaste->setText(QCoreApplication::translate("MainWindow", "&Paste"));
768 actionPaste->setShortcut(QStringLiteral("Ctrl+V"));
769 actionDuplicate->setText(QCoreApplication::translate("MainWindow", "Dupli&cate"));
770 actionDuplicate->setShortcut(QStringLiteral("Ctrl+D"));
771 actionDelete->setText(QCoreApplication::translate("MainWindow", "&Delete"));
772 actionDelete->setShortcut(QStringLiteral("Del"));
773 actionNew->setText(QCoreApplication::translate("MainWindow", "&New"));
774 actionNew->setShortcut(QStringLiteral("Ctrl+N"));
775 actionZoomIn->setText(QCoreApplication::translate("MainWindow", "Zoom &in"));
776 // Accept both the unshifted "Ctrl+=" and the "Ctrl++" most users reach for.
777 actionZoomIn->setShortcuts({QKeySequence(QStringLiteral("Ctrl+=")), QKeySequence(QStringLiteral("Ctrl++"))});
778 actionZoomOut->setText(QCoreApplication::translate("MainWindow", "Zoom &out"));
779 actionZoomOut->setShortcut(QStringLiteral("Ctrl+-"));
780 actionWires->setText(QCoreApplication::translate("MainWindow", "&Wires"));
781 actionWires->setShortcut(QStringLiteral("Ctrl+1"));
782 actionGates->setText(QCoreApplication::translate("MainWindow", "&Gates"));
783 actionGates->setShortcut(QStringLiteral("Ctrl+2"));
784 actionAbout->setText(QCoreApplication::translate("MainWindow", "&About"));
785 actionAbout->setShortcut(QStringLiteral("F1"));
786 actionExit->setText(QCoreApplication::translate("MainWindow", "&Exit"));
787 actionExit->setShortcut(QStringLiteral("Ctrl+Q"));
788 actionRotateRight->setText(QCoreApplication::translate("MainWindow", "R&otate right"));
789 actionRotateRight->setShortcut(QStringLiteral("Ctrl+R"));
790 actionRotateLeft->setText(QCoreApplication::translate("MainWindow", "Rotate &left"));
791 actionRotateLeft->setShortcut(QStringLiteral("Ctrl+Shift+R"));
792 actionAboutQt->setText(QCoreApplication::translate("MainWindow", "About &Qt"));
793 actionSelectAll->setText(QCoreApplication::translate("MainWindow", "&Select all"));
794 actionSelectAll->setShortcut(QStringLiteral("Ctrl+A"));
795 actionReloadFile->setText(QCoreApplication::translate("MainWindow", "Re&load File"));
796 actionReloadFile->setShortcut(QStringLiteral("Ctrl+F5"));
797 actionExportToArduino->setText(QCoreApplication::translate("MainWindow", "E&xport to Arduino"));
798 actionExportToArduino->setShortcut(QStringLiteral("Ctrl+Alt+I"));
799 actionExportToSystemVerilog->setText(QCoreApplication::translate("MainWindow", "Export to &SystemVerilog"));
800 actionExportToSystemVerilog->setShortcut(QStringLiteral("Ctrl+Alt+O"));
801 actionResetZoom->setText(QCoreApplication::translate("MainWindow", "&Reset Zoom"));
802 actionResetZoom->setShortcut(QStringLiteral("Ctrl+0"));
803 actionZoomToFit->setText(QCoreApplication::translate("MainWindow", "Zoom to &Fit"));
804 actionZoomToFit->setToolTip(QCoreApplication::translate("MainWindow", "Zoom to fit the whole circuit (or the selection)"));
805 // Modifier-based to match every other action shortcut: a bare letter would preempt
806 // user-assigned InputSwitch/InputButton trigger keys handled in Scene::keyPressEvent.
807 actionZoomToFit->setShortcut(QStringLiteral("Ctrl+Shift+F"));
808 actionExportToPdf->setText(QCoreApplication::translate("MainWindow", "Export to &PDF"));
809 actionExportToPdf->setShortcut(QStringLiteral("Ctrl+Shift+P"));
810 actionPlay->setText(QCoreApplication::translate("MainWindow", "&Play/Pause"));
811 actionPlay->setToolTip(QCoreApplication::translate("MainWindow", "Play or Pause simulation."));
812 actionPlay->setShortcut(QStringLiteral("F5"));
813 actionRename->setText(QCoreApplication::translate("MainWindow", "&Rename"));
814 actionRename->setShortcut(QStringLiteral("F2"));
815 actionChangeTrigger->setText(QCoreApplication::translate("MainWindow", "Cha&nge Trigger"));
816 actionChangeTrigger->setShortcut(QStringLiteral("F3"));
817 actionClearSelection->setText(QCoreApplication::translate("MainWindow", "Cl&ear selection"));
818 actionClearSelection->setShortcut(QStringLiteral("Esc"));
819 actionFastMode->setText(QCoreApplication::translate("MainWindow", "&Fast Mode"));
820 actionSystemTheme->setText(QCoreApplication::translate("MainWindow", "&System"));
821 actionLightTheme->setText(QCoreApplication::translate("MainWindow", "&Light"));
822 actionDarkTheme->setText(QCoreApplication::translate("MainWindow", "&Dark"));
823 actionWaveform->setText(QCoreApplication::translate("MainWindow", "&Waveform"));
824 actionWaveform->setShortcut(QStringLiteral("Ctrl+W"));
825 actionExportToImage->setText(QCoreApplication::translate("MainWindow", "Export to &Image"));
826 actionExportToImage->setShortcut(QStringLiteral("Ctrl+E"));
827 actionMakeSelfContained->setText(QCoreApplication::translate("MainWindow", "Make file self-contained"));
828 actionFlipHorizontally->setText(QCoreApplication::translate("MainWindow", "&Flip horizontally"));
829 actionFlipHorizontally->setShortcut(QStringLiteral("Ctrl+H"));
830 actionFlipVertically->setText(QCoreApplication::translate("MainWindow", "Flip &vertically"));
831 actionAlignLeft->setText(QCoreApplication::translate("MainWindow", "Align &Left"));
832 actionAlignRight->setText(QCoreApplication::translate("MainWindow", "Align &Right"));
833 actionAlignTop->setText(QCoreApplication::translate("MainWindow", "Align &Top"));
834 actionAlignBottom->setText(QCoreApplication::translate("MainWindow", "Align &Bottom"));
835 actionAlignHorizontalCenter->setText(QCoreApplication::translate("MainWindow", "Align Horizontal &Centers"));
836 actionAlignVerticalCenter->setText(QCoreApplication::translate("MainWindow", "Align &Vertical Centers"));
837 actionDistributeHorizontally->setText(QCoreApplication::translate("MainWindow", "Distribute &Horizontally"));
838 actionDistributeVertically->setText(QCoreApplication::translate("MainWindow", "Distribute Verti&cally"));
839 actionFullscreen->setText(QCoreApplication::translate("MainWindow", "F&ullscreen"));
840 actionFullscreen->setShortcut(QStringLiteral("F11"));
841 actionMute->setText(QCoreApplication::translate("MainWindow", "Mute"));
842 actionMute->setStatusTip(QCoreApplication::translate("MainWindow", "Mute/unmute circuit buzzers"));
843 actionMute->setShortcut(QStringLiteral("Ctrl+M"));
844 actionLabelsUnderIcons->setText(QCoreApplication::translate("MainWindow", "Labels under icons"));
845 actionICPreview->setText(QCoreApplication::translate("MainWindow", "Show IC Preview"));
846 actionShowMinimap->setText(QCoreApplication::translate("MainWindow", "Show Minimap"));
847 actionAboutThisVersion->setText(QCoreApplication::translate("MainWindow", "About this version"));
848 actionCheckForUpdates->setText(QCoreApplication::translate("MainWindow", "Check for updates automatically"));
849 actionRestart->setText(QCoreApplication::translate("MainWindow", "&Restart"));
850 actionRestart->setToolTip(QCoreApplication::translate("MainWindow", "Restart simulation."));
851 actionBackground_Simulation->setText(QCoreApplication::translate("MainWindow", "Background Simulation"));
852 actionShortcutsAndTips->setText(QCoreApplication::translate("MainWindow", "Shortcuts and Tips"));
853 actionReportTranslationError->setText(QCoreApplication::translate("MainWindow", "Report Translation Error"));
854 actionReportTranslationError->setToolTip(QCoreApplication::translate("MainWindow", "Report translation errors or help improve translations on Weblate"));
855 tabElements->setTabText(tabElements->indexOf(io), QString());
856 tabElements->setTabToolTip(tabElements->indexOf(io), QCoreApplication::translate("MainWindow", "Inputs/Outputs"));
857 tabElements->setTabText(tabElements->indexOf(gates), QString());
858 tabElements->setTabToolTip(tabElements->indexOf(gates), QCoreApplication::translate("MainWindow", "Gates"));
859 tabElements->setTabText(tabElements->indexOf(combinational), QString());
860 tabElements->setTabToolTip(tabElements->indexOf(combinational), QCoreApplication::translate("MainWindow", "Combinational"));
861 tabElements->setTabText(tabElements->indexOf(memory), QString());
862 tabElements->setTabToolTip(tabElements->indexOf(memory), QCoreApplication::translate("MainWindow", "Memory"));
863 labelFileBasedICs->setText(QCoreApplication::translate("MainWindow", "File-based ICs"));
864 pushButtonAddIC->setText(QCoreApplication::translate("MainWindow", "Add IC files"));
865 pushButtonRemoveIC->setText(QCoreApplication::translate("MainWindow", "Remove IC"));
866 pushButtonMakeSelfContained->setText(QCoreApplication::translate("MainWindow", "Make file self-contained"));
867 labelEmbeddedICs->setText(QCoreApplication::translate("MainWindow", "Embedded ICs"));
868 pushButtonAddEmbeddedIC->setText(QCoreApplication::translate("MainWindow", "Embed IC"));
869 pushButtonRemoveEmbeddedIC->setText(QCoreApplication::translate("MainWindow", "Remove IC"));
870 tabElements->setTabText(tabElements->indexOf(ic), QString());
871 tabElements->setTabToolTip(tabElements->indexOf(ic), QCoreApplication::translate("MainWindow", "Integrated Circuits"));
872 tabElements->setTabText(tabElements->indexOf(misc), QString());
873 tabElements->setTabToolTip(tabElements->indexOf(misc), QCoreApplication::translate("MainWindow", "Miscellaneous"));
874 tabElements->setTabText(tabElements->indexOf(search), QString());
875 label->setText(QCoreApplication::translate("MainWindow", "Search:"));
876 menuFile->setTitle(QCoreApplication::translate("MainWindow", "&File"));
877 menuRecentFiles->setTitle(QCoreApplication::translate("MainWindow", "&Recent files:"));
878 menuEdit->setTitle(QCoreApplication::translate("MainWindow", "&Edit"));
879 menuHelp->setTitle(QCoreApplication::translate("MainWindow", "&Help"));
880 menuView->setTitle(QCoreApplication::translate("MainWindow", "&View"));
881 menuTheme->setTitle(QCoreApplication::translate("MainWindow", "&Theme"));
882 menuLanguage->setTitle(QCoreApplication::translate("MainWindow", "&Language"));
883 menuSimulation->setTitle(QCoreApplication::translate("MainWindow", "Sim&ulation"));
884 menuExamples->setTitle(QCoreApplication::translate("MainWindow", "Examples"));
885 menuLearn->setTitle(QCoreApplication::translate("MainWindow", "&Learn"));
886 menuExercises->setTitle(QCoreApplication::translate("MainWindow", "&Exercises"));
887 menuTours->setTitle(QCoreApplication::translate("MainWindow", "&Tours"));
888}
MainWindowUi: hand-written UI class for the MainWindow.
Widget for inspecting and editing the properties of selected circuit elements.
Drop zone widget that accepts opposite-type IC label drops.
Definition ICDropZone.h:23
@ Embedded
The embedded IC section (accepts file-backed drops for embedding).
Definition ICDropZone.h:30
@ FileBased
The file-backed IC section (accepts embedded drops for extraction).
Definition ICDropZone.h:29
QHBoxLayout * horizontalLayout
TrashButton * pushButtonRemoveIC
QScrollArea * scrollAreaGates
QGridLayout * gridLayout_4
QAction * actionMute
QAction * actionAlignTop
QAction * actionRename
QSpacerItem * verticalSpacer_IC
QSpacerItem * verticalSpacer_EmbeddedIC
void retranslateUi()
Updates all translatable strings in the window.
QAction * actionRestart
QGridLayout * gridLayout_3
QAction * actionDuplicate
QWidget * search
QAction * actionDistributeVertically
QAction * actionShortcutsAndTips
QAction * actionSave
QGridLayout * gridLayout
QAction * actionFullscreen
QToolBar * mainToolBar
QAction * actionWires
QMenu * menuView
QSpacerItem * verticalSpacer_Combinational
QAction * actionResetZoom
QScrollArea * scrollAreaMemory
QWidget * gates
QMenu * menuLearn
QScrollArea * scrollAreaEmbeddedIC
QAction * actionDistributeHorizontally
QScrollArea * scrollArea_Search
QWidget * scrollAreaWidgetContents_EmbeddedIC
QAction * actionChangeTrigger
QMenuBar * menuBar
TrashButton * pushButtonRemoveEmbeddedIC
QLabel * labelEmbeddedICs
QAction * actionClearSelection
QMenu * menuEdit
QWidget * misc
QMenu * menuExercises
QAction * actionFlipVertically
QAction * actionGates
QAction * actionMakeSelfContained
QWidget * memory
QAction * actionAboutQt
QVBoxLayout * verticalLayout_3
QAction * actionOpen
QWidget * scrollAreaWidgetContents_Memory
QAction * actionZoomToFit
QWidget * scrollAreaWidgetContents_IC
QGridLayout * gridLayout_2
QMenu * menuHelp
QAction * actionICPreview
QGridLayout * gridLayout_5
QSpacerItem * verticalSpacer_Search
QAction * actionFlipHorizontally
QGridLayout * gridLayout_8
QGridLayout * gridLayout_10
QAction * actionAboutThisVersion
QWidget * scrollAreaWidgetContents_Search
QMenu * menuRecentFiles
QMenu * menuSimulation
QAction * actionPlay
QSpacerItem * verticalSpacer_Gates
QAction * actionReloadFile
QScrollArea * scrollArea_Combinational
QAction * actionAlignRight
QAction * actionLabelsUnderIcons
QAction * actionAlignHorizontalCenter
QSpacerItem * verticalSpacer_InOut
QAction * actionAbout
QLabel * labelFileBasedICs
QAction * actionCheckForUpdates
QAction * actionWaveform
QAction * actionExportToSystemVerilog
QSpacerItem * verticalSpacer_Misc
QScrollArea * scrollArea_Box
QMenu * menuTheme
QVBoxLayout * verticalLayout_5
QAction * actionAlignLeft
QAction * actionCut
QAction * actionRotateLeft
QPushButton * pushButtonAddEmbeddedIC
QAction * actionLightTheme
QScrollArea * scrollArea_Misc
QAction * actionExportToImage
QGridLayout * gridLayout_9
QSpacerItem * verticalSpacer_Memory
QTabWidget * tabElements
QAction * actionReportTranslationError
QAction * actionDarkTheme
QWidget * scrollAreaWidgetContents_Gates
QVBoxLayout * verticalLayout_7
QAction * actionSelectAll
QScrollArea * scrollAreaInOut
QGridLayout * gridLayout_6
QStatusBar * statusBar
void setupUi(QMainWindow *MainWindow)
Creates and lays out all child widgets inside MainWindow.
QAction * actionDelete
QAction * actionPaste
QAction * actionRotateRight
QVBoxLayout * verticalLayout
ICDropZone * dropZoneFileBased
QSplitter * splitter
ElementEditor * elementEditor
ICDropZone * dropZoneEmbedded
QVBoxLayout * verticalLayout_6
QHBoxLayout * horizontalLayoutEmbeddedIC
QTabWidget * tab
QPushButton * pushButtonAddIC
QAction * actionBackground_Simulation
QWidget * scrollAreaWidgetContents_InOut
QLabel * label
QVBoxLayout * verticalLayout_4
QMenu * menuTours
QWidget * scrollAreaWidgetContents_Misc
QPushButton * pushButtonMakeSelfContained
QAction * actionAlignBottom
QWidget * leftPannel
QAction * actionNew
QAction * actionAlignVerticalCenter
QWidget * centralWidget
QAction * actionFastMode
QAction * actionExportToArduino
QWidget * scrollAreaWidgetContents_Combinational
QAction * actionZoomIn
QWidget * ic
QMenu * menuLanguage
QWidget * io
QAction * actionExportToPdf
QMenu * menuFile
QAction * actionShowMinimap
QLineEdit * lineEditSearch
QVBoxLayout * verticalLayout_8
QAction * actionCopy
QWidget * combinational
QVBoxLayout * verticalLayout_EmbeddedIC
QAction * actionSaveAs
QAction * actionZoomOut
QMenu * menuExamples
QAction * actionSystemTheme
QAction * actionExit
QVBoxLayout * verticalLayout_2
The top-level application window hosting the tab bar, menus, element palette, and editor.
Definition MainWindow.h:47
Push-button that accepts IC file drag-and-drop to trigger IC removal.
Definition TrashButton.h:20