1 /***************************************************************************
2 freeverbsetupimpl.cpp - description
5 copyright : (C) 2003 by Robert Vogl
6 email : voglrobe@saphir
7 ***************************************************************************/
9 /***************************************************************************
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. *
16 ***************************************************************************/
23 #include <qlcdnumber.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
) {
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() );
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
110 // simply close the dialog
116 #include "freeverbsetupimpl.moc"