
#include <tdeapplication.h>
#include <tdecmdlineargs.h>
#include <tdeaboutdata.h>
#include <tdelocale.h>
#include <kstdaction.h>
#include <tdeactioncollection.h>
#include <kdebug.h>

#include <dbtest.h>
#include <dbtest.moc>

dBTestWidget::dBTestWidget( TQWidget* p, const char* n ) : TQWidget( p,n ), dB2VolCalc( -24,6 ) {
kdDebug() << k_funcinfo << endl;
	( void* ) KStdAction::quit( this, TQT_SLOT( close() ), new TDEActionCollection( this ) );

	for ( float i=0; i<=1; i+=0.25 )
		kdDebug() << i << " : " << amptodb( i ) << "dB" <<endl;

	for ( int i=-24; i<=0; i++ )
		kdDebug() << i <<"db : " << dbtoamp( i ) << endl;
}
dBTestWidget::~dBTestWidget() {
kdDebug() << k_funcinfo << endl;
}

int main( int argc, char* argv[] ) {

	TDEAboutData aboutData(  "dbtest", I18N_NOOP( "dBTest" ),
		"0.1", "", TDEAboutData::License_GPL,
		"(c) 2002, Arnold Krille" );
	aboutData.addAuthor( "Arnold Krille", I18N_NOOP(  "Creator" ), "arnold@arnoldarts.de");
	TDECmdLineArgs::init( argc, argv, &aboutData );

	TDEApplication app;

	dBTestWidget* w = new dBTestWidget( 0 );
	w->show();
	app.setMainWidget( w );

	return app.exec();
}
