-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor PianoRoll #5253
Merged
Merged
Refactor PianoRoll #5253
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
0781139
Rework paintEvent + side-effects
Veratil 327acf0
Finish final paintEvent rewrite, split out PositionLine class to own …
Veratil 7c92b83
Fix lines and shade not drawing past the key area
Veratil dc13ef3
Minor math fixup, remove unneeded subtraction
Veratil 8a1617a
Remove now unused m_oldNotesEditHeight
Veratil 57c332b
Resolve PR review suggestions
Veratil 05de81a
Refactor PianoRoll Q_PROPERTYs
Veratil 988b14d
Fix phantom pixmaps when PianoRoll not focused
Veratil 33a150d
Rebase to fix conflicts and fix note area resize bug
Veratil e91829e
Address vertical zoom bug
Veratil 5f6ddd5
Update PositionLine class changes related to #5543
Veratil b4c2545
Add new Q_PROPERTYs to classic theme
Veratil fd23ba2
Reset black piano keys to be shorter; add some comments
Veratil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* PositionLine.h - declaration of class PositionLine, a simple widget that | ||
* draws a line, mainly works with TimeLineWidget | ||
* | ||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net> | ||
* | ||
* This file is part of LMMS - https://lmms.io | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2 of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public | ||
* License along with this program (see COPYING); if not, write to the | ||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
* Boston, MA 02110-1301 USA. | ||
* | ||
*/ | ||
|
||
#ifndef POSITION_LINE_H | ||
#define POSITION_LINE_H | ||
|
||
#include <QWidget> | ||
|
||
class PositionLine : public QWidget | ||
{ | ||
Q_OBJECT | ||
Q_PROPERTY(bool tailGradient MEMBER m_hasTailGradient) | ||
Q_PROPERTY(QColor lineColor MEMBER m_lineColor) | ||
public: | ||
PositionLine(QWidget* parent); | ||
|
||
public slots: | ||
void zoomChange(double zoom); | ||
|
||
private: | ||
void paintEvent(QPaintEvent* pe) override; | ||
|
||
bool m_hasTailGradient; | ||
QColor m_lineColor; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to note these updates are purely for testing and by no means are to be considered final.