Add first run message
This commit is contained in:
parent
e7a5125725
commit
29d3a5b43b
2 changed files with 42 additions and 32 deletions
|
|
@ -130,6 +130,8 @@ void MainWindow::loadSettings()
|
|||
{
|
||||
QSettings settings("MusicGenerator", "AceStepGUI");
|
||||
|
||||
isFirstRun = settings.value("firstRun", true).toBool();
|
||||
|
||||
// Load JSON template (default to simple configuration)
|
||||
jsonTemplate = settings.value("jsonTemplate",
|
||||
"{\n\t\"inference_steps\": 8,\n\t\"shift\": 3.0,\n\t\"vocal_language\": \"en\"\n}").toString();
|
||||
|
|
@ -165,6 +167,8 @@ void MainWindow::saveSettings()
|
|||
settings.setValue("textEncoderModelPath", textEncoderModelPath);
|
||||
settings.setValue("ditModelPath", ditModelPath);
|
||||
settings.setValue("vaeModelPath", vaeModelPath);
|
||||
|
||||
settings.setValue("firstRun", false);
|
||||
}
|
||||
|
||||
QString MainWindow::formatTime(int milliseconds)
|
||||
|
|
@ -397,7 +401,6 @@ void MainWindow::on_advancedSettingsButton_clicked()
|
|||
vaeModelPath = dialog.getVAEModelPath();
|
||||
|
||||
saveSettings();
|
||||
QMessageBox::information(this, "Settings Saved", "Advanced settings have been saved successfully.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -804,3 +807,10 @@ bool MainWindow::loadPlaylistFromJson(const QString &filePath, QList<SongItem> &
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
void MainWindow::show()
|
||||
{
|
||||
QMainWindow::show();
|
||||
if(isFirstRun)
|
||||
QMessageBox::information(this, "Welcome", "Welcome to AceStepGUI! Please configure paths in Settings→Ace Step before generateing your first song.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,10 +27,41 @@ class MainWindow : public QMainWindow
|
|||
{
|
||||
Q_OBJECT
|
||||
|
||||
Ui::MainWindow *ui;
|
||||
SongListModel *songModel;
|
||||
AudioPlayer *audioPlayer;
|
||||
QThread aceThread;
|
||||
AceStep *aceStep;
|
||||
QTimer *playbackTimer;
|
||||
|
||||
QString formatTime(int milliseconds);
|
||||
|
||||
SongItem currentSong;
|
||||
bool isPlaying;
|
||||
bool isPaused;
|
||||
bool shuffleMode;
|
||||
bool isGeneratingNext;
|
||||
bool isFirstRun;
|
||||
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;
|
||||
|
||||
public:
|
||||
MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
public slots:
|
||||
void show();
|
||||
|
||||
private slots:
|
||||
void on_playButton_clicked();
|
||||
void on_pauseButton_clicked();
|
||||
|
|
@ -58,37 +89,6 @@ private slots:
|
|||
void on_actionAppendPlaylist();
|
||||
void on_actionSaveSong();
|
||||
|
||||
private:
|
||||
void startNextSongGeneration();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
SongListModel *songModel;
|
||||
AudioPlayer *audioPlayer;
|
||||
QThread aceThread;
|
||||
AceStep *aceStep;
|
||||
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
|
||||
static constexpr int generationTresh = 2;
|
||||
QQueue<SongItem> generatedSongQueue;
|
||||
|
||||
private:
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue