Skip to content
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

Cue context menu for scrolling waveform #2783

Merged
merged 22 commits into from
May 16, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
883b97c
wwaveformviewer: add context menu to scrolling waveform
hacksdump May 12, 2020
10ce4c4
wwaveformviewer: limit to cue markers on screen
hacksdump May 12, 2020
e129710
wwaveformviewer: handle menu close
hacksdump May 12, 2020
c16cfc1
wwaveformviewer: add menu to vertical orientation
hacksdump May 12, 2020
bc63cbe
wwaveformrendermark: remove unnecessary state variable
hacksdump May 12, 2020
097917b
wwaveformviewer: enable mouse tracking
hacksdump May 13, 2020
db10daa
wwaveformviewer: stop unnecessary bending after menu close
hacksdump May 13, 2020
dff5c2b
wwaveformviewer: detect right click in mark line vicinity
hacksdump May 13, 2020
26b812a
waveformwidgetrenderer: remove std::optional wrapping
hacksdump May 13, 2020
3643057
wcuemenupopup: override closeEvent as protected
hacksdump May 13, 2020
5f5f7bf
remove redundant inlines
hacksdump May 13, 2020
ad10431
remove redundant menu open state variable
hacksdump May 13, 2020
99aa12e
wwaveformviewer: highlight hovered mark
hacksdump May 13, 2020
58c88a6
wwaveformviewer: disable cue menu when playing
hacksdump May 13, 2020
e1f1329
use functor syntax for connect calls
hacksdump May 13, 2020
2918486
waveformrendermark: cleaner rectangle initialisation
hacksdump May 13, 2020
68ae87f
waveformmark: add function to detect point in mark
hacksdump May 15, 2020
2538208
rename variables and change comments
hacksdump May 15, 2020
dd617cf
wwaveformviewer: limit cue menu to hotcues
hacksdump May 15, 2020
afe1282
wwaveformviewer: fix scons build
hacksdump May 15, 2020
c8e7506
convert to const methods
hacksdump May 15, 2020
3deebd9
resolve merge conflict
hacksdump May 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/widget/woverview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,11 @@ void WOverview::mousePressEvent(QMouseEvent* e) {
}
if (pHoveredCue != nullptr) {
m_pCueMenuPopup->setTrackAndCue(m_pCurrentTrack, pHoveredCue);
m_pCueMenuPopup->popup(e->globalPos());
QPoint cueMenuTopLeft = mixxx::widgethelper::mapPopupToScreen(
windowHandle()->screen()->size(),
e->globalPos(),
m_pCueMenuPopup->size());
m_pCueMenuPopup->popup(cueMenuTopLeft);
}
}
}
Expand Down
22 changes: 14 additions & 8 deletions src/widget/wwaveformviewer.cpp
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
#include <QtDebug>
#include "widget/wwaveformviewer.h"

#include <QDomNode>
#include <QEvent>
#include <QDragEnterEvent>
#include <QUrl>
#include <QPainter>
#include <QEvent>
#include <QMimeData>
#include <QPainter>
#include <QUrl>
#include <QtDebug>

#include "control/controlobject.h"
#include "control/controlproxy.h"
#include "track/track.h"
#include "waveform/widgets/waveformwidgetabstract.h"
#include "widget/wwaveformviewer.h"
#include "waveform/waveformwidgetfactory.h"
#include "util/dnd.h"
#include "util/math.h"
#include "util/widgethelper.h"
#include "waveform/waveformwidgetfactory.h"
#include "waveform/widgets/waveformwidgetabstract.h"

WWaveformViewer::WWaveformViewer(const char* group, UserSettingsPointer pConfig, QWidget* parent)
: WWidget(parent),
Expand Down Expand Up @@ -83,7 +85,11 @@ void WWaveformViewer::mousePressEvent(QMouseEvent* event) {
auto cueAtClickPos = getCuePointerFromCueMark(m_pHoveredMark);
if (cueAtClickPos) {
m_pCueMenuPopup->setTrackAndCue(currentTrack, cueAtClickPos);
m_pCueMenuPopup->popup(event->globalPos());
QPoint cueMenuTopLeft = mixxx::widgethelper::mapPopupToScreen(
windowHandle()->screen()->size(),
event->globalPos(),
m_pCueMenuPopup->size());
m_pCueMenuPopup->popup(cueMenuTopLeft);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to bother going back and changing this commit, but for the future please make merge commits the bare minimum required to resolve conflicts and get it to build and run, then add new changes in following commits.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got that. Shouldn't have combined it into the merge resolution commit. Will keep that in mind.

}
} else {
// If we are scratching then disable and reset because the two shouldn't
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.