--- qsampler/trunk/src/qsamplerOptions.cpp 2004/06/09 20:24:48 119 +++ qsampler/trunk/src/qsamplerOptions.cpp 2006/09/24 12:47:51 920 @@ -1,7 +1,7 @@ // qsamplerOptions.cpp // /**************************************************************************** - Copyright (C) 2003-2004, rncbc aka Rui Nuno Capela. All rights reserved. + Copyright (C) 2004-2006, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -13,20 +13,22 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ -#include "qsamplerOptions.h" #include "qsamplerAbout.h" +#include "qsamplerOptions.h" #include -#include "lscp/client.h" +#include -#include "config.h" +#ifdef CONFIG_LIBGIG +#include +#endif //------------------------------------------------------------------------- @@ -46,15 +48,16 @@ m_settings.beginGroup("/Server"); sServerHost = m_settings.readEntry("/ServerHost", "localhost"); iServerPort = m_settings.readNumEntry("/ServerPort", 8888); - iServerTimeout = m_settings.readNumEntry("/ServerTimeout", 500); + iServerTimeout = m_settings.readNumEntry("/ServerTimeout", 1000); bServerStart = m_settings.readBoolEntry("/ServerStart", true); sServerCmdLine = m_settings.readEntry("/ServerCmdLine", "linuxsampler"); - iStartDelay = m_settings.readNumEntry("/StartDelay", 2); + iStartDelay = m_settings.readNumEntry("/StartDelay", 3); m_settings.endGroup(); // Load display options... m_settings.beginGroup("/Display"); sDisplayFont = m_settings.readEntry("/DisplayFont", QString::null); + bDisplayEffect = m_settings.readBoolEntry("/DisplayEffect", true); bAutoRefresh = m_settings.readBoolEntry("/AutoRefresh", true); iAutoRefreshTime = m_settings.readNumEntry("/AutoRefreshTime", 1000); iMaxVolume = m_settings.readNumEntry("/MaxVolume", 100); @@ -62,9 +65,11 @@ bMessagesLimit = m_settings.readBoolEntry("/MessagesLimit", true); iMessagesLimitLines = m_settings.readNumEntry("/MessagesLimitLines", 1000); bConfirmRemove = m_settings.readBoolEntry("/ConfirmRemove", true); + bKeepOnTop = m_settings.readBoolEntry("/KeepOnTop", true); bStdoutCapture = m_settings.readBoolEntry("/StdoutCapture", true); bCompletePath = m_settings.readBoolEntry("/CompletePath", true); iMaxRecentFiles = m_settings.readNumEntry("/MaxRecentFiles", 5); + bInstrumentNames = m_settings.readBoolEntry("/InstrumentNames", false); m_settings.endGroup(); // And go into view options group. @@ -91,6 +96,9 @@ m_settings.beginGroup("/Default"); sSessionDir = m_settings.readEntry("/SessionDir", QString::null); sInstrumentDir = m_settings.readEntry("/InstrumentDir", QString::null); + sEngineName = m_settings.readEntry("/EngineName", QString::null); + sAudioDriver = m_settings.readEntry("/AudioDriver", QString::null); + sMidiDriver = m_settings.readEntry("/MidiDriver", QString::null); m_settings.endGroup(); } @@ -119,6 +127,7 @@ // Save display options. m_settings.beginGroup("/Display"); m_settings.writeEntry("/DisplayFont", sDisplayFont); + m_settings.writeEntry("/DisplayEffect", bDisplayEffect); m_settings.writeEntry("/AutoRefresh", bAutoRefresh); m_settings.writeEntry("/AutoRefreshTime", iAutoRefreshTime); m_settings.writeEntry("/MaxVolume", iMaxVolume); @@ -126,9 +135,11 @@ m_settings.writeEntry("/MessagesLimit", bMessagesLimit); m_settings.writeEntry("/MessagesLimitLines", iMessagesLimitLines); m_settings.writeEntry("/ConfirmRemove", bConfirmRemove); + m_settings.writeEntry("/KeepOnTop", bKeepOnTop); m_settings.writeEntry("/StdoutCapture", bStdoutCapture); m_settings.writeEntry("/CompletePath", bCompletePath); m_settings.writeEntry("/MaxRecentFiles", iMaxRecentFiles); + m_settings.writeEntry("/InstrumentNames", bInstrumentNames); m_settings.endGroup(); // View options group. @@ -151,6 +162,9 @@ m_settings.beginGroup("/Default"); m_settings.writeEntry("/SessionDir", sSessionDir); m_settings.writeEntry("/InstrumentDir", sInstrumentDir); + m_settings.writeEntry("/EngineName", sEngineName); + m_settings.writeEntry("/AudioDriver", sAudioDriver); + m_settings.writeEntry("/MidiDriver", sMidiDriver); m_settings.endGroup(); m_settings.endGroup(); @@ -245,7 +259,10 @@ } else if (sArg == "-v" || sArg == "--version") { fprintf(stderr, "Qt: %s\n", qVersion()); - fprintf(stderr, "liblscp: %s\n", ::lscp_client_version()); +#ifdef CONFIG_LIBGIG + fprintf(stderr, "%s: %s\n", gig::libraryName().c_str(), gig::libraryVersion().c_str()); +#endif + fprintf(stderr, "%s: %s\n", ::lscp_client_package(), ::lscp_client_version()); fprintf(stderr, "qsampler: %s\n", QSAMPLER_VERSION); return false; }