void GenericMediaDevice::applyConfig() { if( m_configDialog != 0) { m_supportedFileTypes.clear(); for( uint i = 0; i < m_configDialog->m_supportedListBox->count(); i++ ) { QString currentText = m_configDialog->m_supportedListBox->item( i )->text(); if( currentText == m_configDialog->m_convertComboBox->currentText() ) m_supportedFileTypes.prepend( currentText ); else m_supportedFileTypes.append( currentText ); } m_spacesToUnderscores = m_configDialog->m_spaceCheck->isChecked(); m_asciiTextOnly = m_configDialog->m_asciiCheck->isChecked(); m_vfatTextOnly = m_configDialog->m_vfatCheck->isChecked(); m_ignoreThePrefix = m_configDialog->m_ignoreTheCheck->isChecked(); m_songLocation = m_configDialog->m_songLocationBox->text(); m_podcastLocation = m_configDialog->m_podcastLocationBox->text(); } setConfigString( "songLocation" , m_songLocation ); setConfigString( "podcastLocation" , m_podcastLocation ); setConfigBool( "spacesToUnderscores", m_spacesToUnderscores ); setConfigBool( "ignoreThePrefix" , m_ignoreThePrefix ); setConfigBool( "asciiTextOnly" , m_asciiTextOnly ); setConfigBool( "vfatTextOnly" , m_vfatTextOnly ); setConfigString( "supportedFiletypes" , m_supportedFileTypes.join( ", " ) ); }
void mql4j::config::setConfigBool(const string key, const bool value) { if(value) { setConfigString(key, "true"); } else { setConfigString(key, "false"); } }
void setTheme(char * themeName) { audio_stop(); //Save the selected theme in main config setConfigString("currentTheme", themeName, configTypeMain); //Reload theme config loadConfigWithType(configTypeTheme); //Reload theme variables for menu loadThemeConfig(); loadSplashImages(); if (themeImageExists(themeImageSplashTop)) { drawThemeImage(themeImageSplashTop, GFX_TOP, 0, 0); } if (themeImageExists(themeImageSplashBottom)) { drawThemeImage(themeImageSplashBottom, GFX_BOTTOM, 0, 0); } gfxFlip(); int startMs = osGetTime(); playBootSound(); //Reload theme images initThemeImages(); //Load BGM initThemeSounds(); //Re-initialise colours initColours(); //Force reload of GUI elements statusbarNeedsUpdate = true; toolbarNeedsUpdate = true; alphaImagesDrawn = false; waitForDurationOfSound(&themeSoundBoot, startMs); startBGM(); panelsDrawn = false; pageControlPanelsDrawn = false; }
void setConfigInt(char* key, int value, int configType) { char sValue[sizeof(int)+1]; sprintf(sValue, "%d", value); setConfigString(key, sValue, configType); }
void setConfigBool(char* key, bool value, int configType) { setConfigString(key, value ? "1" : "0", configType); }
void mql4j::config::setLogLevel(const string str) { setConfigString("logLevel", str); }
void mql4j::config::setLogfile(const string str) { setConfigString("logfile", str); }
void mql4j::config::setJavaMaxMem(const string str) { setConfigString("javaMaxMem", str); }
void mql4j::config::setHomeDir(const string str) { setConfigString("homeDir", str); }
/** *\brief set the specified section's specified key's value to the specified number value *\param cfg : the config file structure *\param section : the section name *\param key : the key name *\param value : the value of the key *\date 2008/04/03 *\return NULL if don't exist the key in specified section,or return the specified value(in char * format) */ char *setConfigInt(struct configFile *cfg, char *section, char *key, int value) { char buffer[32]; sprintf(buffer, "%d", value); return setConfigString(cfg, section, key, buffer); }