#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