Implement a unified export system for extracting data from parsed files: ExportManager (singleton): - Centralized export handling for all content types - Content type detection (image, audio, video, text, binary) - Batch export support with progress tracking Format-specific export dialogs: - ImageExportDialog: PNG, JPEG, BMP, TGA with quality options - AudioExportDialog: WAV, MP3, OGG with FFmpeg integration - BinaryExportDialog: Raw data export with optional decompression - BatchExportDialog: Recursive export with filtering options - Base ExportDialog class for common functionality Settings additions: - FFmpeg path configuration with auto-detection - Search common install locations and PATH Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
83 lines
1.9 KiB
C++
83 lines
1.9 KiB
C++
#ifndef AUDIOEXPORTDIALOG_H
|
|
#define AUDIOEXPORTDIALOG_H
|
|
|
|
#include "exportdialog.h"
|
|
|
|
class QSlider;
|
|
class QSpinBox;
|
|
class QComboBox;
|
|
class QStackedWidget;
|
|
|
|
/**
|
|
* @brief Export dialog for audio with waveform preview and format-specific options.
|
|
*
|
|
* Shows a waveform visualization and provides bitrate/quality settings
|
|
* for different output formats (WAV, MP3, OGG, FLAC).
|
|
*/
|
|
class AudioExportDialog : public ExportDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit AudioExportDialog(QWidget *parent = nullptr);
|
|
|
|
// Audio-specific settings
|
|
int mp3Bitrate() const;
|
|
int oggQuality() const; // -1 to 10
|
|
int flacCompression() const; // 0-8
|
|
|
|
protected:
|
|
void setupPreview() override;
|
|
void updatePreview() override;
|
|
QStringList supportedFormats() const override;
|
|
void onFormatChanged(const QString& format) override;
|
|
|
|
private slots:
|
|
void onBitrateChanged(int index);
|
|
void onOggQualityChanged(int value);
|
|
void onFlacCompressionChanged(int value);
|
|
|
|
private:
|
|
void parseWavInfo();
|
|
void drawWaveform();
|
|
void showOptionsForFormat(const QString& format);
|
|
|
|
// Waveform display
|
|
QLabel* mWaveformLabel;
|
|
QPixmap mWaveformPixmap;
|
|
|
|
// Audio info
|
|
QLabel* mDurationLabel;
|
|
QLabel* mSampleRateLabel;
|
|
QLabel* mChannelsLabel;
|
|
QLabel* mBitDepthLabel;
|
|
|
|
// Parsed audio info
|
|
int mSampleRate;
|
|
int mChannels;
|
|
int mBitsPerSample;
|
|
double mDuration;
|
|
|
|
// Format-specific option widgets
|
|
QStackedWidget* mOptionsStack;
|
|
|
|
// WAV options (none)
|
|
QWidget* mWavOptionsWidget;
|
|
|
|
// MP3 options
|
|
QWidget* mMp3OptionsWidget;
|
|
QComboBox* mBitrateCombo;
|
|
|
|
// OGG options
|
|
QWidget* mOggOptionsWidget;
|
|
QSlider* mOggQualitySlider;
|
|
QSpinBox* mOggQualitySpinBox;
|
|
|
|
// FLAC options
|
|
QWidget* mFlacOptionsWidget;
|
|
QSlider* mFlacCompressionSlider;
|
|
QSpinBox* mFlacCompressionSpinBox;
|
|
};
|
|
|
|
#endif // AUDIOEXPORTDIALOG_H
|