Reformat
This commit is contained in:
parent
10769eef09
commit
58e8345542
20 changed files with 2063 additions and 1901 deletions
129
src/MainWindow.h
129
src/MainWindow.h
|
|
@ -17,90 +17,93 @@
|
|||
#include "AceStepWorker.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui { class MainWindow; }
|
||||
namespace Ui
|
||||
{
|
||||
class MainWindow;
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
private slots:
|
||||
void on_playButton_clicked();
|
||||
void on_pauseButton_clicked();
|
||||
void on_skipButton_clicked();
|
||||
void on_stopButton_clicked();
|
||||
void on_shuffleButton_clicked();
|
||||
void on_positionSlider_sliderMoved(int position);
|
||||
void updatePosition(int position);
|
||||
void updateDuration(int duration);
|
||||
void on_addSongButton_clicked();
|
||||
void on_removeSongButton_clicked();
|
||||
void on_advancedSettingsButton_clicked();
|
||||
|
||||
void on_songListView_doubleClicked(const QModelIndex &index);
|
||||
|
||||
void on_playButton_clicked();
|
||||
void on_pauseButton_clicked();
|
||||
void on_skipButton_clicked();
|
||||
void on_stopButton_clicked();
|
||||
void on_shuffleButton_clicked();
|
||||
void on_positionSlider_sliderMoved(int position);
|
||||
void updatePosition(int position);
|
||||
void updateDuration(int duration);
|
||||
void on_addSongButton_clicked();
|
||||
void on_removeSongButton_clicked();
|
||||
void on_advancedSettingsButton_clicked();
|
||||
|
||||
void on_songListView_doubleClicked(const QModelIndex &index);
|
||||
|
||||
void songGenerated(const SongItem& song);
|
||||
void playNextSong();
|
||||
void playbackStarted();
|
||||
void playNextSong();
|
||||
void playbackStarted();
|
||||
void updatePlaybackStatus(bool playing);
|
||||
void generationError(const QString &error);
|
||||
|
||||
void on_actionSavePlaylist();
|
||||
void on_actionLoadPlaylist();
|
||||
void on_actionAppendPlaylist();
|
||||
void on_actionSaveSong();
|
||||
|
||||
void generationError(const QString &error);
|
||||
|
||||
void on_actionSavePlaylist();
|
||||
void on_actionLoadPlaylist();
|
||||
void on_actionAppendPlaylist();
|
||||
void on_actionSaveSong();
|
||||
|
||||
private:
|
||||
void startNextSongGeneration();
|
||||
|
||||
void startNextSongGeneration();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
SongListModel *songModel;
|
||||
AudioPlayer *audioPlayer;
|
||||
AceStepWorker *aceStepWorker;
|
||||
QTimer *playbackTimer;
|
||||
|
||||
QString formatTime(int milliseconds);
|
||||
Ui::MainWindow *ui;
|
||||
SongListModel *songModel;
|
||||
AudioPlayer *audioPlayer;
|
||||
AceStepWorker *aceStepWorker;
|
||||
QTimer *playbackTimer;
|
||||
|
||||
QString formatTime(int milliseconds);
|
||||
|
||||
SongItem currentSong;
|
||||
bool isPlaying;
|
||||
bool isPaused;
|
||||
bool shuffleMode;
|
||||
bool isGeneratingNext;
|
||||
QString jsonTemplate;
|
||||
|
||||
// Path settings
|
||||
QString aceStepPath;
|
||||
QString qwen3ModelPath;
|
||||
QString textEncoderModelPath;
|
||||
QString ditModelPath;
|
||||
QString vaeModelPath;
|
||||
|
||||
// Queue for generated songs
|
||||
bool isPlaying;
|
||||
bool isPaused;
|
||||
bool shuffleMode;
|
||||
bool isGeneratingNext;
|
||||
QString jsonTemplate;
|
||||
|
||||
// Path settings
|
||||
QString aceStepPath;
|
||||
QString qwen3ModelPath;
|
||||
QString textEncoderModelPath;
|
||||
QString ditModelPath;
|
||||
QString vaeModelPath;
|
||||
|
||||
// Queue for generated songs
|
||||
static constexpr int generationTresh = 2;
|
||||
QQueue<SongItem> generatedSongQueue;
|
||||
|
||||
|
||||
private:
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
void loadPlaylist(const QString &filePath);
|
||||
void savePlaylist(const QString &filePath);
|
||||
void autoSavePlaylist();
|
||||
void autoLoadPlaylist();
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
void loadPlaylist(const QString &filePath);
|
||||
void savePlaylist(const QString &filePath);
|
||||
void autoSavePlaylist();
|
||||
void autoLoadPlaylist();
|
||||
|
||||
void playSong(const SongItem& song);
|
||||
|
||||
bool savePlaylistToJson(const QString &filePath, const QList<SongItem> &songs);
|
||||
bool loadPlaylistFromJson(const QString &filePath, QList<SongItem> &songs);
|
||||
|
||||
void setupUI();
|
||||
|
||||
bool savePlaylistToJson(const QString &filePath, const QList<SongItem> &songs);
|
||||
bool loadPlaylistFromJson(const QString &filePath, QList<SongItem> &songs);
|
||||
|
||||
void setupUI();
|
||||
void updateControls();
|
||||
void ensureSongsInQueue(bool enqeueCurrent = false);
|
||||
void flushGenerationQueue();
|
||||
void flushGenerationQueue();
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue