|
5 | 5 |
|
6 | 6 | #include <QAudioDevice> |
7 | 7 | #include <QColor> |
| 8 | +#include <QCheckBox> |
8 | 9 | #include <QFrame> |
9 | 10 | #include <QFont> |
10 | 11 | #include <QHBoxLayout> |
@@ -37,6 +38,11 @@ const char* kDialogStyle = |
37 | 38 | "QLabel#title { color: #ffffff; background: transparent; font-size: 18px; font-weight: bold; }" |
38 | 39 | "QLabel#body { color: #c8d8e8; background: transparent; }" |
39 | 40 | "QLabel#sectionLabel { color: #00b4d8; background: transparent; font-weight: bold; }" |
| 41 | + "QCheckBox { color: #c8d8e8; spacing: 8px; }" |
| 42 | + "QCheckBox::indicator { width: 16px; height: 16px;" |
| 43 | + " border: 1px solid #304050; border-radius: 3px; background: #0a0a14; }" |
| 44 | + "QCheckBox::indicator:hover { border-color: #00b4d8; }" |
| 45 | + "QCheckBox::indicator:checked { background: #00b4d8; border-color: #00c8f0; }" |
40 | 46 | "QListWidget {" |
41 | 47 | " background: #0a0a14;" |
42 | 48 | " border: 1px solid #304050;" |
@@ -299,6 +305,11 @@ AudioDeviceChangeDialog::AudioDeviceChangeDialog( |
299 | 305 | buttonRow->setContentsMargins(0, 4, 0, 0); |
300 | 306 | buttonRow->setSpacing(8); |
301 | 307 |
|
| 308 | + m_dontAskAgainCheck = new QCheckBox(tr("Don't ask me again"), content); |
| 309 | + m_dontAskAgainCheck->setCursor(Qt::PointingHandCursor); |
| 310 | + buttonRow->addWidget(m_dontAskAgainCheck); |
| 311 | + buttonRow->addStretch(1); |
| 312 | + |
302 | 313 | auto* cancel = new QPushButton(tr("Cancel"), content); |
303 | 314 | cancel->setObjectName("cancelButton"); |
304 | 315 | cancel->setCursor(Qt::PointingHandCursor); |
@@ -377,4 +388,9 @@ QAudioDevice AudioDeviceChangeDialog::selectedOutputDevice() const |
377 | 388 | return selectedDevice(m_outputList, m_outputDevices); |
378 | 389 | } |
379 | 390 |
|
| 391 | +bool AudioDeviceChangeDialog::dontAskAgainChecked() const |
| 392 | +{ |
| 393 | + return m_dontAskAgainCheck && m_dontAskAgainCheck->isChecked(); |
| 394 | +} |
| 395 | + |
380 | 396 | } // namespace AetherSDR |
0 commit comments