hydrogen 1.2.6
PreferencesDialog Class Reference

Preferences Dialog. More...

#include <PreferencesDialog.h>

Inheritance diagram for PreferencesDialog:
Object< PreferencesDialog > Base

Public Member Functions

 PreferencesDialog (QWidget *parent)
 
 ~PreferencesDialog ()
 
- Public Member Functions inherited from Object< PreferencesDialog >
 Object ()
 
 Object (const Object< PreferencesDialog > &other)
 
- Public Member Functions inherited from Base
 Base ()
 
 Base (const Base &other)
 
virtual const char * class_name () const
 
void logBacktrace () const
 Print the current stack at point into the debug log.
 
void Print (bool bShort=true) const
 Prints content of toQString() via DEBUGLOG.
 
virtual QString toQString (const QString &sPrefix="", bool bShort=true) const
 Formatted string version for debugging purposes.
 

Static Public Attributes

static QString m_sColorRed = "#ca0003"
 
- Static Public Attributes inherited from Base
static QString sPrintIndention = " "
 String used to format the debugging string output of some core classes.
 

Private Slots

void audioDeviceTxtChanged (const QString &)
 
void bsliderChanged (int)
 
void bufferSizeSpinBoxValueChanged (int i)
 
void colorButtonChanged ()
 
void colorTreeSelectionChanged ()
 
void driverComboBoxActivated (int index)
 
void exportTheme ()
 
void gsliderChanged (int)
 
void hsliderChanged (int)
 
void importTheme ()
 
void latencyTargetSpinBoxValueChanged (int i)
 
void midiOutportComboBoxActivated (int index)
 
void midiPortComboBoxActivated (int index)
 
void mixerFalloffComboBoxCurrentIndexChanged (int)
 
void on_cancelBtn_clicked ()
 
void on_okBtn_clicked ()
 
void on_restartDriverBtn_clicked ()
 
void on_useLashCheckbox_clicked ()
 
void onApplicationFontChanged (const QFont &font)
 
void onColoringMethodChanged (int nIndex)
 
void onColorNumberChanged (int nIndex)
 
void onColorSelectionClicked ()
 
void onFontSizeChanged (int nIndex)
 
void onIconColorChanged (int)
 
void onLevel2FontChanged (const QFont &font)
 
void onLevel3FontChanged (const QFont &font)
 
void onMidiDriverComboBoxIndexChanged (int index)
 
void onRejected ()
 
void onUILayoutChanged (int nIndex)
 
void portaudioHostAPIComboBoxActivated (int index)
 
void resetTheme ()
 
void rsliderChanged (int)
 
void sampleRateComboBoxEditTextChanged (const QString &text)
 
void ssliderChanged (int)
 
void styleComboBoxActivated (int index)
 
void toggleOscCheckBox (bool toggled)
 
void toggleTrackOutsCheckBox (bool toggled)
 
void uiScalingPolicyComboBoxCurrentIndexChanged (int)
 
void updateColors ()
 
void vsliderChanged (int)
 

Private Member Functions

QColor * getColorById (int nId, std::shared_ptr< H2Core::ColorTheme > uiStyle) const
 
void setColorById (int nId, const QColor &color, std::shared_ptr< H2Core::ColorTheme > uiStyle)
 
void setColorTreeItemDirty (ColorTreeItem *pItem)
 
void setDriverInfoAlsa ()
 
void setDriverInfoCoreAudio ()
 
void setDriverInfoJack ()
 
void setDriverInfoOss ()
 
void setDriverInfoPortAudio ()
 
void setDriverInfoPulseAudio ()
 
void triggerColorSliderTimer ()
 Introduce a temporal smoothing.
 
void updateAppearanceTab (const std::shared_ptr< H2Core::Theme > pTheme)
 
void updateColorTree ()
 
void updateDriverInfo ()
 
void updateDriverInfoLabel ()
 
void updateDriverPreferences ()
 

Private Attributes

bool m_bMidiTableChanged
 
bool m_bNeedDriverRestart
 
H2Core::Preferences::Changes m_changes
 Stores which part of the dialog was altered.
 
std::vector< ColorSelectionButton * > m_colorSelectionButtons
 
int m_nCurrentId
 
QTimer * m_pColorSliderTimer
 
QColor * m_pCurrentColor
 
std::shared_ptr< H2Core::Themem_pCurrentTheme
 
std::shared_ptr< H2Core::Themem_pPreviousTheme
 
QString m_sInitialLanguage
 

Additional Inherited Members

- Static Public Member Functions inherited from Base
static const char * _class_name ()
 return the class name
 
static QString base_clock (const QString &sMsg)
 Measures the current time and stores it in __last_clock.
 
static QString base_clock_in (const QString &sMsg)
 
static int bootstrap (Logger *logger, bool count=false)
 must be called before any Object instantiation !
 
static bool count_active ()
 
static int getAliveObjectCount ()
 
static object_map_t getObjectMap ()
 
static Loggerlogger ()
 return the logger instance
 
static int objects_count ()
 
static void printObjectMapDiff (object_map_t map)
 Creates the difference between a snapshot of the object map and its current state and prints it to std::cout.
 
static void set_count (bool flag)
 enable/disable class instances counting
 
static void write_objects_map_to (std::ostream &out, object_map_t *map=nullptr)
 output the full objects map to a given ostream
 
static void write_objects_map_to_cerr ()
 output objects map to stderr
 
- Protected Member Functions inherited from Object< PreferencesDialog >
 ~Object ()
 
- Protected Member Functions inherited from Base
 ~Base ()
 
- Static Protected Member Functions inherited from Base
static void registerClass (const char *name, const atomic_obj_cpt_t *counters)
 
- Static Protected Attributes inherited from Base
static bool __count = false
 should we count class instances
 
static timeval __last_clock = { 0, 0 }
 
static Logger__logger = nullptr
 
static bool bLogColors = true
 

Detailed Description

Preferences Dialog.

Definition at line 97 of file PreferencesDialog.h.

Constructor & Destructor Documentation

◆ PreferencesDialog()

PreferencesDialog ( QWidget * parent)
explicit

Definition at line 137 of file PreferencesDialog.cpp.

◆ ~PreferencesDialog()

Definition at line 637 of file PreferencesDialog.cpp.

Member Function Documentation

◆ audioDeviceTxtChanged

void audioDeviceTxtChanged ( const QString & )
privateslot

Definition at line 662 of file PreferencesDialog.cpp.

◆ bsliderChanged

void bsliderChanged ( int nValue)
privateslot

Definition at line 2165 of file PreferencesDialog.cpp.

◆ bufferSizeSpinBoxValueChanged

void bufferSizeSpinBoxValueChanged ( int i)
privateslot

Definition at line 1688 of file PreferencesDialog.cpp.

◆ colorButtonChanged

void colorButtonChanged ( )
privateslot

Definition at line 2056 of file PreferencesDialog.cpp.

◆ colorTreeSelectionChanged

void colorTreeSelectionChanged ( )
privateslot

Definition at line 2034 of file PreferencesDialog.cpp.

◆ driverComboBoxActivated

void driverComboBoxActivated ( int index)
privateslot

Definition at line 1101 of file PreferencesDialog.cpp.

◆ exportTheme

void exportTheme ( )
privateslot

Definition at line 2257 of file PreferencesDialog.cpp.

◆ getColorById()

QColor * getColorById ( int nId,
std::shared_ptr< H2Core::ColorTheme > uiStyle ) const
private

Definition at line 1804 of file PreferencesDialog.cpp.

◆ gsliderChanged

void gsliderChanged ( int nValue)
privateslot

Definition at line 2156 of file PreferencesDialog.cpp.

◆ hsliderChanged

void hsliderChanged ( int nValue)
privateslot

Definition at line 2174 of file PreferencesDialog.cpp.

◆ importTheme

void importTheme ( )
privateslot

Definition at line 2201 of file PreferencesDialog.cpp.

◆ latencyTargetSpinBoxValueChanged

void latencyTargetSpinBoxValueChanged ( int i)
privateslot

Definition at line 1682 of file PreferencesDialog.cpp.

◆ midiOutportComboBoxActivated

void midiOutportComboBoxActivated ( int index)
privateslot

Definition at line 1732 of file PreferencesDialog.cpp.

◆ midiPortComboBoxActivated

void midiPortComboBoxActivated ( int index)
privateslot

Definition at line 1726 of file PreferencesDialog.cpp.

◆ mixerFalloffComboBoxCurrentIndexChanged

void mixerFalloffComboBoxCurrentIndexChanged ( int nIndex)
privateslot

Definition at line 1659 of file PreferencesDialog.cpp.

◆ on_cancelBtn_clicked

void on_cancelBtn_clicked ( )
privateslot

Definition at line 642 of file PreferencesDialog.cpp.

◆ on_okBtn_clicked

void on_okBtn_clicked ( )
privateslot

Definition at line 801 of file PreferencesDialog.cpp.

◆ on_restartDriverBtn_clicked

void on_restartDriverBtn_clicked ( )
privateslot

Definition at line 1704 of file PreferencesDialog.cpp.

◆ on_useLashCheckbox_clicked

void on_useLashCheckbox_clicked ( )
privateslot

Definition at line 1763 of file PreferencesDialog.cpp.

◆ onApplicationFontChanged

void onApplicationFontChanged ( const QFont & font)
privateslot

Definition at line 1476 of file PreferencesDialog.cpp.

◆ onColoringMethodChanged

void onColoringMethodChanged ( int nIndex)
privateslot

Definition at line 1632 of file PreferencesDialog.cpp.

◆ onColorNumberChanged

void onColorNumberChanged ( int nIndex)
privateslot

Definition at line 1598 of file PreferencesDialog.cpp.

◆ onColorSelectionClicked

void onColorSelectionClicked ( )
privateslot

Definition at line 1616 of file PreferencesDialog.cpp.

◆ onFontSizeChanged

void onFontSizeChanged ( int nIndex)
privateslot

Definition at line 1522 of file PreferencesDialog.cpp.

◆ onIconColorChanged

void onIconColorChanged ( int nIndex)
privateslot

Definition at line 1587 of file PreferencesDialog.cpp.

◆ onLevel2FontChanged

void onLevel2FontChanged ( const QFont & font)
privateslot

Definition at line 1489 of file PreferencesDialog.cpp.

◆ onLevel3FontChanged

void onLevel3FontChanged ( const QFont & font)
privateslot

Definition at line 1502 of file PreferencesDialog.cpp.

◆ onMidiDriverComboBoxIndexChanged

void onMidiDriverComboBoxIndexChanged ( int index)
privateslot

Definition at line 1775 of file PreferencesDialog.cpp.

◆ onRejected

void onRejected ( )
privateslot

Definition at line 1515 of file PreferencesDialog.cpp.

◆ onUILayoutChanged

void onUILayoutChanged ( int nIndex)
privateslot

Definition at line 1549 of file PreferencesDialog.cpp.

◆ portaudioHostAPIComboBoxActivated

void portaudioHostAPIComboBoxActivated ( int index)
privateslot

Definition at line 1108 of file PreferencesDialog.cpp.

◆ resetTheme

void resetTheme ( )
privateslot

Definition at line 2293 of file PreferencesDialog.cpp.

◆ rsliderChanged

void rsliderChanged ( int nValue)
privateslot

Definition at line 2147 of file PreferencesDialog.cpp.

◆ sampleRateComboBoxEditTextChanged

void sampleRateComboBoxEditTextChanged ( const QString & text)
privateslot

Definition at line 1697 of file PreferencesDialog.cpp.

◆ setColorById()

void setColorById ( int nId,
const QColor & color,
std::shared_ptr< H2Core::ColorTheme > uiStyle )
private

Definition at line 1870 of file PreferencesDialog.cpp.

◆ setColorTreeItemDirty()

void setColorTreeItemDirty ( ColorTreeItem * pItem)
private

Definition at line 1993 of file PreferencesDialog.cpp.

◆ setDriverInfoAlsa()

void setDriverInfoAlsa ( )
private

Definition at line 1347 of file PreferencesDialog.cpp.

◆ setDriverInfoCoreAudio()

void setDriverInfoCoreAudio ( )
private

Definition at line 1397 of file PreferencesDialog.cpp.

◆ setDriverInfoJack()

void setDriverInfoJack ( )
private

Definition at line 1370 of file PreferencesDialog.cpp.

