summaryrefslogtreecommitdiffstats
path: root/ksayit/Freeverb_plugin/freeverbsetupimpl.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit00bb99ac80741fc50ef8a289719373032f2391eb (patch)
tree3a5a9bf72f942784b38bf77dd66c534662fab5f2 /ksayit/Freeverb_plugin/freeverbsetupimpl.cpp
downloadtdeaccessibility-00bb99ac80741fc50ef8a289719373032f2391eb.tar.gz
tdeaccessibility-00bb99ac80741fc50ef8a289719373032f2391eb.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksayit/Freeverb_plugin/freeverbsetupimpl.cpp')
-rw-r--r--ksayit/Freeverb_plugin/freeverbsetupimpl.cpp116
1 files changed, 116 insertions, 0 deletions
diff --git a/ksayit/Freeverb_plugin/freeverbsetupimpl.cpp b/ksayit/Freeverb_plugin/freeverbsetupimpl.cpp
new file mode 100644
index 0000000..cf16c0d
--- /dev/null
+++ b/ksayit/Freeverb_plugin/freeverbsetupimpl.cpp
@@ -0,0 +1,116 @@
+/***************************************************************************
+ freeverbsetupimpl.cpp - description
+ -------------------
+ begin : Son Nov 2 2003
+ copyright : (C) 2003 by Robert Vogl
+ email : voglrobe@saphir
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <iostream>
+using namespace std;
+
+// QT includes
+#include <qslider.h>
+#include <qlcdnumber.h>
+
+// KDE includes
+#include <kdebug.h>
+
+// App specific includes
+#include "freeverbsetupimpl.h"
+
+FreeverbSetupImpl::FreeverbSetupImpl(QWidget *parent, const char *name, bool modal, KConfig *config )
+ : Freeverb_Setup(parent,name,modal), m_config(config) {
+
+ // initialize Widgets
+ Init();
+
+}
+FreeverbSetupImpl::~FreeverbSetupImpl(){
+}
+
+
+void FreeverbSetupImpl::sliderRoomChanged(int value)
+{
+ LCD_room->display( 99-value );
+}
+
+
+void FreeverbSetupImpl::sliderDampChanged(int value)
+{
+ LCD_damp->display( 99-value );
+}
+
+
+void FreeverbSetupImpl::sliderWetChanged(int value)
+{
+ LCD_wet->display( 99-value );
+}
+
+
+void FreeverbSetupImpl::sliderDryChanged(int value)
+{
+ LCD_dry->display( 99-value );
+}
+
+
+void FreeverbSetupImpl::sliderWidthChanged(int value)
+{
+ LCD_width->display( 99-value );
+}
+
+
+void FreeverbSetupImpl::saveWasClicked()
+{
+ kdDebug(100200) << "FreeverbSetupImpl::saveWasClicked()" << endl;
+ // Save freeverb configuration
+ m_config->setGroup("Synth_FREEVERB");
+ m_config->writeEntry( "room", LCD_room->intValue() );
+ m_config->writeEntry( "damp", LCD_damp->intValue() );
+ m_config->writeEntry( "wet", LCD_wet->intValue() );
+ m_config->writeEntry( "dry", LCD_dry->intValue() );
+ m_config->writeEntry( "width", LCD_width->intValue() );
+ m_config->sync();
+}
+
+void FreeverbSetupImpl::Init()
+{
+ // Read freeverb configuration
+ m_config->setGroup("Synth_FREEVERB");
+ LCD_room->display( m_config->readNumEntry("room", 50) );
+ slider_room->setValue( 99-LCD_room->intValue() );
+
+ LCD_damp->display( m_config->readNumEntry("damp", 50) );
+ slider_damp->setValue( 99-LCD_damp->intValue() );
+
+ LCD_wet->display( m_config->readNumEntry("wet", 50) );
+ slider_wet->setValue( 99-LCD_wet->intValue() );
+
+ LCD_dry->display( m_config->readNumEntry("dry", 50) );
+ slider_dry->setValue( 99-LCD_dry->intValue() );
+
+ LCD_width->display( m_config->readNumEntry("width", 50) );
+ slider_width->setValue( 99-LCD_width->intValue() );
+}
+
+
+void FreeverbSetupImpl::slotOKwasClicked()
+{
+ // save configuration
+ saveWasClicked();
+ // simply close the dialog
+ this->accept();
+}
+
+
+
+#include "freeverbsetupimpl.moc"