css files can be loaded from file

This commit is contained in:
itsmattkc
2019-01-12 02:03:53 +11:00
parent b1bb4b7808
commit 215606772c
6 changed files with 61 additions and 11 deletions
+7 -3
View File
@@ -46,7 +46,7 @@ Config::Config()
upcoming_queue_type(FRAME_QUEUE_TYPE_SECONDS),
loop(true),
pause_at_out_point(true),
seek_also_selects(false)
seek_also_selects(false)
{}
void Config::load(QString path) {
@@ -162,7 +162,10 @@ void Config::load(QString path) {
} else if (stream.name() == "SeekAlsoSelects") {
stream.readNext();
seek_also_selects = (stream.text() == "1");
}
} else if (stream.name() == "CSSPath") {
stream.readNext();
css_path = stream.text().toString();
}
}
}
if (stream.hasError()) {
@@ -220,7 +223,8 @@ void Config::save(QString path) {
stream.writeTextElement("UpcomingFrameQueueType", QString::number(upcoming_queue_type));
stream.writeTextElement("Loop", QString::number(loop));
stream.writeTextElement("PauseAtOutPoint", QString::number(pause_at_out_point));
stream.writeTextElement("SeekAlsoSelects", QString::number(seek_also_selects));
stream.writeTextElement("SeekAlsoSelects", QString::number(seek_also_selects));
stream.writeTextElement("CSSPath", css_path);
stream.writeEndElement(); // configuration
stream.writeEndDocument(); // doc