JS8Call-Improved master
Loading...
Searching...
No Matches
styles.h File Reference

Platform-specific label, button, widget, and dialog styles used by the UI_Constructor class to assemble JS8Call's user interface. More...

#include <QtCore/QOperatingSystemVersion>
#include <QtCore/QString>
#include <QtGlobal>
#include <QtGui/QGuiApplication>
#include <QHBoxLayout>
#include <QSlider>
#include <QLabel>
#include <QWidget>
Include dependency graph for styles.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Styles::OffsetSliderWidget
 A labeled "Offset:" slider used to select the RX/TX audio offset, in Hz, in the header bar (Linux/other). More...

Namespaces

namespace  Styles
 Platform-specific style constants for JS8Call's Header Bar and Control Bar.

Functions

QString buttonStyle ()
 Returns a platform-native QPushButton/QToolButton stylesheet.

Variables

constexpr const char * Styles::LogWidgetStyle
constexpr const char * Styles::DialFreqUpDownButtonStyle
 Style for the small frequency up/down step buttons (Linux/other).
constexpr const char * Styles::LabCallsignStyle
 Style for the callsign label in the header bar (Linux/other).
constexpr const char * Styles::LabUTCStyle
constexpr const char * Styles::MonitorTxButtonStyle
constexpr const char * Styles::ControlButtonStyle
constexpr const char * Styles::LogQSOButtonStyle
 Style for the "Log QSO" button (Linux/other).
constexpr const char * Styles::TuneButtonStyle
 Style for the "Tune" button: turns red while active (Linux/other).
constexpr const char * Styles::ModeButtonStyle
 Style for the mode-select button (Linux/other).

Detailed Description

Platform-specific label, button, widget, and dialog styles used by the UI_Constructor class to assemble JS8Call's user interface.

Provides QSS (Qt Style Sheet) stylesheet strings and a small helper widget used to give JS8Call a native "look and feel" on macOS, Windows, and Linux/other platforms.

  1. General control styles: buttonStyle() and logFrameStyle(), which style generic QPushButton/QToolButton widgets and the header bar's frequency display frame.
  2. Styles namespace: platform-specific constants for the two main regions of the UI:
    • Header Bar – LogWidgetStyle, DialFreqUpDownButtonStyle, OffsetSliderWidget, LabCallsignStyle, LabUTCStyle.
    • Control Bar – MonitorTxButtonStyle, ControlButtonStyle, LogQSOButtonStyle, TuneButtonStyle, ModeButtonStyle.

styles.h was added on 11 Apr, 2026 and is intended to be the default StyleSheet configuration for the JS8Call user interface.

Function Documentation

◆ buttonStyle()

QString buttonStyle ( )
inline

Returns a platform-native QPushButton/QToolButton stylesheet.

Generates a stylesheet that approximates the native button conventions of the target platform, using system-appropriate fonts, geometry, and accent colors. Hover, pressed, and disabled pseudo-states are defined. Also styles the drop-down menu indicator/padding used by QToolButton#replyPushButton when it has an attached menu.

Returns
A QSS QString suitable for use with QWidget::setStyleSheet(), or an empty QString() on unsupported platforms (falls back to the default Qt style).