connect(m_recMonitor, SIGNAL(showConfigDialog(int, int)), this, SLOT(slotPreferences(int, int)));
#endif
+ m_notesDock = new QDockWidget(i18n("Project Notes"), this);
+ m_notesDock->setObjectName("notes_widget");
+ m_notesWidget = new KTextEdit();
+ m_notesWidget->setTabChangesFocus(true);
+#if KDE_IS_VERSION(4,4,0)
+ m_notesWidget->setClickMessage(i18n("Enter your project notes here..."));
+#endif
+ m_notesDock->setWidget(m_notesWidget);
+ addDockWidget(Qt::TopDockWidgetArea, m_notesDock);
+
m_effectStackDock = new QDockWidget(i18n("Effect Stack"), this);
m_effectStackDock->setObjectName("effect_stack");
m_effectStack = new EffectStackView(m_projectMonitor);
/// Tabify Widgets ///
tabifyDockWidget(m_projectListDock, m_effectStackDock);
tabifyDockWidget(m_projectListDock, m_transitionConfigDock);
+ tabifyDockWidget(m_projectListDock, m_notesDock);
tabifyDockWidget(m_clipMonitorDock, m_projectMonitorDock);
loadTranscoders();
//kDebug() << factory() << " " << factory()->container("video_effects_menu", this);
- m_projectMonitor->setupMenu(static_cast<QMenu*>(factory()->container("monitor_go", this)), m_playZone, m_loopZone);
+ m_projectMonitor->setupMenu(static_cast<QMenu*>(factory()->container("monitor_go", this)), m_playZone, m_loopZone, NULL, m_loopClip);
m_clipMonitor->setupMenu(static_cast<QMenu*>(factory()->container("monitor_go", this)), m_playZone, m_loopZone, static_cast<QMenu*>(factory()->container("marker_menu", this)));
QMenu *clipInTimeline = static_cast<QMenu*>(factory()->container("clip_in_timeline", this));
collection->addAction("project_clean", projectClean);
connect(projectClean, SIGNAL(triggered(bool)), this, SLOT(slotCleanProject()));
+ KAction* projectAdjust = new KAction(KIcon(), i18n("Adjust Profile to Current Clip"), this);
+ collection->addAction("project_adjust_profile", projectAdjust);
+ connect(projectAdjust, SIGNAL(triggered(bool)), m_projectList, SLOT(adjustProjectProfileToItem()));
+
KAction* monitorPlay = new KAction(KIcon("media-playback-start"), i18n("Play"), this);
KShortcut playShortcut;
playShortcut.setPrimary(Qt::Key_Space);
collection->addAction("monitor_loop_zone", m_loopZone);
connect(m_loopZone, SIGNAL(triggered(bool)), m_monitorManager, SLOT(slotLoopZone()));
+ m_loopClip = new KAction(KIcon("media-playback-start"), i18n("Loop selected clip"), this);
+ m_loopClip->setEnabled(false);
+ collection->addAction("monitor_loop_clip", m_loopClip);
+ connect(m_loopClip, SIGNAL(triggered(bool)), m_projectMonitor, SLOT(slotLoopClip()));
+
KAction *dvdWizard = new KAction(KIcon("media-optical"), i18n("DVD Wizard"), this);
collection->addAction("dvd_wizard", dvdWizard);
connect(dvdWizard, SIGNAL(triggered(bool)), this, SLOT(slotDvdWizard()));
}
m_timelineArea->setEnabled(true);
m_projectList->setEnabled(true);
- KdenliveDoc *doc = new KdenliveDoc(KUrl(), projectFolder, m_commandStack, profileName, projectTracks, m_projectMonitor->render, this);
+ KdenliveDoc *doc = new KdenliveDoc(KUrl(), projectFolder, m_commandStack, profileName, projectTracks, m_projectMonitor->render, m_notesWidget, this);
doc->m_autosave = new KAutoSaveFile(KUrl(), doc);
bool ok;
TrackView *trackView = new TrackView(doc, &ok, this);
{
if (!m_timelineArea->isEnabled()) return;
m_fileRevert->setEnabled(true);
- KdenliveDoc *doc = new KdenliveDoc(url, KdenliveSettings::defaultprojectfolder(), m_commandStack, KdenliveSettings::default_profile(), QPoint(KdenliveSettings::videotracks(), KdenliveSettings::audiotracks()), m_projectMonitor->render, this);
+ KdenliveDoc *doc = new KdenliveDoc(url, KdenliveSettings::defaultprojectfolder(), m_commandStack, KdenliveSettings::default_profile(), QPoint(KdenliveSettings::videotracks(), KdenliveSettings::audiotracks()), m_projectMonitor->render, m_notesWidget, this);
if (stale == NULL) {
stale = new KAutoSaveFile(url, doc);
doc->m_autosave = stale;
if (w->exec() == QDialog::Accepted) {
QString profile = w->selectedProfile();
m_activeDocument->setProjectFolder(w->selectedFolder());
- if (m_renderWidget) m_renderWidget->setDocumentPath(w->selectedFolder().path(KUrl::AddTrailingSlash));
+ m_recMonitor->slotUpdateCaptureFolder(m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash));
+ if (m_renderWidget) m_renderWidget->setDocumentPath(m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash));
if (KdenliveSettings::videothumbnails() != w->enableVideoThumbs()) slotSwitchVideoThumbs();
if (KdenliveSettings::audiothumbnails() != w->enableAudioThumbs()) slotSwitchAudioThumbs();
if (m_activeDocument->profilePath() != profile) slotUpdateProjectProfile(profile);
disconnect(m_projectMonitor, SIGNAL(zoneUpdated(QPoint)), m_activeTimeline, SLOT(slotSetZone(QPoint)));
disconnect(m_projectMonitor, SIGNAL(durationChanged(int)), m_activeTimeline, SLOT(setDuration(int)));
disconnect(m_projectMonitor, SIGNAL(zoneUpdated(QPoint)), m_activeDocument, SLOT(setModified()));
+ disconnect(m_notesWidget, SIGNAL(textChanged()), m_activeDocument, SLOT(setModified()));
disconnect(m_clipMonitor, SIGNAL(zoneUpdated(QPoint)), m_activeDocument, SLOT(setModified()));
disconnect(m_projectList, SIGNAL(projectModified()), m_activeDocument, SLOT(setModified()));
disconnect(m_projectList, SIGNAL(updateProfile(const QString &)), this, SLOT(slotUpdateProjectProfile(const QString &)));
disconnect(m_activeDocument, SIGNAL(deleteTimelineClip(const QString &)), m_activeTimeline, SLOT(slotDeleteClip(const QString &)));
disconnect(m_activeTimeline->projectView(), SIGNAL(clipItemSelected(ClipItem*, int)), m_effectStack, SLOT(slotClipItemSelected(ClipItem*, int)));
disconnect(m_activeTimeline->projectView(), SIGNAL(clipItemSelected(ClipItem*, int)), this, SLOT(slotActivateEffectStackView()));
+ disconnect(m_activeTimeline->projectView(), SIGNAL(clipItemSelected(ClipItem*, int)), m_projectMonitor, SLOT(slotSetSelectedClip(ClipItem*)));
disconnect(m_activeTimeline->projectView(), SIGNAL(transitionItemSelected(Transition*, int, QPoint, bool)), m_transitionConfig, SLOT(slotTransitionItemSelected(Transition*, int, QPoint, bool)));
disconnect(m_activeTimeline->projectView(), SIGNAL(transitionItemSelected(Transition*, int, QPoint, bool)), this, SLOT(slotActivateTransitionView(Transition *)));
+ disconnect(m_activeTimeline->projectView(), SIGNAL(transitionItemSelected(Transition*, int, QPoint, bool)), m_projectMonitor, SLOT(slotSetSelectedClip(Transition*)));
disconnect(m_activeTimeline->projectView(), SIGNAL(playMonitor()), m_projectMonitor, SLOT(slotPlay()));
disconnect(m_activeTimeline->projectView(), SIGNAL(displayMessage(const QString&, MessageType)), m_messageLabel, SLOT(setMessage(const QString&, MessageType)));
disconnect(m_activeTimeline->projectView(), SIGNAL(showClipFrame(DocClipBase *, QPoint, const int)), m_clipMonitor, SLOT(slotSetXml(DocClipBase *, QPoint, const int)));
connect(doc, SIGNAL(deleteTimelineClip(const QString &)), trackView, SLOT(slotDeleteClip(const QString &)));
connect(doc, SIGNAL(docModified(bool)), this, SLOT(slotUpdateDocumentState(bool)));
connect(doc, SIGNAL(guidesUpdated()), this, SLOT(slotGuidesUpdated()));
-
+ connect(m_notesWidget, SIGNAL(textChanged()), doc, SLOT(setModified()));
connect(trackView->projectView(), SIGNAL(clipItemSelected(ClipItem*, int)), m_effectStack, SLOT(slotClipItemSelected(ClipItem*, int)));
connect(trackView->projectView(), SIGNAL(updateClipMarkers(DocClipBase *)), this, SLOT(slotUpdateClipMarkers(DocClipBase*)));
connect(trackView->projectView(), SIGNAL(showClipFrame(DocClipBase *, QPoint, const int)), m_clipMonitor, SLOT(slotSetXml(DocClipBase *, QPoint, const int)));
connect(trackView->projectView(), SIGNAL(playMonitor()), m_projectMonitor, SLOT(slotPlay()));
+ connect(trackView->projectView(), SIGNAL(clipItemSelected(ClipItem*, int)), m_projectMonitor, SLOT(slotSetSelectedClip(ClipItem*)));
+ connect(trackView->projectView(), SIGNAL(transitionItemSelected(Transition*, int, QPoint, bool)), m_projectMonitor, SLOT(slotSetSelectedClip(Transition*)));
connect(m_effectStack, SIGNAL(updateEffect(ClipItem*, int, QDomElement, QDomElement, int)), trackView->projectView(), SLOT(slotUpdateClipEffect(ClipItem*, int, QDomElement, QDomElement, int)));
connect(m_effectStack, SIGNAL(updateClipRegion(ClipItem*, int, QString)), trackView->projectView(), SLOT(slotUpdateClipRegion(ClipItem*, int, QString)));
m_activeDocument = doc;
m_activeTimeline->updateProjectFps();
m_activeDocument->checkProjectClips();
+ m_recMonitor->slotUpdateCaptureFolder(m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash));
if (KdenliveSettings::dropbframes()) slotUpdatePreviewSettings();
//Update the mouse position display so it will display in DF/NDF format by default based on the project setting.
slotUpdateMousePosition(0);
void MainWindow::slotPreferences(int page, int option)
{
- //An instance of your dialog could be already created and could be
- // cached, in which case you want to display the cached dialog
- // instead of creating another one
+ /*
+ * An instance of your dialog could be already created and could be
+ * cached, in which case you want to display the cached dialog
+ * instead of creating another one
+ */
if (KConfigDialog::showDialog("settings")) {
KdenliveSettingsDialog* d = static_cast <KdenliveSettingsDialog*>(KConfigDialog::exists("settings"));
if (page != -1) d->showPage(page, option);
connect(dialog, SIGNAL(doResetProfile()), m_monitorManager, SLOT(slotResetProfiles()));
connect(dialog, SIGNAL(updatePreviewSettings()), this, SLOT(slotUpdatePreviewSettings()));
#ifndef Q_WS_MAC
- connect(dialog, SIGNAL(updateCaptureFolder()), m_recMonitor, SLOT(slotUpdateCaptureFolder()));
+ connect(dialog, SIGNAL(updateCaptureFolder()), this, SLOT(slotUpdateCaptureFolder()));
#endif
//connect(dialog, SIGNAL(updatePreviewSettings()), this, SLOT(slotUpdatePreviewSettings()));
dialog->show();
if (page != -1) dialog->showPage(page, option);
}
+void MainWindow::slotUpdateCaptureFolder()
+{
+ if (m_activeDocument) m_recMonitor->slotUpdateCaptureFolder(m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash));
+ else m_recMonitor->slotUpdateCaptureFolder(KdenliveSettings::defaultprojectfolder());
+}
+
void MainWindow::slotUpdatePreviewSettings()
{
if (m_activeDocument) {
QVBoxLayout *vbox = new QVBoxLayout(widget);
QLabel *label1 = new QLabel(i18n("Save clip zone as:"), this);
- QString path = m_activeDocument->projectFolder().path();
- path.append("/");
+ QString path = m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash);
path.append("untitled.mlt");
KUrlRequester *url = new KUrlRequester(KUrl(path), this);
url->setFilter("video/mlt-playlist");
QString playlistPath;
if (scriptExport) {
bool ok;
- QString scriptsFolder = m_activeDocument->projectFolder().path() + "/scripts/";
+ QString scriptsFolder = m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash) + "scripts/";
QString path = m_renderWidget->getFreeScriptName();
scriptPath = QInputDialog::getText(this, i18n("Create Render Script"), i18n("Script name (will be saved in: %1)", scriptsFolder), QLineEdit::Normal, KUrl(path).fileName(), &ok);
if (!ok || scriptPath.isEmpty()) return;
m_waveformDock->setTitleBarWidget(0);
m_RGBParadeDock->setTitleBarWidget(0);
m_histogramDock->setTitleBarWidget(0);
+ m_notesDock->setTitleBarWidget(0);
} else {
if (!m_effectStackDock->isFloating()) {
m_effectStackDock->setTitleBarWidget(new QWidget);
if (!m_histogramDock->isFloating()) {
m_histogramDock->setTitleBarWidget(new QWidget(this));
}
+ if (!m_notesDock->isFloating()) {
+ m_notesDock->setTitleBarWidget(new QWidget(this));
+ }
}
KdenliveSettings::setShowtitlebars(show);
}