Compare commits
No commits in common. "6be80f1d5c0875d1e81c1fb1075e0aaa7fc44ab7" and "4cacaa04e4e43bbdfded1752a1059f9331ebe241" have entirely different histories.
6be80f1d5c
...
4cacaa04e4
3 changed files with 3 additions and 8 deletions
|
|
@ -242,7 +242,7 @@ void MainWindow::on_playButton_clicked()
|
||||||
|
|
||||||
void MainWindow::on_pauseButton_clicked()
|
void MainWindow::on_pauseButton_clicked()
|
||||||
{
|
{
|
||||||
if (isPlaying && !isPaused && audioPlayer->isPlaying())
|
if (isPlaying && !isPaused)
|
||||||
{
|
{
|
||||||
// Pause playback
|
// Pause playback
|
||||||
audioPlayer->pause();
|
audioPlayer->pause();
|
||||||
|
|
@ -311,7 +311,6 @@ void MainWindow::on_songListView_doubleClicked(const QModelIndex &index)
|
||||||
|
|
||||||
if (index.column() == 0)
|
if (index.column() == 0)
|
||||||
{
|
{
|
||||||
isPaused = false;
|
|
||||||
if (isPlaying)
|
if (isPlaying)
|
||||||
{
|
{
|
||||||
audioPlayer->stop();
|
audioPlayer->stop();
|
||||||
|
|
@ -319,8 +318,8 @@ void MainWindow::on_songListView_doubleClicked(const QModelIndex &index)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
isPlaying = true;
|
isPlaying = true;
|
||||||
|
updateControls();
|
||||||
}
|
}
|
||||||
updateControls();
|
|
||||||
|
|
||||||
flushGenerationQueue();
|
flushGenerationQueue();
|
||||||
ui->nowPlayingLabel->setText("Now Playing: Waiting for generation...");
|
ui->nowPlayingLabel->setText("Now Playing: Waiting for generation...");
|
||||||
|
|
@ -408,7 +407,6 @@ void MainWindow::playSong(const SongItem& song)
|
||||||
ui->nowPlayingLabel->setText("Now Playing: " + song.caption);
|
ui->nowPlayingLabel->setText("Now Playing: " + song.caption);
|
||||||
ui->lyricsTextEdit->setPlainText(song.lyrics);
|
ui->lyricsTextEdit->setPlainText(song.lyrics);
|
||||||
ui->jsonTextEdit->setPlainText(song.json);
|
ui->jsonTextEdit->setPlainText(song.json);
|
||||||
updateControls();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::songGenerated(const SongItem& song)
|
void MainWindow::songGenerated(const SongItem& song)
|
||||||
|
|
|
||||||
|
|
@ -178,9 +178,6 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pauseButton">
|
<widget class="QPushButton" name="pauseButton">
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Pause</string>
|
<string>Pause</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include "SongItem.h"
|
#include "SongItem.h"
|
||||||
|
|
||||||
SongItem::SongItem(const QString &caption, const QString &lyrics)
|
SongItem::SongItem(const QString &caption, const QString &lyrics)
|
||||||
: caption(caption), lyrics(lyrics), cotCaption(true), bpm(0)
|
: caption(caption), lyrics(lyrics), cotCaption(true)
|
||||||
{
|
{
|
||||||
uniqueId = QRandomGenerator::global()->generate64();
|
uniqueId = QRandomGenerator::global()->generate64();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue