Commit Graph

28 Commits

Author SHA1 Message Date
regulus79
ce17c95636 Add Continuous Auto-Scrolling (#7396)
* Initial Commit

* Refactor code and add new icons

* Fix logical error

* Add smooth scrolling to Song Editor

* Remove unused variable

* Fix scrolling speed and scrollbar width

* Remove QDebug and re-add a newline I deleted in an unrelated file

* Forgot to add files to commit

* Remove unused variable

* Fix Styling

* Fix Styling Again

* Fix Styling Again

* Fix Styling Again

* Add icons for classic theme

* Accidentally committed varying scroll speed with zoom -- removing

* Change abs to std::abs

Co-authored-by: saker <sakertooth@gmail.com>

* Change qMax to std::max and use static_cast

Co-authored-by: saker <sakertooth@gmail.com>

* Simplify stepped auto scrolling

Co-authored-by: saker <sakertooth@gmail.com>

* Remove unnecessary parentheses

* Remove return statement causing the play head line to stop

* Add specific tooltips to auto scrolling button states

* Remove `== true` from SongEditor.cpp

Co-authored-by: saker <sakertooth@gmail.com>

* Make tooltips translatable

Co-authored-by: Dominic Clark <mrdomclark@gmail.com>

* Fix zooming position calculation

* Rename bars to ticks

* Fix rubberband rect size

---------

Co-authored-by: saker <sakertooth@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
2024-08-04 10:30:42 +02:00
Spekular
4eba656bd3 New loop marker shortcuts, attempt 2 (#6382)
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
2023-12-25 16:26:35 +00:00
Dominic Clark
f3d3a1421e Split TimeLineWidget into core and GUI parts (#7004) 2023-12-16 14:19:36 +00:00
saker
aa050ae0b7 Fix memory leaks (#6879)
* 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
2023-11-19 00:44:15 -05:00
Dominic Clark
f10277715f Classier enums (#6760) 2023-08-24 19:16:02 +01:00
dev
192119621f Save Piano Roll behaviour at stop state 2023-02-18 10:23:06 -06:00
Dalton Messmer
2c6d88f799 Add GUARD_H closing comments 2023-01-05 17:58:49 -05:00
Dalton Messmer
fe6df8dbaf Add namespace prefix to include guards 2023-01-02 19:51:32 -05: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
Spekular
b4317edd43 Make loop markers snap to same increments as clips (#6313)
* Make loop markers snap to same increments as clips

* Fix snap size when loop points meet

* Switch to signal-slot based communication for proportional snap changes

* Move end if user clicks at exact center of loop

* Changes from reviews

* More detailed comment

* Properly handle zero length loop when ctrl is held

* More compact selection of action, m_loopPos ordering

* More robust sort
2022-04-18 17:25:15 +02:00
Alexandre Almeida
55d361fb65 Rename TCO and related to Clip (#6226)
This PR renames

    TCO -> Clip
    Pattern -> MidiClip
    *TCO and *TCOView -> *Clip and *ClipView

The savefiles are not yet modified by this PR.
2022-01-14 05:45:21 +01:00
Alexandre Almeida
6e081265ba Rename MidiTime to TimePos (#5684)
Fixes #4866
2020-11-29 19:46:13 +01:00
Kevin Zander
ef961e53de Refactor PianoRoll (#5253)
* Rework PianoRoll paintEvent + some extras
* Split out PositionLine class to own file
* Refactor PianoRoll Q_PROPERTYs
* Reduce code by using Q_PROPERTY's MEMBER function and removing getter/setter functions
  After looking at the getters and setters, they did nothing different than what direct
  access would allow. Nothing outside of PianoRoll used the public functions as well.
  Considering these factors we can reduce the number of functions by 2x the number of
  Q_PROPERTIES, and go with direct access instead.
* Remove need for keyboard pixmaps
  With the recent change to allow zooming vertically, aligning pixmaps is a PITA. Since
  we have themes which can take brushes and colors, it would be simpler to take a solid
  color or a gradient with some extra style properties to resize the keys and text colors.
  While it will slightly be a downgrade from pixmaps since they can be anything really,
  this will allow us to customize the piano roll further moving forward.
* Added the ability to update margins for TimeLineWidget and StepRecorderWidget
  These take a X coordinate, which was hardcoded to WHITE_KEY_WIDTH, and never looked
  back. Now we can adjust on the fly if we need to. Currently this just allows us to
  shift the left margin to the style-defined white key width.
* Fix phantom pixmaps when PianoRoll not focused
* Update PositionLine class changes related to #5543
2020-08-09 18:01:35 -05:00
Kumar
86306042f5 Set default behaviour of playhead to << instead of |<< (#5591)
* Set default behaviour, correct spelling

* Set default behaviour, correct spelling

* Store stop behaviour in project

* Change how state is saved & loaded

* Change to use enum
2020-07-24 09:03:25 +02:00
David CARLIER
dac59a5fa0 C++11 inheritance updates
Add `override` and remove `virtual` where applicable
2019-10-31 20:05:33 +01:00
Alexandre Almeida
53e6b645c8 Use "bar" instead of "tact"
Closes #4865
2019-10-31 15:13:25 +01:00
Hyunjin Song
57de274fe8 Fix time display (#3711)
Make Bar:Beat:Tick / Min:Sec:Msec agree with playhead
2017-11-14 23:42:26 -05:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
BaraMGB
43a77a0219 Let sample tracks play from any song position (#3133)
* play sampletracks from any song position

* take care of TCO length

* TCOs shouldn't be updated when SE window is resized

* take care of zooming level

* takes care on all song position changes and mute/solo tracks now

* playes the sample only within the buffer limits

* takes care of time signature changes

* some minor code improvements (zapashcanon)

* loopback one tick earlier

* minor code changes

* get rid off clicks by resize and scrolling song editor

* removes playhandle by remove TCO

* minor bugs on manipulating TCOs in Song Editor

* update on add sample by playing

* white spaces 1
2017-01-05 22:31:52 +01:00
Michael Gregorius
ec95ef1ba9 Implements #2635: Draws a transparent rectangle in the loop area (plus CSS exposure) (#2657)
* Draws a transparent rectangle in the loop area (plus CSS exposure)

The color for the rectangle can be defined in the style CSS for the
active and inactive case. The following properties of the TimeLineWidget
are exposed through the CSS:
- The color of the lines that are drawn for each bar
- The color of the bar numbers
- The font size (given in pt)
- The minimum and the maximum height of the widget (given in em so that it scales with the font size). Set both to the same value to set a fixed size.
- The background of the widget
- A loop color: The color for the main rectangle's pen
- A loop brush: The brush used to fill the main rectangle
- An inner loop color: The color used for the pen that draws the inner border.
- loopRectangleVerticalPadding: specifies the padding used for the loop indicator rectangle.

The bar numbers are drawn conditionally like the bar lines. The
numbers are drawn with a constant distance to the tact line. This gives
a more consistent picture at different zoom levels and also fixes the
broken look at very small zoom sizes like for example 12.5%.

The bar numbers are drawn with hinting so that they show up less blurry on low DPI displays.

Remove the pixmaps that have been used up to now to draw the loop
boundaries.

Removes the unused "TimeLine" from style.css.

Document the style sheet properties for the loop indicator rectangle.
2016-06-12 18:13:23 +02:00
Michael Gregorius
fa5c0c1569 Fixes the rendering of the tact numbers in the timeline
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.
2015-07-30 22:32:38 +02:00
Jonas Trappenberg
76ffbd6528 Merge branch 'master' into coding
Conflicts:
	include/Plugin.h
	src/core/Note.cpp
	src/core/Track.cpp
2015-01-31 19:11:33 -08:00
Dave French
1cf9300f72 821 changed to use sockets/ slots 2015-01-21 11:55:30 +00:00
Alexandre
2834bd17f4 Coding conventions update 2015-01-20 00:00:58 -02:00
Alexandre Almeida
4d6d937cf2 Update Timeline.h 2015-01-19 23:18:30 -02:00
Dave French
b3d943920c proposed fix 821 Range-select in Song Editor 2015-01-18 19:16:43 +00:00
Lukas W
51f59293ce Rename Timeline to TimeLineWidget 2014-12-08 23:38:38 +01:00