hydrogen 1.2.3
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 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
 

Detailed Description

Preferences Dialog.

Definition at line 96 of file PreferencesDialog.h.

Constructor & Destructor Documentation

◆ PreferencesDialog()

PreferencesDialog ( QWidget * parent)
explicit

Definition at line 135 of file PreferencesDialog.cpp.

◆ ~PreferencesDialog()

Definition at line 640 of file PreferencesDialog.cpp.

Member Function Documentation

◆ audioDeviceTxtChanged

void audioDeviceTxtChanged ( const QString & )
privateslot

Definition at line 665 of file PreferencesDialog.cpp.

◆ bsliderChanged

void bsliderChanged ( int nValue)
privateslot

Definition at line 2195 of file PreferencesDialog.cpp.

◆ bufferSizeSpinBoxValueChanged

void bufferSizeSpinBoxValueChanged ( int i)
privateslot

Definition at line 1718 of file PreferencesDialog.cpp.

◆ colorButtonChanged

void colorButtonChanged ( )
privateslot

Definition at line 2086 of file PreferencesDialog.cpp.

◆ colorTreeSelectionChanged

void colorTreeSelectionChanged ( )
privateslot

Definition at line 2064 of file PreferencesDialog.cpp.

◆ driverComboBoxActivated

void driverComboBoxActivated ( int index)
privateslot

Definition at line 1113 of file PreferencesDialog.cpp.

◆ exportTheme

void exportTheme ( )
privateslot

Definition at line 2287 of file PreferencesDialog.cpp.

◆ getColorById()

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

Definition at line 1834 of file PreferencesDialog.cpp.

◆ gsliderChanged

void gsliderChanged ( int nValue)
privateslot

Definition at line 2186 of file PreferencesDialog.cpp.

◆ hsliderChanged

void hsliderChanged ( int nValue)
privateslot

Definition at line 2204 of file PreferencesDialog.cpp.

◆ importTheme

void importTheme ( )
privateslot

Definition at line 2231 of file PreferencesDialog.cpp.

◆ latencyTargetSpinBoxValueChanged

void latencyTargetSpinBoxValueChanged ( int i)
privateslot

Definition at line 1712 of file PreferencesDialog.cpp.

◆ midiOutportComboBoxActivated

void midiOutportComboBoxActivated ( int index)
privateslot

Definition at line 1762 of file PreferencesDialog.cpp.

◆ midiPortComboBoxActivated

void midiPortComboBoxActivated ( int index)
privateslot

Definition at line 1756 of file PreferencesDialog.cpp.

◆ mixerFalloffComboBoxCurrentIndexChanged

void mixerFalloffComboBoxCurrentIndexChanged ( int nIndex)
privateslot

Definition at line 1689 of file PreferencesDialog.cpp.

◆ on_cancelBtn_clicked

void on_cancelBtn_clicked ( )
privateslot

Definition at line 645 of file PreferencesDialog.cpp.

◆ on_okBtn_clicked

void on_okBtn_clicked ( )
privateslot

Definition at line 810 of file PreferencesDialog.cpp.

◆ on_restartDriverBtn_clicked

void on_restartDriverBtn_clicked ( )
privateslot

Definition at line 1734 of file PreferencesDialog.cpp.

◆ on_useLashCheckbox_clicked

void on_useLashCheckbox_clicked ( )
privateslot

Definition at line 1793 of file PreferencesDialog.cpp.

◆ onApplicationFontChanged

void onApplicationFontChanged ( const QFont & font)
privateslot

Definition at line 1502 of file PreferencesDialog.cpp.

◆ onColoringMethodChanged

void onColoringMethodChanged ( int nIndex)
privateslot

Definition at line 1662 of file PreferencesDialog.cpp.

◆ onColorNumberChanged

void onColorNumberChanged ( int nIndex)
privateslot

Definition at line 1628 of file PreferencesDialog.cpp.

◆ onColorSelectionClicked

void onColorSelectionClicked ( )
privateslot

Definition at line 1646 of file PreferencesDialog.cpp.

◆ onFontSizeChanged

void onFontSizeChanged ( int nIndex)
privateslot

Definition at line 1548 of file PreferencesDialog.cpp.

◆ onIconColorChanged

void onIconColorChanged ( int nIndex)
privateslot

Definition at line 1617 of file PreferencesDialog.cpp.

◆ onLevel2FontChanged

void onLevel2FontChanged ( const QFont & font)
privateslot

Definition at line 1515 of file PreferencesDialog.cpp.

◆ onLevel3FontChanged

void onLevel3FontChanged ( const QFont & font)
privateslot

Definition at line 1528 of file PreferencesDialog.cpp.

◆ onMidiDriverComboBoxIndexChanged

void onMidiDriverComboBoxIndexChanged ( int index)
privateslot

Definition at line 1805 of file PreferencesDialog.cpp.

◆ onRejected

void onRejected ( )
privateslot

Definition at line 1541 of file PreferencesDialog.cpp.

◆ onUILayoutChanged

void onUILayoutChanged ( int nIndex)
privateslot

