diff --git a/include/ExportProjectDialog.h b/include/ExportProjectDialog.h
index 5ac70bb8f..d7159780f 100644
--- a/include/ExportProjectDialog.h
+++ b/include/ExportProjectDialog.h
@@ -53,6 +53,8 @@ private slots:
void accept();
void startExport();
+ void onFileFormatChanged(int);
+
private:
QString m_fileName;
QString m_dirName;
diff --git a/src/gui/ExportProjectDialog.cpp b/src/gui/ExportProjectDialog.cpp
index 3f8c36abb..8c55e382f 100644
--- a/src/gui/ExportProjectDialog.cpp
+++ b/src/gui/ExportProjectDialog.cpp
@@ -171,7 +171,35 @@ void ExportProjectDialog::startExport()
}
+ProjectRenderer::ExportFileFormats convertIndexToExportFileFormat(int index)
+{
+ switch (index)
+ {
+ case 0:
+ return ProjectRenderer::WaveFile;
+ case 1:
+ return ProjectRenderer::OggFile;
+ default:
+ Q_ASSERT(false);
+ break;
+ }
+ return ProjectRenderer::NumFileFormats;
+}
+
+
+void ExportProjectDialog::onFileFormatChanged(int index)
+{
+ ProjectRenderer::ExportFileFormats exportFormat =
+ convertIndexToExportFileFormat(index);
+
+ bool bitRateControlsEnabled = exportFormat == ProjectRenderer::OggFile;
+ bool bitDepthControlEnabled = exportFormat == ProjectRenderer::WaveFile;
+
+ bitrateWidget->setVisible(bitRateControlsEnabled);
+
+ depthWidget->setVisible(bitDepthControlEnabled);
+}
void ExportProjectDialog::startBtnClicked()
{
diff --git a/src/gui/dialogs/export_project.ui b/src/gui/dialogs/export_project.ui
index 4384993af..2225a6495 100644
--- a/src/gui/dialogs/export_project.ui
+++ b/src/gui/dialogs/export_project.ui
@@ -6,8 +6,8 @@
0
0
- 519
- 412
+ 715
+ 447
@@ -80,6 +80,47 @@
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+ 0
+
+
-
+
+
+ Depth:
+
+
+
+ -
+
+
-
+
+ 16 Bit Integer
+
+
+ -
+
+ 24 Bit Float
+
+
+ -
+
+ 32 Bit Float
+
+
+
+
+
+
+
-
@@ -90,7 +131,7 @@
0
-
-
+
Bitrate:
@@ -136,67 +177,6 @@
- -
-
-
-
- 0
-
-
-
-
-
- Depth:
-
-
-
- -
-
-
-
-
- 16 Bit Integer
-
-
- -
-
- 24 Bit Float
-
-
- -
-
- 32 Bit Float
-
-
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
- QSizePolicy::Fixed
-
-
-
- 1
- 10
-
-
-
-
- -
-
-
- Please note that not all of the parameters above apply for all file formats.
-
-
- true
-
-
-
-
@@ -368,8 +348,8 @@
reject()
- 357
- 293
+ 511
+ 372
202
@@ -377,5 +357,24 @@
+
+ fileFormatCB
+ currentIndexChanged(int)
+ ExportProjectDialog
+ onFileFormatChanged(int)
+
+
+ 111
+ 85
+
+
+ 518
+ 212
+
+
+
+
+ onFileFormatChanged(int)
+