Skip to content
Extraits de code Groupes Projets

Add the ASS sub document and the ASS tree

Fusionnées Kubat a demandé de fusionner ass-sub-document vers master
4 files
+ 43
4
Comparer les modifications
  • Côte à côte
  • En ligne

Fichiers

+ 11
1
@@ -15,7+15,7 @@
@@ -15,7+15,7 @@
while (!in.atEnd()) {
while (!in.atEnd()) {
const QString line = in.readLine().trimmed();
const QString line = in.readLine().trimmed();
// Dectect comment
// Dectect comment
if (line.startsWith(";") || line.isEmpty()) {
if (line.startsWith(";") || line.isEmpty()) {
lineIndex++;
lineIndex++;
@@ -63,7+63,7 @@
@@ -63,7+63,7 @@
for (const auto &styleLine : stylesContent)
for (const auto &styleLine : stylesContent)
assStyles.push_back(std::make_shared<Style>(styleLine));
assStyles.push_back(std::make_shared<Style>(styleLine));
for (const auto &assLine : eventsContent)
for (const auto &assLine : eventsContent)
assLines.push_back(std::make_shared<Line>(assLine));
assLines.push_back(std::make_shared<Line>(this, assLine));
} catch (const std::runtime_error &e) {
} catch (const std::runtime_error &e) {
qCritical() << "Failed to create ASS style or events with error:" << e.what();
qCritical() << "Failed to create ASS style or events with error:" << e.what();
}
}
@@ -138,3 +138,13 @@ AssFactory::getInfoSection() const noexcept
@@ -138,3 +138,13 @@ AssFactory::getInfoSection() const noexcept
{
{
return assInfo;
return assInfo;
}
}
 
 
bool
 
AssFactory::hasStyle(const QString &name) const noexcept
 
{
 
for (const auto &stylePtr : assStyles) {
 
if (stylePtr->getElementName() == name)
 
return true;
 
}
 
return false;
 
}
Chargement en cours