Commit Graph

8 Commits

Author SHA1 Message Date
Levin Oehlmann
f742710758 Macro cleanup (#6095)
Summary:

* `NULL` -> `nullptr`
* `gui` -> Function `getGUI()`
* `pluginFactory` -> Function `getPluginFactory()`
* `assert` (redefinition) -> using `NDEBUG` instead, which standard `assert` respects.
* `powf` (C stdlib symbol clash) -> removed and all expansions replaced with calls to `std::pow`.
* `exp10` (nonstandard function symbol clash) -> removed and all expansions replaced with calls to `std::pow`.
* `PATH_DEV_DSP` -> File-scope QString of identical name and value.
* `VST_SNC_SHM_KEY_FILE` -> constexpr char* with identical name and value.
* `MM_ALLOC` and `MM_FREE` -> Functions with identical name and implementation.
* `INVAL`, `OUTVAL`, etc. for automation nodes -> Functions with identical names and implementations.
* BandLimitedWave.h: All integer constant macros replaced with constexpr ints of same name and value.
* `FAST_RAND_MAX` -> constexpr int of same name and value.
* `QSTR_TO_STDSTR` -> Function with identical name and equivalent implementation.
* `CCONST` -> constexpr function template with identical name and implementation.
* `F_OPEN_UTF8` -> Function with identical name and equivalent implementation.
* `LADSPA_PATH_SEPARATOR` -> constexpr char with identical name and value.
* `UI_CTRL_KEY` -> constexpr char* with identical name and value.
* `ALIGN_SIZE` -> Renamed to `LMMS_ALIGN_SIZE` and converted from a macro to a constexpr size_t.
* `JACK_MIDI_BUFFER_MAX` -> constexpr size_t with identical name and value.
* versioninfo.h: `PLATFORM`, `MACHINE` and `COMPILER_VERSION` -> prefixed with `LMMS_BUILDCONF_` and converted from macros to constexpr char* literals.
* Header guard _OSCILLOSCOPE -> renamed to OSCILLOSCOPE_H
* Header guard _TIME_DISPLAY_WIDGET -> renamed to TIME_DISPLAY_WIDGET_H
* C-style typecasts in DrumSynth.cpp have been replaced with `static_cast`.
* constexpr numerical constants are initialized with assignment notation instead of curly brace intializers.
* In portsmf, `Alg_seq::operator[]` will throw an exception instead of returning null if the operator index is out of range.

Additionally, in many places, global constants that were declared as `const T foo = bar;` were changed from const to constexpr, leaving them const and making them potentially evaluable at compile time.

Some macros that only appeared in single source files and were unused in those files have been removed entirely.
2021-09-30 18:01:27 +02:00
David CARLIER
dac59a5fa0 C++11 inheritance updates
Add `override` and remove `virtual` where applicable
2019-10-31 20:05:33 +01:00
Johannes Lorenz
a4b801fe1b TabWidget: Add missing size hints
This is mostly for completeness, it does not fix any known issues.
2019-07-13 22:49:10 +02:00
Johannes Lorenz
9aa997e574 Allow TabWidget to be variable sized 2019-03-16 16:38:16 +01:00
Matt Kline
68c9d227d0 Default some empty destructors
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.
2018-05-06 16:34:08 -07:00
Umcaruje
53772c052b Allow WidgetTab to use artwork tabs (@StCyr) (#3569)
* First version of artwork tabs for the InstrumentTrackWindow.

This version can only display & manage artwork tabs, which breaks
the InstrumentSoundShapingView as it still uses text tabs.

I'm planing to improve this implementation to let these artwork tabs fall back
to text mode when no artwork is given. This would solve the problem of the
InstrumentSoundShapingView.

* Second version of artwork tabs for the InstrumentTrackWindow.

This version will draw an artwork tab when the TabWidget::addTab function is given
a pixmapName. Otherwise, when pixmapName is NULL, it will fall back drawing a text
tab.

* Created artwork for the artwork tabs.

* 1st PoC for autosizeable artwork tabs.

* TabWidget is 20 pixels tall when it's going to display artwork tabs.

* Added tooltip support for the TabWidget class.

Atm, tooltips are simply tabs' name.

* Imported artworks from RebeccaDeField

* Reverted to 12px tall TabWidget

* Fine tuning for the positioning of artwork tabs: Take into account the caption 'space.

* New artwork for the ENV/LFO tab (has now an ADSR-based look)

* 1) Tabs in TabWidget class have now a "tooltip" attribute. So that they can now show
more meaningfull information then simply the tab's name.
2) Fixed the compilation problem with QT5

* Fine tuning the positioning of highlighted artwork tabs.

* Fixed an issue in TabWidget's artwork tabs autosize function that makes gdb crash
with SIGFPE.

* TabWidget is 17 pixels tall when it's going to display artwork tabs.

* Removed underscore prefix for function parameters as coding convention has changed.

(Request at dccf9f4119 (r61165005))

Cyrille

* Removed background gradient for TabWidget as LMMS is going to a more flat design.

Cyrille

* Increased the graphical TabWidget's height by 2 pixels for eye-candy.

The InstrumentTrackWindow's height has been increased by the same amount.

Cyrille

* Removed gradient in GrouBox widgets as LMMS is going for a more flattened design.

Cyrille

* Made the background of TabWidget themeable

Cyrille

* The highlighting color for a TabWidget'selected tab is now themeable.

* Made TabWidget's Title text and tab text themeable.

* Added a darker background to the TabWidget's tab bar.

* Further flatened the design of TabWidget

* Flatened the design of the GroupBox widget

* Fine tuning the placement of TabWidgets' highlighting background
+ some code cleaning in TabWidgets

* Made the TabWidget's title background and borders themeable

* TabWidget - Artwork tabs: Do not change the icon color when it is highlighted

* TabWidget: Made the artworks' color themeable

* Adapted format to follow LMMS coding conventions

* Some more blank spaces to tabs translation to comply with LMMS coding standards.

* Some more blank spaces to tabs translation to comply with LMMS coding standards.

* Revert "TabWidget: Made the artworks' color themeable"

This reverts commit 5b162c07e2.

Conflicts:
	src/gui/widgets/TabWidget.cpp

Reason: Artwork's color themeability had the side-effect that it removed the artworks' alpha
channel, thus making them ugly.

* Made GroupBox's background color themeable

* Update background color, only use one set of images

* Use name as tooltip, more descriptive names

* Update icons and colors

* more things

* formatting fixes

* Remove update() from constructor
2017-05-31 16:19:58 +02:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
Lukas W
1bbf7455a4 Rename a lot… 2014-11-26 10:09:49 +01:00