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

header file that defines platform specific label, button, widget and dialog styles used in functions in the UI_Constructor class that assembles the UI and provides the proper "look and feel" for each desktop platform 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.

Namespaces

namespace  Styles
 Defines platform-specific style constants for JS8Call's header bar controls.

Enumerations

enum class  TxStatusAppearance { Receiving , Transmitting , Decoding , IdleTimeout }

Functions

QString txStatusLabelStyle (TxStatusAppearance appearance)
 Returns the QSS stylesheet string for a given TX status state.
QString buttonStyle ()
 Returns a platform-native QPushButton stylesheet.

Variables

constexpr const char * Styles::LogWidgetStyle
constexpr const char * Styles::DialFreqUpDownButtonStyle
constexpr const char * Styles::LabDialFreqOffsetStyle
constexpr const char * Styles::LabCallsignStyle
constexpr const char * Styles::LabUTCStyle
constexpr const char * Styles::ButtonGridStyle
constexpr const char * Styles::MonitorTxButtonStyle
constexpr const char * Styles::MonitorButtonStyle
constexpr const char * Styles::LogQSOButtonStyle
constexpr const char * Styles::TuneButtonStyle = LogQSOButtonStyle
constexpr const char * Styles::ModeButtonStyle
constexpr const char * Styles::SpotButtonStyle

Detailed Description

header file that defines platform specific label, button, widget and dialog styles used in functions in the UI_Constructor class that assembles the UI and provides the proper "look and feel" for each desktop platform

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

Function Documentation

◆ buttonStyle()

QString buttonStyle ( )
inline

Returns a platform-native QPushButton stylesheet.

Generates a stylesheet that approximates the native button conventions of the specific platform, using system-appropriate fonts, geometry, and accent colors. Hover, pressed, and disabled pseudo-states are defined for all active variants.

Returns
A QSS QString suitable for use with QWidget::setStyleSheet(), or an empty default Qt style on unsupported platforms.
Note
A Linux variant targeting Ubuntu/Noto Sans with a neutral grey palette (#E0E0E0 background, #BDBDBD border) has been drafted but is currently commented out pending a styling decision.
On platforms other than Windows and macOS, Qt's built-in default button style is returned unchanged. This includes Linux until the pending variant is defined
Todo
Evaluate and enable the Linux stylesheet when platform styling is decided upon.

◆ txStatusLabelStyle()

QString txStatusLabelStyle ( TxStatusAppearance appearance)
inline

Returns the QSS stylesheet string for a given TX status state.

Parameters
appearanceThe desired TxStatusAppearance state.
Returns
A QSS QString for the requested appearance, or an empty QString() for any unhandled default case (compiler safety fallback).
Here is the caller graph for this function: