summaryrefslogtreecommitdiffstats
path: root/kradio3/plugins/recording/recording-configuration.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-22 18:23:26 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-22 18:23:26 +0000
commitae364d9bed0589bf1a22cd5f530c563462379e3e (patch)
treee32727e2664e7ce68d0d30270afa040320ae35a1 /kradio3/plugins/recording/recording-configuration.h
downloadtderadio-ae364d9bed0589bf1a22cd5f530c563462379e3e.tar.gz
tderadio-ae364d9bed0589bf1a22cd5f530c563462379e3e.zip
Added old KDE3 version of kradio
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kradio@1094417 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kradio3/plugins/recording/recording-configuration.h')
-rw-r--r--kradio3/plugins/recording/recording-configuration.h126
1 files changed, 126 insertions, 0 deletions
diff --git a/kradio3/plugins/recording/recording-configuration.h b/kradio3/plugins/recording/recording-configuration.h
new file mode 100644
index 0000000..bf1b8f6
--- /dev/null
+++ b/kradio3/plugins/recording/recording-configuration.h
@@ -0,0 +1,126 @@
+/***************************************************************************
+ recording-configuration.h - description
+ -------------------
+ begin : So Aug 31 2003
+ copyright : (C) 2003 by Martin Witte
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef KRADIO_RECORDING_CONFIGURATION_H
+#define KRADIO_RECORDING_CONFIGURATION_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "../../src/include/soundformat.h"
+
+#include "recording-config.h"
+#include "reccfg_interfaces.h"
+#include "recording-configuration-ui.h"
+
+#define RATE_48000_IDX 0
+#define RATE_44100_IDX 1
+#define RATE_22050_IDX 2
+#define RATE_11025_IDX 3
+
+#define CHANNELS_STEREO_IDX 0
+#define CHANNELS_MONO_IDX 1
+
+#define SIGN_SIGNED_IDX 0
+#define SIGN_UNSIGNED_IDX 1
+
+#define BITS_16_IDX 0
+#define BITS_8_IDX 1
+
+#define ENDIAN_LITTLE_IDX 0
+#define ENDIAN_BIG_IDX 1
+
+#define FORMAT_RAW_IDX 0
+#define FORMAT_WAV_IDX 1
+#define FORMAT_AIFF_IDX 2
+#define FORMAT_AU_IDX 3
+#define NEXT_IDX1 4
+
+#define FORMAT_MP3_IDX_ORG 4
+#define FORMAT_OGG_IDX_ORG 5
+
+
+#ifdef HAVE_LAME
+ #define FORMAT_MP3_IDX NEXT_IDX1
+ #define NEXT_IDX2 (NEXT_IDX1+1)
+#else
+ #define FORMAT_MP3_IDX (-1)
+ #define NEXT_IDX2 NEXT_IDX1
+#endif
+
+#ifdef HAVE_OGG
+ #define FORMAT_OGG_IDX NEXT_IDX2
+ #define NEXT_IDX3 (NEXT_IDX2+1)
+#else
+ #define FORMAT_OGG_IDX (-1)
+ #define NEXT_IDX3 NEXT_IDX2
+#endif
+
+
+
+
+
+
+class RecordingConfiguration : public RecordingConfigurationUI,
+ public IRecCfgClient
+{
+Q_OBJECT
+public :
+ RecordingConfiguration (QWidget *parent);
+ ~RecordingConfiguration ();
+
+// IRecCfgClient
+
+ bool noticeEncoderBufferChanged (size_t BufferSize, size_t BufferCount);
+ bool noticeSoundFormatChanged (const SoundFormat &sf);
+ bool noticeMP3QualityChanged (int q);
+ bool noticeOggQualityChanged (float q);
+ bool noticeRecordingDirectoryChanged(const QString &dir);
+ bool noticeOutputFormatChanged (RecordingConfig::OutputFormat of);
+ bool noticePreRecordingChanged (bool enable, int seconds);
+ bool noticeRecordingConfigChanged (const RecordingConfig &cfg);
+
+protected slots:
+
+ void slotOK();
+ void slotCancel();
+ void slotSetDirty();
+
+ void slotFormatSelectionChanged();
+
+protected:
+
+ void storeConfig();
+
+ void setGUIBuffers(const RecordingConfig &c);
+ void setGUIDirectories(const RecordingConfig &c);
+ void setGUISoundFormat(const RecordingConfig &c);
+ void setGUIOutputFormat(const RecordingConfig &c);
+ void setGUIPreRecording(const RecordingConfig &c);
+ void setGUIEncoderQuality(const RecordingConfig &c);
+
+ RecordingConfig m_RecordingConfig;
+
+ bool m_dirty;
+ bool m_ignore_gui_updates;
+};
+
+
+
+
+#endif