wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
ElementEditorUI.h
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
7
8#pragma once
9
10// Specific Qt includes instead of monolithic QtWidgets
11#include <QButtonGroup>
12#include <QCheckBox>
13#include <QComboBox>
14#include <QDoubleSpinBox>
15#include <QGridLayout>
16#include <QGroupBox>
17#include <QHBoxLayout>
18#include <QLabel>
19#include <QLineEdit>
20#include <QPushButton>
21#include <QSlider>
22#include <QVBoxLayout>
23#include <QWidget>
24
25class LabeledSlider;
26
28{
29public:
30 // --- Lifecycle ---
31
32 ElementEditorUi() = default;
33
36
37 // --- Setup ---
38
43 void setupUi(QWidget *ElementEditor);
44
49 void retranslateUi(QWidget *ElementEditor);
50
51 // --- Widgets ---
52
53 // Layout
54 QGridLayout *gridLayout = nullptr;
55 QGroupBox *groupBox = nullptr;
56 QVBoxLayout *verticalLayoutSections = nullptr;
57 QHBoxLayout *horizontalLayout = nullptr;
58 QHBoxLayout *horizontalLayout_2 = nullptr;
59
60 // Sections — group related properties so the panel isn't one flat 15-row list.
61 QGroupBox *groupBoxIdentity = nullptr;
62 QGridLayout *gridLayoutIdentity = nullptr;
63 QGroupBox *groupBoxPorts = nullptr;
64 QGridLayout *gridLayoutPorts = nullptr;
65 QGroupBox *groupBoxTiming = nullptr;
66 QGridLayout *gridLayoutTiming = nullptr;
67 QGroupBox *groupBoxSound = nullptr;
68 QGridLayout *gridLayoutSound = nullptr;
69 QGroupBox *groupBoxInteraction = nullptr;
70 QGridLayout *gridLayoutInteraction = nullptr;
71 QGroupBox *groupBoxAppearanceSection = nullptr;
72 QGridLayout *gridLayoutAppearanceSection = nullptr;
73
74 // Label editing
75 QLabel *labelLabels = nullptr;
76 QLineEdit *lineEditElementLabel = nullptr;
77
78 // Color selection
79 QLabel *labelColor = nullptr;
80 QComboBox *comboBoxColor = nullptr;
81
82 // Input / output size
83 QLabel *labelInputs = nullptr;
84 QComboBox *comboBoxInputSize = nullptr;
85 QLabel *labelOutputs = nullptr;
86 QComboBox *comboBoxOutputSize = nullptr;
87
88 // Output value
89 QLabel *labelValue = nullptr;
90 QComboBox *comboBoxValue = nullptr;
91
92 // Frequency
93 QLabel *labelFrequency = nullptr;
94 QDoubleSpinBox *doubleSpinBoxFrequency = nullptr;
95
96 // Delay
97 QLabel *labelDelay = nullptr;
99
100 // Trigger
101 QLabel *labelTrigger = nullptr;
102 QLineEdit *lineEditTrigger = nullptr;
103
104 // Appearance
105 QLabel *labelAppearanceState = nullptr;
106 QWidget *widgetAppearanceStates = nullptr;
107 QGridLayout *gridLayoutAppearanceStates = nullptr;
108 QButtonGroup *buttonGroupAppearanceStates = nullptr;
109 QPushButton *pushButtonChangeAppearance = nullptr;
110 QPushButton *pushButtonDefaultAppearance = nullptr;
111
112 // Truth table
113 QPushButton *pushButtonTruthTable = nullptr;
114
115 // Volume
116 QLabel *labelVolume = nullptr;
117 QSlider *sliderVolume = nullptr;
118
119 // Audio
120 QLabel *labelAudioBox = nullptr;
121 QLabel *labelAudio = nullptr;
122 QComboBox *comboBoxAudio = nullptr;
123 QLineEdit *lineCurrentAudioBox = nullptr;
124 QPushButton *pushButtonAudioBox = nullptr;
125
126 // Lock
127 QLabel *labelLocked = nullptr;
128 QCheckBox *checkBoxLocked = nullptr;
129
130 // Wireless mode (Node only)
131 QLabel *labelWirelessMode = nullptr;
132 QComboBox *comboBoxWirelessMode = nullptr;
133
134 // Blob name (embedded ICs only)
135 QLabel *labelBlobName = nullptr;
136 QLineEdit *lineEditBlobName = nullptr;
137};
QComboBox * comboBoxAudio
QGroupBox * groupBoxTiming
QGroupBox * groupBoxInteraction
QComboBox * comboBoxWirelessMode
QLabel * labelWirelessMode
QGroupBox * groupBoxIdentity
QGroupBox * groupBox
QComboBox * comboBoxOutputSize
QComboBox * comboBoxInputSize
ElementEditorUi & operator=(const ElementEditorUi &)=delete
ElementEditorUi(const ElementEditorUi &)=delete
QHBoxLayout * horizontalLayout
QGridLayout * gridLayoutPorts
QVBoxLayout * verticalLayoutSections
QLabel * labelFrequency
QGridLayout * gridLayout
QLineEdit * lineCurrentAudioBox
void retranslateUi(QWidget *ElementEditor)
Updates all translatable strings in the widget.
QHBoxLayout * horizontalLayout_2
QLineEdit * lineEditBlobName
QPushButton * pushButtonTruthTable
QGridLayout * gridLayoutTiming
QGroupBox * groupBoxPorts
QPushButton * pushButtonChangeAppearance
QGridLayout * gridLayoutIdentity
QComboBox * comboBoxColor
QPushButton * pushButtonAudioBox
QGroupBox * groupBoxAppearanceSection
QLineEdit * lineEditElementLabel
QButtonGroup * buttonGroupAppearanceStates
QGridLayout * gridLayoutAppearanceStates
QLineEdit * lineEditTrigger
QComboBox * comboBoxValue
QGridLayout * gridLayoutInteraction
QGridLayout * gridLayoutAppearanceSection
QLabel * labelAppearanceState
ElementEditorUi()=default
QWidget * widgetAppearanceStates
QCheckBox * checkBoxLocked
QGroupBox * groupBoxSound
void setupUi(QWidget *ElementEditor)
Creates and lays out all child widgets inside ElementEditor.
QDoubleSpinBox * doubleSpinBoxFrequency
QPushButton * pushButtonDefaultAppearance
LabeledSlider * sliderDelay
QGridLayout * gridLayoutSound
Widget for inspecting and editing the properties of selected circuit elements.
QSlider that draws numeric value labels beneath each tick mark.