Move GUI dependencies out of Song::exportProjectMidi

Move all GUI dependencies out of Song::exportProjectMidi and move them
into the MainWindow.

Show the GUI in the new slot method MainWindow::onExportProjectMidi and
delegate to Song::exportProjectMidi once the file name has been
determined. The file name is given as a parameter to
Song::exportProjectMidi which still contains the business logic of
exporting the data.
This commit is contained in:
Michael Gregorius
2017-12-08 19:26:51 +01:00
parent 7f9d01e3b6
commit 989db1dc9b
4 changed files with 53 additions and 43 deletions

View File

@@ -175,6 +175,9 @@ public slots:
void autoSave();
private slots:
void onExportProjectMidi();
protected:
virtual void closeEvent( QCloseEvent * _ce );
virtual void focusOutEvent( QFocusEvent * _fe );

View File

@@ -298,6 +298,7 @@ public:
return m_timeSigModel;
}
void exportProjectMidi(QString const & exportFileName) const;
public slots:
void playSong();
@@ -311,7 +312,6 @@ public slots:
void importProject();
void exportProject( bool multiExport = false );
void exportProjectTracks();
void exportProjectMidi();
void startExport();
void stopExport();