Now it compiles without readSizeEntry/readRectEntry/readIntEntry/readUnsignedIntEntry
[kdeaccessibility.git] / ksayit / Freeverb_plugin / freeverbsetupimpl.cpp
blob1505bcf2239150d01195084e3ad77bdc57bd94bf
1 /***************************************************************************
2 freeverbsetupimpl.cpp - description
3 -------------------
4 begin : Son Nov 2 2003
5 copyright : (C) 2003 by Robert Vogl
6 email : voglrobe@saphir
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 #include <iostream>
19 using namespace std;
21 // QT includes
22 #include <qslider.h>
23 #include <qlcdnumber.h>
25 // KDE includes
26 #include <kdebug.h>
28 // App specific includes
29 #include "freeverbsetupimpl.h"
31 FreeverbSetupImpl::FreeverbSetupImpl(QWidget *parent, const char *name, bool modal, KConfig *config )
32 : Freeverb_Setup(parent,name,modal), m_config(config) {
34 // initialize Widgets
35 Init();
38 FreeverbSetupImpl::~FreeverbSetupImpl(){
42 void FreeverbSetupImpl::sliderRoomChanged(int value)
44 LCD_room->display( 99-value );
48 void FreeverbSetupImpl::sliderDampChanged(int value)
50 LCD_damp->display( 99-value );
54 void FreeverbSetupImpl::sliderWetChanged(int value)
56 LCD_wet->display( 99-value );
60 void FreeverbSetupImpl::sliderDryChanged(int value)
62 LCD_dry->display( 99-value );
66 void FreeverbSetupImpl::sliderWidthChanged(int value)
68 LCD_width->display( 99-value );
72 void FreeverbSetupImpl::saveWasClicked()
74 kdDebug(100200) << "FreeverbSetupImpl::saveWasClicked()" << endl;
75 // Save freeverb configuration
76 m_config->setGroup("Synth_FREEVERB");
77 m_config->writeEntry( "room", LCD_room->intValue() );
78 m_config->writeEntry( "damp", LCD_damp->intValue() );
79 m_config->writeEntry( "wet", LCD_wet->intValue() );
80 m_config->writeEntry( "dry", LCD_dry->intValue() );
81 m_config->writeEntry( "width", LCD_width->intValue() );
82 m_config->sync();
85 void FreeverbSetupImpl::Init()
87 // Read freeverb configuration
88 m_config->setGroup("Synth_FREEVERB");
89 LCD_room->display( m_config->readEntry("room", 50) );
90 slider_room->setValue( 99-LCD_room->intValue() );
92 LCD_damp->display( m_config->readEntry("damp", 50) );
93 slider_damp->setValue( 99-LCD_damp->intValue() );
95 LCD_wet->display( m_config->readEntry("wet", 50) );
96 slider_wet->setValue( 99-LCD_wet->intValue() );
98 LCD_dry->display( m_config->readEntry("dry", 50) );
99 slider_dry->setValue( 99-LCD_dry->intValue() );
101 LCD_width->display( m_config->readEntry("width", 50) );
102 slider_width->setValue( 99-LCD_width->intValue() );
106 void FreeverbSetupImpl::slotOKwasClicked()
108 // save configuration
109 saveWasClicked();
110 // simply close the dialog
111 this->accept();
116 #include "freeverbsetupimpl.moc"