not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / khotkeys / libkhotkeysprivate / soundrecorder.cpp
blob925120690e237113205d335f936bd42cea8b9603
1 /***************************************************************************
2 * Copyright (C) 2005 by Olivier Goffart *
3 * ogoffart@kde.org *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
21 #include "soundrecorder.h"
23 #include <kdebug.h>
24 #include <klocale.h>
25 #include <QtCore/QTimer>
26 #include <klibloader.h>
28 #include "khotkeysglobal.h"
30 namespace KHotKeys
33 SoundRecorder::create_ptr SoundRecorder::create_fun = NULL;
35 bool SoundRecorder::init( KLibrary* lib )
37 #ifdef HAVE_ARTS
38 if( create_fun == NULL && lib != NULL )
39 create_fun = (create_ptr) lib->symbol( "khotkeys_soundrecorder_create" );
40 #endif
41 // kDebug() << "soundrecorder:" << create_fun << ":" << lib;
42 return create_fun != NULL;
45 SoundRecorder* SoundRecorder::create( QObject* parent )
47 #ifdef HAVE_ARTS
48 if( create_fun != NULL )
49 return create_fun( parent, name );
50 #endif
51 return new SoundRecorder( parent );
54 SoundRecorder::SoundRecorder(QObject *parent) : QObject(parent) {}
56 SoundRecorder::~SoundRecorder()
60 void SoundRecorder::start()
64 void SoundRecorder::stop()
68 void SoundRecorder::abort()
73 Sound SoundRecorder::sound()
75 Sound s;
76 return s;
81 #include "soundrecorder.moc"