* Song: add isSavingProject.
* VersionedSaveDialog: Add support for a custom option dialog.
* AutomatableModel: Support the discardMIDIConnections save option.
* InstrumentTrack: Support the discardMIDIConnections save option.
* SaveOptions: Show the save option dialog on "save as".
Changed according to feedback from AudioBlast. The flag used to be set most of the time, now it is only set when playback starts/stops, looping is toggled, or playback jumps around.
Finally remove Song's dependency to MainWindow by moving the window
title update which is triggered due to a changed project file name from
the class Song into MainWindow.
Implementation details:
Add a new signal projectFileNameChanged to Song and connect the new slot
method MainWindow::onProjectFileNameChanged to it. Update the window
title whenever the slot is triggered.
Add a new private method Song::setProjectFileName which sets the project
file name and emits the signal (only if the file name really changes).
Call setProjectFileName everywhere where m_fileName was manipulated
directly. This is done to ensure that the signal can be potentially
emitted in all relevant situations.
Remove the calls to gui->mainWindow from
Song::createNewProjectFromTemplate.
These changes finally remove the include to "MainWindow.h". The include
for "ConfigManager.h" was previously done implicitly through the include
of "MainWindow.h" and therefore had to be added explicitly after the
latter is removed.
Move the window title updates which are triggered due to a changed
modify state from Song to MainWindow.
Implementation details:
Add a new signal modified to Song and connect the new slot method
MainWindow::onSongModified to it.
Currently only the window title is updated in the slot. It is only
updated if the code is executed from the GUI main thread. This
implementation was taken over from the original implementation of
Song::setModified. The assumption here seems to be that the Song might
also be set as modified from other threads (which is a bad design).
Add a new private method Song::setModified(bool) and replace all direct
manipulations of m_modified in Song by calls to this method. This is done
to ensure that the signal can be emitted in all these cases. Make
Song::setModified() delegates to Song::setModified(bool) for the same
reason.
Other changes:
Slightly refactor MainWindow::resetWindowTitle to get rid of an
unnecessary if statement.
Add the new signal Song::stopped which is emitted when the song is
stopped. Connect the new slot method MainWindow::onSongStopped to that
signal. Remove all GUI updates from Song::stop and handle them in
MainWindow::onSongStopped.
Move the functionality of the method Song::importProject into the
MainWindow as it mainly consists of GUI related actions.
Add a new method Song::setLoadOnLauch to ensure that the boolean
Song::m_loadOnLaunch is still set at the end of the import.
The code to export a song and the tracks of a song mainly consisted of
GUI code. Therefore it was moved completely into MainWindow.
Add two new slots and a method that does the actual work to MainWindow.
Make both slots delegate to the worker method.
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.
Default project when cancelling project loading
If a user isn't aware that the loading of a project has been
cancelled, it may be in an incomplete state. Saving such a project
will overwrite the original file and result in data loss. This is
solved by loading the default project on cancelling project loading.
Add Mixer::clearNewPlayHandles() to prevent crash when cancelling
loading of a single streamed instrument.
Make the member Song::m_errors a static member to prevent memory leaks.
The member was allocated dynamically when an instance of a Song was
created but was not deleted in the destructor.
Add a method to convert a MidiTime instance to milliseconds. Also add a
static method to MidiTime that computes the time in milliseconds for a
given number of ticks and a tempo.
Remove the method that sets the milliseconds explicitly from Song.
Replace it by a method that takes a MidiTime instance and one method
that takes an amount of ticks.
Remove several explicit time calculations from the implementation of
Song and TimeLineWidget. Instead use the new methods.
* play sampletracks from any song position
* take care of TCO length
* TCOs shouldn't be updated when SE window is resized
* take care of zooming level
* takes care on all song position changes and mute/solo tracks now
* playes the sample only within the buffer limits
* takes care of time signature changes
* some minor code improvements (zapashcanon)
* loopback one tick earlier
* minor code changes
* get rid off clicks by resize and scrolling song editor
* removes playhandle by remove TCO
* minor bugs on manipulating TCOs in Song Editor
* update on add sample by playing
* white spaces 1
ControllerRackView now uses a layout to organize the ControllerViews.
The ControllerViews in turn use layouts to organize their widgets
(labels and push button). ControllerView now inherits from QFrame
instead of QWidget. The (static) background image for controllers was
deleted because the ControllerView can now be resized dynamically.
Song: Added specific signals for added and removed controllers. Also
removed a TODO by putting the functionality to remove all controllers in
a method (removeAllControllers).
Deleted Controllers now don't unregister from Song during deletion. This
has to be done by the client (Hollywood principle - "Don't call us, we
call you.").
TODO: For some strange reason I cannot programmatically resize the
controller rack to make it fit the controllers on my screen.