Cleanup file format, refactoring progress (move more stuff in appropriate...

Cleanup file format, refactoring progress (move more stuff in appropriate places (timeline.cpp/track.cpp)
parent f6a66670
......@@ -856,6 +856,8 @@ void Bin::selectProxyModel(const QModelIndex &id)
m_editAction->setEnabled(true);
m_reloadAction->setEnabled(true);
m_duplicateAction->setEnabled(true);
ClipType type = ((ProjectClip *)currentItem)->clipType();
m_openAction->setEnabled(type == Image || type == Audio);
if (m_propertiesPanel->width() > 0) {
// if info panel is displayed, update info
showClipProperties((ProjectClip *)currentItem);
......@@ -865,6 +867,7 @@ void Bin::selectProxyModel(const QModelIndex &id)
} else {
// A folder was selected, disable editing clip
m_editAction->setEnabled(false);
m_openAction->setEnabled(false);
m_reloadAction->setEnabled(false);
m_duplicateAction->setEnabled(false);
m_deleteAction->setText(i18n("Delete Folder"));
......@@ -875,12 +878,14 @@ void Bin::selectProxyModel(const QModelIndex &id)
m_reloadAction->setEnabled(false);
m_duplicateAction->setEnabled(false);
m_editAction->setEnabled(false);
m_openAction->setEnabled(false);
m_deleteAction->setEnabled(false);
}
}
else {
// No item selected in bin
m_editAction->setEnabled(false);
m_openAction->setEnabled(false);
m_deleteAction->setEnabled(false);
// Hide properties panel
m_collapser->collapse();
......@@ -1029,6 +1034,7 @@ void Bin::closeEditing()
void Bin::contextMenuEvent(QContextMenuEvent *event)
{
bool enableClipActions = false;
ClipType type = Unknown;
if (m_itemView) {
QModelIndex idx = m_itemView->indexAt(m_itemView->viewport()->mapFromGlobal(event->globalPos()));
if (idx.isValid()) {
......@@ -1045,6 +1051,7 @@ void Bin::contextMenuEvent(QContextMenuEvent *event)
QString condition;
QString audioCodec = clip->codec(true);
QString videoCodec = clip->codec(false);
type = clip->clipType();
bool noCodecInfo = false;
if (audioCodec.isEmpty() && videoCodec.isEmpty()) {
noCodecInfo = true;
......@@ -1077,6 +1084,7 @@ void Bin::contextMenuEvent(QContextMenuEvent *event)
m_proxyAction->setEnabled(enableClipActions);
m_transcodeAction->setEnabled(enableClipActions);
m_editAction->setEnabled(enableClipActions);
m_openAction->setEnabled(type == Image || type == Audio);
m_reloadAction->setEnabled(enableClipActions);
m_duplicateAction->setEnabled(enableClipActions);
m_clipsActionsMenu->setEnabled(enableClipActions);
......
......@@ -164,7 +164,7 @@ public:
isBlind(0),
isLocked(0),
duration(0),
effectsList() {}
effectsList(true) {}
};
......
......@@ -285,6 +285,24 @@ MltVideoProfile ProfilesDialog::getVideoProfile(const QString &name)
return result;
}
// static
MltVideoProfile ProfilesDialog::getVideoProfile(Mlt::Profile &profile)
{
MltVideoProfile result;
result.description = profile.description();
result.frame_rate_num = profile.frame_rate_num();
result.frame_rate_den = profile.frame_rate_den();
result.width = profile.width();
result.height = profile.height();
result.progressive = profile.progressive();
result.sample_aspect_num = profile.sample_aspect_num();
result.sample_aspect_den = profile.sample_aspect_den();
result.display_aspect_num = profile.display_aspect_num();
result.display_aspect_den = profile.display_aspect_den();
result.colorspace = profile.colorspace();
return result;
}
// static
bool ProfilesDialog::existingProfileDescription(const QString &desc)
{
......
......@@ -24,6 +24,7 @@
#include "definitions.h"
#include "ui_profiledialog_ui.h"
#include <mlt++/Mlt.h>
class ProfilesDialog : public QDialog
{
......@@ -37,6 +38,7 @@ public:
void fillList(const QString &selectedProfile = QString());
static QMap< QString, QString > getSettingsFromFile(const QString& path);
static MltVideoProfile getVideoProfile(const QString &name);
static MltVideoProfile getVideoProfile(Mlt::Profile &profile);
static QMap <QString, QString> getProfilesInfo();
static void saveProfile(MltVideoProfile &profile, QString profilePath = QString());
static QString existingProfile(const MltVideoProfile &profile);
......
......@@ -79,6 +79,7 @@ bool DocumentChecker::hasErrorInClips()
m_safeImages.clear();
m_safeFonts.clear();
max = documentProducers.count();
QStringList verifiedPaths;
for (int i = 0; i < max; ++i) {
e = documentProducers.item(i).toElement();
QString service = EffectsList::property(e, "mlt_service");
......@@ -95,6 +96,10 @@ bool DocumentChecker::hasErrorInClips()
if (!resource.startsWith("/")) {
resource.prepend(root);
}
if (verifiedPaths.contains(resource)) {
// Don't check same url twice (for example track producers)
continue;
}
qDebug()<<" / / /Checking resource: "<<resource;
if (e.hasAttribute("proxy")) {
QString proxyresource = e.attribute("proxy");
......@@ -117,6 +122,7 @@ bool DocumentChecker::hasErrorInClips()
// Missing clip found
m_missingClips.append(e);
} else {
verifiedPaths.append(resource);
// Check if the clip has changed
//TODO
/*if (clipType != SlideShow && e.hasAttribute("file_hash")) {
......
......@@ -60,10 +60,6 @@ bool DocumentValidator::validate(const double currentVersion)
return false;
QDomElement kdenliveDoc = mlt.firstChildElement("kdenlivedoc");
// Check if we're validating a Kdenlive project
if (kdenliveDoc.isNull())
return false;
QString rootDir = mlt.attribute("root");
if (rootDir == "$CURRENTPATH") {
// The document was extracted from a Kdenlive archived project, fix root directory
......@@ -122,23 +118,29 @@ bool DocumentValidator::validate(const double currentVersion)
initEffects::parseEffectFiles(pCore->binController()->mltRepository(), setlocale(LC_NUMERIC_MASK, NULL));
#endif
}
bool ok;
double version = documentLocale.toDouble(kdenliveDoc.attribute("version"), &ok);
if (!ok) {
// Could not parse version number, there is probably a conflict in decimal separator
QLocale tempLocale = QLocale(mlt.attribute("LC_NUMERIC"));
version = tempLocale.toDouble(kdenliveDoc.attribute("version"), &ok);
if (!ok) version = kdenliveDoc.attribute("version").toDouble(&ok);
if (!ok) {
// Last try: replace comma with a dot
QString versionString = kdenliveDoc.attribute("version");
if (versionString.contains(',')) versionString.replace(',', '.');
version = versionString.toDouble(&ok);
if (!ok) qDebug()<<"// CANNOT PARSE VERSION NUMBER, ERROR!";
}
double version = -1;
if (kdenliveDoc.isNull() || !kdenliveDoc.hasAttribute("version")) {
// Newer Kdenlive document version
QDomElement main = mlt.firstChildElement("playlist");
version = EffectsList::property(main, "kdenlive:docproperties.version").toDouble();
}
else {
bool ok;
version = documentLocale.toDouble(kdenliveDoc.attribute("version"), &ok);
if (!ok) {
// Could not parse version number, there is probably a conflict in decimal separator
QLocale tempLocale = QLocale(mlt.attribute("LC_NUMERIC"));
version = tempLocale.toDouble(kdenliveDoc.attribute("version"), &ok);
if (!ok) version = kdenliveDoc.attribute("version").toDouble(&ok);
if (!ok) {
// Last try: replace comma with a dot
QString versionString = kdenliveDoc.attribute("version");
if (versionString.contains(',')) versionString.replace(',', '.');
version = versionString.toDouble(&ok);
if (!ok) qDebug()<<"// CANNOT PARSE VERSION NUMBER, ERROR!";
}
}
}
// Upgrade the document to the latest version
if (!upgrade(version, currentVersion))
return false;
......@@ -251,11 +253,9 @@ bool DocumentValidator::validate(const double currentVersion)
tracksinfoElm.appendChild(trackinfo);
}
}
}
}
// TODO: check the tracks references
// TODO: check internal mix transitions
}
updateEffects();
......@@ -265,7 +265,7 @@ bool DocumentValidator::validate(const double currentVersion)
bool DocumentValidator::upgrade(double version, const double currentVersion)
{
//qDebug() << "Opening a document with version " << version;
qDebug() << "Opening a document with version " << version << " / "<<currentVersion;
// No conversion needed
if (version == currentVersion) {
......@@ -1008,6 +1008,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
// Create Bin Playlist
QDomElement main_playlist = m_doc.createElement("playlist");
main_playlist.setAttribute("id", "main bin");
QDomElement prop = m_doc.createElement("property");
prop.setAttribute("name", "xml_retain");
QDomText val = m_doc.createTextNode("1");
......@@ -1091,7 +1092,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
}
ids.append(prodId);
}
// Set clip folders
QDomNodeList kdenlive_producers = m_doc.elementsByTagName("kdenlive_producer");
for (int j = 0; j < kdenlive_producers.count(); j++) {
......@@ -1170,9 +1171,68 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
frag.appendChild(main_playlist);
mlt.insertBefore(frag, firstProd);
}
// The document has been converted: mark it as modified
infoXml.setAttribute("version", currentVersion);
if (version < 0.91) {
// Migrate track properties
QDomNodeList old_tracks = m_doc.elementsByTagName("trackinfo");
QDomNodeList tracks = m_doc.elementsByTagName("track");
QDomNodeList playlists = m_doc.elementsByTagName("playlist");
for (int i = 0; i < old_tracks.count(); i++) {
QString playlistName = tracks.at(i + 1).toElement().attribute("producer");
// find playlist for track
QDomElement trackPlaylist;
for (int j = 0; j < playlists.count(); j++) {
if (playlists.at(j).toElement().attribute("id") == playlistName) {
trackPlaylist = playlists.at(j).toElement();
break;
}
}
if (!trackPlaylist.isNull()) {
QDomElement kdenliveTrack = old_tracks.at(i).toElement();
if (kdenliveTrack.attribute("type") == "audio") {
qDebug()<<"Found AUDIO TK";
EffectsList::setProperty(trackPlaylist, "kdenlive:audio_track", "1");
}
if (kdenliveTrack.attribute("locked") == "1") {
EffectsList::setProperty(trackPlaylist, "kdenlive:locked_track", "1");
}
EffectsList::setProperty(trackPlaylist, "kdenlive:track_name", kdenliveTrack.attribute("trackname"));
}
}
// Find bin playlist
playlists = m_doc.elementsByTagName("playlist");
QDomElement playlist;
for (int i = 0; i < playlists.count(); i++) {
if (playlists.at(i).toElement().attribute("id") == "main bin") {
playlist = playlists.at(i).toElement();
break;
}
}
// Migrate document notes
QDomNodeList notesList = m_doc.elementsByTagName("documentnotes");
if (!notesList.isEmpty()) {
QDomElement notes_elem = notesList.at(0).toElement();
QString notes = notes_elem.firstChild().nodeValue();
EffectsList::setProperty(playlist, "kdenlive:documentnotes", notes);
}
// Migrate clip groups
QDomNodeList groupElement = m_doc.elementsByTagName("groups");
if (!groupElement.isEmpty()) {
QDomElement groups = groupElement.at(0).toElement();
QDomDocument d2;
d2.importNode(groups, true);
EffectsList::setProperty(playlist, "kdenlive:clipgroups", d2.toString());
}
// Migrate custom effects
QDomNodeList effectsElement = m_doc.elementsByTagName("customeffects");
if (!effectsElement.isEmpty()) {
QDomElement effects = effectsElement.at(0).toElement();
QDomDocument d2;
d2.importNode(effects, true);
EffectsList::setProperty(playlist, "kdenlive:customeffects", d2.toString());
}
EffectsList::setProperty(playlist, "kdenlive:docproperties.version", QString::number(currentVersion));
}
m_modified = true;
return true;
}
......@@ -1264,8 +1324,9 @@ QString DocumentValidator::colorToString(const QColor& c)
bool DocumentValidator::isProject() const
{
QDomNode infoXmlNode = m_doc.elementsByTagName("kdenlivedoc").at(0);
return !infoXmlNode.isNull();
return m_doc.documentElement().tagName() == "mlt";
/*QDomNode infoXmlNode = m_doc.elementsByTagName("kdenlivedoc").at(0);
return !infoXmlNode.isNull();*/
}
bool DocumentValidator::isModified() const
......
This diff is collapsed.
......@@ -78,6 +78,7 @@ public:
QUndoStack *commandStack();
Render *renderer();
ClipManager *clipManager();
QString groupsXml() const;
/** @brief Adds a clip to the project tree.
* @return false if the user aborted the operation, true otherwise */
......@@ -104,7 +105,7 @@ public:
/** @brief Informs Kdenlive of the audio thumbnails generation progress. */
void setThumbsProgress(const QString &message, int progress);
const QString &profilePath() const;
MltVideoProfile mltProfile() const;
Q_DECL_DEPRECATED MltVideoProfile mltProfile() const;
ProfileInfo getProfileInfo() const;
//Mlt::Profile *profile();
const QString description() const;
......@@ -124,33 +125,9 @@ public:
double dar() const;
double projectDuration() const;
/** @brief Returns the project file xml. */
QDomDocument xmlSceneList(const QString &scene, QMap <double, QString> guidesData);
QDomDocument xmlSceneList(const QString &scene);
/** @brief Saves the project file xml to a file. */
bool saveSceneList(const QString &path, const QString &scene, QMap <double, QString> guidesData);
int tracksCount() const;
TrackInfo trackInfoAt(int ix) const;
void insertTrack(int ix, const TrackInfo &type);
void deleteTrack(int ix);
void setTrackType(int ix, const TrackInfo &type);
const QList <TrackInfo> tracksList() const;
/** @brief Gets the number of audio and video tracks and returns them as a QPoint with x = video, y = audio. */
QPoint getTracksCount() const;
void switchTrackVideo(int ix, bool hide);
void switchTrackAudio(int ix, bool hide);
void switchTrackLock(int ix, bool lock);
bool isTrackLocked(int ix) const;
/** @brief Sets the duration of track @param ix to @param duration.
* This does not! influence the actual track but only the value in its TrackInfo. */
void setTrackDuration(int ix, int duration);
/** @brief Returns the duration of track @param ix.
*
* The returned duration might differ from the actual track duration!
* It is the one stored in the track's TrackInfo. */
int trackDuration(int ix);
bool saveSceneList(const QString &path, const QString &scene);
void cacheImage(const QString &fileId, const QImage &img) const;
void setProjectFolder(QUrl url);
void setZone(int start, int end);
......@@ -161,15 +138,6 @@ public:
/** @brief Gets the list of renderer properties saved into the document. */
QMap <QString, QString> getRenderProperties() const;
void addTrackEffect(int ix, QDomElement effect);
void removeTrackEffect(int ix, const QDomElement &effect);
void setTrackEffect(int trackIndex, int effectIndex, QDomElement effect);
const EffectsList getTrackEffects(int ix);
/** @brief Enable / disable an effect in Kdenlive's xml list. */
void enableTrackEffects(int trackIndex, const QList<int> &effectIndexes, bool disable);
QDomElement getTrackEffect(int trackIndex, int effectIndex) const;
/** @brief Check if a track already contains a specific effect. */
int hasTrackEffect(int trackIndex, const QString &tag, const QString &id) const;
/** @brief Get a list of folder id's that were opened on last save. */
QStringList getExpandedFolders();
/** @brief Read the display ratio from an xml project file. */
......@@ -185,9 +153,13 @@ public:
const QSize getRenderSize() const;
/** @brief Add url to the file watcher so that we monitor changes */
void watchFile(const QUrl &url);
/** @brief Get all document properties that need to be saved */
const QMap <QString, QString> documentProperties();
bool useProxy() const;
QString documentNotes() const;
/** @brief Saves effects embedded in project file. */
void saveCustomEffects(const QDomNodeList &customeffects);
private:
QUrl m_url;
QDomDocument m_document;
......@@ -196,7 +168,6 @@ private:
QTimer m_modifiedTimer;
/** List of the clip IDs that need to be reloaded after being externally modified */
QMap <QString, QTime> m_modifiedClips;
double m_fps;
int m_width;
int m_height;
Timecode m_timecode;
......@@ -215,7 +186,6 @@ private:
QMap <QString, QString> m_documentProperties;
QMap <QString, QString> m_documentMetadata;
QList <TrackInfo> m_tracksList;
void setNewClipResource(const QString &id, const QString &path);
QString searchFileRecursively(const QDir &dir, const QString &matchSize, const QString &matchHash) const;
void moveProjectData(const QUrl &url);
......@@ -230,14 +200,13 @@ private:
/** @brief Creates a new project. */
QDomDocument createEmptyDocument(int videotracks, int audiotracks);
QDomDocument createEmptyDocument(const QList<TrackInfo> &tracks);
/** @brief Saves effects embedded in project file.
* @return True if effects were imported. */
bool saveCustomEffects(const QDomNodeList &customeffects);
/** @brief Updates the project folder location entry in the kdenlive file dialogs to point to the current project folder. */
void updateProjectFolderPlacesEntry();
/** @brief Only keep some backup files, delete some */
void cleanupBackupFiles();
/** @brief Load document properties from the xml file */
void loadDocumentProperties();
public slots:
void slotCreateXmlClip(const QString &name, const QDomElement &xml, const QString &group, const QString &groupId);
......@@ -252,7 +221,7 @@ public slots:
void slotProxyCurrentItem(bool doProxy);
/** @brief Saves the current project at the autosave location.
* @description The autosave files are in ~/.kde/data/stalefiles/kdenlive/ */
void slotAutoSave(QMap <double, QString> guidesData);
void slotAutoSave();
private slots:
void slotClipModified(const QString &path);
......@@ -260,6 +229,7 @@ private slots:
void slotClipAvailable(const QString &path);
void slotProcessModifiedClips();
void slotModified();
void slotSetDocumentNotes(const QString &notes);
signals:
void resetProjectList();
......@@ -276,6 +246,8 @@ signals:
void saveTimelinePreview(const QString &path);
/** @brief Trigger the autosave timer start */
void startAutoSave();
/** @brief Current doc created effects, reload list */
void reloadEffects();
};
#endif
......
......@@ -671,7 +671,7 @@ void MainWindow::slotAddEffect(const QDomElement &effect)
}
QDomElement effectToAdd = effect.cloneNode().toElement();
EFFECTMODE status = m_effectStack->effectStatus();
if (status == TIMELINE_TRACK) pCore->projectManager()->currentTimeline()->projectView()->slotAddTrackEffect(effectToAdd, pCore->projectManager()->current()->tracksCount() - m_effectStack->trackIndex());
if (status == TIMELINE_TRACK) pCore->projectManager()->currentTimeline()->projectView()->slotAddTrackEffect(effectToAdd, pCore->projectManager()->currentTimeline()->tracksCount() - m_effectStack->trackIndex());
else if (status == TIMELINE_CLIP) pCore->projectManager()->currentTimeline()->projectView()->slotAddEffect(effectToAdd, GenTime(), -1);
else if (status == MASTER_CLIP) pCore->bin()->addEffect(QString(), effectToAdd);
}
......@@ -1335,7 +1335,7 @@ void MainWindow::slotEditProfiles()
void MainWindow::slotEditProjectSettings()
{
KdenliveDoc *project = pCore->projectManager()->current();
QPoint p = project->getTracksCount();
QPoint p = pCore->projectManager()->currentTimeline()->getTracksCount();
QPointer<ProjectSettings> w = new ProjectSettings(project, project->metadata(), pCore->projectManager()->currentTimeline()->projectView()->extractTransitionsLumas(), p.x(), p.y(), project->projectFolder().path(), true, !project->isModified(), this);
connect(w, SIGNAL(disableProxies()), this, SLOT(slotDisableProxies()));
......@@ -1542,6 +1542,7 @@ void MainWindow::connectDocument()
Timeline *trackView = pCore->projectManager()->currentTimeline();
pCore->binController()->resetProfile(project->profilePath());
connect(project, SIGNAL(startAutoSave()), pCore->projectManager(), SLOT(slotStartAutoSave()));
connect(project, SIGNAL(reloadEffects()), this, SLOT(slotReloadEffects()));
// Resetting monitor profiles should now be handled by binController
//pCore->monitorManager()->resetProfiles(project->timecode());
KdenliveSettings::setProject_fps(project->fps());
......@@ -2293,15 +2294,15 @@ void MainWindow::customEvent(QEvent* e)
void MainWindow::slotTimelineClipSelected(ClipItem* item, bool raise)
{
if (item == m_mainClip) return;
if (m_mainClip) {
m_mainClip->setMainSelectedClip(false);
}
if (item) {
item->setMainSelectedClip(true);
if (item != m_mainClip) {
if (m_mainClip) {
m_mainClip->setMainSelectedClip(false);
}
if (item) {
item->setMainSelectedClip(true);
}
m_mainClip = item;
}
m_mainClip = item;
m_effectStack->slotClipItemSelected(item, m_projectMonitor);
m_projectMonitor->slotSetSelectedClip(item);
if (raise) {
......@@ -2811,7 +2812,7 @@ void MainWindow::slotPrepareRendering(bool scriptExport, bool zoneOnly, const QS
QString mltSuffix(".mlt");
QList<QString> playlistPaths;
QList<QString> trackNames;
const QList <TrackInfo> trackInfoList = project->tracksList();
const QList <TrackInfo> trackInfoList = pCore->projectManager()->currentTimeline()->getTracksInfo();
int tracksCount = 1;
bool stemExport = m_renderWidget->isStemAudioExportEnabled();
......@@ -3147,7 +3148,8 @@ void MainWindow::slotUpdateProxySettings()
void MainWindow::slotArchiveProject()
{
QList <ClipController*> list = pCore->binController()->getControllerList();
QDomDocument doc = pCore->projectManager()->current()->xmlSceneList(m_projectMonitor->sceneList(), pCore->projectManager()->currentTimeline()->projectView()->guidesData());
pCore->binController()->saveDocumentProperties(pCore->projectManager()->current()->documentProperties(), pCore->projectManager()->currentTimeline()->projectView()->guidesData());
QDomDocument doc = pCore->projectManager()->current()->xmlSceneList(m_projectMonitor->sceneList());
QPointer<ArchiveWidget> d = new ArchiveWidget(pCore->projectManager()->current()->url().fileName(), doc, list, pCore->projectManager()->currentTimeline()->projectView()->extractTransitionsLumas(), this);
if (d->exec()) {
m_messageLabel->setMessage(i18n("Archiving project"), OperationCompletedMessage);
......@@ -3184,7 +3186,7 @@ void MainWindow::slotSaveTimelineClip()
}
QUrl url = QFileDialog::getSaveFileUrl(this, i18n("Save clip"), pCore->projectManager()->current()->projectFolder(), i18n("MLT playlist (*.mlt)"));
if (url.isValid()) {
m_projectMonitor->render->saveClip(pCore->projectManager()->current()->tracksCount() - clip->track(), clip->startPos(), url);
m_projectMonitor->render->saveClip(pCore->projectManager()->currentTimeline()->tracksCount() - clip->track(), clip->startPos(), url);
}
}
}
......
......@@ -109,6 +109,10 @@ void BinController::initializeBin(Mlt::Playlist playlist)
}
emit loadFolders(foldersData);
// Read notes
QString notes = playlistProps.get("kdenlive:documentnotes");
emit setDocumentNotes(notes);
// Fill Controller's list
m_binPlaylist = new Mlt::Playlist(playlist);
m_binPlaylist->set("id", kPlaylistTrackId);
......@@ -487,3 +491,31 @@ void BinController::checkAudioThumbs()
}
}
void BinController::saveDocumentProperties(const QMap <QString, QString> props, const QMap <double, QString> guidesData)
{
QMapIterator<QString, QString> i(props);
while (i.hasNext()) {
i.next();
m_binPlaylist->set(("kdenlive:docproperties." + i.key()).toUtf8().constData(), i.value().toUtf8().constData());
}
// Append guides
QMapIterator<double, QString> g(guidesData);
QLocale locale;
while (g.hasNext()) {
g.next();
QString propertyName = "kdenlive:guide." + locale.toString(g.key());
m_binPlaylist->set(propertyName.toUtf8().constData(), g.value().toUtf8().constData());
}
}
void BinController::saveProperty(const QString &name, const QString & value)
{
m_binPlaylist->set(name.toUtf8().constData(), value.toUtf8().constData());
}
const QString BinController::getProperty(const QString &name)
{
return QString(m_binPlaylist->get(name.toUtf8().constData()));
}
......@@ -155,6 +155,15 @@ public:
/** @brief Request audio thumbnails for all producers */
void checkAudioThumbs();
/** @brief Save document properties in MLT's bin playlist */
void saveDocumentProperties(const QMap <QString, QString> props, const QMap <double, QString> guidesData);
/** @brief Save a property to main bin */
void saveProperty(const QString &name, const QString & value);
/** @brief Save a property from the main bin */
const QString getProperty(const QString &name);
public slots:
/** @brief Stored a Bin Folder id / name to MLT's bin playlist. Using an empry folderName deletes the property */
void slotStoreFolder(const QString &folderId, const QString &parentId, const QString &oldParentId, const QString &folderName);
......@@ -192,6 +201,7 @@ signals:
void requestAudioThumb(const QString&);
void abortAudioThumb(const QString&);
void replaceTimelineProducer(const QString &id);
void setDocumentNotes(const QString &);
};
#endif