EffectsList MainWindow::customEffects;
EffectsList MainWindow::transitions;
-MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, QWidget *parent) :
+MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString & clipsToLoad, QWidget *parent) :
KXmlGuiWindow(parent),
m_activeDocument(NULL),
m_activeTimeline(NULL),
newFile(false);
}
+ if (!clipsToLoad.isEmpty() && m_activeDocument) {
+ QStringList list = clipsToLoad.split(',');
+ QList <QUrl> urls;
+ foreach(QString path, list) {
+ kDebug() << QDir::current().absoluteFilePath(path);
+ urls << QUrl::fromLocalFile(QDir::current().absoluteFilePath(path));
+ }
+ m_projectList->slotAddClip(urls);
+ }
+
#ifndef NO_JOGSHUTTLE
activateShuttleDevice();
#endif /* NO_JOGSHUTTLE */
KToggleFullScreenAction::setFullScreen(this, actionCollection()->action("fullscreen")->isChecked());
}
-void MainWindow::slotAddEffect(const QDomElement effect, GenTime pos, int track)
+void MainWindow::slotAddEffect(const QDomElement effect)
{
if (!m_activeDocument) return;
if (effect.isNull()) {
return;
}
QDomElement effectToAdd = effect.cloneNode().toElement();
- m_activeTimeline->projectView()->slotAddEffect(effectToAdd, pos, track);
+ bool ok;
+ int ix = m_effectStack->isTrackMode(&ok);
+ if (ok) m_activeTimeline->projectView()->slotAddTrackEffect(effectToAdd, m_activeDocument->tracksCount() - ix);
+ else m_activeTimeline->projectView()->slotAddEffect(effectToAdd, GenTime(), -1);
}
void MainWindow::slotRaiseMonitor(bool clipMonitor)
KToolBar *toolbar = new KToolBar("statusToolBar", this, Qt::BottomToolBarArea);
toolbar->setMovable(false);
+ KColorScheme scheme(palette().currentColorGroup(), KColorScheme::Window, KSharedConfig::openConfig(KdenliveSettings::colortheme()));
+ QColor buttonBg = scheme.background(KColorScheme::LinkBackground).color();
+ QColor buttonBord = scheme.foreground(KColorScheme::LinkText).color();
+ QColor buttonBord2 = scheme.shade(KColorScheme::LightShade);
statusBar()->setStyleSheet(QString("QStatusBar QLabel {font-size:%1pt;} QStatusBar::item { border: 0px; font-size:%1pt;padding:0px; }").arg(statusBar()->font().pointSize()));
- QString style1 = "QToolBar { border: 0px } QToolButton { border-style: inset; border:1px solid #999999;border-radius: 3px;margin: 0px 3px;padding: 0px;} QToolButton:checked { background-color: rgba(224, 224, 0, 100); border-style: inset; border:1px solid #cc6666;border-radius: 3px;}";
+ QString style1 = QString("QToolBar { border: 0px } QToolButton { border-style: inset; border:1px solid transparent;border-radius: 3px;margin: 0px 3px;padding: 0px;} QToolButton:hover { background: rgb(%7, %8, %9);border-style: inset; border:1px solid rgb(%7, %8, %9);border-radius: 3px;} QToolButton:checked { background-color: rgb(%1, %2, %3); border-style: inset; border:1px solid rgb(%4, %5, %6);border-radius: 3px;}").arg(buttonBg.red()).arg(buttonBg.green()).arg(buttonBg.blue()).arg(buttonBord.red()).arg(buttonBord.green()).arg(buttonBord.blue()).arg(buttonBord2.red()).arg(buttonBord2.green()).arg(buttonBord2.blue());
QString styleBorderless = "QToolButton { border-width: 0px;margin: 1px 3px 0px;padding: 0px;}";
//create edit mode buttons
void MainWindow::newFile(bool showProjectSettings, bool force)
{
- if (!m_timelineArea->isEnabled() && !force) return;
+ if (!m_timelineArea->isEnabled() && !force)
+ return;
m_fileRevert->setEnabled(false);
- QString profileName;
- KUrl projectFolder;
+ QString profileName = KdenliveSettings::default_profile();
+ KUrl projectFolder = KdenliveSettings::defaultprojectfolder();
QPoint projectTracks(KdenliveSettings::videotracks(), KdenliveSettings::audiotracks());
if (!showProjectSettings) {
- if (!KdenliveSettings::activatetabs()) if (!closeCurrentDocument()) return;
- profileName = KdenliveSettings::default_profile();
- projectFolder = KdenliveSettings::defaultprojectfolder();
+ if (!KdenliveSettings::activatetabs())
+ if (!closeCurrentDocument())
+ return;
} else {
ProjectSettings *w = new ProjectSettings(NULL, QStringList(), projectTracks.x(), projectTracks.y(), KdenliveSettings::defaultprojectfolder(), false, true, this);
- if (w->exec() != QDialog::Accepted) return;
- if (!KdenliveSettings::activatetabs()) if (!closeCurrentDocument()) return;
- if (KdenliveSettings::videothumbnails() != w->enableVideoThumbs()) slotSwitchVideoThumbs();
- if (KdenliveSettings::audiothumbnails() != w->enableAudioThumbs()) slotSwitchAudioThumbs();
+ if (w->exec() != QDialog::Accepted)
+ return;
+ if (!KdenliveSettings::activatetabs())
+ if (!closeCurrentDocument())
+ return;
+ if (KdenliveSettings::videothumbnails() != w->enableVideoThumbs())
+ slotSwitchVideoThumbs();
+ if (KdenliveSettings::audiothumbnails() != w->enableAudioThumbs())
+ slotSwitchAudioThumbs();
profileName = w->selectedProfile();
projectFolder = w->selectedFolder();
projectTracks = w->tracks();
if (m_timelineArea->count() == 1) {
connectDocumentInfo(doc);
connectDocument(trackView, doc);
- } else m_timelineArea->setTabBarHidden(false);
+ } else
+ m_timelineArea->setTabBarHidden(false);
m_monitorManager->activateMonitor("clip");
m_closeAction->setEnabled(m_timelineArea->count() > 1);
}
//m_activeDocument->editTextClip(clip->getProperty("xml"), clip->getId());
return;
}
+
+ // any type of clip but a title
ClipProperties dia(clip, m_activeDocument->timecode(), m_activeDocument->fps(), this);
connect(&dia, SIGNAL(addMarker(const QString &, GenTime, QString)), m_activeTimeline->projectView(), SLOT(slotAddClipMarker(const QString &, GenTime, QString)));
if (dia.exec() == QDialog::Accepted) {
if (newprops.isEmpty()) return;
EditClipCommand *command = new EditClipCommand(m_projectList, clip->getId(), clip->properties(), newprops, true);
m_activeDocument->commandStack()->push(command);
+ m_activeDocument->setModified();
if (dia.needsTimelineRefresh()) {
// update clip occurences in timeline
((QWidget*)subchild)->setPalette(plt);
}
}
- if (m_activeTimeline)
+ if (m_activeTimeline) {
m_activeTimeline->projectView()->updatePalette();
+ }
}