* Adds "Show Hidden Content Dialogue"
* Update FileBrowser.cpp
* Automatically rearrange layout to fit check boxes
* check if files are hidden in a cross platform manner
* put the hidden files checkbox below the user and factory check boxes at all times
* removed layout rearrangement code
* moved checkbox code to FileBrowser
* Removed unused include
* Cleanup in FileBrowser
Move the method `addContentCheckBox` to the other private methods.
Remove the method parameters because it can use the members.
Remove the conditional when adding the "Hidden content" checkbox because
it was always true.
---------
Co-authored-by: Michael Gregorius <michael.gregorius.git@arcor.de>
* Replace knobFModel with std::vector
* Create QPixmap's on the stack
* Assign parent for QGraphicsScene
A call to QGraphicsView::setScene does not make
the view take ownership of the scene.
* Do not allocate QList on the heap
* Use static QPixmap's
The QPixmap's need to be created within the constructor, and not outside
where they are defined, since it can't find them otherwise.
I'm not too sure why.
* Clear m_vi2->knobFModel in destructor
* Use local static QPixmap's
* Do not allocate QPixmap with new in AudioFileProcessor
* Do not allocate QPixmap with new in Nes
* Do not allocate QPixmap with new in Organic
* Do not allocate QPixmap with new in SaControlsDialog
* Do not allocate QPixmap with new in Vestige
* Do not allocate QPixmap with new for FileBrowser
* Do not allocate QPixmap with new in MixerLine
* Do not allocate QPixmap with new in SendButtonIndicator
* Do not allocate QPixmap with new in AutomationClipView
* Do not allocate QPixmap with new in MidiClipView
* Do not allocate QPixmap with new in AutomationEditor
* Do not allocate QPixmap with new in PianoRoll
* Do not allocate QPixmap with new in TimeLineWidget
* Do not allocate QPixmap with new in EnvelopeAndLfoView
* Do not allocate QPixmap with new in PianoView
* Do not allocate QPixmap with new in ComboBox
* Do not allocate QPixmap with new in Fader
* Do not allocate QPixmap with new for LcdWidget
* Do not allocate QPixmap with new for LedCheckbox
* Use m_ as prefix for members
* Use uniform initialization
I already started using uniform initialization for the QPixmap changes
for some reason, so I'm finishing that up.
* Uniform initiaization
* And then he realized he was making copies...
* Do not call QPixmap copy constructor
* Do not call QPixmap copy constructor in SaControlsDialog
* Do not make pixmap's static for Lcd's and Led's
* Initialize pixmaps in-class
* Fix few mistakes and formatting
Improves performance when searching in the file browser (confirmed with profiling using KCacheGrind), adds a search indicator at the bottom to let the user know a search is in progress, blacklists unnecessary system directories (speeding up both the search speed and potentially load times as well by reducing the number of filesystem entries to consider), and fixes an issue that causes not all of the search results to appear.
Improves the search performance of the file browser by delegating the search to a worker thread. The main thread then builds the tree and displays it to the user.
* Change the title for SideBarWidgets to be vertically centered related to icon and with no underlining
* Update src/gui/SideBarWidget.cpp
Co-authored-by: saker <sakertooth@gmail.com>
* Updating FileBrowser display when searching : showing matching files
* Correcting increment and removing duplicated calls
* Correcting reload tree when filter is activated
---------
Co-authored-by: saker <sakertooth@gmail.com>
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>
* 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
- Extract file item preview start and end into new methods `previewFileItem` and `stopPreview`.
- Add event handlers:
- `keyPressEvent` to allow auto preview (on up/down arrow navigation), manual preview (space), and send to editors (enter)
- `keyReleaseEvent` to end previews when preview key is released
- `hideEvent` to end previews when switching sidebar tab or hiding sidebar
- Functions that operate on a `FileItem` now take it as an argument instead of using a member variable
- `getContextActions` provides menu items for sending clips to the song editor and BB editor with minimal duplicate code
- Some formatting changes in affected code
- Replace many instances of `NULL` with `nullptr`
Move openContainingFolder to the end of the method block.
Adjust FileBrowserTreeWidget::contextMenuEvent to the coding conventions
and also make the code more readable by splitting up some conditions.
Add comments to clarify as to why the member m_contextMenuItem is set to
nullptr at the end of the execution of contextMenuEvent. Please note
that this implementation is not exception safe and should be changed in
the future, e.g. by passing the FileItem as a parameter of the slot.
Add functionality to open the containing folder of a file that's selected
in LMMS' file browser.
Technical details
------------------
Add a new private method openContainingFolder to FileBrowser. Add a new
action to the context menu of a selected file. This action in turn calls
the added method.
The current implementation of openContainingFolder delegates to
QDesktopServices::openUrl with the directory of the selected file. Please
note that this will only open the directory but not select the file as
this is much more complicated due to different implementations that are
needed for the different platforms (Linux/Windows/MacOS).
Using QDesktopServices::openUrl seems to be the most simple cross
platform way which uses functionality that's already available in Qt.
Moving empty destructors out of the .cpp files and into headers
allows them to be devirtualized in certain cases.
(When the compiler can't "see" a function in a header, it must largely
assume it's some black box that the linker will resolve.)
While we're at it, use C++11's `= default` to define empty virtual
desturctors for us.
For some classes (e.g., Piano), nothing is derived from it, so we can
mark the class as final and remove any explicit virtual dtor.
There are many other places where this can be done, but this is a large
enough patch as-is.
Move the search bar on top of the file browser for the following sidebar
windows:
* "My Projects"
* "My Samples"
* "My Presets"
* "My Home"
* "My Computer"
Add the greyed out text "Search" to the search text edit.
The text is only shown as long as no text is entered in the search field.
Also rename some variable names to something more meaningful. Rename the
member m_l of FileBrowser to m_fileBrowserTreeWidget. Rename the
following local variables in the constructor of FileBrowser:
* ops -> searchWidget
* opl -> searchWidgetLayout