|
From: Tapio V. <aa...@us...> - 2011-02-02 14:30:50
|
Module: editor
Branch: master
Commit: 0cc147ff437aa4f40a091fab799c798a1a0b0d42
Author: Tapio Vierros <tap...@gm...>
Date: Wed Feb 2 16:14:35 2011 +0200
Implement Skip syllable and Skip Sentence buttons.
---
editorapp.cc | 3 ++-
notegraphwidget.cc | 6 +++---
notegraphwidget.hh | 4 ++--
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/editorapp.cc b/editorapp.cc
index b5b3680..b84913b 100644
--- a/editorapp.cc
+++ b/editorapp.cc
@@ -42,7 +42,8 @@ EditorApp::EditorApp(QWidget *parent): QMainWindow(parent), gettingStarted(), pr
connect(noteGraph, SIGNAL(updateNoteInfo(NoteLabel*)), this, SLOT(updateNoteInfo(NoteLabel*)));
connect(ui.cmdTimeSyllable, SIGNAL(pressed()), noteGraph, SLOT(timeSyllable()));
connect(ui.cmdTimeSentence, SIGNAL(pressed()), noteGraph, SLOT(timeSentence()));
- // Duplicate/reused signals/slots
+ connect(ui.cmdSkipSyllable, SIGNAL(pressed()), noteGraph, SLOT(selectNextSyllable()));
+ connect(ui.cmdSkipSentence, SIGNAL(pressed()), noteGraph, SLOT(selectNextSentenceStart()));
connect(ui.cmdMusicFile, SIGNAL(clicked()), this, SLOT(on_actionMusicFile_triggered()));
show(); // Needed in order to get real values from width()
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index 83b1bbe..c4bf321 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -272,7 +272,7 @@ void NoteGraphWidget::timeCurrent()
void NoteGraphWidget::timeSyllable()
{
timeCurrent();
- selectNextSyllableAfterSeekHandle();
+ selectNextSyllable();
}
void NoteGraphWidget::timeSentence()
@@ -281,7 +281,7 @@ void NoteGraphWidget::timeSentence()
selectNextSentenceStart();
}
-void NoteGraphWidget::selectNextSyllableAfterSeekHandle()
+void NoteGraphWidget::selectNextSyllable()
{
bool currentFound = (m_selectedNote ? false : true);
if (m_notes.size() > 1 && m_selectedNote != m_notes.back()) {
@@ -404,7 +404,7 @@ void NoteGraphWidget::mouseDoubleClickEvent(QMouseEvent *event)
if (!child) {
// Double click empty space = seek there
seek(event->x());
- selectNextSyllableAfterSeekHandle();
+ selectNextSyllable();
return;
}
diff --git a/notegraphwidget.hh b/notegraphwidget.hh
index d076c0c..8837198 100644
--- a/notegraphwidget.hh
+++ b/notegraphwidget.hh
@@ -68,6 +68,8 @@ public:
public slots:
void timeSyllable();
void timeSentence();
+ void selectNextSyllable();
+ void selectNextSentenceStart();
signals:
void updateNoteInfo(NoteLabel*);
@@ -88,8 +90,6 @@ protected:
private:
void finalizeNewLyrics();
void timeCurrent();
- void selectNextSyllableAfterSeekHandle();
- void selectNextSentenceStart();
int m_requiredWidth;
int m_noteHalfHeight;
|