git-svn-id: https://svn.code.sf.net/p/pianobooster/code/trunk@58 ba081f5d-443b-49a7-ac4b-446c3f91f371
This commit is contained in:
parent
2efcfed942
commit
25d2ae9db3
|
@ -12,19 +12,22 @@ Piano Booster To Do tasks (in no particular order)
|
|||
- Add - one finger play - playing just one note of a cord will be accepted (Optional
|
||||
- Add - rhythm practice - any note played at the right time will be accepted
|
||||
|
||||
|
||||
======== MEDIUM ========
|
||||
|
||||
- Adding a high score of your playing ability.
|
||||
- Add stars -- see if you can collect all 10 stars.
|
||||
- Add stars -- see if you can collect all 10 stars.
|
||||
- Reduce the midi timing jitter by:
|
||||
1. Change to using rtTimer (as supplied by Pedro)
|
||||
2. Increase the midi tick rate to 1 mSec
|
||||
- Make the graphics move smoothly across the screen, without the flickering or tearing by:.
|
||||
1. synchronise the frame rate to match screen/lcd monitor refresh rate.
|
||||
- Fix the text flickering problem (probably a QT bug.)
|
||||
- Fix the text flickering problem (probably a QT bug.)
|
||||
- Display note durations as a piano roll type display.
|
||||
- Display note duration using simple musical notation (without any rests or note beams)
|
||||
- Automatically adjust the speed (as an option) to match the playing ability.
|
||||
- Adding a metronome/drum track to the piece being played.
|
||||
- read the midi file tracks (at present the tracks are split only by midi channel number)
|
||||
|
||||
|
||||
======== DIFFICULT ========
|
||||
|
@ -53,7 +56,7 @@ Piano Booster To Do tasks (in no particular order)
|
|||
|
||||
====== NOTE ======
|
||||
|
||||
Note: changed the '-' to a '+' when the task has been started.
|
||||
Note: changed the '-' to a '+' when the task has been started.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ ADD_DEFINITIONS(-Wall)
|
|||
# by default only QtCore and QtGui modules are enabled
|
||||
# other modules must be enabled like this:
|
||||
SET(QT_USE_QTOPENGL TRUE)
|
||||
SET(QT_USE_QTXML TRUE)
|
||||
|
||||
|
||||
FIND_PACKAGE( OpenGL REQUIRED )
|
||||
|
@ -88,6 +89,7 @@ SET( PIANOBOOSTER_SRCS
|
|||
TrackList.cpp
|
||||
Rating.cpp
|
||||
Bar.cpp
|
||||
Settings.cpp
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ GuiKeyboardSetupDialog::GuiKeyboardSetupDialog(QWidget *parent)
|
|||
setWindowTitle("Piano Keyboard Settings");
|
||||
}
|
||||
|
||||
void GuiKeyboardSetupDialog::init(CSong* song, QSettings* settings)
|
||||
void GuiKeyboardSetupDialog::init(CSong* song, CSettings* settings)
|
||||
{
|
||||
m_song = song;
|
||||
m_settings = settings;
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <QtGui>
|
||||
|
||||
#include "Song.h"
|
||||
#include "Settings.h"
|
||||
|
||||
|
||||
#include "ui_GuiKeyboardSetupDialog.h"
|
||||
|
@ -43,7 +44,7 @@ class GuiKeyboardSetupDialog : public QDialog, private Ui::GuiKeyboardSetupDialo
|
|||
public:
|
||||
GuiKeyboardSetupDialog(QWidget *parent = 0);
|
||||
|
||||
void init(CSong* song, QSettings* settings);
|
||||
void init(CSong* song, CSettings* settings);
|
||||
|
||||
private slots:
|
||||
void accept();
|
||||
|
@ -86,7 +87,7 @@ private:
|
|||
|
||||
void updateInfoText();
|
||||
|
||||
QSettings* m_settings;
|
||||
CSettings* m_settings;
|
||||
CSong* m_song;
|
||||
};
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ GuiMidiSetupDialog::GuiMidiSetupDialog(QWidget *parent)
|
|||
}
|
||||
|
||||
|
||||
void GuiMidiSetupDialog::init(CSong* song, QSettings* settings)
|
||||
void GuiMidiSetupDialog::init(CSong* song, CSettings* settings)
|
||||
{
|
||||
m_song = song;
|
||||
m_settings = settings;
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
#include <QtGui>
|
||||
|
||||
#include "Song.h"
|
||||
#include "Settings.h"
|
||||
|
||||
|
||||
|
||||
#include "ui_GuiMidiSetupDialog.h"
|
||||
|
@ -43,7 +45,7 @@ class GuiMidiSetupDialog : public QDialog, private Ui::GuiMidiSettingsDialog
|
|||
public:
|
||||
GuiMidiSetupDialog(QWidget *parent = 0);
|
||||
|
||||
void init(CSong* song, QSettings* settings);
|
||||
void init(CSong* song, CSettings* settings);
|
||||
|
||||
private slots:
|
||||
void accept();
|
||||
|
@ -55,7 +57,7 @@ private slots:
|
|||
private:
|
||||
|
||||
void updateMidiInfoText();
|
||||
QSettings* m_settings;
|
||||
CSettings* m_settings;
|
||||
CSong* m_song;
|
||||
int m_latencyFix;
|
||||
bool m_latencyChanged;
|
||||
|
|
|
@ -40,7 +40,7 @@ GuiPreferencesDialog::GuiPreferencesDialog(QWidget *parent)
|
|||
}
|
||||
|
||||
|
||||
void GuiPreferencesDialog::init(CSong* song, QSettings* settings, CGLView * glView)
|
||||
void GuiPreferencesDialog::init(CSong* song, CSettings* settings, CGLView * glView)
|
||||
{
|
||||
m_song = song;
|
||||
m_settings = settings;
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <QtGui>
|
||||
|
||||
#include "Song.h"
|
||||
#include "Settings.h"
|
||||
|
||||
|
||||
#include "ui_GuiPreferencesDialog.h"
|
||||
|
@ -45,13 +46,13 @@ class GuiPreferencesDialog : public QDialog, private Ui::GuiPreferencesDialog
|
|||
|
||||
public:
|
||||
GuiPreferencesDialog(QWidget *parent = 0);
|
||||
void init(CSong* song, QSettings* settings, CGLView* glView);
|
||||
void init(CSong* song, CSettings* settings, CGLView* glView);
|
||||
|
||||
private slots:
|
||||
void accept();
|
||||
|
||||
private:
|
||||
QSettings* m_settings;
|
||||
CSettings* m_settings;
|
||||
CSong* m_song;
|
||||
CGLView *m_glView;
|
||||
};
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "GuiTopBar.h"
|
||||
#include "TrackList.h"
|
||||
|
||||
GuiSidePanel::GuiSidePanel(QWidget *parent, QSettings* settings)
|
||||
GuiSidePanel::GuiSidePanel(QWidget *parent, CSettings* settings)
|
||||
: QWidget(parent), m_parent(parent)
|
||||
{
|
||||
m_song = 0;
|
||||
|
@ -97,8 +97,6 @@ void GuiSidePanel::loadBookList()
|
|||
|
||||
void GuiSidePanel::openSongFile(QString filename)
|
||||
{
|
||||
QDir dirBooks(filename);
|
||||
|
||||
if (!QFile::exists(filename))
|
||||
return;
|
||||
|
||||
|
@ -109,6 +107,7 @@ void GuiSidePanel::openSongFile(QString filename)
|
|||
loadSong(filename);
|
||||
}
|
||||
|
||||
/*Fix me */
|
||||
void GuiSidePanel::loadSong(QString filename)
|
||||
{
|
||||
m_song->loadSong(filename);
|
||||
|
@ -137,6 +136,7 @@ void GuiSidePanel::on_bookCombo_activated (int index)
|
|||
for (int i = 0; i < songNames.size(); ++i)
|
||||
{
|
||||
if ( songNames.at(i).endsWith(".mid", Qt::CaseInsensitive ) ||
|
||||
songNames.at(i).endsWith(".midi", Qt::CaseInsensitive ) ||
|
||||
songNames.at(i).endsWith(".kar", Qt::CaseInsensitive ) )
|
||||
{
|
||||
songCombo->addItem( songNames.at(i));
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
#include "Song.h"
|
||||
#include "Score.h"
|
||||
#include "TrackList.h"
|
||||
#include "Settings.h"
|
||||
|
||||
|
||||
#include "ui_GuiSidePanel.h"
|
||||
|
||||
|
@ -44,7 +46,7 @@ class GuiSidePanel : public QWidget, private Ui::GuiSidePanel
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GuiSidePanel(QWidget *parent, QSettings* settings);
|
||||
GuiSidePanel(QWidget *parent, CSettings* settings);
|
||||
|
||||
void init(CSong* songObj, CTrackList* trackList, GuiTopBar* topBar);
|
||||
void openSongFile(QString filename);
|
||||
|
@ -53,6 +55,16 @@ public:
|
|||
return m_bookPath + bookCombo->currentText() + '/' + songCombo->currentText();
|
||||
}
|
||||
|
||||
void refresh()
|
||||
{
|
||||
if (m_trackList)
|
||||
{
|
||||
m_trackList->refresh();
|
||||
}
|
||||
autoSetMuteYourPart();
|
||||
}
|
||||
void loadBookList();
|
||||
|
||||
private slots:
|
||||
void on_songCombo_activated (int index);
|
||||
void on_bookCombo_activated (int index);
|
||||
|
@ -98,7 +110,6 @@ private slots:
|
|||
}
|
||||
|
||||
private:
|
||||
void loadBookList();
|
||||
void loadSong(QString filename);
|
||||
void autoSetMuteYourPart();
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
|
@ -109,7 +120,7 @@ private:
|
|||
QString m_bookPath;
|
||||
CTrackList* m_trackList;
|
||||
GuiTopBar* m_topBar;
|
||||
QSettings* m_settings;
|
||||
CSettings* m_settings;
|
||||
QWidget *m_parent;
|
||||
};
|
||||
|
||||
|
|
|
@ -49,6 +49,9 @@ public:
|
|||
|
||||
void setPlayButtonState(bool checked, bool atTheEnd = false);
|
||||
|
||||
void setSpeed(int value){ speedSpin->setValue(value); }
|
||||
int getSpeed(){return speedSpin->value();}
|
||||
|
||||
private slots:
|
||||
void on_playButton_clicked(bool clicked);
|
||||
void on_playFromStartButton_clicked(bool clicked);
|
||||
|
|
|
@ -45,7 +45,7 @@ Window::Window()
|
|||
QCoreApplication::setOrganizationName("PianoBooster");
|
||||
QCoreApplication::setOrganizationDomain("pianobooster.sourceforge.net/");
|
||||
QCoreApplication::setApplicationName("Piano Booster");
|
||||
m_settings = new QSettings(QSettings::IniFormat, QSettings::UserScope, "PianoBooster", "Piano Booster");
|
||||
m_settings = new CSettings(this);
|
||||
setWindowIcon(QIcon(":/images/Logo32x32.png"));
|
||||
setWindowTitle(tr("Piano Booster"));
|
||||
|
||||
|
@ -61,6 +61,8 @@ Window::Window()
|
|||
m_sidePanel = new GuiSidePanel(this, m_settings);
|
||||
m_topBar = new GuiTopBar(this);
|
||||
|
||||
m_settings->init(m_song, m_sidePanel, m_topBar);
|
||||
|
||||
mainLayout->addWidget(m_sidePanel);
|
||||
columnLayout->addWidget(m_topBar);
|
||||
columnLayout->addWidget(m_glWidget);
|
||||
|
@ -291,7 +293,7 @@ void Window::open()
|
|||
QString currentSong = m_settings->value("CurrentSong").toString();
|
||||
|
||||
QString fileName = QFileDialog::getOpenFileName(this,tr("Open Midi File"),
|
||||
currentSong, tr("Midi Files (*.mid *.kar)"));
|
||||
currentSong, tr("Midi Files (*.mid *.midi *.kar)"));
|
||||
if (!fileName.isEmpty())
|
||||
m_sidePanel->openSongFile(fileName);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
@file QtWindow.cpp
|
||||
@file QtWindow.h
|
||||
|
||||
@brief xxx.
|
||||
|
||||
|
@ -37,6 +37,8 @@
|
|||
#include "GuiTopBar.h"
|
||||
#include "GuiPreferencesDialog.h"
|
||||
#include "GuiLoopingPopup.h"
|
||||
#include "Settings.h"
|
||||
|
||||
|
||||
|
||||
class CGLView;
|
||||
|
@ -131,7 +133,7 @@ private:
|
|||
void readSettings();
|
||||
void writeSettings();
|
||||
|
||||
QSettings* m_settings;
|
||||
CSettings* m_settings;
|
||||
|
||||
GuiSidePanel *m_sidePanel;
|
||||
GuiTopBar *m_topBar;
|
||||
|
|
Loading…
Reference in New Issue