|
From: Tapio V. <aa...@us...> - 2011-02-08 16:03:10
|
Module: editor
Branch: master
Commit: 56d58af45f9b6091c4c1873635b158e9ca024177
Author: Tapio Vierros <tap...@gm...>
Date: Tue Feb 8 17:47:19 2011 +0200
Small things.
---
editorapp.cc | 4 +++-
main.cc | 2 ++
notegraphwidget.cc | 8 +++++---
notegraphwidget.hh | 1 -
4 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/editorapp.cc b/editorapp.cc
index a9da936..d771260 100644
--- a/editorapp.cc
+++ b/editorapp.cc
@@ -25,7 +25,9 @@ namespace {
static const QDataStream::Version PROJECT_SAVE_FILE_STREAM_VERSION = QDataStream::Qt_4_7;
}
-EditorApp::EditorApp(QWidget *parent): QMainWindow(parent), gettingStarted(), projectFileName(), hasUnsavedChanges(), latestPath(QDir::homePath())
+EditorApp::EditorApp(QWidget *parent)
+ : QMainWindow(parent), gettingStarted(), noteGraph(), player(), audioOutput(), statusbarProgress(),
+ projectFileName(), hasUnsavedChanges(), latestPath(QDir::homePath())
{
ui.setupUi(this);
readSettings();
diff --git a/main.cc b/main.cc
index 360938d..79e7d9c 100644
--- a/main.cc
+++ b/main.cc
@@ -8,11 +8,13 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(editor);
QApplication app(argc, argv);
+ // These values are used by e.g. Phonon and QSettings
app.setApplicationName(PACKAGE);
app.setApplicationVersion(VERSION);
app.setOrganizationName("Performous Team");
app.setOrganizationDomain("performous.org");
+ // Localization
QString locale = QLocale::system().name();
QTranslator translator;
translator.load(locale);
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index 91a4225..b43607d 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -116,10 +116,12 @@ void NoteGraphWidget::analyzeMusic(QString filepath)
void NoteGraphWidget::timerEvent(QTimerEvent* event)
{
if (event->timerId() == m_playbackTimer) {
+ // Playback position update
m_playbackPos += m_playbackInterval.restart();
updateMusicPos(m_playbackPos);
} else if (event->timerId() == m_analyzeTimer && m_pitch) {
+ // PitchVis stuff
double progress, duration;
bool needUpdate, done;
{
@@ -129,7 +131,7 @@ void NoteGraphWidget::timerEvent(QTimerEvent* event)
needUpdate = m_pitch->newDataAvailable() || duration != m_duration;
done = m_pitch->isFinished();
}
- emit analyzeProgress(1000 * progress, 1000);
+ emit analyzeProgress(1000 * progress, 1000); // Update progress bar
if (needUpdate) {
m_duration = std::max(m_duration, duration);
update();
@@ -488,7 +490,7 @@ QString NoteGraphWidget::getCurrentSentence() const
if (m_notes[i]->isSelected()) lyrics += "</span>";
lyrics += " ";
}
- lyrics = lyrics.left(lyrics.size() - 1);
+ lyrics = lyrics.left(lyrics.size() - 1); // Remove trailing space
}
return lyrics;
}
@@ -507,7 +509,7 @@ QString NoteGraphWidget::getPrevSentence() const
if (i != id && m_notes[i]->note().lineBreak) break;
lyrics += m_notes[i]->lyric() + " ";
}
- lyrics = lyrics.left(lyrics.size() - 1);
+ lyrics = lyrics.left(lyrics.size() - 1); // Remove trailing space
}
return lyrics;
}
diff --git a/notegraphwidget.hh b/notegraphwidget.hh
index 3b37378..c27802e 100644
--- a/notegraphwidget.hh
+++ b/notegraphwidget.hh
@@ -133,7 +133,6 @@ private:
void finalizeNewLyrics();
void timeCurrent();
- int m_requiredWidth;
QPoint m_panHotSpot;
bool m_seeking;
bool m_actionHappened;
|