Rewrite ColorLabel to be a child of QPushButton instead of QFrame. The reason is that QFrame doesn't implement MouseClickEvent. That led to the issues when opening the colour picker widget on mousePressEvent.
I have to move `Awl::ColorLabel` `else if` statement checks above the `QPushButton` ones, because the latter set incorrect connects for the `ColorLabel` which inherits `QPushButton` now.
Manually keep scroll position and restore on scroll range changing. The range changing always happens when we show/hide channels.
Remove redundant QScrollArea variable
Adjust volume slider processing to work correctly when dragging mouse (when dragging mouse fast up and down around one point slider went down instead of keeping slider "attached" to mouse cursor)
Moving PartEditBase into separate file. Creating new files for
building mixer.
Creating art assets/UI design for new components.
Styling the track control.
Adding track area.
Separating out score from update.
Creating instances of mixer UI.
Creating part per voice now.
Can click on tracks to select them now.
Can now switch bwtewwn tracks.
Setting patch channel now.
Setting enabled off when no track selected.
Improving slider ui.
Turning Channel into a class and adding listener to it.
Somewhat stabalized sharing track objects between interfaces.
Can now apply volume changes to both expanded and collapsed tracks.
Pan knob is now working.
Encapsulating the rest of the fields in Channel.
Mute and solo now working.
Reverb and chorus now working.
Drumkit checkbox now working. Port and channel somewhat working.
Adding support for colors per track.
Part name change now working.
Separating out MixerTrackItem
Finishing moving MixerTrackItem to new file.
Cleaning up code.
Moving PartEditBase into separate file. Creating new files for
building mixer.
Creating art assets/UI design for new components.
Styling the track control.
Adding track area.
Separating out score from update.
Creating instances of mixer UI.
Creating part per voice now.
Can click on tracks to select them now.
Can now switch bwtewwn tracks.
Setting patch channel now.
Setting enabled off when no track selected.
Improving slider ui.
Turning Channel into a class and adding listener to it.
Somewhat stabalized sharing track objects between interfaces.
Can now apply volume changes to both expanded and collapsed tracks.
Pan knob is now working.
Encapsulating the rest of the fields in Channel.
Mute and solo now working.
Reverb and chorus now working.
Drumkit checkbox now working. Port and channel somewhat working.
Adding support for colors per track.
Part name change now working.
Separating out MixerTrackItem
Finishing moving MixerTrackItem to new file.
Cleaning up code.
Setting color in collapsed mode now affects all channels.
Using shared_ptr to track MixerTrackItem. Part changes now affect
all instruments.
Creating new track UI object to handle parts.
Using shard_ptr to track MixerTrackItem objects.
setting port and channel data now.
Changing to horizontal layout.
Fixing knob display. Chaning track control appearance.
Setting init slider window size.
Switchong back to vertical orientation. Fixing a few UI bugs in
the slider.
Tracks now left aligned.
Moving details panel above mixer. Now changing track selection when
user clicks on sliders.
Pan and volume controls now reflect track color.
Showing volume and pan values in tooltips.
Creating a new slider control for mixer.
Switching Channel's volume, pan, reverb and chorus and chaning them
to doubles with a decimal range.
No longer writing out vol, pan, chor, reverb when at default values.
Nolonger writing vol, pan, chorus, reverb as controler values in
output file.
Now testing against default values on write.
More export fixes.
Manually editing test files to reflect new channel parameters.
Manually editing more test files to reflect new channel parameters.
Manually editing more test files to reflect new channel parameters.
More test changes to make Travis happy.
More test changes to make Travis happy.
Importing MusicXML now matches new volume, pan ranges.
Changing range of pan. Fixing a few bugs with calculating MIDI.
Altering test files for Travis.
fix#275313: rework-mixer-ui-2
Moving PartEditBase into separate file. Creating new files for
building mixer.
Creating art assets/UI design for new components.
Styling the track control.
Adding track area.
Separating out score from update.
Creating instances of mixer UI.
Creating part per voice now.
Can click on tracks to select them now.
Can now switch bwtewwn tracks.
Setting patch channel now.
Setting enabled off when no track selected.
Improving slider ui.
Turning Channel into a class and adding listener to it.
Somewhat stabalized sharing track objects between interfaces.
Can now apply volume changes to both expanded and collapsed tracks.
Pan knob is now working.
Encapsulating the rest of the fields in Channel.
Mute and solo now working.
Reverb and chorus now working.
Drumkit checkbox now working. Port and channel somewhat working.
Adding support for colors per track.
Part name change now working.
Separating out MixerTrackItem
Finishing moving MixerTrackItem to new file.
Cleaning up code.
Moving PartEditBase into separate file. Creating new files for
building mixer.
Creating art assets/UI design for new components.
Styling the track control.
Adding track area.
Separating out score from update.
Creating instances of mixer UI.
Creating part per voice now.
Can click on tracks to select them now.
Can now switch bwtewwn tracks.
Setting patch channel now.
Setting enabled off when no track selected.
Improving slider ui.
Turning Channel into a class and adding listener to it.
Somewhat stabalized sharing track objects between interfaces.
Can now apply volume changes to both expanded and collapsed tracks.
Pan knob is now working.
Encapsulating the rest of the fields in Channel.
Mute and solo now working.
Reverb and chorus now working.
Drumkit checkbox now working. Port and channel somewhat working.
Adding support for colors per track.
Part name change now working.
Separating out MixerTrackItem
Finishing moving MixerTrackItem to new file.
Cleaning up code.
Setting color in collapsed mode now affects all channels.
Using shared_ptr to track MixerTrackItem. Part changes now affect
all instruments.
Creating new track UI object to handle parts.
Using shard_ptr to track MixerTrackItem objects.
setting port and channel data now.
Changing to horizontal layout.
Fixing knob display. Chaning track control appearance.
Setting init slider window size.
Switchong back to vertical orientation. Fixing a few UI bugs in
the slider.
Tracks now left aligned.
Moving details panel above mixer. Now changing track selection when
user clicks on sliders.
Pan and volume controls now reflect track color.
Showing volume and pan values in tooltips.
Creating a new slider control for mixer.
Switching Channel's volume, pan, reverb and chorus and chaning them
to doubles with a decimal range.
No longer writing out vol, pan, chor, reverb when at default values.
Nolonger writing vol, pan, chorus, reverb as controler values in
output file.
Now testing against default values on write.
More export fixes.
Manually editing test files to reflect new channel parameters.
Manually editing more test files to reflect new channel parameters.
Manually editing more test files to reflect new channel parameters.
More test changes to make Travis happy.
More test changes to make Travis happy.
Importing MusicXML now matches new volume, pan ranges.
Changing range of pan. Fixing a few bugs with calculating MIDI.
Altering test files for Travis.
Restoring the volume, pan, chorus, reverb to original char data type
& range. UI now shows different 'user friendly' ranges.
Overwriting tests with versions from master.
mtest/libmscore/compat114/clef_missing_first-ref.mscx
mtest/libmscore/compat114/hor_frame_and_mmrest-ref.mscx
mtest/musicxml/io/testInstrumentChangeMIDIportExport_ref.xml
mtest/musicxml/io/testUninitializedDivisions_ref.xml
Restoring test files to original state.
Restoring test files to original state.
Restoring old values for importing files.
Restoring part methods.
mtest/importmidi/simplify_8th_dotted_no_staccato.mscx
mtest/libmscore/compat114/clef_missing_first-ref.mscx
mtest/libmscore/compat114/hor_frame_and_mmrest-ref.mscx
mtest/musicxml/io/testInstrumentChangeMIDIportExport_ref.xml
mtest/musicxml/io/testUninitializedDivisions_ref.xml
Rearranging UI components for better feel.
Improving UI. Fixed crash when changing part name.
Adding support for two lighting modes. Showing part name over
channel expansion.
Adding master gain control to mixer.
Changing color of gain slider.
Adapting to latest source in main.
Changing master gain slider to use decibel calculation.
CSS now set on tracks whenever a Paint event received.
Restoring mixer slider values to refect MIDI ranges. Fixing crash when drumkit checked.
Fixing crash when closing score.
Fixing alignment in mixer details.
Tweaking UI for better appearance.
1) fix some bugs which appear in runtime: replace QString::tostdstring() to Foo.toUtf8().constData().
2) Enable start center online community. To use it you need download webengine in your QT lib. see instruction https://musescore.org/en/handbook/developers-handbook/compilation/compile-instructions-windows-visual-studio-2017-wip
3) update install steps. Add additional dlls for webEngine. Add copying dlls and musescore.exe to /msvc.install/bin folder. Run project will work with the "$(ProjectDir)\..\..\msvc.install\bin\MuseScore.exe" specified in Debugging field in mscore project
4) Moving AppVeyor from MinGW to MSVC. Exclude ALL MSVC project from INSTALL project. Exclude ALL from PACKAGE. Remove migw-cmake in script build, add .bat instead. Remove xcopy from 7z archive step
5) Fix warning : Warning C4703 potentially uninitialized local pointer variable '' used; Warning C4456 declaration of '' hides previous local declaration; Warning C4458 declaration of '' hides class member
6) Change path to 11 version wix toolset which created .msi installer package
This commit contains changes required for MuseScore to compile under MSVC with no warnings.
MuseScore is being compiled with the /W4 setting (warning level 4), which is similar to -wall -wextra on clang. This generates lots of warnings on MSVC, mainly for non-standard constructs and for constructs which might be bugs or might lead to bugs.
Most warnings are in the following categories:
- Name hiding: a variable hides a variable with the same name on a larger scope (or a field, or a function parameter). This can easily lead to bugs, and it is a best practice to avoid hiding variable names (see recommendation ES.12 in the C++ Core Guidelines by Stroustrop & Sutter (http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-reuse : ES.12: Do not reuse names in nested scopes)
- Narrowing conversion: a numeric conversion results in loss of significant digits (for example, double -> float). The general recommendation is to use a cast to indicate this is designed behaviour.
- Unreachable code: in several instances, there is unreachable code. The unreachable code is commented out.
- (Potentially) uninitialized local variable. Just initialized the vars.
- foreach(,) -> for(:): this does not generate a warning per-se (only a few of these generate warnings due to name hiding), but changed in keeping with "MuseScore Coding Rules" (https://musescore.org/en/handbook/musescore-coding-rules#Loops), which tells explicitly "Use C++11's "for" instead of Qt's "foreach":" ... "If you happen to be fixing some code and see a "foreach", please change that loop into a "for"."
Most changes are in the categories indicated above. The next listing shows detailed changes for files which are *not* of the aforementioned types.
- all.h: Disable warning C4127 (conditional expression is constant - generated in Qt header file qvector.h)
- awl/aslider.h: unreachable code.
- awl/knob.cpp: name hiding
- awl/mslider.cpp: name hiding
- awl/slider.cpp: name hiding
- bww2mxml/parser.cpp: name hiding
- effects/compressor/compressor.cpp: narrowing conversion
- effects/zita1/zitagui.cpp: name hiding
- fluid/fluid.cpp: foreach replacement. Name hiding.
- fluid/mod.cpp: name hiding.
- fluid/sfont.cpp: foreach replacement. Name hiding. Initialize vars.
- fluid/voice.cpp: Name hiding.
- libmscore/accidental.cpp: Name hiding.
- libmscore/ambitus.cpp: Initialize vars.
- libmscore/barline.cpp: Name hiding. Unreachable code.
- libmscore/beam.cpp: Name hiding.
- libmscore/chordrest.cpp: Unreachable code.
- libmscore/scorefile.cpp: Name hiding.
- manual/genManual.cpp: Name hiding. foreach replacement.
- midi/midifile.cpp: Name hiding. Unreachable code.
- omr/importpdf.cpp: Name hiding. foreach replacement.
- omr/omr.cpp: Name hiding. foreach replacement.
- omr/omrpage.cpp: Name hiding. foreach replacement.
- omr/omrview.cpp: Name hiding. foreach replacement.
- synthesizer/event.cpp: Unreachable code.
- zerberus\channel.cpp: Narrowing conversion.
- zerberus\instrument.cpp: Name hiding.
- zerberus\sfz.cpp: Name hiding.
- zerberus\voice.h: Suppress warning C4201: "nonstandard extension used: nameless struct/union"
- zerberus\zerberus.cpp: Name hiding. Unreferenced parameter.
- zerberus\zerberusgui.cpp: Name hiding.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
Found via `codespell -i 3 -w --skip="./thirdparty,./share/locale,./fonts" -I ../musescore-whitelist.txt`
Whitelist:
```
clas
nd
ot
pres
strack
tage
te
```
Increased the QRect to cover entire meter are which is updated, to prevent a visual glitch whereby leftmost two columns of pixels weren't updated. But since since the notches aren't redrawn when synth updates level, notches have been shifted a bit and end right before the mixer redraw area so they'll no longer overlap, which prevents a visual glitch whereby the notches would flicker off when mixer was redrawn.