You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(25) |
Jul
(288) |
Aug
(119) |
Sep
(31) |
Oct
(59) |
Nov
(458) |
Dec
(359) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(268) |
Feb
(26) |
Mar
(36) |
Apr
(48) |
May
(119) |
Jun
(37) |
Jul
(173) |
Aug
(429) |
Sep
(137) |
Oct
(156) |
Nov
(59) |
Dec
(45) |
| 2011 |
Jan
(398) |
Feb
(257) |
Mar
(49) |
Apr
(5) |
May
(34) |
Jun
(11) |
Jul
(38) |
Aug
(12) |
Sep
(1) |
Oct
(49) |
Nov
(5) |
Dec
(10) |
| 2012 |
Jan
(21) |
Feb
(32) |
Mar
(20) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(173) |
Aug
|
Sep
(25) |
Oct
(6) |
Nov
(44) |
Dec
|
|
From: Tapio V. <aa...@us...> - 2011-01-12 13:35:21
|
Module: editor
Branch: master
Commit: 89c18d1c8c845539690a682c32b8eb113cdcd58e
Author: Tapio Vierros <tap...@gm...>
Date: Wed Jan 12 15:34:13 2011 +0200
Fix note splitting.
---
notegraphwidget.cc | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index dd837d0..e94f743 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -1,5 +1,6 @@
#include <QtGui>
#include <iostream>
+#include <algorithm>
#include <cmath>
#include "notelabel.hh"
#include "notegraphwidget.hh"
@@ -199,7 +200,17 @@ void NoteGraphWidget::mousePressEvent(QMouseEvent *event)
// Create new labels
NoteLabel *newLabel1 = new NoteLabel(Note(firstst.toStdString()), this, child->pos(), QSize(w1, 0));
- new NoteLabel(Note(secondst.toStdString()), this, newLabel1->pos() + QPoint(newLabel1->width(), 0), QSize(child->width() - w1, 0));
+ NoteLabel *newLabel2 = new NoteLabel(Note(secondst.toStdString()), this, newLabel1->pos() + QPoint(newLabel1->width(), 0), QSize(child->width() - w1, 0));
+ // Insert them to the list removing the old one
+ NoteLabels::iterator it = std::find(m_notes.begin(), m_notes.end(), child);
+ if (it != m_notes.end()) {
+ m_notes.insert(it, newLabel1);
+ m_notes.insert(it, newLabel2);
+ m_notes.erase(it);
+ } else {
+ m_notes.push_back(newLabel1);
+ m_notes.push_back(newLabel2);
+ }
// Delete the old one
child->close();
|
|
From: Tapio V. <aa...@us...> - 2011-01-12 13:35:19
|
Module: editor
Branch: master
Commit: 4dd6c33839d9c1410891f43b58480af0613a3742
Author: Tapio Vierros <tap...@gm...>
Date: Wed Jan 12 14:46:24 2011 +0200
Changing lyric text no longer resizes the label.
---
notegraphwidget.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index 04169c6..dd837d0 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -240,7 +240,7 @@ void NoteGraphWidget::mouseDoubleClickEvent(QMouseEvent *event)
child->lyric(), &ok);
if (ok && !text.isEmpty()) {
child->setLyric(text);
- child->createPixmap();
+ child->createPixmap(child->size());
}
}
|
|
From: Tapio V. <aa...@us...> - 2011-01-12 13:35:17
|
Module: editor
Branch: master
Commit: 51551acce869c1dcd313db79cfcd23c9bb9c2f80
Author: Tapio Vierros <tap...@gm...>
Date: Wed Jan 12 14:45:03 2011 +0200
Remove broken mouse wheel resize.
---
notegraphwidget.cc | 14 +-------------
1 files changed, 1 insertions(+), 13 deletions(-)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index 6b392d6..04169c6 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -224,17 +224,7 @@ void NoteGraphWidget::mouseReleaseEvent(QMouseEvent *event)
void NoteGraphWidget::wheelEvent(QWheelEvent *event)
{
- NoteLabel *child = qobject_cast<NoteLabel*>(childAt(event->pos()));
- if (!child)
- return;
-
- // Figure out new size and apply it
- int neww = child->size().width() + event->delta() * 0.1;
- child->resize(neww, child->size().height());
-
- updateNotes();
-
- event->accept();
+ event->ignore();
}
void NoteGraphWidget::mouseDoubleClickEvent(QMouseEvent *event)
@@ -252,8 +242,6 @@ void NoteGraphWidget::mouseDoubleClickEvent(QMouseEvent *event)
child->setLyric(text);
child->createPixmap();
}
-
- event->accept();
}
void NoteGraphWidget::mouseMoveEvent(QMouseEvent *event)
|
|
From: Tapio V. <aa...@us...> - 2011-01-12 13:35:14
|
Module: editor
Branch: master
Commit: 5f47789242791666e92bd4610328ea7f19d46db7
Author: Tapio Vierros <tap...@gm...>
Date: Wed Jan 12 14:41:00 2011 +0200
Use some doubles to make big amounts of lyrics behave better.
---
notegraphwidget.cc | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index 0cec21b..6b392d6 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -138,9 +138,9 @@ void NoteGraphWidget::updateNotes()
} else {
// Calculate position and size
- int w = gap.width() / float(gap.notes.size()) * 0.9;
- int step = (gap.width() - w * gap.notes.size()) / float(gap.notes.size() + 1);
- int x = gap.begin + step;
+ double w = gap.width() / double(gap.notes.size()) * 0.9;
+ double step = (gap.width() - w * gap.notes.size()) / double(gap.notes.size() + 1);
+ double x = gap.begin + step;
for (NoteLabels::iterator it2 = gap.notes.begin(); it2 != gap.notes.end(); ++it2) {
(*it2)->move(x, (*it2)->y());
(*it2)->resize(w, (*it2)->height());
|
|
From: Tapio V. <aa...@us...> - 2011-01-12 13:35:12
|
Module: editor
Branch: master
Commit: 98dbded63b6879cfbca374f610053ac2f372ac7d
Author: Tapio Vierros <tap...@gm...>
Date: Wed Jan 12 14:38:07 2011 +0200
Hack the initial dummy lyrics visible.
---
notegraphwidget.cc | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index 8ddd97e..0cec21b 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -27,6 +27,13 @@ NoteGraphWidget::NoteGraphWidget(QWidget *parent)
setFocusPolicy(Qt::StrongFocus);
setWhatsThis(tr("Note graph that displays the song notes and allows you to manipulate them."));
setLyrics(tr("Please add music file and lyrics text."));
+
+ // We want the initial text to be completely visible on screen
+ // FIXME: This should be handled with more robustness and elegance
+ m_notes.back()->move(600, m_notes.back()->y());
+ updateNotes();
+
+ // Signal the UI to update itself
emit updateNoteInfo(NULL);
}
|
|
From: Tapio V. <aa...@us...> - 2011-01-12 13:35:09
|
Module: editor
Branch: master
Commit: b0bd2cd414e489a6b06d6264703b28bdbf10b8db
Author: Tapio Vierros <tap...@gm...>
Date: Wed Jan 12 14:30:06 2011 +0200
NoteGraphWidget is now spawned outside of ui generator.
This allows greater control over the widget in constructor
and also makes it easy to delete&reconstruct.
---
editor.ui | 31 +++----------------------------
editorapp.cc | 25 +++++++++++++++----------
editorapp.hh | 2 ++
notegraphwidget.cc | 3 ++-
4 files changed, 22 insertions(+), 39 deletions(-)
diff --git a/editor.ui b/editor.ui
index 9fe5094..52f041d 100644
--- a/editor.ui
+++ b/editor.ui
@@ -20,7 +20,7 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <widget class="QScrollArea" name="scrollArea">
+ <widget class="QScrollArea" name="noteGraphScroller">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -30,7 +30,7 @@
<property name="widgetResizable">
<bool>true</bool>
</property>
- <widget class="QWidget" name="scrollAreaWidgetContents">
+ <widget class="QWidget" name="noteGraphScrollerContents">
<property name="geometry">
<rect>
<x>0</x>
@@ -39,24 +39,7 @@
<height>227</height>
</rect>
</property>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="0" column="0">
- <widget class="NoteGraphWidget" name="noteGraph" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- </layout>
+ <layout class="QGridLayout" name="gridLayout_2"/>
</widget>
</widget>
<widget class="QFrame" name="frame">
@@ -460,14 +443,6 @@
</property>
</action>
</widget>
- <customwidgets>
- <customwidget>
- <class>NoteGraphWidget</class>
- <extends>QWidget</extends>
- <header>notegraphwidget.hh</header>
- <container>1</container>
- </customwidget>
- </customwidgets>
<resources/>
<connections/>
</ui>
diff --git a/editorapp.cc b/editorapp.cc
index bd4c393..bcdc9d1 100644
--- a/editorapp.cc
+++ b/editorapp.cc
@@ -1,18 +1,23 @@
-#include <QtGui>
+#include <QtGui>
#include <cstdlib>
#include "editorapp.hh"
#include "notelabel.hh"
+#include "notegraphwidget.hh"
EditorApp::EditorApp(QWidget *parent): QMainWindow(parent)
{
ui.setupUi(this);
+
+ noteGraph = new NoteGraphWidget(NULL);
+ ui.noteGraphScroller->setWidget(noteGraph);
+
// Splitter sizes cannot be set through designer :(
QList<int> ss; ss.push_back(700); ss.push_back(300); // Proportions, not pixels
ui.splitter->setSizes(ss);
// Custom signals/slots
- connect(ui.noteGraph, SIGNAL(updateNoteInfo(NoteLabel*)), this, SLOT(updateNoteInfo(NoteLabel*)));
+ connect(noteGraph, SIGNAL(updateNoteInfo(NoteLabel*)), this, SLOT(updateNoteInfo(NoteLabel*)));
updateNoteInfo(NULL);
// Some icons to menus to make them prettier
@@ -63,11 +68,11 @@ void EditorApp::on_actionNew_triggered()
case QMessageBox::Yes:
// TODO: Save
case QMessageBox::No:
- ui.noteGraph->clear(); break;
+ noteGraph->clear(); break;
default: break;
}
} else {
- ui.noteGraph->clear();
+ noteGraph->clear();
}
}
@@ -139,7 +144,7 @@ void EditorApp::on_actionLyricsFromFile_triggered()
}
if (text != "")
- ui.noteGraph->setLyrics(text);
+ noteGraph->setLyrics(text);
}
}
@@ -154,7 +159,7 @@ void EditorApp::on_actionLyricsFromClipboard_triggered()
tr("Pasting lyrics from clipboard will replace the existing ones. Continue?"),
QMessageBox::Ok | QMessageBox::Cancel);
if (b == QMessageBox::Ok) {
- ui.noteGraph->setLyrics(text);
+ noteGraph->setLyrics(text);
}
} else {
QMessageBox::warning(this, tr("No text to paste"), tr("No suitable data on the clipboard."));
@@ -176,12 +181,12 @@ void EditorApp::on_actionAbout_triggered()
void EditorApp::on_cmbNoteType_currentIndexChanged(int index)
{
- if (ui.noteGraph->selectedNote())
- ui.noteGraph->selectedNote()->setType(index);
+ if (noteGraph->selectedNote())
+ noteGraph->selectedNote()->setType(index);
}
void EditorApp::on_chkFloating_stateChanged(int state)
{
- if (ui.noteGraph->selectedNote())
- ui.noteGraph->selectedNote()->setFloating(state != 0);
+ if (noteGraph->selectedNote())
+ noteGraph->selectedNote()->setFloating(state != 0);
}
diff --git a/editorapp.hh b/editorapp.hh
index 6e357f8..eaa9fa2 100644
--- a/editorapp.hh
+++ b/editorapp.hh
@@ -3,6 +3,7 @@
#include "ui_editor.h"
class NoteLabel;
+class NoteGraphWidget;
class EditorApp: public QMainWindow
{
@@ -36,4 +37,5 @@ public slots:
private:
Ui::EditorApp ui;
+ NoteGraphWidget* noteGraph;
};
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index ff06eb7..8ddd97e 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -21,7 +21,8 @@ NoteGraphWidget::NoteGraphWidget(QWidget *parent)
}
setPixmap(QPixmap::fromImage(image));
- setFixedWidth(std::max(width, (unsigned)1024)); // FIXME: Width should come from song length * pixPerSec
+ // FIXME: Width should come from song length * pixPerSec
+ setFixedSize(std::max(width, (unsigned)1024), height);
setFocusPolicy(Qt::StrongFocus);
setWhatsThis(tr("Note graph that displays the song notes and allows you to manipulate them."));
|
|
From: Tapio V. <aa...@us...> - 2011-01-12 13:35:06
|
Module: editor
Branch: master
Commit: 9974df1d72e0e6e7e8711660f3134ef30fa65f32
Author: Tapio Vierros <tap...@gm...>
Date: Wed Jan 12 14:04:42 2011 +0200
No more constantly regenerating NoteLabel list.
---
notegraphwidget.cc | 65 ++++++++++++++++------------------------------------
notegraphwidget.hh | 4 +-
2 files changed, 22 insertions(+), 47 deletions(-)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index 04492f7..ff06eb7 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -21,6 +21,8 @@ NoteGraphWidget::NoteGraphWidget(QWidget *parent)
}
setPixmap(QPixmap::fromImage(image));
+ setFixedWidth(std::max(width, (unsigned)1024)); // FIXME: Width should come from song length * pixPerSec
+
setFocusPolicy(Qt::StrongFocus);
setWhatsThis(tr("Note graph that displays the song notes and allows you to manipulate them."));
setLyrics(tr("Please add music file and lyrics text."));
@@ -57,57 +59,42 @@ void NoteGraphWidget::clear()
void NoteGraphWidget::setLyrics(QString lyrics)
{
QTextStream ts(&lyrics, QIODevice::ReadOnly);
- const int gap = 10;
- int x = gap, y = 2 * noteYStep;
clear();
- NoteLabel *first = NULL, *last = NULL;
while (!ts.atEnd()) {
QString word;
ts >> word;
- if (!word.isEmpty()) {
- NoteLabel *wordLabel = new NoteLabel(Note(word.toStdString()), this, QPoint(x, y));
- last = wordLabel;
- x += wordLabel->width() + gap;
- if (!first) first = wordLabel;
- }
+ if (!word.isEmpty())
+ m_notes.push_back(new NoteLabel(Note(word.toStdString()), this, QPoint(0, 2 * noteYStep)));
}
- // Set first and last to non-floating
- if (first) first->setFloating(false);
- if (last) last->setFloating(false);
-
- rebuildNoteList();
- m_requiredWidth = x + gap;
- updateWidth();
+ finalizeNewLyrics();
}
void NoteGraphWidget::setLyrics(const Notes ¬es)
{
- const int gap = 10;
- int x = gap, y = 2 * noteYStep;
-
clear();
- NoteLabel *first = NULL, *last = NULL;
for (Notes::const_iterator it = notes.begin(); it != notes.end(); ++it) {
- NoteLabel *label = new NoteLabel(*it, this, QPoint(x, y));
- last = label;
- x += label->width() + gap;
- if (!first) first = label;
+ m_notes.push_back(new NoteLabel(*it, this, QPoint(0, 2 * noteYStep)));
}
- // Set first and last to non-floating
- if (first) first->setFloating(false);
- if (last) last->setFloating(false);
-
- rebuildNoteList();
- m_requiredWidth = x + gap;
- updateWidth();
+ finalizeNewLyrics();
}
-void NoteGraphWidget::updateWidth()
+void NoteGraphWidget::finalizeNewLyrics()
{
- setFixedWidth(m_requiredWidth);
+ // Set first and last to non-floating and put the last one to the end of the song
+ if (m_notes.size() > 0) {
+ m_notes.front()->setFloating(false);
+ if (m_notes.size() > 1) {
+ m_notes.back()->setFloating(false);
+ m_notes.back()->move(width() - m_notes.back()->width(), m_notes.back()->y());
+ }
+ // Make sure there is enough room
+ setFixedWidth(std::max<int>(width(), m_notes.size() * NoteLabel::min_width + m_notes.front()->width() * 2));
+ }
+ // Calculate floating note positions
+ updateNotes();
}
void NoteGraphWidget::updateNotes()
@@ -115,7 +102,6 @@ void NoteGraphWidget::updateNotes()
// Here happens the magic that adjusts the floating
// notes according to the fixed ones.
FloatingGap gap(0);
- rebuildNoteList();
// Determine gaps between non-floating notes
for (NoteLabels::iterator it = m_notes.begin(); it != m_notes.end(); ++it) {
@@ -160,17 +146,6 @@ void NoteGraphWidget::updateNotes()
}
}
-void NoteGraphWidget::rebuildNoteList()
-{
- m_notes.clear();
- const QObjectList &childlist = children();
- for (QObjectList::const_iterator it = childlist.begin(); it != childlist.end(); ++it) {
- NoteLabel *child = qobject_cast<NoteLabel*>(*it);
- if (child) m_notes.push_back(child);
- }
- m_notes.sort(cmpNoteLabelPtr);
-}
-
void NoteGraphWidget::mousePressEvent(QMouseEvent *event)
{
NoteLabel *child = qobject_cast<NoteLabel*>(childAt(event->pos()));
diff --git a/notegraphwidget.hh b/notegraphwidget.hh
index ed34310..f9bc4c7 100644
--- a/notegraphwidget.hh
+++ b/notegraphwidget.hh
@@ -21,9 +21,7 @@ public:
void clear();
void setLyrics(QString lyrics);
void setLyrics(const Notes ¬es);
- void updateWidth();
void updateNotes();
- void rebuildNoteList();
void selectNote(NoteLabel* note);
NoteLabel* selectedNote() const { return m_selectedNote; }
@@ -40,6 +38,8 @@ protected:
void keyPressEvent(QKeyEvent *event);
private:
+ void finalizeNewLyrics();
+
int m_requiredWidth;
QPoint m_panHotSpot;
NoteLabel* m_selectedNote;
|
|
From: Tapio V. <aa...@us...> - 2011-01-12 13:35:01
|
Module: editor
Branch: master
Commit: e7c137cfa5f5d74ce51a4d2487aae778691eb6fa
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 11 22:08:41 2011 +0200
Use qobject_cast<> with widgets.
---
CMakeLists.txt | 2 +-
notegraphwidget.cc | 12 ++++++------
notelabel.cc | 2 +-
notelabel.hh | 2 ++
4 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b5c77c4..af65e1a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,7 @@ find_package(Qt4 REQUIRED) # find and setup Qt4 for this project
include(${QT_USE_FILE})
# Headers that need MOC need to be defined separately
-file(GLOB MOC_HEADER_FILES "editorapp.hh" "notegraphwidget.hh")
+file(GLOB MOC_HEADER_FILES "editorapp.hh" "notelabel.hh" "notegraphwidget.hh")
file(GLOB SOURCE_FILES "*.cc")
file(GLOB HEADER_FILES "*.hh")
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index 3e05b09..04492f7 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -48,7 +48,7 @@ void NoteGraphWidget::clear()
// Clear NoteLabels
const QObjectList &childlist = children();
for (QObjectList::const_iterator it = childlist.begin(); it != childlist.end(); ++it) {
- NoteLabel *child = dynamic_cast<NoteLabel*>(*it);
+ NoteLabel *child = qobject_cast<NoteLabel*>(*it);
if (child) child->close();
}
m_notes.clear();
@@ -165,7 +165,7 @@ void NoteGraphWidget::rebuildNoteList()
m_notes.clear();
const QObjectList &childlist = children();
for (QObjectList::const_iterator it = childlist.begin(); it != childlist.end(); ++it) {
- NoteLabel *child = dynamic_cast<NoteLabel*>(*it);
+ NoteLabel *child = qobject_cast<NoteLabel*>(*it);
if (child) m_notes.push_back(child);
}
m_notes.sort(cmpNoteLabelPtr);
@@ -173,7 +173,7 @@ void NoteGraphWidget::rebuildNoteList()
void NoteGraphWidget::mousePressEvent(QMouseEvent *event)
{
- NoteLabel *child = static_cast<NoteLabel*>(childAt(event->pos()));
+ NoteLabel *child = qobject_cast<NoteLabel*>(childAt(event->pos()));
if (!child) {
// Left click empty area = pan
if (event->button() == Qt::LeftButton)
@@ -241,7 +241,7 @@ void NoteGraphWidget::mouseReleaseEvent(QMouseEvent *event)
void NoteGraphWidget::wheelEvent(QWheelEvent *event)
{
- NoteLabel *child = static_cast<NoteLabel*>(childAt(event->pos()));
+ NoteLabel *child = qobject_cast<NoteLabel*>(childAt(event->pos()));
if (!child)
return;
@@ -256,7 +256,7 @@ void NoteGraphWidget::wheelEvent(QWheelEvent *event)
void NoteGraphWidget::mouseDoubleClickEvent(QMouseEvent *event)
{
- NoteLabel *child = static_cast<NoteLabel*>(childAt(event->pos()));
+ NoteLabel *child = qobject_cast<NoteLabel*>(childAt(event->pos()));
if (!child)
return;
@@ -280,7 +280,7 @@ void NoteGraphWidget::mouseMoveEvent(QMouseEvent *event)
setCursor(QCursor(Qt::ClosedHandCursor));
QScrollArea *scrollArea = NULL;
if (parentWidget() && parentWidget()->parent())
- scrollArea = dynamic_cast<QScrollArea*>(parentWidget()->parent()->parent());
+ scrollArea = qobject_cast<QScrollArea*>(parentWidget()->parent()->parent());
if (scrollArea) {
QPoint diff = event->pos() - m_panHotSpot;
QScrollBar *scrollHor = scrollArea->horizontalScrollBar();
diff --git a/notelabel.cc b/notelabel.cc
index 6eb46d8..359751f 100644
--- a/notelabel.cc
+++ b/notelabel.cc
@@ -91,7 +91,7 @@ void NoteLabel::mouseMoveEvent(QMouseEvent *event)
{
QToolTip::showText(event->globalPos(), toolTip(), this);
- NoteGraphWidget* ngw = dynamic_cast<NoteGraphWidget*>(parent());
+ NoteGraphWidget* ngw = qobject_cast<NoteGraphWidget*>(parent());
if (m_resizing != 0) {
// Resizing
if (m_resizing < 0)
diff --git a/notelabel.hh b/notelabel.hh
index 44c7eac..b36e0d0 100644
--- a/notelabel.hh
+++ b/notelabel.hh
@@ -5,6 +5,8 @@
class NoteLabel: public QLabel
{
+ Q_OBJECT
+
public:
static const int resize_margin;
static const int min_width;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-12 00:45:14
|
Module: editor
Branch: master
Commit: 7e30ad7bced6759fae67395a50f5599321e0b8ed
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Jan 12 01:28:50 2011 +0100
Visualize tones too, change visual style
---
pitch.cc | 1 -
pitchvis.cc | 41 ++++++++++++++++++++++++++---------------
2 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/pitch.cc b/pitch.cc
index 982c6a0..fdb9bf3 100644
--- a/pitch.cc
+++ b/pitch.cc
@@ -114,7 +114,6 @@ void Analyzer::calcTones() {
m_peaks[k].magnitude = magnitude;
magnitudes.push_back(magnitude);
}
- return; // No further processing needed by editor at the moment
std::sort(magnitudes.begin(), magnitudes.end());
double m80 = magnitudes[magnitudes.size() * 80 / 100]; // m80 > 80 % peaks
double mmax = magnitudes.back(); // Max magnitude of peaks (note: combos will combine peaks and go higher)
diff --git a/pitchvis.cc b/pitchvis.cc
index 4d8ec12..ca04b8e 100644
--- a/pitchvis.cc
+++ b/pitchvis.cc
@@ -26,7 +26,7 @@ PitchVis::PitchVis(std::string const& filename): height(1024) {
try { readVec(filename, data); } catch(std::exception& e) { std::cerr << e.what() << std::endl; return; }
unsigned step = 1024;
unsigned width = data.size() / step;
- img.resize(width * height, Pixel(0.5f, 0.5f, 0.5f, 1.0f));
+ img.resize(width * height);
Analyzer analyzer(44100, "");
MusicalScale scale;
QProgressDialog progress(tr("Analyzing and rendering pitch data..."), tr("&Abort"), 0, width, this);
@@ -40,20 +40,31 @@ PitchVis::PitchVis(std::string const& filename): height(1024) {
analyzer.process();
Analyzer::Peaks peaks = analyzer.getPeaks();
for (unsigned i = 0; i < peaks.size(); ++i) {
- for (unsigned div = 1; div < 4; ++div) {
- unsigned y = height - static_cast<unsigned>(16.0 * (scale.getNote(peaks[i].freq * div)));
- if (y == 0 || y >= height - 1) continue;
- float value = 0.003 * (magn2dB(peaks[i].magnitude) + 80.0);
- if (value <= 0.0) continue;
- if (div > 1) value *= -0.5;
- Pixel p(value, value, value);
- (*this)(x, y) += p;
- p.r *= 0.5;
- p.g *= 0.5;
- p.b *= 0.5;
- (*this)(x, y + 1) += p;
- (*this)(x, y - 1) += p;
- }
+ unsigned y = height - static_cast<unsigned>(16.0 * scale.getNote(peaks[i].freq));
+ if (y == 0 || y >= height - 1) continue;
+ float value = 0.003 * (magn2dB(peaks[i].magnitude) + 80.0);
+ if (value <= 0.0) continue;
+ Pixel p(0.0f, 0.0f, value);
+ (*this)(x, y) += p;
+ p.r *= 0.5;
+ p.g *= 0.5;
+ p.b *= 0.5;
+ (*this)(x, y + 1) += p;
+ (*this)(x, y - 1) += p;
+ }
+ Analyzer::Tones tones = analyzer.getTones();
+ for (Analyzer::Tones::const_iterator it = tones.begin(), itend = tones.end(); it != itend; ++it) {
+ unsigned y = height - static_cast<unsigned>(16.0 * scale.getNote(it->freq));
+ if (y == 0 || y >= height - 1) continue;
+ float value = 0.003 * (it->db + 80.0);
+ if (value <= 0.0) continue;
+ Pixel p(value, value, value);
+ (*this)(x, y) += p;
+ p.r *= 0.5;
+ p.g *= 0.5;
+ p.b *= 0.5;
+ (*this)(x, y + 1) += p;
+ (*this)(x, y - 1) += p;
}
}
progress.setValue(width);
|
|
From: Tapio V. <aa...@us...> - 2011-01-11 17:39:32
|
Module: editor
Branch: master
Commit: 21d02a728cbe8f78144d789057c9d2c116549ab5
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 11 19:38:55 2011 +0200
Floating notes now use 90% note - 10% gap division.
Stretching now works both ways.
---
notegraphwidget.cc | 25 +++++++++----------------
1 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index 988c7b3..3e05b09 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -129,35 +129,28 @@ void NoteGraphWidget::updateNotes()
} else {
// Fixed note encountered, handle the gap (divide notes evenly into it)
gap.end = child->x();
- int x = gap.begin;
- if (gap.width() >= gap.notesWidth()) {
- // Plenty of space - no resizing needed
- int step = (gap.width() - gap.notesWidth()) / (gap.notes.size() + 1);
- x += step;
- for (NoteLabels::iterator it2 = gap.notes.begin(); it2 != gap.notes.end(); ++it2) {
- (*it2)->move(x, (*it2)->y());
- x += step + (*it2)->width();
- }
-
- } else if (gap.width() <= gap.minWidth()) {
+ if (gap.width() <= gap.minWidth()) {
// We are at minimum width, enforce it
+ int x = gap.begin;
for (NoteLabels::iterator it2 = gap.notes.begin(); it2 != gap.notes.end(); ++it2) {
(*it2)->move(x, (*it2)->y());
(*it2)->resize(NoteLabel::min_width, (*it2)->height());
x += NoteLabel::min_width;
}
// FIXME: Enforcing fixed note position can be cheated by rapid mouse movement
- // Also, left & right side behaves differently
+ // Also, left & right side behave differently
child->move(gap.begin + gap.minWidth(), child->y());
} else {
- // Make the notes smaller so that they fit
- float sf = gap.width() / float(gap.notesWidth());
+ // Calculate position and size
+ int w = gap.width() / float(gap.notes.size()) * 0.9;
+ int step = (gap.width() - w * gap.notes.size()) / float(gap.notes.size() + 1);
+ int x = gap.begin + step;
for (NoteLabels::iterator it2 = gap.notes.begin(); it2 != gap.notes.end(); ++it2) {
(*it2)->move(x, (*it2)->y());
- (*it2)->resize((*it2)->width() * sf, (*it2)->height());
- x += (*it2)->width();
+ (*it2)->resize(w, (*it2)->height());
+ x += w + step;
}
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-11 16:38:31
|
Module: editor
Branch: master
Commit: 1e75cb909aed48052b5ffebaebcd70de6310aca1
Author: Lasse Karkkainen <tro...@tr...>
Date: Tue Jan 11 17:37:57 2011 +0100
Experimentation with visualization of peaks. Visualization height doubled to 1024 pixels and semitone height doubled to 16 pixels.
---
pitchvis.cc | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/pitchvis.cc b/pitchvis.cc
index bdcf265..4d8ec12 100644
--- a/pitchvis.cc
+++ b/pitchvis.cc
@@ -21,7 +21,7 @@ template <typename T> void readVec(std::string const& filename, std::vector<T>&
if (!f) throw std::runtime_error("Error reading " + filename);
}
-PitchVis::PitchVis(std::string const& filename): height(512) {
+PitchVis::PitchVis(std::string const& filename): height(1024) {
std::vector<float> data;
try { readVec(filename, data); } catch(std::exception& e) { std::cerr << e.what() << std::endl; return; }
unsigned step = 1024;
@@ -40,17 +40,20 @@ PitchVis::PitchVis(std::string const& filename): height(512) {
analyzer.process();
Analyzer::Peaks peaks = analyzer.getPeaks();
for (unsigned i = 0; i < peaks.size(); ++i) {
- unsigned y = height - static_cast<unsigned>(8.0 * (scale.getNote(peaks[i].freq)));
- if (y == 0 || y >= height - 1) continue;
- float value = 0.003 * (magn2dB(peaks[i].magnitude) + 80.0);
- if (value < 0.0) continue;
- Pixel p(value, value, value);
- (*this)(x, y) += p;
- p.r *= 0.5;
- p.g *= 0.5;
- p.b *= 0.5;
- (*this)(x, y + 1) += p;
- (*this)(x, y - 1) += p;
+ for (unsigned div = 1; div < 4; ++div) {
+ unsigned y = height - static_cast<unsigned>(16.0 * (scale.getNote(peaks[i].freq * div)));
+ if (y == 0 || y >= height - 1) continue;
+ float value = 0.003 * (magn2dB(peaks[i].magnitude) + 80.0);
+ if (value <= 0.0) continue;
+ if (div > 1) value *= -0.5;
+ Pixel p(value, value, value);
+ (*this)(x, y) += p;
+ p.r *= 0.5;
+ p.g *= 0.5;
+ p.b *= 0.5;
+ (*this)(x, y + 1) += p;
+ (*this)(x, y - 1) += p;
+ }
}
}
progress.setValue(width);
|
|
From: Tapio V. <aa...@us...> - 2011-01-11 15:10:41
|
Module: editor
Branch: master
Commit: e8bf33b3cf314a0b457a470c327c55116022728b
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 11 17:09:51 2011 +0200
Dummy Open menu action (with various format options).
---
editorapp.cc | 17 +++++++++++++++++
editorapp.hh | 1 +
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/editorapp.cc b/editorapp.cc
index 19cbafa..bd4c393 100644
--- a/editorapp.cc
+++ b/editorapp.cc
@@ -71,6 +71,23 @@ void EditorApp::on_actionNew_triggered()
}
}
+void EditorApp::on_actionOpen_triggered()
+{
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
+ "",
+ tr("All supported formats (*.TBD!!! *.xml *.mid *.ini *.txt)") + ";;" +
+ tr("Project files (*.TBD!!!)") + ";;" + // FIXME: Project file extension
+ tr("SingStar XML (*.xml)") + ";;" +
+ tr("Frets on Fire MIDI (*.mid *.ini)") + ";;" +
+ tr("UltraStar TXT (*.txt)") + ";;" +
+ tr("All files (*)")
+ );
+
+ if (!fileName.isNull()) {
+ // TODO: Spawn a parser
+ }
+}
+
void EditorApp::on_actionExit_triggered()
{
// TODO: Check if a save prompt is in order
diff --git a/editorapp.hh b/editorapp.hh
index 30009d7..6e357f8 100644
--- a/editorapp.hh
+++ b/editorapp.hh
@@ -18,6 +18,7 @@ public slots:
// File menu
void on_actionNew_triggered();
+ void on_actionOpen_triggered();
void on_actionExit_triggered();
// Insert menu
|
|
From: Tapio V. <aa...@us...> - 2011-01-11 14:53:34
|
Module: editor Branch: master Commit: 67f9bc187d3a520cee248ee8f6ab9004726e1d06 Author: Tapio Vierros <tap...@gm...> Date: Tue Jan 11 16:53:02 2011 +0200 NoteLabels have now fixed corner rounding. --- notelabel.cc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notelabel.cc b/notelabel.cc index e3b6980..6eb46d8 100644 --- a/notelabel.cc +++ b/notelabel.cc @@ -63,7 +63,7 @@ void NoteLabel::createPixmap(QSize size) painter.setPen(m_selected ? Qt::red : Qt::black); // Hilight selected note painter.setBrush(gradient); painter.drawRoundedRect(QRectF(0.5, 0.5, image.width()-1, image.height()-1), - 25, 25, Qt::RelativeSize); + 8, 8); painter.setFont(font); painter.setBrush(Qt::black); |
|
From: Stefano A. <xa...@us...> - 2011-01-11 14:51:34
|
Module: performous Branch: master Commit: 1dc4d1f81e7a17e1049a3e04c387b9b499a84a66 Author: Xaldyz <xa...@us...> Date: Tue Jan 11 15:51:15 2011 +0100 cmake/Modules/FindBoost.cmake Fixed latest Boost detection (1.45) cmake/Modules/FindOpenGL.cmake Fixed auto-detection of OpenGL using MSVC lang/it.po Updated italian translation tools/scripts/xml_gettext.sh Fixed to get it running under MSYS --- cmake/Modules/FindBoost.cmake | 5 +- cmake/Modules/FindOpenGL.cmake | 25 +- lang/it.po | 944 ++++++++++++++++++++-------------------- tools/scripts/xml_gettext.sh | 2 +- 4 files changed, 497 insertions(+), 479 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2011-01-11 14:46:53
|
Module: editor
Branch: master
Commit: 7d6e6ff0a509f287e2754f7b14953083725bd63c
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 11 16:45:52 2011 +0200
Just selecting a note doesn't make it non-floating anymore.
---
notegraphwidget.cc | 3 ---
notelabel.cc | 2 ++
notelabel.hh | 6 +++++-
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index a2d131d..988c7b3 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -36,7 +36,6 @@ void NoteGraphWidget::selectNote(NoteLabel* note)
m_selectedNote = note;
if (m_selectedNote) {
m_selectedNote->setSelected();
- m_selectedNote->setFloating(false);
} else m_selectedAction = NONE;
// Signal UI about the change
@@ -204,13 +203,11 @@ void NoteGraphWidget::mousePressEvent(QMouseEvent *event)
// Start a resize
m_selectedAction = RESIZE;
child->startResizing( (hotSpot.x() < NoteLabel::resize_margin) ? -1 : 1 );
- child->setFloating(false);
} else {
// Start a drag
m_selectedAction = MOVE;
child->startDragging(hotSpot);
- child->setFloating(false);
}
child->createPixmap(child->size());
diff --git a/notelabel.cc b/notelabel.cc
index e1c1369..e3b6980 100644
--- a/notelabel.cc
+++ b/notelabel.cc
@@ -99,12 +99,14 @@ void NoteLabel::mouseMoveEvent(QMouseEvent *event)
else
resize(event->pos().x(), height());
if (ngw) ngw->updateNotes();
+ setFloating(false);
} else if (!m_hotspot.isNull()) {
// Moving
QPoint newpos = pos() + event->pos() - m_hotspot;
move(newpos);
if (ngw) ngw->updateNotes();
+ setFloating(false);
// Check if we need a new hotspot, because the note was constrained
if (pos().x() != newpos.x()) m_hotspot.rx() = event->x();
diff --git a/notelabel.hh b/notelabel.hh
index 99aff0b..44c7eac 100644
--- a/notelabel.hh
+++ b/notelabel.hh
@@ -16,7 +16,11 @@ public:
QString lyric() const { return QString::fromStdString(m_note.syllable); }
void setLyric(const QString &text) { m_note.syllable = text.toStdString(); }
- void setSelected(bool state = true) { m_selected = state; createPixmap(size()); }
+ void setSelected(bool state = true) {
+ if (m_selected != state) {
+ m_selected = state; createPixmap(size());
+ }
+ }
Note& note() { return m_note; }
Note note() const { return m_note; }
|
|
From: Tapio V. <aa...@us...> - 2011-01-11 14:46:51
|
Module: editor
Branch: master
Commit: 23ec7e8d6f0d1c77e8b3e0293c2b67787183b78d
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 11 16:40:54 2011 +0200
Note type change now updates pixmap immediately.
---
editorapp.cc | 2 +-
notelabel.hh | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/editorapp.cc b/editorapp.cc
index 69e9ca7..19cbafa 100644
--- a/editorapp.cc
+++ b/editorapp.cc
@@ -160,7 +160,7 @@ void EditorApp::on_actionAbout_triggered()
void EditorApp::on_cmbNoteType_currentIndexChanged(int index)
{
if (ui.noteGraph->selectedNote())
- ui.noteGraph->selectedNote()->note().type = Note::Type(index);
+ ui.noteGraph->selectedNote()->setType(index);
}
void EditorApp::on_chkFloating_stateChanged(int state)
diff --git a/notelabel.hh b/notelabel.hh
index 0926b9f..99aff0b 100644
--- a/notelabel.hh
+++ b/notelabel.hh
@@ -23,6 +23,7 @@ public:
bool isFloating() const { return m_floating; }
void setFloating(bool state) { m_floating = state; createPixmap(size()); }
+ void setType(int newtype) { m_note.type = Note::Type(newtype); createPixmap(size()); }
void startResizing(int dir);
void startDragging(const QPoint& point);
|
|
From: Tapio V. <aa...@us...> - 2011-01-11 14:46:48
|
Module: editor
Branch: master
Commit: 1541d2eb34382dad782fc4ccd346953ad3d7d156
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 11 16:37:11 2011 +0200
Display selected note better (not obscuring note type etc.).
---
notelabel.cc | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/notelabel.cc b/notelabel.cc
index 548eecd..e1c1369 100644
--- a/notelabel.cc
+++ b/notelabel.cc
@@ -43,11 +43,7 @@ void NoteLabel::createPixmap(QSize size)
QLinearGradient gradient(0, 0, 0, image.height()-1);
gradient.setColorAt(0.0, Qt::white);
float ff = m_floating ? 1.0f : 0.5f;
- if (m_selected) {
- gradient.setColorAt(0.2, QColor(180, 100, 100));
- gradient.setColorAt(0.8, QColor(180, 100, 100));
- gradient.setColorAt(1.0, QColor(120, 100, 100));
- } else if (m_note.type == Note::NORMAL) {
+ if (m_note.type == Note::NORMAL) {
gradient.setColorAt(0.2, QColor(100 * ff, 100 * ff, 255 * ff));
gradient.setColorAt(0.8, QColor(100 * ff, 100 * ff, 255 * ff));
gradient.setColorAt(1.0, QColor(100 * ff, 100 * ff, 200 * ff));
@@ -64,6 +60,7 @@ void NoteLabel::createPixmap(QSize size)
QPainter painter;
painter.begin(&image);
painter.setRenderHint(QPainter::Antialiasing);
+ painter.setPen(m_selected ? Qt::red : Qt::black); // Hilight selected note
painter.setBrush(gradient);
painter.drawRoundedRect(QRectF(0.5, 0.5, image.width()-1, image.height()-1),
25, 25, Qt::RelativeSize);
|
|
From: Tapio V. <aa...@us...> - 2011-01-11 14:46:46
|
Module: editor
Branch: master
Commit: 01feaed6bdaf64b17513d453db68d7d20426443a
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 11 16:27:26 2011 +0200
Some preparation for sentence end handling.
---
notelabel.cc | 6 ++++++
notes.cc | 2 +-
notes.hh | 1 +
3 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/notelabel.cc b/notelabel.cc
index fb18ace..548eecd 100644
--- a/notelabel.cc
+++ b/notelabel.cc
@@ -71,6 +71,12 @@ void NoteLabel::createPixmap(QSize size)
painter.setFont(font);
painter.setBrush(Qt::black);
painter.drawText(QRect(QPoint(6, 6), QSize(size.width()-text_margin, size.height()-text_margin)), Qt::AlignCenter, lyric());
+
+ // Render sentence end indicator
+ if (m_note.lineBreak) {
+ // TODO
+ }
+
painter.end();
setPixmap(QPixmap::fromImage(image));
diff --git a/notes.cc b/notes.cc
index 09e1071..f952dd0 100644
--- a/notes.cc
+++ b/notes.cc
@@ -54,7 +54,7 @@ double MusicalScale::getNoteOffset(double freq) const {
Duration::Duration(): begin(getNaN()), end(getNaN()) {}
-Note::Note(std::string lyric): syllable(lyric), duration(getNaN(), getNaN()), phase(getNaN()), type(NORMAL), note(), notePrev() {}
+Note::Note(std::string lyric): syllable(lyric), duration(getNaN(), getNaN()), phase(getNaN()), type(NORMAL), note(), notePrev(), lineBreak() {}
double Note::diff(double note, double n) { return remainder(n - note, 12.0); }
diff --git a/notes.hh b/notes.hh
index 4b29864..cd85bae 100644
--- a/notes.hh
+++ b/notes.hh
@@ -55,6 +55,7 @@ struct Note {
int note; ///< MIDI pitch of the note (at the end for slide notes)
int notePrev; ///< MIDI pitch of the previous note (should be same as note for everything but SLIDE)
std::string syllable; ///< lyrics syllable for that note
+ bool lineBreak; ///< is this note ending a syllable?
/// note begin time access
double& begin() { return duration.begin; }
double begin() const { return duration.begin; }
|
|
From: Tapio V. <aa...@us...> - 2011-01-11 14:46:43
|
Module: editor
Branch: master
Commit: 70b0cf1e8cea749b10d7abb15b851c69035dc95f
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 11 16:22:49 2011 +0200
Prepare to populate NoteGraphWidget from Notes instead of string.
---
notegraphwidget.cc | 29 ++++++++++++++++++++++++++---
notegraphwidget.hh | 2 ++
notelabel.cc | 4 ++--
notelabel.hh | 2 +-
4 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index bb595c5..a2d131d 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -67,7 +67,7 @@ void NoteGraphWidget::setLyrics(QString lyrics)
QString word;
ts >> word;
if (!word.isEmpty()) {
- NoteLabel *wordLabel = new NoteLabel(word, this, QPoint(x, y));
+ NoteLabel *wordLabel = new NoteLabel(Note(word.toStdString()), this, QPoint(x, y));
last = wordLabel;
x += wordLabel->width() + gap;
if (!first) first = wordLabel;
@@ -83,6 +83,29 @@ void NoteGraphWidget::setLyrics(QString lyrics)
updateWidth();
}
+void NoteGraphWidget::setLyrics(const Notes ¬es)
+{
+ const int gap = 10;
+ int x = gap, y = 2 * noteYStep;
+
+ clear();
+ NoteLabel *first = NULL, *last = NULL;
+ for (Notes::const_iterator it = notes.begin(); it != notes.end(); ++it) {
+ NoteLabel *label = new NoteLabel(*it, this, QPoint(x, y));
+ last = label;
+ x += label->width() + gap;
+ if (!first) first = label;
+ }
+
+ // Set first and last to non-floating
+ if (first) first->setFloating(false);
+ if (last) last->setFloating(false);
+
+ rebuildNoteList();
+ m_requiredWidth = x + gap;
+ updateWidth();
+}
+
void NoteGraphWidget::updateWidth()
{
setFixedWidth(m_requiredWidth);
@@ -202,8 +225,8 @@ void NoteGraphWidget::mousePressEvent(QMouseEvent *event)
int w1 = relRatio * child->width();
// Create new labels
- NoteLabel *newLabel1 = new NoteLabel(firstst, this, child->pos(), QSize(w1, 0));
- new NoteLabel(secondst, this, newLabel1->pos() + QPoint(newLabel1->width(), 0), QSize(child->width() - w1, 0));
+ NoteLabel *newLabel1 = new NoteLabel(Note(firstst.toStdString()), this, child->pos(), QSize(w1, 0));
+ new NoteLabel(Note(secondst.toStdString()), this, newLabel1->pos() + QPoint(newLabel1->width(), 0), QSize(child->width() - w1, 0));
// Delete the old one
child->close();
diff --git a/notegraphwidget.hh b/notegraphwidget.hh
index 042b531..ed34310 100644
--- a/notegraphwidget.hh
+++ b/notegraphwidget.hh
@@ -1,6 +1,7 @@
#pragma once
#include "pitchvis.hh"
+#include "notes.hh"
#include <QLabel>
#include <list>
@@ -19,6 +20,7 @@ public:
void clear();
void setLyrics(QString lyrics);
+ void setLyrics(const Notes ¬es);
void updateWidth();
void updateNotes();
void rebuildNoteList();
diff --git a/notelabel.cc b/notelabel.cc
index 58169cd..fb18ace 100644
--- a/notelabel.cc
+++ b/notelabel.cc
@@ -10,8 +10,8 @@ const int NoteLabel::resize_margin = 5; // How many pixels is the resize area
const int NoteLabel::min_width = 10; // How many pixels is the resize area
const int NoteLabel::default_size = 50; // The preferred size of notes
-NoteLabel::NoteLabel(const QString &text, QWidget *parent, const QPoint &position, const QSize &size, bool floating)
- : QLabel(parent), m_note(text.toStdString()), m_selected(false), m_floating(floating), m_resizing(0), m_hotspot()
+NoteLabel::NoteLabel(const Note ¬e, QWidget *parent, const QPoint &position, const QSize &size, bool floating)
+ : QLabel(parent), m_note(note), m_selected(false), m_floating(floating), m_resizing(0), m_hotspot()
{
createPixmap(size);
if (!position.isNull())
diff --git a/notelabel.hh b/notelabel.hh
index 096a523..0926b9f 100644
--- a/notelabel.hh
+++ b/notelabel.hh
@@ -10,7 +10,7 @@ public:
static const int min_width;
static const int default_size;
- NoteLabel(const QString &text, QWidget *parent, const QPoint &position = QPoint(), const QSize &size = QSize(), bool floating = true);
+ NoteLabel(const Note ¬e, QWidget *parent, const QPoint &position = QPoint(), const QSize &size = QSize(), bool floating = true);
void createPixmap(QSize size = QSize());
QString lyric() const { return QString::fromStdString(m_note.syllable); }
|
|
From: Tapio V. <aa...@us...> - 2011-01-11 14:46:41
|
Module: editor
Branch: master
Commit: 49311348634858803c622536888e77926d12f50a
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 11 16:13:25 2011 +0200
NoteLabel now contains Note instead of inheriting.
---
editorapp.cc | 4 ++--
notegraphwidget.cc | 10 +++++-----
notelabel.cc | 26 ++++++++------------------
notelabel.hh | 11 +++++++----
notes.cc | 2 +-
notes.hh | 2 +-
6 files changed, 24 insertions(+), 31 deletions(-)
diff --git a/editorapp.cc b/editorapp.cc
index b0ac4c2..69e9ca7 100644
--- a/editorapp.cc
+++ b/editorapp.cc
@@ -39,7 +39,7 @@ void EditorApp::updateNoteInfo(NoteLabel *note)
ui.valNoteDuration->setText(QString::number(note->width()));
ui.valNote->setText(QString::number(note->y() / NoteGraphWidget::noteYStep));
ui.cmbNoteType->setEnabled(true);
- ui.cmbNoteType->setCurrentIndex(note->type);
+ ui.cmbNoteType->setCurrentIndex(note->note().type);
ui.chkFloating->setEnabled(true);
ui.chkFloating->setChecked(note->isFloating());
} else {
@@ -160,7 +160,7 @@ void EditorApp::on_actionAbout_triggered()
void EditorApp::on_cmbNoteType_currentIndexChanged(int index)
{
if (ui.noteGraph->selectedNote())
- ui.noteGraph->selectedNote()->type = Note::Type(index);
+ ui.noteGraph->selectedNote()->note().type = Note::Type(index);
}
void EditorApp::on_chkFloating_stateChanged(int state)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index f0ff738..bb595c5 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -196,9 +196,9 @@ void NoteGraphWidget::mousePressEvent(QMouseEvent *event)
// Cut the text in a position proportional to the click point
float relRatio = float(hotSpot.x()) / child->width();
- int cutpos = int(std::ceil(child->getText().length() * relRatio));
- QString firstst = child->getText().left(cutpos);
- QString secondst = child->getText().right(child->getText().length() - cutpos);
+ int cutpos = int(std::ceil(child->lyric().length() * relRatio));
+ QString firstst = child->lyric().left(cutpos);
+ QString secondst = child->lyric().right(child->lyric().length() - cutpos);
int w1 = relRatio * child->width();
// Create new labels
@@ -251,9 +251,9 @@ void NoteGraphWidget::mouseDoubleClickEvent(QMouseEvent *event)
bool ok;
QString text = QInputDialog::getText(this, tr("Edit lyric"),
tr("Lyric:"), QLineEdit::Normal,
- child->getText(), &ok);
+ child->lyric(), &ok);
if (ok && !text.isEmpty()) {
- child->setText(text);
+ child->setLyric(text);
child->createPixmap();
}
diff --git a/notelabel.cc b/notelabel.cc
index fd0094d..58169cd 100644
--- a/notelabel.cc
+++ b/notelabel.cc
@@ -11,7 +11,7 @@ const int NoteLabel::min_width = 10; // How many pixels is the resize area
const int NoteLabel::default_size = 50; // The preferred size of notes
NoteLabel::NoteLabel(const QString &text, QWidget *parent, const QPoint &position, const QSize &size, bool floating)
- : QLabel(parent), m_labelText(text), m_selected(false), m_floating(floating), m_resizing(0), m_hotspot()
+ : QLabel(parent), m_note(text.toStdString()), m_selected(false), m_floating(floating), m_resizing(0), m_hotspot()
{
createPixmap(size);
if (!position.isNull())
@@ -30,7 +30,7 @@ void NoteLabel::createPixmap(QSize size)
size.rwidth() = default_size;
}
if (size.height() <= 0) {
- size.rheight() = metric.size(Qt::TextSingleLine, m_labelText).height() + text_margin;
+ size.rheight() = metric.size(Qt::TextSingleLine, lyric()).height() + text_margin;
}
QImage image(size.width(), size.height(),
@@ -47,15 +47,15 @@ void NoteLabel::createPixmap(QSize size)
gradient.setColorAt(0.2, QColor(180, 100, 100));
gradient.setColorAt(0.8, QColor(180, 100, 100));
gradient.setColorAt(1.0, QColor(120, 100, 100));
- } else if (type == NORMAL) {
+ } else if (m_note.type == Note::NORMAL) {
gradient.setColorAt(0.2, QColor(100 * ff, 100 * ff, 255 * ff));
gradient.setColorAt(0.8, QColor(100 * ff, 100 * ff, 255 * ff));
gradient.setColorAt(1.0, QColor(100 * ff, 100 * ff, 200 * ff));
- } else if (type == GOLDEN) {
+ } else if (m_note.type == Note::GOLDEN) {
gradient.setColorAt(0.2, QColor(255 * ff, 255 * ff, 100 * ff));
gradient.setColorAt(0.8, QColor(255 * ff, 255 * ff, 100 * ff));
gradient.setColorAt(1.0, QColor(160 * ff, 160 * ff, 100 * ff));
- } else if (type == FREESTYLE) {
+ } else if (m_note.type == Note::FREESTYLE) {
gradient.setColorAt(0.2, QColor(100 * ff, 180 * ff, 100 * ff));
gradient.setColorAt(0.8, QColor(100 * ff, 180 * ff, 100 * ff));
gradient.setColorAt(1.0, QColor(100 * ff, 120 * ff, 100 * ff));
@@ -70,23 +70,13 @@ void NoteLabel::createPixmap(QSize size)
painter.setFont(font);
painter.setBrush(Qt::black);
- painter.drawText(QRect(QPoint(6, 6), QSize(size.width()-text_margin, size.height()-text_margin)), Qt::AlignCenter, m_labelText);
+ painter.drawText(QRect(QPoint(6, 6), QSize(size.width()-text_margin, size.height()-text_margin)), Qt::AlignCenter, lyric());
painter.end();
setPixmap(QPixmap::fromImage(image));
- setToolTip(QString("\"%1\"\n%2").arg(m_labelText).arg(QString::fromStdString(typeString())));
- setStatusTip(QString("Lyric: ") + m_labelText);
-}
-
-QString NoteLabel::getText() const
-{
- return m_labelText;
-}
-
-void NoteLabel::setText(const QString &text)
-{
- m_labelText = text;
+ setToolTip(QString("\"%1\"\n%2").arg(lyric()).arg(QString::fromStdString(m_note.typeString())));
+ setStatusTip(QString("Lyric: ") + lyric());
}
void NoteLabel::resizeEvent(QResizeEvent *event)
diff --git a/notelabel.hh b/notelabel.hh
index a30aeb8..096a523 100644
--- a/notelabel.hh
+++ b/notelabel.hh
@@ -3,7 +3,7 @@
#include <QLabel>
#include "notes.hh"
-class NoteLabel: public QLabel, public Note
+class NoteLabel: public QLabel
{
public:
static const int resize_margin;
@@ -13,11 +13,14 @@ public:
NoteLabel(const QString &text, QWidget *parent, const QPoint &position = QPoint(), const QSize &size = QSize(), bool floating = true);
void createPixmap(QSize size = QSize());
- QString getText() const;
- void setText(const QString &text);
+ QString lyric() const { return QString::fromStdString(m_note.syllable); }
+ void setLyric(const QString &text) { m_note.syllable = text.toStdString(); }
void setSelected(bool state = true) { m_selected = state; createPixmap(size()); }
+ Note& note() { return m_note; }
+ Note note() const { return m_note; }
+
bool isFloating() const { return m_floating; }
void setFloating(bool state) { m_floating = state; createPixmap(size()); }
@@ -30,7 +33,7 @@ public:
bool operator<(const NoteLabel &rhs) const { return x() < rhs.x(); }
private:
- QString m_labelText;
+ Note m_note;
bool m_selected;
bool m_floating;
int m_resizing;
diff --git a/notes.cc b/notes.cc
index 366a9b9..09e1071 100644
--- a/notes.cc
+++ b/notes.cc
@@ -54,7 +54,7 @@ double MusicalScale::getNoteOffset(double freq) const {
Duration::Duration(): begin(getNaN()), end(getNaN()) {}
-Note::Note(): duration(getNaN(), getNaN()), phase(getNaN()), type(NORMAL), note(), notePrev() {}
+Note::Note(std::string lyric): syllable(lyric), duration(getNaN(), getNaN()), phase(getNaN()), type(NORMAL), note(), notePrev() {}
double Note::diff(double note, double n) { return remainder(n - note, 12.0); }
diff --git a/notes.hh b/notes.hh
index ff7fee7..4b29864 100644
--- a/notes.hh
+++ b/notes.hh
@@ -47,7 +47,7 @@ typedef std::map<int, Durations> NoteMap;
/// note read from songfile
struct Note {
- Note();
+ Note(std::string lyric = "");
Duration duration; ///< note begin/end
double phase; ///< position within a measure, [0, 1)
/// note type
|
|
From: Tapio V. <aa...@us...> - 2011-01-11 09:13:44
|
Module: editor
Branch: master
Commit: 4ff0959d6b2bcd330919fa5ba204ca49350a862e
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 11 11:12:45 2011 +0200
Note type visualization by color (and tooltip).
---
notelabel.cc | 31 ++++++++++++++++++-------------
notes.cc | 6 ++++++
notes.hh | 3 +++
3 files changed, 27 insertions(+), 13 deletions(-)
diff --git a/notelabel.cc b/notelabel.cc
index 8e0d512..fd0094d 100644
--- a/notelabel.cc
+++ b/notelabel.cc
@@ -42,18 +42,23 @@ void NoteLabel::createPixmap(QSize size)
QLinearGradient gradient(0, 0, 0, image.height()-1);
gradient.setColorAt(0.0, Qt::white);
+ float ff = m_floating ? 1.0f : 0.5f;
if (m_selected) {
- gradient.setColorAt(0.2, QColor(100, 180, 100));
- gradient.setColorAt(0.8, QColor(100, 180, 100));
- gradient.setColorAt(1.0, QColor(100, 120, 100));
- } else if (m_floating) {
- gradient.setColorAt(0.2, QColor(160, 160, 180));
- gradient.setColorAt(0.8, QColor(160, 160, 180));
- gradient.setColorAt(1.0, QColor(100, 100, 120));
- } else {
- gradient.setColorAt(0.2, QColor(100, 100, 255));
- gradient.setColorAt(0.8, QColor(100, 100, 255));
- gradient.setColorAt(1.0, QColor(100, 100, 200));
+ gradient.setColorAt(0.2, QColor(180, 100, 100));
+ gradient.setColorAt(0.8, QColor(180, 100, 100));
+ gradient.setColorAt(1.0, QColor(120, 100, 100));
+ } else if (type == NORMAL) {
+ gradient.setColorAt(0.2, QColor(100 * ff, 100 * ff, 255 * ff));
+ gradient.setColorAt(0.8, QColor(100 * ff, 100 * ff, 255 * ff));
+ gradient.setColorAt(1.0, QColor(100 * ff, 100 * ff, 200 * ff));
+ } else if (type == GOLDEN) {
+ gradient.setColorAt(0.2, QColor(255 * ff, 255 * ff, 100 * ff));
+ gradient.setColorAt(0.8, QColor(255 * ff, 255 * ff, 100 * ff));
+ gradient.setColorAt(1.0, QColor(160 * ff, 160 * ff, 100 * ff));
+ } else if (type == FREESTYLE) {
+ gradient.setColorAt(0.2, QColor(100 * ff, 180 * ff, 100 * ff));
+ gradient.setColorAt(0.8, QColor(100 * ff, 180 * ff, 100 * ff));
+ gradient.setColorAt(1.0, QColor(100 * ff, 120 * ff, 100 * ff));
}
QPainter painter;
@@ -70,7 +75,7 @@ void NoteLabel::createPixmap(QSize size)
setPixmap(QPixmap::fromImage(image));
- setToolTip(m_labelText);
+ setToolTip(QString("\"%1\"\n%2").arg(m_labelText).arg(QString::fromStdString(typeString())));
setStatusTip(QString("Lyric: ") + m_labelText);
}
@@ -91,7 +96,7 @@ void NoteLabel::resizeEvent(QResizeEvent *event)
void NoteLabel::mouseMoveEvent(QMouseEvent *event)
{
- QToolTip::showText(event->globalPos(), getText(), this);
+ QToolTip::showText(event->globalPos(), toolTip(), this);
NoteGraphWidget* ngw = dynamic_cast<NoteGraphWidget*>(parent());
if (m_resizing != 0) {
diff --git a/notes.cc b/notes.cc
index 787908a..366a9b9 100644
--- a/notes.cc
+++ b/notes.cc
@@ -58,6 +58,12 @@ Note::Note(): duration(getNaN(), getNaN()), phase(getNaN()), type(NORMAL), note(
double Note::diff(double note, double n) { return remainder(n - note, 12.0); }
+std::string Note::typeString() const {
+ static const std::string typenames[] = { "Normal", "Bonus", "Freestyle" };
+ return typenames[type];
+}
+
+
VocalTrack::VocalTrack(std::string name) : name(name) {reload();}
void VocalTrack::reload() {
diff --git a/notes.hh b/notes.hh
index daca52f..ff7fee7 100644
--- a/notes.hh
+++ b/notes.hh
@@ -69,6 +69,9 @@ struct Note {
static bool ltBegin(Note const& a, Note const& b) { return a.duration.begin < b.duration.begin; }
/// compares end of two notes
static bool ltEnd(Note const& a, Note const& b) { return a.duration.end < b.duration.end; }
+
+ /// human-readable description of note type
+ std::string typeString() const;
};
typedef std::vector<Note> Notes;
|
|
From: Tapio V. <aa...@us...> - 2011-01-11 09:13:41
|
Module: editor
Branch: master
Commit: 78e611be9255d09a1a843b342505467214fd1947
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 11 10:49:10 2011 +0200
NoteLabel now inherits Note and setting note type is possible.
---
editorapp.cc | 11 ++++++++++-
editorapp.hh | 1 +
notelabel.hh | 3 ++-
notes.hh | 3 +--
4 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/editorapp.cc b/editorapp.cc
index 24e6ffb..b0ac4c2 100644
--- a/editorapp.cc
+++ b/editorapp.cc
@@ -39,6 +39,7 @@ void EditorApp::updateNoteInfo(NoteLabel *note)
ui.valNoteDuration->setText(QString::number(note->width()));
ui.valNote->setText(QString::number(note->y() / NoteGraphWidget::noteYStep));
ui.cmbNoteType->setEnabled(true);
+ ui.cmbNoteType->setCurrentIndex(note->type);
ui.chkFloating->setEnabled(true);
ui.chkFloating->setChecked(note->isFloating());
} else {
@@ -143,7 +144,8 @@ void EditorApp::on_actionLyricsFromClipboard_triggered()
}
}
-void EditorApp::on_actionWhatsThis_triggered() {
+void EditorApp::on_actionWhatsThis_triggered()
+{
QWhatsThis::enterWhatsThisMode ();
}
@@ -154,6 +156,13 @@ void EditorApp::on_actionAbout_triggered()
);
}
+
+void EditorApp::on_cmbNoteType_currentIndexChanged(int index)
+{
+ if (ui.noteGraph->selectedNote())
+ ui.noteGraph->selectedNote()->type = Note::Type(index);
+}
+
void EditorApp::on_chkFloating_stateChanged(int state)
{
if (ui.noteGraph->selectedNote())
diff --git a/editorapp.hh b/editorapp.hh
index 7992b31..30009d7 100644
--- a/editorapp.hh
+++ b/editorapp.hh
@@ -30,6 +30,7 @@ public slots:
void on_actionAbout_triggered();
// Note properties tab
+ void on_cmbNoteType_currentIndexChanged(int);
void on_chkFloating_stateChanged(int);
private:
diff --git a/notelabel.hh b/notelabel.hh
index 43e5e48..a30aeb8 100644
--- a/notelabel.hh
+++ b/notelabel.hh
@@ -1,8 +1,9 @@
#pragma once
#include <QLabel>
+#include "notes.hh"
-class NoteLabel: public QLabel
+class NoteLabel: public QLabel, public Note
{
public:
static const int resize_margin;
diff --git a/notes.hh b/notes.hh
index 6830b56..daca52f 100644
--- a/notes.hh
+++ b/notes.hh
@@ -51,8 +51,7 @@ struct Note {
Duration duration; ///< note begin/end
double phase; ///< position within a measure, [0, 1)
/// note type
- enum Type { FREESTYLE = 'F', NORMAL = ':', GOLDEN = '*', SLIDE = '+', SLEEP = '-',
- TAP = '1', HOLDBEGIN = '2', HOLDEND = '3', ROLL = '4', MINE = 'M', LIFT = 'L'} type;
+ enum Type { NORMAL = 0, GOLDEN = 1, FREESTYLE = 2 } type;
int note; ///< MIDI pitch of the note (at the end for slide notes)
int notePrev; ///< MIDI pitch of the previous note (should be same as note for everything but SLIDE)
std::string syllable; ///< lyrics syllable for that note
|
|
From: Tapio V. <aa...@us...> - 2011-01-11 09:13:39
|
Module: editor
Branch: master
Commit: 6fdf154dda5686a023b55ba6de26284dd8699048
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 11 10:40:18 2011 +0200
Note struct now uses Duration struct.
---
notes.cc | 2 +-
notes.hh | 18 +++++++++++-------
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/notes.cc b/notes.cc
index 4596c89..787908a 100644
--- a/notes.cc
+++ b/notes.cc
@@ -54,7 +54,7 @@ double MusicalScale::getNoteOffset(double freq) const {
Duration::Duration(): begin(getNaN()), end(getNaN()) {}
-Note::Note(): begin(getNaN()), end(getNaN()), phase(getNaN()), type(NORMAL), note(), notePrev() {}
+Note::Note(): duration(getNaN(), getNaN()), phase(getNaN()), type(NORMAL), note(), notePrev() {}
double Note::diff(double note, double n) { return remainder(n - note, 12.0); }
diff --git a/notes.hh b/notes.hh
index 6557afe..6830b56 100644
--- a/notes.hh
+++ b/notes.hh
@@ -48,24 +48,28 @@ typedef std::map<int, Durations> NoteMap;
/// note read from songfile
struct Note {
Note();
- double begin, ///< begin time
- end; ///< end time
- double phase; /// position within a measure, [0, 1)
+ Duration duration; ///< note begin/end
+ double phase; ///< position within a measure, [0, 1)
/// note type
enum Type { FREESTYLE = 'F', NORMAL = ':', GOLDEN = '*', SLIDE = '+', SLEEP = '-',
TAP = '1', HOLDBEGIN = '2', HOLDEND = '3', ROLL = '4', MINE = 'M', LIFT = 'L'} type;
int note; ///< MIDI pitch of the note (at the end for slide notes)
int notePrev; ///< MIDI pitch of the previous note (should be same as note for everything but SLIDE)
- /// lyrics syllable for that note
- std::string syllable;
+ std::string syllable; ///< lyrics syllable for that note
+ /// note begin time access
+ double& begin() { return duration.begin; }
+ double begin() const { return duration.begin; }
+ /// note end time access
+ double& end() { return duration.end; }
+ double end() const { return duration.end; }
/// difference of n from note
double diff(double n) const { return diff(note, n); }
/// difference of n from note, so that note + diff(note, n) is n (mod 12)
static double diff(double note, double n);
/// compares begin of two notes
- static bool ltBegin(Note const& a, Note const& b) { return a.begin < b.begin; }
+ static bool ltBegin(Note const& a, Note const& b) { return a.duration.begin < b.duration.begin; }
/// compares end of two notes
- static bool ltEnd(Note const& a, Note const& b) { return a.end < b.end; }
+ static bool ltEnd(Note const& a, Note const& b) { return a.duration.end < b.duration.end; }
};
typedef std::vector<Note> Notes;
|
|
From: Tapio V. <aa...@us...> - 2011-01-11 09:13:36
|
Module: editor
Branch: master
Commit: 31e37597519bec379b248b992c75fb18ade489c6
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 11 10:26:50 2011 +0200
Fix mouse panning.
---
notegraphwidget.cc | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index 9d5168e..f0ff738 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -222,6 +222,7 @@ void NoteGraphWidget::mouseReleaseEvent(QMouseEvent *event)
m_selectedAction = NONE;
}
m_panHotSpot = QPoint();
+ setCursor(QCursor());
updateNotes();
}
@@ -270,10 +271,10 @@ void NoteGraphWidget::mouseMoveEvent(QMouseEvent *event)
if (scrollArea) {
QPoint diff = event->pos() - m_panHotSpot;
QScrollBar *scrollHor = scrollArea->horizontalScrollBar();
- scrollHor->setValue(scrollHor->value() + diff.x());
- QScrollBar *scrollVer = scrollArea->horizontalScrollBar();
- scrollVer->setValue(scrollVer->value() + diff.y());
- m_panHotSpot = event->pos() + diff;
+ scrollHor->setValue(scrollHor->value() - diff.x());
+ QScrollBar *scrollVer = scrollArea->verticalScrollBar();
+ scrollVer->setValue(scrollVer->value() - diff.y());
+ m_panHotSpot = event->pos() - diff;
}
}
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-11 01:06:03
|
Module: web Branch: master Commit: e8b672ed8fc37b26d7ada7e879819bf954decada Author: Lasse Karkkainen <tro...@tr...> Date: Tue Jan 11 02:05:49 2011 +0100 Capitalized titles --- htdocs-source/AWC-cfg.txt | 8 ++++---- htdocs-source/about.txt | 2 +- htdocs-source/others.txt | 2 +- htdocs-source/songs.txt | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs-source/AWC-cfg.txt b/htdocs-source/AWC-cfg.txt index 9fbadc2..a53da19 100644 --- a/htdocs-source/AWC-cfg.txt +++ b/htdocs-source/AWC-cfg.txt @@ -1,17 +1,17 @@ % Performous +index Home +blog Blog -+about What is it ++about What Is It +download Download -+songs Free songs -+others Other games ++songs Free Songs ++others Other Games % Project links .http://wiki.performous.org/ Documentation .http://webchat.freenode.net/?channels=#performous Webchat .http://sourceforge.net/projects/performous/forums/forum/871563 Forum .http://sourceforge.net/projects/performous/ SF.net .http://www.ohloh.net/projects/performous Ohloh.net -.awstats/awstats.pl Site stats +.awstats/awstats.pl Site Stats # First char of the line selects: # + a page that is converted (.txt -> .html) diff --git a/htdocs-source/about.txt b/htdocs-source/about.txt index 9a1099e..cad0d5d 100644 --- a/htdocs-source/about.txt +++ b/htdocs-source/about.txt @@ -1,4 +1,4 @@ -What is it? +What Is It? :>div,~margin <iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="510" src="http://www.youtube.com/embed/soYIbsVmcyU?rel=0" frameborder="0"></iframe> diff --git a/htdocs-source/others.txt b/htdocs-source/others.txt index 0b8419d..43e38ce 100644 --- a/htdocs-source/others.txt +++ b/htdocs-source/others.txt @@ -1,4 +1,4 @@ -Check out our competitors +Other Similar Games Nothing quite like Performous but there are interesting projects here. Let us know if anything worth a mention is missing. diff --git a/htdocs-source/songs.txt b/htdocs-source/songs.txt index de9eda6..059e21d 100644 --- a/htdocs-source/songs.txt +++ b/htdocs-source/songs.txt @@ -1,4 +1,4 @@ -Free songs +Free Songs :~preface:Do you like the songs? Remember to support the artists who give their work for free! |