Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • seelook/nootka
  • lucas-marques/nootka
2 results
Show changes
Commits on Source (3)
......@@ -80,7 +80,6 @@ TipRect {
bold: true
pixelSize: NOO.factor() * 1.6
}
}
Text {
......@@ -92,9 +91,7 @@ TipRect {
font {
pixelSize: NOO.factor() * 0.8
}
}
}
Rectangle {
......@@ -148,16 +145,12 @@ TipRect {
position: 0
color: "transparent"
}
GradientStop {
position: 0.5
color: activPal.base
}
}
}
}
TspinBox {
......@@ -246,9 +239,7 @@ TipRect {
font {
pixelSize: NOO.factor() * 0.9
}
}
}
// line tip column
......@@ -267,12 +258,9 @@ TipRect {
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
}
}
}
// tipItem
}
MouseArea {
......@@ -285,7 +273,7 @@ TipRect {
hoverEnabled: true
onEntered: chartItem.tipEntered()
onExited: overArea.visible = true
onPressed: {
onPressed: mouse => {
startPosY = mouseY;
if (tipCol.childAt(mouse.x, mouse.y) !== scoreRow)
attemptSpin.pressed(mapToItem(attemptSpin, mouse.x, mouse.y));
......@@ -298,7 +286,7 @@ TipRect {
startPosY = mouseY;
}
}
onReleased: {
onReleased: mouse => {
if (tipCol.childAt(mouse.x, mouse.y) === scoreRow) {
if (tipItem.moreMelody && !tipItem.prevShown) {
tipItem.showMelodyPreview();
......
......@@ -364,14 +364,14 @@ void TlinChartDelegate::setProgressHoverred(bool ph)
void TlinChartDelegate::hoverEnterEvent(QHoverEvent *e)
{
if ((e->posF().y() > m_prevAverY && e->posF().y() < m_thisAverY) || (e->posF().y() < m_prevAverY && e->posF().y() > m_thisAverY))
if ((e->position().y() > m_prevAverY && e->position().y() < m_thisAverY) || (e->position().y() < m_prevAverY && e->position().y() > m_thisAverY))
setProgressHoverred(true);
}
void TlinChartDelegate::hoverMoveEvent(QHoverEvent *e)
{
if (m_prevAverY) {
if ((e->posF().y() > m_prevAverY && e->posF().y() < m_thisAverY) || (e->posF().y() < m_prevAverY && e->posF().y() > m_thisAverY))
if ((e->position().y() > m_prevAverY && e->position().y() < m_thisAverY) || (e->position().y() < m_prevAverY && e->position().y() > m_thisAverY))
setProgressHoverred(true);
else
setProgressHoverred(false);
......
......@@ -397,7 +397,7 @@ bool Texam::loadFromXml(QXmlStreamReader &xml)
} else if (xml.name() == QLatin1String("black")) {
m_blackNumbers.clear();
while (xml.readNextStartElement()) {
if (xml.name() == "n")
if (xml.name() == QLatin1String("n"))
m_blackNumbers << xml.readElementText().toInt();
else
Tlevel::skipCurrentXmlKey(xml);
......
......@@ -321,7 +321,7 @@ Tlevel::EerrorType Tlevel::loadFromXml(QXmlStreamReader &xml)
while (xml.readNextStartElement()) {
if (xml.name() == QLatin1String("melodyLength"))
melodyLen = qBound(1, QVariant(xml.readElementText()).toInt(), 100);
else if (xml.name() == ("endsOnTonic"))
else if (xml.name() == QLatin1String("endsOnTonic"))
endsOnTonic = QVariant(xml.readElementText()).toBool();
else if (xml.name() == QLatin1String("requireInTempo"))
requireInTempo = QVariant(xml.readElementText()).toBool();
......
......@@ -422,7 +422,7 @@ void TguitarBg::pressedAt(qreal px, qreal py)
{
paintFingerAtPoint(QPointF(px, py).toPoint());
// skip press point set - not used in that event handler
auto me = new QMouseEvent(QEvent::MouseButtonPress, QPointF(), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
auto me = new QMouseEvent(QEvent::MouseButtonPress, QPointF(), QPointF(), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
mouseReleaseEvent(me);
}
......@@ -494,7 +494,7 @@ void TguitarBg::hoverMoveEvent(QHoverEvent *event)
if (!active())
hoverEnterEvent(nullptr);
paintFingerAtPoint(event->pos());
paintFingerAtPoint(event->position().toPoint());
}
void TguitarBg::mousePressEvent(QMouseEvent *event)
......
......@@ -69,13 +69,13 @@ void TaddNoteItem::setScoreObject(TscoreObject *sc)
void TaddNoteItem::hoverEnterEvent(QHoverEvent *event)
{
if (event->pos().y() > 1.0) {
if (event->position().y() > 1.0) {
m_hideTimer->stop();
m_active = true;
m_hovered = true;
int yy = qFloor(event->pos().y());
int yy = qFloor(event->position().y());
if (yy != static_cast<int>(m_yPos)) {
m_yPos = m_scoreObject->clefType() == Tclef::NoClef ? m_scoreObject->upperLine() + 7.0 : qFloor(event->pos().y());
m_yPos = m_scoreObject->clefType() == Tclef::NoClef ? m_scoreObject->upperLine() + 7.0 : qFloor(event->position().y());
emit activeChanged();
emit yPosChanged();
}
......@@ -90,7 +90,7 @@ void TaddNoteItem::hoverLeaveEvent(QHoverEvent *)
void TaddNoteItem::hoverMoveEvent(QHoverEvent *event)
{
int yy = qFloor(event->pos().y());
int yy = qFloor(event->position().y());
if (yy > 1 && yy != static_cast<int>(m_yPos)) {
if (!m_active) { // sometimes hover enter seems to be omitted - fix that then
m_active = true;
......
......@@ -149,11 +149,11 @@ void TnoteItem::setColor(const QColor &c)
m_alter->setProperty("color", c);
m_flag->setProperty("color", c);
m_stem->setProperty("color", c);
for (auto line : qAsConst(m_upLines))
for (auto line : std::as_const(m_upLines))
line->setProperty("color", c);
for (auto line : qAsConst(m_loLines))
for (auto line : std::as_const(m_loLines))
line->setProperty("color", c);
for (auto line : qAsConst(m_underLoLines))
for (auto line : std::as_const(m_underLoLines))
line->setProperty("color", c);
if (m_tie)
m_tie->setProperty("color", c);
......@@ -696,7 +696,7 @@ void TnoteItem::keySignatureChanged()
void TnoteItem::hoverEnterEvent(QHoverEvent *event)
{
if (!m_staff->score()->readOnly() && (m_staff->score()->singleNote() || m_staff->score()->editMode())) {
if (event->pos().y() > 2.0 && event->pos().y() < height()) {
if (event->position().y() > 2.0 && event->position().y() < height()) {
m_measure->score()->setHoveredNote(this);
m_measure->score()->changeActiveNote(this);
}
......@@ -722,10 +722,10 @@ void TnoteItem::hoverMoveEvent(QHoverEvent *event)
m_measure->score()->changeActiveNote(this);
}
if (event->pos().y() > 2.0 && event->pos().y() < height()) {
if (event->position().y() > 2.0 && event->position().y() < height()) {
if (!m_measure->score()->pressedNote() && m_measure->score()->hoveredNote()
&& static_cast<int>(m_measure->score()->activeYpos()) != static_cast<int>(event->pos().y()))
m_measure->score()->setActiveNotePos(qFloor(event->pos().y()));
&& static_cast<int>(m_measure->score()->activeYpos()) != static_cast<int>(event->position().y()))
m_measure->score()->setActiveNotePos(qFloor(event->position().y()));
}
}
}
......
......@@ -82,7 +82,7 @@ void TnotePair::approve()
int TnotePair::pairsDuration(const QList<TnotePair *> &pairs)
{
int dur = 0;
for (TnotePair *np : qAsConst(pairs))
for (TnotePair *np : std::as_const(pairs))
dur += np->note()->duration();
return dur;
}
......