SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
themehelpers.h File Reference
#include <QString>
#include <QWidget>
#include "ui/theme/thememanager.h"
#include "ui/theme/themetokens.h"
Include dependency graph for themehelpers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::ui
 
namespace  openswmmvis::ui::theme
 

Enumerations

enum class  openswmmvis::ui::theme::Banner {
  openswmmvis::ui::theme::Info ,
  openswmmvis::ui::theme::Success ,
  openswmmvis::ui::theme::Error
}
 

Functions

void openswmmvis::ui::theme::applyHintRole (QWidget *w)
 
QString openswmmvis::ui::theme::hintStyle ()
 
QString openswmmvis::ui::theme::hintItalicStyle ()
 
QString openswmmvis::ui::theme::errorTextStyle ()
 
QString openswmmvis::ui::theme::errorBorderStyle ()
 
QString openswmmvis::ui::theme::sectionHeadingStyle ()
 
QString openswmmvis::ui::theme::errorFillStyle ()
 
QString openswmmvis::ui::theme::bannerStyle (Banner kind)
 

Detailed Description

UI redesign P4 — the one vocabulary for chrome styling that used to be scattered hex literals (three different "error reds", three "hint grays", hardcoded light banner backgrounds). Header-only, two flavors:

  • Palette-role application (preferred, theme-live for free): applyHintRole() rides QPalette::PlaceholderText, which ThemeManager keeps tokenized, so hint labels recolor on theme flips with no reconnect machinery.
  • Stylesheet builders for TRANSIENT states (validation feedback that toggles styles on and off): the string carries the token color of the moment it is applied. "color: palette(mid)" hints are theme-live (Mid is tokenized to hintText); error/banner strings refresh the next time the site re-applies them — acceptable for short-lived validation states, and vastly simpler than per-widget reconnects.