Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 3ed57110 authored by Nicolas Carion's avatar Nicolas Carion

[Timeline2][Model] Add option to init tracks when constructing timeline

parent 2306f442
......@@ -34,10 +34,14 @@ TimelineModel::TimelineModel() :
{
}
std::shared_ptr<TimelineModel> TimelineModel::construct()
std::shared_ptr<TimelineModel> TimelineModel::construct(bool populate)
{
std::shared_ptr<TimelineModel> ptr(new TimelineModel());
ptr->m_groups = std::unique_ptr<GroupsModel>(new GroupsModel(ptr));
if (populate) {
TrackModel::construct(ptr);
TrackModel::construct(ptr);
}
return ptr;
}
......
......@@ -37,7 +37,7 @@ class TimelineModel
public:
/* @brief construct a timeline object and returns a pointer to the created object
*/
static std::shared_ptr<TimelineModel> construct();
static std::shared_ptr<TimelineModel> construct(bool populate = false);
protected:
/* @brief this constructor should not be called. Call the static construct instead
......
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