Definition at line 1575 of file PreferencesDialog.cpp.

◆ portaudioHostAPIComboBoxActivated

void portaudioHostAPIComboBoxActivated ( int index)
privateslot

Definition at line 1120 of file PreferencesDialog.cpp.

◆ resetTheme

void resetTheme ( )
privateslot

Definition at line 2323 of file PreferencesDialog.cpp.

◆ rsliderChanged

void rsliderChanged ( int nValue)
privateslot

Definition at line 2177 of file PreferencesDialog.cpp.

◆ sampleRateComboBoxEditTextChanged

void sampleRateComboBoxEditTextChanged ( const QString & text)
privateslot

Definition at line 1727 of file PreferencesDialog.cpp.

◆ setColorById()

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

Definition at line 1900 of file PreferencesDialog.cpp.

◆ setColorTreeItemDirty()

void setColorTreeItemDirty ( ColorTreeItem * pItem)
private

Definition at line 2023 of file PreferencesDialog.cpp.

◆ setDriverInfoAlsa()

void setDriverInfoAlsa ( )
private

Definition at line 1361 of file PreferencesDialog.cpp.

◆ setDriverInfoCoreAudio()

void setDriverInfoCoreAudio ( )
private

Definition at line 1417 of file PreferencesDialog.cpp.

◆ setDriverInfoJack()

void setDriverInfoJack ( )
private

Definition at line 1386 of file PreferencesDialog.cpp.

◆ setDriverInfoOss()

void setDriverInfoOss ( )
private

Definition at line 1336 of file PreferencesDialog.cpp.

◆ setDriverInfoPortAudio()

void setDriverInfoPortAudio ( )
private

Definition at line 1442 of file PreferencesDialog.cpp.

◆ setDriverInfoPulseAudio()

void setDriverInfoPulseAudio ( )
private

Definition at line 1478 of file PreferencesDialog.cpp.

◆ ssliderChanged

void ssliderChanged ( int nValue)
privateslot

Definition at line 2213 of file PreferencesDialog.cpp.

◆ styleComboBoxActivated

void styleComboBoxActivated ( int index)
privateslot

Definition at line 1768 of file PreferencesDialog.cpp.

◆ toggleOscCheckBox

void toggleOscCheckBox ( bool toggled)
privateslot

Definition at line 1815 of file PreferencesDialog.cpp.

◆ toggleTrackOutsCheckBox

void toggleTrackOutsCheckBox ( bool toggled)
privateslot

Definition at line 1810 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 2170 of file PreferencesDialog.cpp.

◆ uiScalingPolicyComboBoxCurrentIndexChanged

void uiScalingPolicyComboBoxCurrentIndexChanged ( int nIndex)
privateslot

Definition at line 1596 of file PreferencesDialog.cpp.

◆ updateAppearanceTab()

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

Definition at line 2334 of file PreferencesDialog.cpp.

◆ updateColors

void updateColors ( )
privateslot

Definition at line 2092 of file PreferencesDialog.cpp.

◆ updateColorTree()

void updateColorTree ( )
private

Definition at line 2056 of file PreferencesDialog.cpp.

◆ updateDriverInfo()

void updateDriverInfo ( )
private

Definition at line 1127 of file PreferencesDialog.cpp.

◆ updateDriverInfoLabel()

void updateDriverInfoLabel ( )
private

Definition at line 1231 of file PreferencesDialog.cpp.

◆ updateDriverPreferences()

void updateDriverPreferences ( )
private

Definition at line 670 of file PreferencesDialog.cpp.

◆ vsliderChanged

void vsliderChanged ( int nValue)
privateslot

Definition at line 2222 of file PreferencesDialog.cpp.

Field Documentation

◆ m_bMidiTableChanged

bool m_bMidiTableChanged
private

Definition at line 184 of file PreferencesDialog.h.

◆ m_bNeedDriverRestart

bool m_bNeedDriverRestart
private

Definition at line 180 of file PreferencesDialog.h.

◆ m_changes

H2Core::Preferences::Changes m_changes
private

Stores which part of the dialog was altered.

Definition at line 178 of file PreferencesDialog.h.

◆ m_colorSelectionButtons

std::vector<ColorSelectionButton*> m_colorSelectionButtons
private

Definition at line 182 of file PreferencesDialog.h.

◆ m_nCurrentId

int m_nCurrentId
private

Definition at line 174 of file PreferencesDialog.h.

◆ m_pColorSliderTimer

QTimer* m_pColorSliderTimer
private

Definition at line 175 of file PreferencesDialog.h.

◆ m_pCurrentColor

QColor* m_pCurrentColor
private

Definition at line 173 of file PreferencesDialog.h.

◆ m_pCurrentTheme

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

Definition at line 171 of file PreferencesDialog.h.

◆ m_pPreviousTheme

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

Definition at line 172 of file PreferencesDialog.h.

◆ m_sColorRed

QString m_sColorRed = "#ca0003"
static

Definition at line 103 of file PreferencesDialog.h.

◆ m_sInitialLanguage

QString m_sInitialLanguage
private

Definition at line 181 of file PreferencesDialog.h.