Commit feb19c83 authored by Sashmita Raghav's avatar Sashmita Raghav Committed by Jean-Baptiste Mardelle

Add function to delete all subtitles from subtitle model

parent 872b95cf
......@@ -414,6 +414,18 @@ void SubtitleModel::removeSubtitle(GenTime pos)
model->endRemoveRows();
}
void SubtitleModel::removeAllSubtitles()
{
//qDebug()<<"Deleting all subtitles in model";
std::vector<GenTime> all_pos;
for (const auto &s : m_subtitleList) {
all_pos.push_back(s.first);
}
for (const auto &p : all_pos) {
removeSubtitle(p);
}
}
void SubtitleModel::moveSubtitle(GenTime oldPos, GenTime newPos)
{
qDebug()<<"Moving Subtitle";
......
......@@ -84,6 +84,9 @@ public:
/** @brief Remove subtitle at start position (pos) */
void removeSubtitle(GenTime pos);
/** @brief Remove all subtitles from subtitle model */
void removeAllSubtitles();
/** @brief Move an existing subtitle
@param oldPos is original start position of subtitle
@param newPos is new start position of subtitle
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment