MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / buildBody

Method buildBody

src/gui/FreeDvReporterDialog.cpp:124–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void FreeDvReporterDialog::buildBody()
125{
126 m_model = new FreeDvReporterModel(this);
127 auto* proxy = new FreeDvReporterProxy(this);
128 proxy->setSourceModel(m_model);
129 m_proxy = proxy;
130
131 auto* root = new QVBoxLayout(bodyWidget());
132 root->setContentsMargins(6, 6, 6, 6);
133 root->setSpacing(4);
134
135 // ── Table ──────────────────────────────────────────────────────────────
136 m_table = new QTableView;
137 m_table->setModel(m_proxy);
138 m_table->setSortingEnabled(true);
139 m_table->setSelectionBehavior(QAbstractItemView::SelectRows);
140 m_table->setSelectionMode(QAbstractItemView::SingleSelection);
141 m_table->setEditTriggers(QAbstractItemView::NoEditTriggers);
142 m_table->setAlternatingRowColors(false);
143 m_table->verticalHeader()->setVisible(false);
144 m_table->horizontalHeader()->setStretchLastSection(true);
145 m_table->horizontalHeader()->setSortIndicatorShown(true);
146 m_table->setShowGrid(true);
147 m_table->sortByColumn(FreeDvReporterModel::MHz, Qt::AscendingOrder);
148
149 ThemeManager::instance().applyStyleSheet(m_table,
150 "QTableView {"
151 " background-color: {{color.background.0}};"
152 " color: {{color.text.primary}};"
153 " gridline-color: {{color.background.2}};"
154 " selection-background-color: {{color.background.2}};"
155 " selection-color: {{color.text.primary}};"
156 " border: 1px solid {{color.background.2}};"
157 "}"
158 "QHeaderView::section {"
159 " background-color: {{color.background.2}};"
160 " color: {{color.text.primary}};"
161 " border: 1px solid {{color.background.0}};"
162 " padding: 2px 4px;"
163 "}"
164 );
165 root->addWidget(m_table, 1);
166
167 // ── Separator ──────────────────────────────────────────────────────────
168 auto* sep = new QFrame;
169 sep->setFrameShape(QFrame::HLine);
170 ThemeManager::instance().applyStyleSheet(sep,
171 "color: {{color.border.subtle}};");
172 root->addWidget(sep);
173
174 // ── Bottom controls ────────────────────────────────────────────────────
175 auto* bottom = new QHBoxLayout;
176 bottom->setSpacing(6);
177
178 m_trackCheck = new QCheckBox("Track");
179 ThemeManager::instance().applyStyleSheet(m_trackCheck,
180 "QCheckBox { color: {{color.text.primary}}; }");
181 bottom->addWidget(m_trackCheck);

Callers

nothing calls this directly

Calls 6

setShowGridMethod · 0.80
applyStyleSheetMethod · 0.80
containsMethod · 0.80
setModelMethod · 0.45
clearMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected