JS8Call-Improved master
Loading...
Searching...
No Matches
styles.h
Go to the documentation of this file.
1
23
24#pragma once
25#include <QtCore/QOperatingSystemVersion>
26#include <QtCore/QString>
27#include <QtGlobal>
28#include <QtGui/QGuiApplication>
29#include <QHBoxLayout>
30#include <QSlider>
31#include <QLabel>
32#include <QWidget>
33
34// =============================================================================
35// General control styles
36// =============================================================================
37
51inline QString buttonStyle() {
52#if defined(Q_OS_MACOS)
53 return R"(
54 QPushButton, QToolButton {
55 background-color: #6699ff;
56 color: black;
57 border: none;
58 border-radius: 6px;
59 padding: 3px 9px;
60 min-height: 12;
61 max-height: 12px;
62 font-family: "-apple-system";
63 }
64 QPushButton:hover, QToolButton:hover {
65 background-color: #006EE6;
66 color: white;
67 }
68 QPushButton:pressed, QToolButton:pressed {
69 background-color: #003EAA;
70 }
71 QPushButton:disabled, QToolButton:disabled {
72 background-color: rgba(0, 0, 0, 20);
73 color: rgba(0, 0, 0, 100);
74 }
75 QToolButton#replyPushButton::menu-button {
76 width: 12px;
77 }
78 QToolButton#replyPushButton[popupMode="MenuButtonPopup"] {
79 padding-right: 21px;
80 }
81 QToolButton#replyPushButton[popupMode="MenuButtonPopup"][layoutDirection="RightToLeft"] {
82 padding-right: 9px;
83 padding-left: 21px;
84 }
85 )";
86
87#elif defined(Q_OS_WIN)
88 return R"(
89 QPushButton, QToolButton {
90 background-color: #0078D4;
91 color: black;
92 border: none;
93 border-radius: 4px;
94 padding: 3px 9px;
95 min-height: 12px;
96 max-height: 12px;
97 font-family: "Segoe UI";
98 }
99 QPushButton:hover, QToolButton:hover {
100 background-color: #006ABB;
101 color: white;
102 }
103 QPushButton:pressed, QToolButton:pressed {
104 background-color: #003EAA;
105 }
106 QPushButton:disabled, QToolButton:disabled {
107 background-color: rgba(0, 0, 0, 20);
108 color: rgba(0, 0, 0, 100);
109 }
110 QToolButton#replyPushButton::menu-button {
111 width: 12px;
112 }
113 QToolButton#replyPushButton[popupMode="MenuButtonPopup"] {
114 padding-right: 21px;
115 }
116 QToolButton#replyPushButton[popupMode="MenuButtonPopup"][layoutDirection="RightToLeft"] {
117 padding-right: 9px;
118 padding-left: 21px;
119 }
120 )";
121
122#elif defined(Q_OS_LINUX)
123 return R"(
124 QPushButton, QToolButton {
125 background-color: #3584E4;
126 color: black;
127 border: none;
128 border-radius: 0px;
129 padding: 3px 9px;
130 min-height: 12px;
131 max-height: 12px;
132 font-family: "Ubuntu", "Noto Sans";
133 }
134 QPushButton:hover, QToolButton:hover {
135 background-color: #1F76E1;
136 }
137 QPushButton:pressed, QToolButton:pressed {
138 background-color: #003EAA;
139 }
140 QPushButton:disabled, QToolButton:disabled {
141 background-color: rgba(0, 0, 0, 20);
142 color: rgba(0, 0, 0, 100);
143 }
144 QToolButton#replyPushButton::menu-button {
145 width: 12px;
146 }
147 QToolButton#replyPushButton[popupMode="MenuButtonPopup"] {
148 padding-right: 21px;
149 }
150 QToolButton#replyPushButton[popupMode="MenuButtonPopup"][layoutDirection="RightToLeft"] {
151 padding-right: 9px;
152 padding-left: 21px;
153 }
154 )";
155
156#else
157 return QString();
158#endif
159}
160
170
171// =============================================================================
172// Header bar frequency display
173// =============================================================================
174
175static inline QString logFrameStyle() {
176#if defined(Q_OS_MACOS)
177 return QStringLiteral("QFrame#frame { background-color: #F2F2F0; }"
178 "QLabel#currentFreq {"
179 " color: #39FF14;"
180 " background-color: black;"
181 " border-radius:6px; padding:0px 8px; "
182 " font-family: Monaco, 'Courier New', monospace;"
183 " font-size: 15pt;"
184 " font-weight: bold;"
185 " min-width: 150px;"
186 " max-width: 150px;"
187 " min-height: 20px;"
188 " max-height: 50px;"
189 "}");
190#elif defined(Q_OS_WIN)
191 return QStringLiteral("QFrame#frame { background-color: #DDEEFF; }"
192 "QLabel#currentFreq {"
193 " color: #39FF14;"
194 " background-color: black;"
195 " border-radius:4px; padding:0px 8px; "
196 " font-family: Consolas, 'Courier New', monospace;"
197 " font-size: 15pt;"
198 " font-weight: bold;"
199 " min-width: 150px;"
200 " max-width: 150px;"
201 " min-height: 20px;"
202 " max-height: 50px;"
203 "}");
204#else
205 // Linux and other platforms
206 return QStringLiteral("QFrame#frame { background-color: #F2F2F0; }"
207 "QLabel#currentFreq {"
208 " color: #39FF14;"
209 " background-color: black;"
210 " border-radius:0px; padding:0px 8px; "
211 " font-size: 15pt;"
212 " font-weight: bold;"
213 " min-width: 150px;"
214 " max-width: 150px;"
215 " min-height: 20px;"
216 " max-height: 50px;"
217 "}");
218#endif
219}
220
221// =============================================================================
222// Styles namespace
223// =============================================================================
224
252#if defined(Q_OS_MACOS)
253namespace Styles {
254
255// ---------------------------------------------------------------------------
256// Header Bar
257// ---------------------------------------------------------------------------
258
262constexpr const char *LogWidgetStyle =
263 "QFrame#logWidget, QFrame#macroHorizontalWidget, QFrame#controlHorizontalWidget { background-color: #F2F2F0; }";
264
266constexpr const char *DialFreqUpDownButtonStyle = "QPushButton {"
267 " background: transparent;"
268 " color: #000000;"
269 " font-size: 10pt;"
270 " padding: 0px;"
271 " border: none;"
272 " margin: 0px;"
273 " min-height: 14px;"
274 " max-height: 14px;"
275 " min-width: 10px;"
276 " max-width: 10px;"
277 "}";
278
289class OffsetSliderWidget : public QWidget {
290 public:
296 explicit OffsetSliderWidget(QWidget *parent = nullptr) : QWidget(parent) {
297 auto *layout = new QHBoxLayout(this);
298 layout->setContentsMargins(0, 0, 0, 0);
299 layout->setSpacing(4);
300
301 auto *caption = new QLabel("Offset:", this);
302 caption->setStyleSheet("QLabel { color: black; }");
303
304 slider = new QSlider(Qt::Horizontal, this);
305 slider->setStyleSheet(R"(
306 QSlider {
307 background: transparent;
308 min-height: 14px;
309 min-width: 100px;
310 max-width: 100px;
311 }
312 QSlider::groove:horizontal {
313 border: 1px solid #b0b0b0;
314 height: 4px;
315 background: #3F9BFF;
316 border-radius: 2px;
317 }
318 QSlider::handle:horizontal {
319 background: #6699ff;
320 border: 1px solid #c2c8d1;
321 width: 12px;
322 height: 12px;
323 margin: -4px 0;
324 border-radius: 6px;
325 }
326 QSlider::sub-page:horizontal {
327 background: #3F9BFF;
328 border-radius: 2px;
329 }
330 QSlider::add-page:horizontal {
331 background: #e0e0e0;
332 border-radius: 2px;
333 }
334 )");
335 slider->setRange(0, 3000);
336 slider->setValue(1500);
337 valueLabel = new QLabel("0 Hz", this);
338 valueLabel->setStyleSheet("QLabel { color: black; }");
339 valueLabel->setMinimumWidth(20);
340 layout->addWidget(caption);
341 layout->addWidget(slider);
342 layout->addWidget(valueLabel);
343 connect(slider, &QSlider::valueChanged, this, [this](int val) {
344 valueLabel->setText(QString("%1 Hz").arg(val));
345 if (onValueChanged)
346 onValueChanged(val);
347 });
348 }
349
351 int offset() const { return slider->value(); }
352
355 void setValue(int hz) { slider->setValue(hz); }
356
359 void setOnValueChanged(std::function<void(int)> cb) { onValueChanged = cb; }
360
361 private:
362 QSlider *slider;
363 QLabel *valueLabel;
364 std::function<void(int)> onValueChanged;
365};
366
368constexpr const char *LabCallsignStyle = "QLabel {"
369 " font-size: 12pt;"
370 " line-height:12pt;"
371 " color : black;"
372 "}";
373
376constexpr const char *LabUTCStyle =
377 "QLabel {"
378 " border-radius:6px;"
379 " font-size: 12pt;"
380 " line-height:12pt;"
381 " font-family: Monaco, 'Courier New', monospace;"
382 " font-weight: bold;"
383 " background-color: black;"
384 " color: #39FF14;"
385 "}";
386
387// ---------------------------------------------------------------------------
388// Control Bar
389// ---------------------------------------------------------------------------
390
393constexpr const char *MonitorTxButtonStyle =
394 "QPushButton {"
395 " background-color: rgba(0, 0, 255, 40);"
396 " color: black;"
397 " padding: 0.25em 0.25em; font-weight:normal;"
398 " border-style: solid;"
399 " border-width: 0px;"
400 " border-radius: 6px;"
401 "}"
402 "QPushButton:checked {"
403 " background-color: #22FF22;"
404 " color: black;"
405 "}"
406 "QPushButton[transmitting=\"true\"] {"
407 " background-color: #FF2222;"
408 " color: black;"
409 "}";
410
413constexpr const char *ControlButtonStyle =
414 "QPushButton {"
415 " background-color: rgba(0, 0, 255, 40);"
416 " color: black;"
417 " padding: 0.25em 0.25em; font-weight:normal;"
418 " border-style: solid;"
419 " border-width: 0px;"
420 " border-radius: 6px;"
421 "}"
422 "QPushButton:checked {"
423 " background-color: #22FF22;"
424 " color:black;"
425 "}"
426 "QPushButton:disabled {"
427 " background-color: rgba(230, 230, 230, 255);"
428 " color: rgba(0, 0, 0, 100);"
429 "}"
430 "QPushButton:disabled:checked {"
431 " background-color: #a0d8a0;"
432 " color: rgba(0, 0, 0, 100);"
433 "}";
434
436constexpr const char *LogQSOButtonStyle =
437 "QPushButton {"
438 " background-color: #6699ff;"
439 " color: black;"
440 " padding: 0.25em 0.25em; font-weight:normal;"
441 " border-style: solid;"
442 " border-width: 0px;"
443 " border-radius: 6px;"
444 "}"
445 "QPushButton:hover {"
446 " color: white;"
447 "}"
448 "QPushButton:checked {"
449 " background-color: #6699ff;"
450 " color: black;"
451 "}";
452
454constexpr const char *TuneButtonStyle =
455 "QPushButton {"
456 " background-color: rgba(0, 0, 255, 40);"
457 " color: black;"
458 " padding: 0.25em 0.25em; font-weight:normal;"
459 " border-style: solid;"
460 " border-width: 0px;"
461 " border-radius: 6px;"
462 "}"
463 "QPushButton:hover {"
464 "background-color: #ffcc00;"
465 " color: black;"
466 "}"
467 "QPushButton:checked {"
468 " background-color: #FF2222;"
469 " color: black;"
470 "}";
471
473constexpr const char *ModeButtonStyle =
474 "QPushButton {"
475 " padding: 0.25em 0.25em; font-weight:bold;"
476 " border-style: solid;"
477 " border-width: 0px;"
478 " border-radius: 6px;"
479 " background-color: #6699ff;"
480 " color: black;"
481 "}"
482 "QPushButton:hover {"
483 " color: white;"
484 "}"
485 "QPushButton:checked {"
486 " background-color: #6699ff;"
487 " color: black;"
488 "}";
489
490} // namespace Styles
491#elif defined(Q_OS_WIN)
492namespace Styles {
493
494// ---------------------------------------------------------------------------
495// Header Bar
496// ---------------------------------------------------------------------------
497
501constexpr const char *LogWidgetStyle =
502 "QFrame#logWidget, QFrame#macroHorizontalWidget, QFrame#controlHorizontalWidget { background-color: #DDEEFF; }";
503
505constexpr const char *DialFreqUpDownButtonStyle = "QPushButton {"
506 " background: transparent;"
507 " color: #000000;"
508 " font-size: 10pt;"
509 " padding: 0px;"
510 " border: none;"
511 " margin: 0px;"
512 " min-height: 14px;"
513 " max-height: 14px;"
514 " min-width: 10px;"
515 " max-width: 10px;"
516 "}";
517
523class OffsetSliderWidget : public QWidget {
524 public:
525 explicit OffsetSliderWidget(QWidget *parent = nullptr) : QWidget(parent) {
526 auto *layout = new QHBoxLayout(this);
527 auto *caption = new QLabel("Offset:", this);
528 caption->setStyleSheet("QLabel { color: black; }");
529 slider = new QSlider(Qt::Horizontal, this);
530 // Lock the QSlider's appearance regardless of the system theme
531 slider->setStyleSheet(R"(
532 QSlider {
533 background: transparent;
534 min-height: 14px;
535 min-width: 100px;
536 max-width: 100px;
537 }
538 QSlider::groove:horizontal {
539 border: 1px solid #b0b0b0;
540 height: 4px;
541 background: #1499FF;
542 border-radius: 2px;
543 }
544 QSlider::handle:horizontal {
545 background: #0078D4;
546 border: 1px solid #c2c8d1;
547 width: 12px;
548 height: 12px;
549 margin: -4px 0;
550 border-radius: 6px;
551 }
552 QSlider::sub-page:horizontal {
553 background: #1499FF;
554 border-radius: 2px;
555 }
556 QSlider::add-page:horizontal {
557 background: #e0e0e0;
558 border-radius: 2px;
559 }
560 )");
561 slider->setRange(0, 3000);
562 slider->setValue(1500);
563 valueLabel = new QLabel("0 Hz", this);
564 valueLabel->setStyleSheet("QLabel { color: black; }");
565 valueLabel->setMinimumWidth(20);
566 layout->addWidget(caption);
567 layout->addWidget(slider);
568 layout->addWidget(valueLabel);
569 connect(slider, &QSlider::valueChanged, this, [this](int val) {
570 valueLabel->setText(QString("%1 Hz").arg(val));
571 if (onValueChanged)
572 onValueChanged(val);
573 });
574 }
575
577 int offset() const { return slider->value(); }
578
580 void setValue(int hz) { slider->setValue(hz); }
581
583 void setOnValueChanged(std::function<void(int)> cb) { onValueChanged = cb; }
584
585 private:
586 QSlider *slider;
587 QLabel *valueLabel;
588 std::function<void(int)> onValueChanged;
589};
590
592constexpr const char *LabCallsignStyle = "QLabel {"
593 " font-size: 12pt;"
594 " line-height:12pt;"
595 " color : black;"
596 "}";
597
600constexpr const char *LabUTCStyle =
601 "QLabel {"
602 " border-radius: 4px;"
603 " font-size: 12pt;"
604 " line-height: 12pt;"
605 " font-family: Consolas, 'Courier New', monospace;"
606 " font-weight: bold;"
607 " background-color: black;"
608 " color: #39FF14;"
609 "}";
610
611// ---------------------------------------------------------------------------
612// Control Bar
613// ---------------------------------------------------------------------------
614
617constexpr const char *MonitorTxButtonStyle =
618 "QPushButton {"
619 " background-color: lightgray;"
620 " color: black;"
621 " padding: 0.25em 0.25em; font-weight:normal;"
622 " border-style: solid;"
623 " border-width: 0px;"
624 " border-radius: 4px;"
625 "}"
626 "QPushButton:checked {"
627 " background-color: #22FF22;"
628 " color: black;"
629 "}"
630 "QPushButton[transmitting=\"true\"] {"
631 " background-color: #FF2222;"
632 " color: black;"
633 "}";
634
637constexpr const char *ControlButtonStyle =
638 "QPushButton {"
639 " background-color: lightgray;"
640 " color: black;"
641 " padding: 0.25em 0.25em; font-weight:normal;"
642 " border-style:s olid;"
643 " border-width: 0px;"
644 " border-radius: 4px;"
645 "}"
646 "QPushButton:checked {"
647 " background-color: #22FF22;"
648 " color: black;"
649 "}"
650 "QPushButton:hover {"
651 " color: red;"
652 "}"
653 "QPushButton:disabled {"
654 " background-color: rgba(230, 230, 230, 255);"
655 " color: rgba(0, 0, 0, 100);"
656 "}"
657 "QPushButton:disabled:checked {"
658 " background-color: #a0d8a0;"
659 " color: rgba(0, 0, 0, 100);"
660 "}";
661
663constexpr const char *LogQSOButtonStyle =
664 "QPushButton {"
665 " background-color: #0078D4;"
666 " color: black;"
667 " padding: 0.25em 0.25em; font-weight:normal;"
668 " border-style: solid;"
669 " border-width: 0px;"
670 " border-radius: 4px;"
671 "}"
672 "QPushButton:hover {"
673 " color: white;"
674 "}"
675 "QPushButton:checked {"
676 " background-color: #0078D4;"
677 " color: black;"
678 "}";
679
681constexpr const char *TuneButtonStyle =
682 "QPushButton {"
683 " background-color: lightgray;"
684 " color: black;"
685 " padding: 0.25em 0.25em; font-weight:normal;"
686 " border-style: solid;"
687 " border-width: 0px;"
688 " border-radius: 4px;"
689 "}"
690 "QPushButton:hover {"
691 "background-color: #ffcc00;"
692 " color: black;"
693 "}"
694 "QPushButton:checked {"
695 " background-color: #FF2222;"
696 " color: black;"
697 "}";
698
700constexpr const char *ModeButtonStyle =
701 "QPushButton {"
702 " padding: 0.25em 0.25em; font-weight:bold;"
703 " border-style: solid;"
704 " border-width: 0px;"
705 " border-radius: 4px;"
706 " background-color: #0078D4;"
707 " color: black;"
708 "}"
709 "QPushButton:hover {"
710 " color: white;"
711 "}"
712 "QPushButton:checked {"
713 " background-color: #0078D4;"
714 " color: black;"
715 "}";
716
717} // namespace Styles
718#else
719namespace Styles {
720// Linux and other platforms
721
722// ---------------------------------------------------------------------------
723// Header Bar
724// ---------------------------------------------------------------------------
725
729constexpr const char *LogWidgetStyle =
730 "QFrame#logWidget, QFrame#macroHorizontalWidget, QFrame#controlHorizontalWidget { background-color: #F2F2F0; }";
731
733constexpr const char *DialFreqUpDownButtonStyle = "QPushButton {"
734 " background: transparent;"
735 " color: #000000;"
736 " font-size: 10pt;"
737 " padding: 0px;"
738 " border: none;"
739 " margin: 0px;"
740 " min-height: 14px;"
741 " max-height: 14px;"
742 " min-width: 10px;"
743 " max-width: 10px;"
744 "}";
745
751class OffsetSliderWidget : public QWidget {
752 public:
753 explicit OffsetSliderWidget(QWidget *parent = nullptr) : QWidget(parent) {
754 auto *layout = new QHBoxLayout(this);
755 auto *caption = new QLabel("Offset:", this);
756 caption->setStyleSheet("QLabel { color: black; }");
757 slider = new QSlider(Qt::Horizontal, this);
758 // Lock the QSlider's appearance regardless of the system theme
759 slider->setStyleSheet(R"(
760 QSlider {
761 background: transparent;
762 min-height: 14px;
763 min-width: 100px;
764 max-width: 100px;
765 }
766 QSlider::groove:horizontal {
767 border: 1px solid #b0b0b0;
768 height: 4px;
769 background: #6DA6EB;
770 border-radius: 2px;
771 }
772 QSlider::handle:horizontal {
773 background: #3584E4;
774 border: 1px solid #c2c8d1;
775 width: 12px;
776 height: 12px;
777 margin: -4px 0;
778 border-radius: 6px;
780 QSlider::sub-page:horizontal {
781 background: #6DA6EB;
782 border-radius: 2px;
783 }
784 QSlider::add-page:horizontal {
785 background: #e0e0e0;
786 border-radius: 2px;
787 }
788 )");
789 slider->setRange(0, 3000);
790 slider->setValue(1500);
791 valueLabel = new QLabel("0 Hz", this);
792 valueLabel->setStyleSheet("QLabel { color: black; }");
793 valueLabel->setMinimumWidth(20);
794 layout->addWidget(caption);
795 layout->addWidget(slider);
796 layout->addWidget(valueLabel);
797 connect(slider, &QSlider::valueChanged, this, [this](int val) {
798 valueLabel->setText(QString("%1 Hz").arg(val));
799 if (onValueChanged)
800 onValueChanged(val);
801 });
802 }
803
805 int offset() const { return slider->value(); }
806
808 void setValue(int hz) { slider->setValue(hz); }
809
811 void setOnValueChanged(std::function<void(int)> cb) { onValueChanged = cb; }
812
813 private:
814 QSlider *slider;
815 QLabel *valueLabel;
816 std::function<void(int)> onValueChanged;
817};
818
820constexpr const char *LabCallsignStyle = "QLabel {"
821 " font-size: 12pt;"
822 " line-height:12pt;"
823 " color : black;"
824 "}";
825
828constexpr const char *LabUTCStyle =
829 "QLabel {"
830 " border-radius: 0px;"
831 " font-size: 12pt;"
832 " line-height: 12pt;"
833 " font-family: \"DejaVu Sans Mono\", \"Liberation Mono\", \"Noto "
834 "Mono\", \"Ubuntu Mono\", monospace;"
835 " font-weight: bold;"
836 " background-color: black;"
837 " color: #39FF14;"
838 "}";
839
840// ---------------------------------------------------------------------------
841// Control Bar
842// ---------------------------------------------------------------------------
843
846constexpr const char *MonitorTxButtonStyle =
847 "QPushButton {"
848 " background-color: lightgray;"
849 " padding: 0.25em 0.25em; font-weight:normal;"
850 " border-style: solid;"
851 " border-width: 0px;"
852 " border-radius: 0px;"
853 "}"
854 "QPushButton:checked {"
855 " background-color: #22FF22;"
856 "}"
857 "QPushButton[transmitting=\"true\"] {"
858 " background-color: #FF2222;"
859 "}";
860
863constexpr const char *ControlButtonStyle =
864 "QPushButton {"
865 " background-color: lightgray;"
866 " padding: 0.25em 0.25em; font-weight:normal;"
867 " border-style: solid;"
868 " border-width: 0px;"
869 " border-radius: 0px;"
870 "}"
871 "QPushButton:checked {"
872 " background-color: #22FF22;"
873 "}"
874 "QPushButton:hover {"
875 " color: red;"
876 "}"
877 "QPushButton:disabled {"
878 " background-color: rgba(230, 230, 230, 255);"
879 " color: rgba(0, 0, 0, 100);"
880 "}"
881 "QPushButton:disabled:checked {"
882 " background-color: #a0d8a0;"
883 " color: rgba(0, 0, 0, 100);"
884 "}";
885
887constexpr const char *LogQSOButtonStyle =
888 "QPushButton {"
889 " background-color: #3584E4;"
890 " padding: 0.25em 0.25em; font-weight:normal;"
891 " border-style: solid;"
892 " border-width: 0px;"
893 " border-radius: 0px;"
894 "}"
895 "QPushButton:hover {"
896 " color: white;"
897 "}"
898 "QPushButton:checked {"
899 " background-color: #3584E4;"
900 "}";
901
903constexpr const char *TuneButtonStyle =
904 "QPushButton {"
905 " background-color: lightgray;"
906 " color: black;"
907 " padding: 0.25em 0.25em; font-weight:normal;"
908 " border-style: solid;"
909 " border-width: 0px;"
910 " border-radius: 0px;"
911 "}"
912 "QPushButton:hover {"
913 "background-color: #ffcc00;"
914 " color: black;"
915 "}"
916 "QPushButton:checked {"
917 " background-color: #FF2222;"
918 " color: black;"
919 "}";
920
922constexpr const char *ModeButtonStyle =
923 "QPushButton {"
924 " padding: 0.25em 0.25em; font-weight:bold;"
925 " border-style: solid;"
926 " border-width: 0px;"
927 " border-radius: 0px;"
928 " background-color: #3584E4;"
929 "}"
930 "QPushButton:hover {"
931 " color: white;"
932 "}"
933 "QPushButton:checked {"
934 " background-color: #3584E4;"
935 "}";
936
937} // namespace Styles
938#endif
A labeled "Offset:" slider used to select the RX/TX audio offset, in Hz, in the header bar (Linux/oth...
Definition styles.h:751
void setValue(int hz)
Programmatically sets the offset, in Hz.
Definition styles.h:779
int offset() const
Returns the currently selected offset, in Hz.
Definition styles.h:776
void setOnValueChanged(std::function< void(int)> cb)
Registers a callback invoked whenever the offset changes.
Definition styles.h:782
Platform-specific style constants for JS8Call's Header Bar and Control Bar.
constexpr const char * ControlButtonStyle
Definition styles.h:863
constexpr const char * DialFreqUpDownButtonStyle
Style for the small frequency up/down step buttons (Linux/other).
Definition styles.h:733
constexpr const char * LogWidgetStyle
Definition styles.h:729
constexpr const char * LabCallsignStyle
Style for the callsign label in the header bar (Linux/other).
Definition styles.h:820
constexpr const char * LabUTCStyle
Definition styles.h:828
constexpr const char * MonitorTxButtonStyle
Definition styles.h:846
constexpr const char * LogQSOButtonStyle
Style for the "Log QSO" button (Linux/other).
Definition styles.h:887
constexpr const char * TuneButtonStyle
Style for the "Tune" button: turns red while active (Linux/other).
Definition styles.h:903
constexpr const char * ModeButtonStyle
Style for the mode-select button (Linux/other).
Definition styles.h:922
QString buttonStyle()
Returns a platform-native QPushButton/QToolButton stylesheet.
Definition styles.h:51