Commit Graph

70 Commits

Author SHA1 Message Date
Levin Oehlmann
773310384b clang-tidy: Apply modernize-redundant-void-arg everywhere (#6446) 2022-06-23 21:27:23 +02:00
Levin Oehlmann
5904b249c0 clang-tidy: Apply modernize-use-override everywhere (#6439)
... to mark overriding functions `override` instead of `virtual`.
2022-06-19 23:03:55 +02:00
Levin Oehlmann
7227c89847 Namespace lmms (#6174)
This PR places all LMMS symbols into namespaces to eliminate any potential future name collisions between LMMS and third-party modules.

Also, this PR changes back `LmmsCore` to `Engine`, reverting c519921306 .

Co-authored-by: allejok96 <allejok96@gmail.com>
2022-06-19 20:08:46 +02:00
Alex
33b44ec9c7 Disable tooltips through event filter (#6192)
* Control tooltip visibility using an event filter

...removing the need for a ToolTip helper class

* Remove whitespace
2022-04-15 14:04:52 +02:00
Johannes Lorenz
7db3fa94a1 Improve includes (#6320)
* Update ringbuffer submodule to fix includes

* Remove cyclic includes

* Remove Qt include prefixes

* Include C++ versions of C headers

E.g.: assert.h -> cassert

* Move CLIP_BORDER_WIDTH into ClipView

This allows to remove includes to TrackView.h in ClipView cpp files.

* Elliminate useless includes

This improves the include structure by elliminating includes that are
not used. Most of this was done by using `include-what-you-use` with
`CMAKE_C_INCLUDE_WHAT_YOU_USE` and `CMAKE_CXX_INCLUDE_WHAT_YOU_USE`
set to (broken down here):

```
include-what-you-use;
    -Xiwyu;--mapping_file=/usr/share/include-what-you-use/qt5_11.imp;
    -Xiwyu;--keep=*/xmmintrin.h;
    -Xiwyu;--keep=*/lmmsconfig.h;
    -Xiwyu;--keep=*/weak_libjack.h;
    -Xiwyu;--keep=*/sys/*;
    -Xiwyu;--keep=*/debug.h;
    -Xiwyu;--keep=*/SDL/*;
    -Xiwyu;--keep=*/alsa/*;
    -Xiwyu;--keep=*/FL/x.h;
    -Xiwyu;--keep=*/MidiApple.h;
    -Xiwyu;--keep=*/MidiWinMM.h;
    -Xiwyu;--keep=*/AudioSoundIo.h
```

* Fixup: Remove empty #if-#ifdef pairs

* Remove LMMS_HAVE_STD(LIB|INT)_H
2022-03-02 13:30:43 +01:00
Alex
dc73911391 Rename Beat/Bassline to Pattern (#6284)
- BB* -> Pattern*
- BBTrackContainer -> PatternStore
- BBTrackContainerView -> PatternEditor
- BBEditor -> PatternEditorWindow

Does not touch save files
2022-02-13 09:03:37 +01:00
Yashraj Shinde
bf323d2024 Rename FxMixer to Mixer (#6239)
... as decided in #6089 and #5592.

This PR replaces every occurrence of "FX" where "Mixer Channel" is meant.
2022-01-09 08:15:23 +01:00
Martin Pavelek
e07861ced3 Support for alternative tunings and keyboard mappings (#5522)
Co-authored-by: Kevin Zander <veratil@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
Co-authored-by: Martin <martin@sigma.he29.net>
2021-09-09 18:49:24 +01:00
Dat Ng
3d8b31039f Qt deprecation fix (#5619)
Qt6 TODO: Orientation check by comparing angleDelta().x() and y() won't make sense
because the direction is arbitrary in Qt 6.
2020-09-13 11:09:46 +09:00
Kumar
2da0aaa460 Enable LMMS fullscreen and... (long title, read first line of description) (#5563)
* Enable fullscreen with hotkey & hotkey to toggle maximise in internal window

* Fix an obvious blunder

* Add fullscreen menu entry

* Change Alt+F11 to Shift+F11 (fix Windows bug)

* Move F5-F10 to Ctrl+F*, fullscreen by F11 and fix Linux bug

* Remove wrongly placed "fullscreen" attribute

* Remove temporary fixes for redundant bug

* Rename maximise to maximize

* Rename maximise to maximize

* Use fullscreen icon instead of maximise icon

* Actually include the icon in the commit

* Replace .svg icon with .png 16x16 icon

* Migrate editor hotkeys to Ctrl+1-7
2020-07-11 11:30:27 +02:00
Hyunjin Song
044c88c271 Merge branch 'stable-1.2'
# Conflicts:
#	.gitmodules
#	.travis.yml
#	.travis/linux..before_install.sh
#	.travis/linux..install.sh
#	CMakeLists.txt
#	cmake/linux/package_linux.sh.in
#	cmake/modules/BuildPlugin.cmake
#	include/AutomatableModel.h
#	plugins/MidiImport/MidiImport.cpp
#	plugins/carlapatchbay/CMakeLists.txt
#	plugins/carlarack/CMakeLists.txt
#	src/core/Song.cpp
#	src/core/Track.cpp
#	src/gui/editors/SongEditor.cpp
#	tests/src/core/AutomatableModelTest.cpp
2020-04-04 12:08:55 +09:00
Johannes Lorenz
a9640c8898 Comment-out deprecated attribute
It may be valid, but fails our CI
2019-12-26 18:23:52 +01:00
Cyp
42f7e262e9 Fix scrolling direction in SongEditor due to stuck Ctrl/Shift. 2019-12-23 21:17:18 +01:00
David CARLIER
dac59a5fa0 C++11 inheritance updates
Add `override` and remove `virtual` where applicable
2019-10-31 20:05:33 +01:00
Winnie
2cdb9f2f38 Extract RecentProjectsMenu class from MainWindow (#5148)
* Extract RecentProjectsMenu class from MainWindow
* Clean up updateRecentlyOpenedProjectsMenu
* Remove m_recentlyOpenedProjectsMenu from MainWindow
2019-08-24 18:55:30 +02:00
Winnie
a863830795 Extract TemplatesMenu class from MainWindow (#5125) 2019-08-24 09:33:52 +02:00
Lukas W
966bf1c6de Use CMake GenerateExportHeader 2018-07-07 11:20:54 +02:00
Hussam al-Homsi
6d46bd473f Remove "What's This?" and update tooltips (#4128) 2018-06-06 01:50:11 +03:00
Colin Wallace
a3cdda04c0 Give our threads names (#4356)
* Give our threads names

It helps with debugging.

* Use Q_OBJECT macro to automatically name threads.

By default, QThread sets its name based on the Qt meta class. To get an
accurate metaclass, the class which inherits QThread must declare
Q_OBJECT in its header. Futhermore, Qt's MOC requires that a Qt type be
the primary base class when declaring Q_OBJECT, hence the order of
base classes has been rearranged for some classes.
2018-05-24 18:01:51 -07:00
Michael Gregorius
9acff89ad3 Remove Song's dependency to MainWindow
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.
2017-12-26 00:33:11 +01:00
Michael Gregorius
b79999a6bf Move some window title updates from Song into MainWindow
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.
2017-12-26 00:33:11 +01:00
Michael Gregorius
07caf85bf5 Remove GUI related code from Song::stop
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.
2017-12-26 00:33:11 +01:00
Michael Gregorius
7fa62266a9 Move showing of save result dialog out of Song
Move the showing of save result dialogs, e.g. "The project XYZ is now
saved.", from the class Song into the class MainWindow.

Implementation details:
Add three new methods guiSaveProject, guiSaveProjectAs and
handleSaveResult to MainWindow. The first two correspond to the methods
with the same name in Song which don't do anything GUI related anymore.
The GUI related actions are instead implemented in the two new methods
in MainWindow. The method handleSaveResult shows the dialogs for
successful and failed saves, updates the list of recent files and the
title bar of the main window.

This commit also fixes a problem in Song::guiSaveProject where a failed
saved without a GUI would still have returned true, i.e. success.
2017-12-26 00:33:11 +01:00
Michael Gregorius
6a716ef985 Move import functionality from Song to MainWindow
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.
2017-12-26 00:33:11 +01:00
Michael Gregorius
78d65ccc3a Move song export and track export from Song into MainWindow
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.
2017-12-26 00:33:11 +01:00
Michael Gregorius
989db1dc9b 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.
2017-12-26 00:33:11 +01:00
Dominic Clark
9407e84ffa Stop some autosave crashes (#3841) 2017-10-01 22:01:38 +02:00
DomClark
fe98a9aa43 Fix some VST deadlocks/hangs 2017-09-08 23:14:52 +02:00
Oskar Wallgren
2e841e4917 Fixes to recover file system (#3722)
Don't auto-save while playing by default. On weaker machines (xp?) we
see glitches so better turn this on after need.

Remove the last of Limited Sessin which was removed in 290556e.
2017-07-30 11:43:48 +02:00
Steffen Baranowsky
fc6d844a92 saves the correct subwindow size when it is hidden (#3589)
* saves the correct subwindow size when it is hidden

* remove invisible size from saveWidgetState()
2017-06-13 12:31:21 +02:00
Oskar Wallgren
290556e43d Remove Limited Session 2017-05-13 14:58:14 +02:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
Oskar Wallgren
cfb2c7201f Auto save timer setting 2016-03-02 07:25:19 +01:00
Oskar Wallgren
9e8020719c Recovery file fixes 2016-01-19 14:04:08 +01:00
Michael Gregorius
7881e0315d Fixes the storage of the windows state for invisible windows
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.
2015-09-17 17:48:37 +02:00
Michael Gregorius
5b2e77b444 Improved metronome (on/off during song, pattern and bb playback)
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().
2015-08-29 15:04:41 +02:00
Michael Gregorius
bc1a416cd1 Added an option to save a project as the default template
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.
2015-08-16 16:18:38 +02:00
Colin Wallace
be564efb1e Add missing EXPORT directives for new SubWindow class 2015-06-15 23:41:08 +00:00
Colin Wallace
908591ba7d Have MainWindow and others make use of the new SubWindow class 2015-06-15 03:32:25 +00:00
Tres Finocchiaro
6428c7a9c8 Merge pull request #1915 from Wallacoloo/master
Provide status messages on splash screen when loading (#1696)
2015-04-27 18:40:36 +00:00
Colin Wallace
035f48fb1d Grey out edit->undo/redo actions if there's nothing left to undo/redo 2015-04-25 22:15:12 +00:00
Colin Wallace
44c42d9d38 Provide status messages on splash screen when loading (#1696) 2015-04-02 08:23:14 +00:00
Christopher L. Simons
95c7d72a90 Added 'bool stopPlayback' parameter to MainWindow::mayChangeProject() to preserve old behavior outside of 'Open project dialog' case; fixes #1384 2015-03-10 07:41:13 -04:00
Raine M. Ekman
96882f44d5 Added view menu
To be reviewed and reverted if undesired.

Based on https://sourceforge.net/p/lmms/patches/38/

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2015-02-17 23:37:44 +01:00
Amadeus Folego
edebf5d7da Refactor loading song errors notification 2015-01-13 00:18:36 -02:00
Lukas W
56055b36b0 Merge branch 'master' into ed_refac
Conflicts:
	src/gui/editors/PianoRoll.cpp
2015-01-11 13:25:55 +01:00
Daniel Winzen
4a55e1c46a Performance and other fixes 2015-01-09 20:17:07 +01:00
Amadeus Folego
d20e83e2f7 Fix exporting class for windows build 2015-01-09 04:27:18 -02:00
Lukas W
1ee93409d1 Move Engine' GUI code to new GuiApplication class 2014-12-17 23:25:55 +01:00
Christopher L. Simons
ca973b9369 Upon toggling off a window, now attempting to focus SongEditor, then any other visible editors, or finally the parent window if all editors are hidden. 2014-12-06 03:46:41 -05:00