user default template (jankish for now but whatever)

master
zetaPRIME 2022-03-13 23:14:34 -04:00
parent 7fa610f4af
commit 394b24223f
4 changed files with 7 additions and 2 deletions

4
notes
View File

@ -32,7 +32,7 @@ parameters {
TODO {
immediate frontburner {
user-defined default template
- user-defined default template
clear song info on loading template?
revert action
@ -50,6 +50,8 @@ TODO {
eventually swap over to actually using ffmpeg as a library >_>
figure out what to actually do with directory config
buffer helper akin to what quicklevel does {
keeps a buffer length, running averages, etc.
can lerp across tick for speed

View File

@ -8,3 +8,4 @@ const QString Directories::stateFile = QStandardPaths::writableLocation(QStandar
QString Directories::projects = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation).append("/xybrid/projects");
QString Directories::presets = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation).append("/xybrid/nodes");
QString Directories::userDefaultTemplate = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation).append("/xybrid/default.xyp");

View File

@ -9,5 +9,6 @@ namespace Xybrid::Config {
extern QString projects;
extern QString presets;
extern QString userDefaultTemplate;
}
}

View File

@ -271,7 +271,8 @@ std::shared_ptr<Project> FileOps::loadProject(QString fileName, bool asTemplate)
std::shared_ptr<Project> FileOps::newProject(bool useTemplate) {
std::shared_ptr<Project> project;
if (useTemplate) {
project = loadProject(":/template/default.xyp", true);
project = loadProject(Config::Directories::userDefaultTemplate, true);
if (!project) project = loadProject(":/template/default.xyp", true);
}
if (!project) {
project = std::make_shared<Project>();