PulseView  unreleased development snapshot
A Qt-based sigrok GUI
pv::GlobalSettings Class Reference

#include <globalsettings.hpp>

Inheritance diagram for pv::GlobalSettings:
Collaboration diagram for pv::GlobalSettings:

Public Types

enum  ConvThrDispMode { ConvThrDispMode_None = 0, ConvThrDispMode_Background, ConvThrDispMode_Dots }
 

Public Member Functions

 GlobalSettings ()
 
void save_internal_defaults ()
 
void set_defaults_where_needed ()
 
void set_bright_theme_default_colors ()
 
void set_dark_theme_default_colors ()
 
void apply_theme ()
 
void apply_language ()
 
void setValue (const QString &key, const QVariant &value)
 
void start_tracking ()
 
void stop_tracking ()
 
void undo_tracked_changes ()
 

Static Public Member Functions

static bool current_theme_is_dark ()
 
static void add_change_handler (GlobalSettingsInterface *cb)
 
static void remove_change_handler (GlobalSettingsInterface *cb)
 
static void store_gvariant (QSettings &settings, GVariant *v)
 
static GVariant * restore_gvariant (QSettings &settings)
 
static void store_variantbase (QSettings &settings, Glib::VariantBase v)
 
static Glib::VariantBase restore_variantbase (QSettings &settings)
 
static void store_timestamp (QSettings &settings, const char *name, const pv::util::Timestamp &ts)
 
static pv::util::Timestamp restore_timestamp (QSettings &settings, const char *name)
 

Static Public Attributes

static const QString Key_General_Language = "General_Language"
 
static const QString Key_General_Theme = "General_Theme"
 
static const QString Key_General_Style = "General_Style"
 
static const QString Key_General_SaveWithSetup = "General_SaveWithSetup"
 
static const QString Key_General_StartAllSessions = "General_StartAllSessions"
 
static const QString Key_View_ZoomToFitDuringAcq = "View_ZoomToFitDuringAcq"
 
static const QString Key_View_ZoomToFitAfterAcq = "View_ZoomToFitAfterAcq"
 
static const QString Key_View_TriggerIsZeroTime = "View_TriggerIsZeroTime"
 
static const QString Key_View_ColoredBG = "View_ColoredBG"
 
static const QString Key_View_StickyScrolling = "View_StickyScrolling"
 
static const QString Key_View_AllowVerticalDragging = "View_AllowVerticalDragging"
 
static const QString Key_View_ShowSamplingPoints = "View_ShowSamplingPoints"
 
static const QString Key_View_FillSignalHighAreas = "View_FillSignalHighAreas"
 
static const QString Key_View_FillSignalHighAreaColor = "View_FillSignalHighAreaColor"
 
static const QString Key_View_ShowAnalogMinorGrid = "View_ShowAnalogMinorGrid"
 
static const QString Key_View_ConversionThresholdDispMode = "View_ConversionThresholdDispMode"
 
static const QString Key_View_DefaultDivHeight = "View_DefaultDivHeight"
 
static const QString Key_View_DefaultLogicHeight = "View_DefaultLogicHeight"
 
static const QString Key_View_ShowHoverMarker = "View_ShowHoverMarker"
 
static const QString Key_View_KeepRulerItemSelected = "View_KeepRulerItemSelected"
 
static const QString Key_View_SnapDistance = "View_SnapDistance"
 
static const QString Key_View_CursorFillColor = "View_CursorFillColor"
 
static const QString Key_View_CursorShowInterval = "View_CursorShowInterval"
 
static const QString Key_View_CursorShowFrequency = "View_CursorShowFrequency"
 
static const QString Key_View_CursorShowSamples = "View_CursorShowSamples"
 
static const QString Key_Dec_InitialStateConfigurable = "Dec_InitialStateConfigurable"
 
static const QString Key_Dec_ExportFormat = "Dec_ExportFormat"
 
static const QString Key_Dec_AlwaysShowAllRows = "Dec_AlwaysShowAllRows"
 
static const QString Key_Log_BufferSize = "Log_BufferSize"
 
static const QString Key_Log_NotifyOfStacktrace = "Log_NotifyOfStacktrace"
 

Static Private Attributes

static vector< GlobalSettingsInterface * > callbacks_
 
static bool tracking_ = false
 
static map< QString, QVariant > tracked_changes_
 
static QString default_style_
 
static QPalette default_palette_
 
static bool is_dark_theme_ = false
 

Detailed Description

Definition at line 51 of file globalsettings.hpp.

Member Enumeration Documentation

Enumerator
ConvThrDispMode_None 
ConvThrDispMode_Background 
ConvThrDispMode_Dots 

Definition at line 87 of file globalsettings.hpp.

Constructor & Destructor Documentation

pv::GlobalSettings::GlobalSettings ( )

Definition at line 89 of file globalsettings.cpp.

Member Function Documentation

void pv::GlobalSettings::add_change_handler ( GlobalSettingsInterface cb)
static

Definition at line 275 of file globalsettings.cpp.

Here is the caller graph for this function:

void pv::GlobalSettings::apply_language ( )

Definition at line 269 of file globalsettings.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::GlobalSettings::apply_theme ( )

Definition at line 209 of file globalsettings.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool pv::GlobalSettings::current_theme_is_dark ( )
static

Definition at line 204 of file globalsettings.cpp.

Here is the caller graph for this function:

void pv::GlobalSettings::remove_change_handler ( GlobalSettingsInterface cb)
static

Definition at line 280 of file globalsettings.cpp.

Here is the caller graph for this function:

GVariant * pv::GlobalSettings::restore_gvariant ( QSettings settings)
static

Definition at line 346 of file globalsettings.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

pv::util::Timestamp pv::GlobalSettings::restore_timestamp ( QSettings settings,
const char *  name 
)
static

Definition at line 407 of file globalsettings.cpp.

Here is the caller graph for this function:

Glib::VariantBase pv::GlobalSettings::restore_variantbase ( QSettings settings)
static

Definition at line 375 of file globalsettings.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::GlobalSettings::save_internal_defaults ( )

Definition at line 95 of file globalsettings.cpp.

void pv::GlobalSettings::set_bright_theme_default_colors ( )

Definition at line 186 of file globalsettings.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::GlobalSettings::set_dark_theme_default_colors ( )

Definition at line 195 of file globalsettings.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::GlobalSettings::set_defaults_where_needed ( )

Definition at line 104 of file globalsettings.cpp.

Here is the call graph for this function:

void pv::GlobalSettings::setValue ( const QString &  key,
const QVariant &  value 
)

Definition at line 289 of file globalsettings.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::GlobalSettings::start_tracking ( )

Begins the tracking of changes. All changes will be recorded until stop_tracking() is called. The change tracking is global and doesn't support nesting.

Definition at line 306 of file globalsettings.cpp.

Here is the caller graph for this function:

void pv::GlobalSettings::stop_tracking ( )

Ends the tracking of changes without any changes to the settings.

Definition at line 312 of file globalsettings.cpp.

Here is the caller graph for this function:

void pv::GlobalSettings::store_gvariant ( QSettings settings,
GVariant *  v 
)
static

Definition at line 328 of file globalsettings.cpp.

Here is the caller graph for this function:

void pv::GlobalSettings::store_timestamp ( QSettings settings,
const char *  name,
const pv::util::Timestamp ts 
)
static

Definition at line 399 of file globalsettings.cpp.

Here is the caller graph for this function:

void pv::GlobalSettings::store_variantbase ( QSettings settings,
Glib::VariantBase  v 
)
static

Definition at line 367 of file globalsettings.cpp.

Here is the caller graph for this function:

void pv::GlobalSettings::undo_tracked_changes ( )

Ends the tracking of changes, undoing the changes since the change tracking began.

Definition at line 318 of file globalsettings.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

vector< GlobalSettingsInterface * > pv::GlobalSettings::callbacks_
staticprivate

Definition at line 139 of file globalsettings.hpp.

QPalette pv::GlobalSettings::default_palette_
staticprivate

Definition at line 145 of file globalsettings.hpp.

QString pv::GlobalSettings::default_style_
staticprivate

Definition at line 144 of file globalsettings.hpp.

bool pv::GlobalSettings::is_dark_theme_ = false
staticprivate

Definition at line 147 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_Dec_AlwaysShowAllRows = "Dec_AlwaysShowAllRows"
static

Definition at line 83 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_Dec_ExportFormat = "Dec_ExportFormat"
static

Definition at line 82 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_Dec_InitialStateConfigurable = "Dec_InitialStateConfigurable"
static

Definition at line 81 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_General_Language = "General_Language"
static

Definition at line 56 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_General_SaveWithSetup = "General_SaveWithSetup"
static

Definition at line 59 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_General_StartAllSessions = "General_StartAllSessions"
static

Definition at line 60 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_General_Style = "General_Style"
static

Definition at line 58 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_General_Theme = "General_Theme"
static

Definition at line 57 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_Log_BufferSize = "Log_BufferSize"
static

Definition at line 84 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_Log_NotifyOfStacktrace = "Log_NotifyOfStacktrace"
static

Definition at line 85 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_AllowVerticalDragging = "View_AllowVerticalDragging"
static

Definition at line 66 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_ColoredBG = "View_ColoredBG"
static

Definition at line 64 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_ConversionThresholdDispMode = "View_ConversionThresholdDispMode"
static

Definition at line 71 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_CursorFillColor = "View_CursorFillColor"
static

Definition at line 77 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_CursorShowFrequency = "View_CursorShowFrequency"
static

Definition at line 79 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_CursorShowInterval = "View_CursorShowInterval"
static

Definition at line 78 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_CursorShowSamples = "View_CursorShowSamples"
static

Definition at line 80 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_DefaultDivHeight = "View_DefaultDivHeight"
static

Definition at line 72 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_DefaultLogicHeight = "View_DefaultLogicHeight"
static

Definition at line 73 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_FillSignalHighAreaColor = "View_FillSignalHighAreaColor"
static

Definition at line 69 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_FillSignalHighAreas = "View_FillSignalHighAreas"
static

Definition at line 68 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_KeepRulerItemSelected = "View_KeepRulerItemSelected"
static

Definition at line 75 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_ShowAnalogMinorGrid = "View_ShowAnalogMinorGrid"
static

Definition at line 70 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_ShowHoverMarker = "View_ShowHoverMarker"
static

Definition at line 74 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_ShowSamplingPoints = "View_ShowSamplingPoints"
static

Definition at line 67 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_SnapDistance = "View_SnapDistance"
static

Definition at line 76 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_StickyScrolling = "View_StickyScrolling"
static

Definition at line 65 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_TriggerIsZeroTime = "View_TriggerIsZeroTime"
static

Definition at line 63 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_ZoomToFitAfterAcq = "View_ZoomToFitAfterAcq"
static

Definition at line 62 of file globalsettings.hpp.

const QString pv::GlobalSettings::Key_View_ZoomToFitDuringAcq = "View_ZoomToFitDuringAcq"
static

Definition at line 61 of file globalsettings.hpp.

map< QString, QVariant > pv::GlobalSettings::tracked_changes_
staticprivate

Definition at line 142 of file globalsettings.hpp.

bool pv::GlobalSettings::tracking_ = false
staticprivate

Definition at line 141 of file globalsettings.hpp.


The documentation for this class was generated from the following files: