Until now windows/widgets that were invisible during the call to
MainWindow::saveWidgetState had their size stored as (0, 0). This
resulted in problems when the default template was created with
invisible windows because in new projects these windows then opened up
at a very small size.
This patch fixes the problem by introducing a new parameter of type
QSize to MainWindow::saveWidgetState. It can be used to communicate the
size that should be stored in case the widget that calls the method is
invisible. The code of most callers (PianoRollWindow, SongEditor, etc.)
has been updated to use good default sizes.
Puts the controls of the InstrumentTrackWindow into a grid layout to
give them a more balanced look. Without this patch the labels of the
widgets are not aligned which gives the instrument controls a rather
unbalanced look.
Added a "SAVE" label for the preset button to make the layout more
balanced.
This adds libsoundio (http://libsound.io/) as an available audio
backend. libsoundio supports JACK, PulseAudio, ALSA, CoreAudio,
WASAPI, and a dummy backend.
Remove the rendering logic from the gui code in ExportProjectDialog and let
RenderManger handle it instead.
This is part of an effort to allow the CLI and the GUI to share the same
rendering logic, setting the state for a --render-tracks CLI option similiar to
the "Export Tracks" GUI option.
Much of the multi-track rendering logic was intermixed with GUI code in
ExportProjectDialog.
This creates the RenderManager class to provide rendering logic that could be
shared between the CLI and GUI interfaces.
Currently ProjectRenderer has a helper getFileFormatFromExtension, this adds a
similar helper getFileExtensionFromFormat.
This will, for example, return "ogg" for OggFile.
The piano roll's actions have been grouped into several toolbars. There
are now five groups / tool bars: "Transport controls", "Note controls",
"Copy paste controls", "Timeline controls" and "Zoom and note controls"
(this group is a bit mixed). Each group can be turned off and on using
the standard toolbar context menu provided by Qt.
The new default layout of the toolbars saves horizontal space by putting
the "Zoom and note controls" below the other toolbars. The toolbars can
be hidden and shown via the context menu but these states are not
stored.
The "Song editor", "Beat+Bassline editor" and "Automation editor" have
been switched to using movable toolbars as well.
Adjusted the Editor class to have some other defaults for the "Transport
controls".
Added some methods to add toolbars to editors and changed the other
editors' code to use it. This way the properties of a standard editor
toolbar can be changed in a simple and central way.
Fixed the size of the timeline control buttons which are implemented as
NStateButton. Previously these had a fixed size and appeared smaller than
all other buttons. Now they behave like other ToolButton with respect to
the size. Also removed a fixed size call in ToolButton itself.
Made some adjustments to the CSS for QToolBar and QToolButton:
* Switched the QToolBar CSS to a vertical gradient and also increased
the padding to 2px on the way.
* Previously all buttons looked like they were pressed. This was fixed by
using the same linear gradient that is used for the QToolBar.
* The hover effect for QToolButtons is a bit more subtle now and looks
less intensive as when the button is pressed / checked.
* Gave the normal buttons a bit more radius.
* Adjusted the radii of the special play and stop buttons to be
symmetric so the do not look skewed.
There is a new tool button that can be used to turn the metronome on and
off. Per default the metronome is turned off. When enabled the metronome
will during on song playback, pattern playback and BB playback. During
export it is ignored.
A new icon was added as well.
The state is currently stored in the Mixer. It might make sense to put
the metronome configuration in its own class in the future. The state is
currently not stored in the file but this might be a good choice for now
until a better place is found for the metronome data.
Also removed some repeated calls to Engine::getSong() and
Engine::fxMixer().
A new option to save a project as the default template is now available
in the file menu. If the default template already exists the user is
asked whether he wants to overwrite it.
Removes the non-intuitive saving of the default template in
MainWindow::createNewProject.
Other fixed problems:
* User entries were not shown in the menu of the tool button that
creates new projects from templates. Now they are shown as well.
Other changes:
* Adds a new option "New from template" in the file menu. It shows the
same menu as the tool button.
Fixed the rendering of the tact numbers in the timeline widget. Before
this fix they were not readable because they were too big. Interestingly
in this case the fix is to use a font size in pixels (half the height of
the widget). The numbers are now also rendered a bit darker than the
lines.
Also removed the pixmap for the timeline from the code and from the
filesystem. It was only used to determine the fixed height of the widget
but not rendered. Therefore it was removed and the height is now
directly set to 18 pixels which was the height of the pixmap.
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.