◆ setDriverInfoOss()

void setDriverInfoOss ( )
private

Definition at line 1324 of file PreferencesDialog.cpp.

◆ setDriverInfoPortAudio()

void setDriverInfoPortAudio ( )
private

Definition at line 1420 of file PreferencesDialog.cpp.

◆ setDriverInfoPulseAudio()

void setDriverInfoPulseAudio ( )
private

Definition at line 1454 of file PreferencesDialog.cpp.

◆ ssliderChanged

void ssliderChanged ( int nValue)
privateslot

Definition at line 2183 of file PreferencesDialog.cpp.

◆ styleComboBoxActivated

void styleComboBoxActivated ( int index)
privateslot

Definition at line 1738 of file PreferencesDialog.cpp.

◆ toggleOscCheckBox

void toggleOscCheckBox ( bool toggled)
privateslot

Definition at line 1785 of file PreferencesDialog.cpp.

◆ toggleTrackOutsCheckBox

void toggleTrackOutsCheckBox ( bool toggled)
privateslot

Definition at line 1780 of file PreferencesDialog.cpp.

◆ triggerColorSliderTimer()

void triggerColorSliderTimer ( )
private

Introduce a temporal smoothing.

Otherwise, moving the slider would draw to heavy on the GUI thread with every change triggering a recoloring of the whole GUI.

Definition at line 2140 of file PreferencesDialog.cpp.

◆ uiScalingPolicyComboBoxCurrentIndexChanged

void uiScalingPolicyComboBoxCurrentIndexChanged ( int nIndex)
privateslot

Definition at line 1568 of file PreferencesDialog.cpp.

◆ updateAppearanceTab()

void updateAppearanceTab ( const std::shared_ptr< H2Core::Theme > pTheme)
private

Definition at line 2304 of file PreferencesDialog.cpp.

◆ updateColors

void updateColors ( )
privateslot

Definition at line 2062 of file PreferencesDialog.cpp.

◆ updateColorTree()

void updateColorTree ( )
private

Definition at line 2026 of file PreferencesDialog.cpp.

◆ updateDriverInfo()

void updateDriverInfo ( )
private

Definition at line 1115 of file PreferencesDialog.cpp.

◆ updateDriverInfoLabel()

void updateDriverInfoLabel ( )
private

Definition at line 1217 of file PreferencesDialog.cpp.

◆ updateDriverPreferences()

void updateDriverPreferences ( )
private

Definition at line 667 of file PreferencesDialog.cpp.

◆ vsliderChanged

void vsliderChanged ( int nValue)
privateslot

Definition at line 2192 of file PreferencesDialog.cpp.

Field Documentation

◆ m_bMidiTableChanged

bool m_bMidiTableChanged
private

Definition at line 185 of file PreferencesDialog.h.

◆ m_bNeedDriverRestart

bool m_bNeedDriverRestart
private

Definition at line 181 of file PreferencesDialog.h.

◆ m_changes

H2Core::Preferences::Changes m_changes
private

Stores which part of the dialog was altered.

Definition at line 179 of file PreferencesDialog.h.

◆ m_colorSelectionButtons

std::vector<ColorSelectionButton*> m_colorSelectionButtons
private

Definition at line 183 of file PreferencesDialog.h.

◆ m_nCurrentId

int m_nCurrentId
private

Definition at line 175 of file PreferencesDialog.h.

◆ m_pColorSliderTimer

QTimer* m_pColorSliderTimer
private

Definition at line 176 of file PreferencesDialog.h.

◆ m_pCurrentColor

QColor* m_pCurrentColor
private

Definition at line 174 of file PreferencesDialog.h.

◆ m_pCurrentTheme

std::shared_ptr<H2Core::Theme> m_pCurrentTheme
private

Definition at line 172 of file PreferencesDialog.h.

◆ m_pPreviousTheme

std::shared_ptr<H2Core::Theme> m_pPreviousTheme
private

Definition at line 173 of file PreferencesDialog.h.

◆ m_sColorRed

QString m_sColorRed = "#ca0003"
static

Definition at line 104 of file PreferencesDialog.h.

◆ m_sInitialLanguage

QString m_sInitialLanguage
private

Definition at line 182 of file PreferencesDialog.h.