#include "trackview.h"
#include "customtrackview.h"
#include "effectslistview.h"
-#include "effectstackview.h"
+#include "effectstack/effectstackview2.h"
#include "transitionsettings.h"
#include "renderwidget.h"
#include "renderer.h"
KXmlGuiWindow(parent),
m_activeDocument(NULL),
m_activeTimeline(NULL),
+ m_projectList(NULL),
+ m_effectList(NULL),
+ m_effectStack(NULL),
+ m_clipMonitor(NULL),
+ m_projectMonitor(NULL),
m_recMonitor(NULL),
m_renderWidget(NULL),
#ifdef USE_JOGSHUTTLE
dbus.registerObject("/MainWindow", this);
if (!KdenliveSettings::colortheme().isEmpty()) slotChangePalette(NULL, KdenliveSettings::colortheme());
- //setFont(KGlobalSettings::toolBarFont());
+ setFont(KGlobalSettings::toolBarFont());
parseProfiles(MltPath);
KdenliveSettings::setCurrent_profile(KdenliveSettings::default_profile());
m_commandStack = new QUndoGroup;
// Connect the project list
connect(m_projectList, SIGNAL(clipSelected(DocClipBase *, QPoint, bool)), m_clipMonitor, SLOT(slotSetClipProducer(DocClipBase *, QPoint, bool)));
- connect(m_projectList, SIGNAL(raiseClipMonitor()), m_clipMonitor, SLOT(activateMonitor()));
+ connect(m_projectList, SIGNAL(raiseClipMonitor()), m_clipMonitor, SLOT(slotActivateMonitor()));
connect(m_projectList, SIGNAL(loadingIsOver()), this, SLOT(slotElapsedTime()));
connect(m_projectList, SIGNAL(displayMessage(const QString&, int)), this, SLOT(slotGotProgressInfo(const QString&, int)));
connect(m_projectList, SIGNAL(updateRenderStatus()), this, SLOT(slotCheckRenderStatus()));
m_effectStackDock = new QDockWidget(i18n("Effect Stack"), this);
m_effectStackDock->setObjectName("effect_stack");
- m_effectStack = new EffectStackView(m_projectMonitor);
+ m_effectStack = new EffectStackView2(m_projectMonitor);
m_effectStackDock->setWidget(m_effectStack);
addDockWidget(Qt::TopDockWidgetArea, m_effectStackDock);
connect(m_effectStack, SIGNAL(startFilterJob(ItemInfo, const QString&,const QString&,const QString&,const QString&,const QString&,const QString&,const QString&)), m_projectList, SLOT(slotStartFilterJob(ItemInfo, const QString&,const QString&,const QString&,const QString&,const QString&,const QString&,const QString&)));
#ifndef Q_WS_MAC
tabifyDockWidget(m_clipMonitorDock, m_recMonitorDock);
#endif
-
-
-
-
setCentralWidget(m_timelineArea);
-
m_fileOpenRecent = KStandardAction::openRecent(this, SLOT(openFile(const KUrl &)), actionCollection());
readOptions();
m_fileRevert = KStandardAction::revert(this, SLOT(slotRevert()), actionCollection());
connect(m_effectsMenu, SIGNAL(triggered(QAction *)), this, SLOT(slotAddVideoEffect(QAction *)));
connect(m_transitionsMenu, SIGNAL(triggered(QAction *)), this, SLOT(slotAddTransition(QAction *)));
- m_effectStack->setMenu(m_effectsMenu);
-
QMenu *viewMenu = static_cast<QMenu*>(factory()->container("dockwindows", this));
const QList<QAction *> viewActions = createPopupMenu()->actions();
viewMenu->insertActions(NULL, viewActions);
m_timelineContextClipMenu->addAction(actionCollection()->action("clip_in_project_tree"));
//m_timelineContextClipMenu->addAction(actionCollection()->action("clip_to_project_tree"));
- m_timelineContextClipMenu->addAction(actionCollection()->action("edit_item_duration"));
m_timelineContextClipMenu->addAction(actionCollection()->action("delete_item"));
m_timelineContextClipMenu->addSeparator();
m_timelineContextClipMenu->addAction(actionCollection()->action("group_clip"));
m_timelineContextClipMenu->addMenu(m_transitionsMenu);
m_timelineContextClipMenu->addMenu(m_effectsMenu);
- m_timelineContextTransitionMenu->addAction(actionCollection()->action("edit_item_duration"));
m_timelineContextTransitionMenu->addAction(actionCollection()->action("delete_item"));
m_timelineContextTransitionMenu->addAction(actionCollection()->action(KStandardAction::name(KStandardAction::Copy)));
connect(m_projectMonitorDock, SIGNAL(visibilityChanged(bool)), m_projectMonitor, SLOT(refreshMonitor(bool)));
connect(m_clipMonitorDock, SIGNAL(visibilityChanged(bool)), m_clipMonitor, SLOT(refreshMonitor(bool)));
- //connect(m_monitorManager, SIGNAL(checkColorScopes()), this, SLOT(slotUpdateColorScopes()));
- //connect(m_monitorManager, SIGNAL(clearScopes()), this, SLOT(slotClearColorScopes()));
connect(m_effectList, SIGNAL(addEffect(const QDomElement)), this, SLOT(slotAddEffect(const QDomElement)));
connect(m_effectList, SIGNAL(reloadEffects()), this, SLOT(slotReloadEffects()));
KdenliveSettings::setDecklink_extension(data.section(';', 1, 1));
}
}
+
+ connect (KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), this, SLOT(slotChangePalette()));
}
MainWindow::~MainWindow()
if (m_stopmotion) {
delete m_stopmotion;
}
- m_effectStack->slotClipItemSelected(NULL, 0);
+ m_effectStack->slotClipItemSelected(NULL);
m_transitionConfig->slotTransitionItemSelected(NULL, 0, QPoint(), false);
if (m_projectMonitor) m_projectMonitor->stop();
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 = 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());
+
+ setStatusBarStyleSheet(palette());
QString styleBorderless = "QToolButton { border-width: 0px;margin: 1px 3px 0px;padding: 0px;}";
//create edit mode buttons
actionWidget->setMaximumWidth(max);
actionWidget->setMaximumHeight(max - 4);
- toolbar->setStyleSheet(style1);
connect(toolGroup, SIGNAL(triggered(QAction *)), this, SLOT(slotChangeTool(QAction *)));
toolbar->addSeparator();
KAction *fullMon = collection.addAction("monitor_fullscreen");
fullMon->setText(i18n("Switch monitor fullscreen"));
fullMon->setIcon(KIcon("view-fullscreen"));
- connect(fullMon, SIGNAL(triggered(bool)), this, SLOT(slotSwitchFullscreen()));
+ connect(fullMon, SIGNAL(triggered(bool)), m_monitorManager, SLOT(slotSwitchFullscreen()));
KAction *insertTree = collection.addAction("insert_project_tree");
insertTree->setText(i18n("Insert zone in project tree"));
KAction* editItemDuration = new KAction(KIcon("measure"), i18n("Edit Duration"), this);
collection.addAction("edit_item_duration", editItemDuration);
connect(editItemDuration, SIGNAL(triggered(bool)), this, SLOT(slotEditItemDuration()));
+
+ KAction* saveTimelineClip = new KAction(KIcon("document-save"), i18n("Save clip"), this);
+ collection.addAction("save_timeline_clip", saveTimelineClip);
+ connect(saveTimelineClip, SIGNAL(triggered(bool)), this, SLOT(slotSaveTimelineClip()));
KAction* clipInProjectTree = new KAction(KIcon("go-jump-definition"), i18n("Clip in Project Tree"), this);
collection.addAction("clip_in_project_tree", clipInProjectTree);
connect(proxyClip, SIGNAL(toggled(bool)), m_projectList, SLOT(slotProxyCurrentItem(bool)));
QAction *stopMotion = new KAction(KIcon("image-x-generic"), i18n("Stop Motion Capture"), this);
- collection.addAction(Kdenlive::stopmotionMonitor, stopMotion);
+ collection.addAction("stopmotion", stopMotion);
connect(stopMotion , SIGNAL(triggered()), this, SLOT(slotOpenStopmotion()));
QMenu *addClips = new QMenu();
statusBar()->showMessage(a->data().toString(), 3000);
}
+void MainWindow::setStatusBarStyleSheet(const QPalette &p)
+{
+ KColorScheme scheme(p.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 = QString("QToolBar { border: 0px } QToolButton { border-style: inset; border:1px solid transparent;border-radius: 3px;margin: 0px 3px;padding: 0px;} QToolButton:hover { background: %3;border-style: inset; border:1px solid %3;border-radius: 3px;} QToolButton:checked { background-color: %1; border-style: inset; border:1px solid %2;border-radius: 3px;}").arg(buttonBg.name()).arg(buttonBord.name()).arg(buttonBord2.name());
+ statusBar()->setStyleSheet(style1);
+}
+
void MainWindow::loadLayouts()
{
QMenu *saveLayout = (QMenu*)(factory()->container("layout_save_as", this));
}
// Deselect current effect / transition
- m_effectStack->slotClipItemSelected(NULL, 0);
+ m_effectStack->slotClipItemSelected(NULL);
m_transitionConfig->slotTransitionItemSelected(NULL, 0, QPoint(), false);
m_clipMonitor->slotSetClipProducer(NULL);
bool updateFps = m_activeDocument->setProfilePath(profile);
disconnect(m_activeDocument, SIGNAL(signalDeleteProjectClip(const QString &)), this, SLOT(slotDeleteClip(const QString &)));
disconnect(m_activeDocument, SIGNAL(updateClipDisplay(const QString &)), m_projectList, SLOT(slotUpdateClip(const QString &)));
disconnect(m_activeDocument, SIGNAL(selectLastAddedClip(const QString &)), m_projectList, SLOT(slotSelectClip(const QString &)));
- disconnect(m_activeTimeline->projectView(), SIGNAL(clipItemSelected(ClipItem*, int, bool)), m_effectStack, SLOT(slotClipItemSelected(ClipItem*, int)));
- disconnect(m_activeTimeline->projectView(), SIGNAL(clipItemSelected(ClipItem*, int, bool)), this, SLOT(slotActivateEffectStackView(ClipItem*, int, bool)));
- disconnect(m_activeTimeline->projectView(), SIGNAL(clipItemSelected(ClipItem*, int, bool)), m_projectMonitor, SLOT(slotSetSelectedClip(ClipItem*)));
+ disconnect(m_activeTimeline->projectView(), SIGNAL(clipItemSelected(ClipItem*, bool)), this, SLOT(slotTimelineClipSelected(ClipItem*, bool)));
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, bool, const int)), m_clipMonitor, SLOT(slotSetClipProducer(DocClipBase *, QPoint, bool, const int)));
disconnect(m_projectList, SIGNAL(gotFilterJobResults(const QString &, int, int, const QString &, stringMap)), m_activeTimeline->projectView(), SLOT(slotGotFilterJobResults(const QString &, int, int, const QString &, stringMap)));
- disconnect(m_activeTimeline, SIGNAL(cursorMoved()), m_projectMonitor, SLOT(activateMonitor()));
+ disconnect(m_activeTimeline, SIGNAL(cursorMoved()), m_projectMonitor, SLOT(slotActivateMonitor()));
disconnect(m_activeTimeline, SIGNAL(configTrack(int)), this, SLOT(slotConfigTrack(int)));
disconnect(m_activeDocument, SIGNAL(docModified(bool)), this, SLOT(slotUpdateDocumentState(bool)));
- disconnect(m_effectStack, SIGNAL(updateEffect(ClipItem*, int, QDomElement, QDomElement, int)), m_activeTimeline->projectView(), SLOT(slotUpdateClipEffect(ClipItem*, int, QDomElement, QDomElement, int)));
+ disconnect(m_effectStack, SIGNAL(updateEffect(ClipItem*, int, QDomElement, QDomElement, int,bool)), m_activeTimeline->projectView(), SLOT(slotUpdateClipEffect(ClipItem*, int, QDomElement, QDomElement, int,bool)));
disconnect(m_effectStack, SIGNAL(removeEffect(ClipItem*, int, QDomElement)), m_activeTimeline->projectView(), SLOT(slotDeleteEffect(ClipItem*, int, QDomElement)));
+ disconnect(m_effectStack, SIGNAL(addEffect(ClipItem*, QDomElement)), trackView->projectView(), SLOT(slotAddEffect(ClipItem*, QDomElement)));
disconnect(m_effectStack, SIGNAL(changeEffectState(ClipItem*, int, int, bool)), m_activeTimeline->projectView(), SLOT(slotChangeEffectState(ClipItem*, int, int, bool)));
disconnect(m_effectStack, SIGNAL(changeEffectPosition(ClipItem*, int, int, int)), m_activeTimeline->projectView(), SLOT(slotChangeEffectPosition(ClipItem*, int, int, int)));
disconnect(m_effectStack, SIGNAL(refreshEffectStack(ClipItem*)), m_activeTimeline->projectView(), SLOT(slotRefreshEffects(ClipItem*)));
disconnect(m_effectStack, SIGNAL(displayMessage(const QString&, int)), this, SLOT(slotGotProgressInfo(const QString&, int)));
disconnect(m_transitionConfig, SIGNAL(transitionUpdated(Transition *, QDomElement)), m_activeTimeline->projectView() , SLOT(slotTransitionUpdated(Transition *, QDomElement)));
disconnect(m_transitionConfig, SIGNAL(seekTimeline(int)), m_activeTimeline->projectView() , SLOT(setCursorPos(int)));
- disconnect(m_activeTimeline->projectView(), SIGNAL(activateDocumentMonitor()), m_projectMonitor, SLOT(activateMonitor()));
+ disconnect(m_activeTimeline->projectView(), SIGNAL(activateDocumentMonitor()), m_projectMonitor, SLOT(slotActivateMonitor()));
disconnect(m_activeTimeline, SIGNAL(zoneMoved(int, int)), this, SLOT(slotZoneMoved(int, int)));
disconnect(m_projectList, SIGNAL(loadingIsOver()), m_activeTimeline->projectView(), SLOT(slotUpdateAllThumbs()));
disconnect(m_projectList, SIGNAL(refreshClip(const QString &)), m_activeTimeline->projectView(), SLOT(slotRefreshThumbs(const QString &)));
connect(m_notesWidget, SIGNAL(textChanged()), doc, SLOT(setModified()));
- connect(trackView->projectView(), SIGNAL(clipItemSelected(ClipItem*, int, bool)), m_effectStack, SLOT(slotClipItemSelected(ClipItem*, int)));
connect(trackView->projectView(), SIGNAL(updateClipMarkers(DocClipBase *)), this, SLOT(slotUpdateClipMarkers(DocClipBase*)));
- connect(trackView, SIGNAL(showTrackEffects(int, TrackInfo)), m_effectStack, SLOT(slotTrackItemSelected(int, TrackInfo)));
- connect(trackView, SIGNAL(showTrackEffects(int, TrackInfo)), this, SLOT(slotActivateEffectStackView()));
+ connect(trackView, SIGNAL(showTrackEffects(int, TrackInfo)), this, SLOT(slotTrackSelected(int, TrackInfo)));
- connect(trackView->projectView(), SIGNAL(clipItemSelected(ClipItem*, int, bool)), this, SLOT(slotActivateEffectStackView(ClipItem*, int, bool)));
+ connect(trackView->projectView(), SIGNAL(clipItemSelected(ClipItem*, bool)), this, SLOT(slotTimelineClipSelected(ClipItem*, bool)));
connect(trackView->projectView(), SIGNAL(transitionItemSelected(Transition*, int, QPoint, bool)), m_transitionConfig, SLOT(slotTransitionItemSelected(Transition*, int, QPoint, bool)));
connect(trackView->projectView(), SIGNAL(transitionItemSelected(Transition*, int, QPoint, bool)), this, SLOT(slotActivateTransitionView(Transition *)));
m_zoomSlider->setValue(doc->zoom().x());
connect(trackView->projectView(), SIGNAL(showClipFrame(DocClipBase *, QPoint, bool, const int)), m_clipMonitor, SLOT(slotSetClipProducer(DocClipBase *, QPoint, bool, const int)));
connect(trackView->projectView(), SIGNAL(playMonitor()), m_projectMonitor, SLOT(slotPlay()));
- connect(trackView->projectView(), SIGNAL(clipItemSelected(ClipItem*, int, bool)), m_projectMonitor, SLOT(slotSetSelectedClip(ClipItem*)));
connect(trackView->projectView(), SIGNAL(transitionItemSelected(Transition*, int, QPoint, bool)), m_projectMonitor, SLOT(slotSetSelectedClip(Transition*)));
connect(m_projectList, SIGNAL(gotFilterJobResults(const QString &, int, int, const QString &, stringMap)), trackView->projectView(), SLOT(slotGotFilterJobResults(const QString &, int, int, const QString &, stringMap)));
- connect(m_effectStack, SIGNAL(updateEffect(ClipItem*, int, QDomElement, QDomElement, int)), trackView->projectView(), SLOT(slotUpdateClipEffect(ClipItem*, int, QDomElement, QDomElement, int)));
+ connect(m_effectStack, SIGNAL(updateEffect(ClipItem*, int, QDomElement, QDomElement, int,bool)), trackView->projectView(), SLOT(slotUpdateClipEffect(ClipItem*, int, QDomElement, QDomElement, int,bool)));
connect(m_effectStack, SIGNAL(updateClipRegion(ClipItem*, int, QString)), trackView->projectView(), SLOT(slotUpdateClipRegion(ClipItem*, int, QString)));
connect(m_effectStack, SIGNAL(removeEffect(ClipItem*, int, QDomElement)), trackView->projectView(), SLOT(slotDeleteEffect(ClipItem*, int, QDomElement)));
+ connect(m_effectStack, SIGNAL(addEffect(ClipItem*, QDomElement)), trackView->projectView(), SLOT(slotAddEffect(ClipItem*, QDomElement)));
connect(m_effectStack, SIGNAL(changeEffectState(ClipItem*, int, int, bool)), trackView->projectView(), SLOT(slotChangeEffectState(ClipItem*, int, int, bool)));
connect(m_effectStack, SIGNAL(changeEffectPosition(ClipItem*, int, int, int)), trackView->projectView(), SLOT(slotChangeEffectPosition(ClipItem*, int, int, int)));
connect(m_effectStack, SIGNAL(refreshEffectStack(ClipItem*)), trackView->projectView(), SLOT(slotRefreshEffects(ClipItem*)));
connect(m_effectStack, SIGNAL(reloadEffects()), this, SLOT(slotReloadEffects()));
connect(m_effectStack, SIGNAL(displayMessage(const QString&, int)), this, SLOT(slotGotProgressInfo(const QString&, int)));
- connect(trackView->projectView(), SIGNAL(activateDocumentMonitor()), m_projectMonitor, SLOT(activateMonitor()));
+ connect(trackView->projectView(), SIGNAL(activateDocumentMonitor()), m_projectMonitor, SLOT(slotActivateMonitor()));
connect(trackView, SIGNAL(zoneMoved(int, int)), this, SLOT(slotZoneMoved(int, int)));
connect(m_projectList, SIGNAL(loadingIsOver()), trackView->projectView(), SLOT(slotUpdateAllThumbs()));
trackView->projectView()->setContextMenu(m_timelineContextMenu, m_timelineContextClipMenu, m_timelineContextTransitionMenu, m_clipTypeGroup, static_cast<QMenu*>(factory()->container("marker_menu", this)));
QWidget *widget = QApplication::focusWidget();
while (widget) {
if (widget == m_effectStackDock) {
- m_effectStack->slotItemDel();
+ m_effectStack->deleteCurrentEffect();
return;
}
widget = widget->parentWidget();
void MainWindow::slotInsertTrack(int ix)
{
- m_projectMonitor->activateMonitor();
+ m_projectMonitor->slotActivateMonitor();
if (m_activeTimeline) {
if (ix == -1) ix = m_activeTimeline->projectView()->selectedTrack();
m_activeTimeline->projectView()->slotInsertTrack(ix);
void MainWindow::slotDeleteTrack(int ix)
{
- m_projectMonitor->activateMonitor();
+ m_projectMonitor->slotActivateMonitor();
if (m_activeTimeline) {
if (ix == -1) ix = m_activeTimeline->projectView()->selectedTrack();
m_activeTimeline->projectView()->slotDeleteTrack(ix);
void MainWindow::slotConfigTrack(int ix)
{
- m_projectMonitor->activateMonitor();
+ m_projectMonitor->slotActivateMonitor();
if (m_activeTimeline)
m_activeTimeline->projectView()->slotConfigTracks(ix);
if (m_activeDocument)
void MainWindow::slotSelectTrack()
{
- m_projectMonitor->activateMonitor();
+ m_projectMonitor->slotActivateMonitor();
if (m_activeTimeline) {
m_activeTimeline->projectView()->slotSelectClipsInTrack();
}
void MainWindow::slotSelectAllTracks()
{
- m_projectMonitor->activateMonitor();
+ m_projectMonitor->slotActivateMonitor();
if (m_activeTimeline)
m_activeTimeline->projectView()->slotSelectAllClips();
}
if (info.isEmpty() || info.size() < 3) return;
QDomElement effect ;
- if (info.at(2) == QString::number((int) EFFECT_VIDEO))
+ if (info.last() == QString::number((int) EFFECT_VIDEO))
effect = videoEffects.getEffectByTag(info.at(0), info.at(1));
- else if (info.at(2) == QString::number((int) EFFECT_AUDIO))
+ else if (info.last() == QString::number((int) EFFECT_AUDIO))
effect = audioEffects.getEffectByTag(info.at(0), info.at(1));
else
effect = customEffects.getEffectByTag(info.at(0), info.at(1));
if (e->type() == QEvent::User)
m_messageLabel->setMessage(static_cast <MltErrorEvent *>(e)->message(), MltError);
}
-void MainWindow::slotActivateEffectStackView(ClipItem* item, int ix, bool raise)
+
+void MainWindow::slotTimelineClipSelected(ClipItem* item, bool raise)
{
- Q_UNUSED(item)
- Q_UNUSED(ix)
+ m_effectStack->slotClipItemSelected(item);
+ m_projectMonitor->slotSetSelectedClip(item);
+ if (raise)
+ m_effectStack->raiseWindow(m_effectStackDock);
+}
+void MainWindow::slotTrackSelected(int index, TrackInfo info, bool raise)
+{
+ m_effectStack->slotTrackItemSelected(index, info);
if (raise)
m_effectStack->raiseWindow(m_effectStackDock);
}
}
kapp->setPalette(plt);
+ slotChangePalette();
const QObjectList children = statusBar()->children();
foreach(QObject * child, children) {
((QWidget*)subchild)->setPalette(plt);
}
}
- if (m_activeTimeline) {
- m_activeTimeline->projectView()->updatePalette();
- }
}
else m_projectList->focusTree();
}
-void MainWindow::slotSwitchFullscreen()
-{
- if (m_projectMonitor->isActive()) m_projectMonitor->slotSwitchFullScreen();
- else m_clipMonitor->slotSwitchFullScreen();
-}
-
void MainWindow::slotInsertZoneToTree()
{
if (!m_clipMonitor->isActive() || m_clipMonitor->activeClip() == NULL) return;
d->show();
}
+void MainWindow::slotChangePalette()
+{
+ QPalette plt = QApplication::palette();
+ if (m_effectStack) m_effectStack->updatePalette();
+ if (m_projectList) m_projectList->updatePalette();
+ if (m_effectList) m_effectList->updatePalette();
+
+ if (m_clipMonitor) m_clipMonitor->setPalette(plt);
+ if (m_projectMonitor) m_projectMonitor->setPalette(plt);
+
+ setStatusBarStyleSheet(plt);
+ if (m_activeTimeline) {
+ m_activeTimeline->updatePalette();
+ }
+}
+
+void MainWindow::slotSaveTimelineClip()
+{
+ if (m_activeTimeline && m_projectMonitor->render) {
+ ClipItem *clip = m_activeTimeline->projectView()->getActiveClipUnderCursor(true);
+ if (!clip) {
+ m_messageLabel->setMessage(i18n("Select a clip to save"), InformationMessage);
+ return;
+ }
+ KUrl url = KFileDialog::getSaveUrl(m_activeDocument->projectFolder(), "video/mlt-playlist");
+ if (!url.isEmpty()) m_projectMonitor->render->saveClip(m_activeDocument->tracksCount() - clip->track(), clip->startPos(), url);
+ }
+}
+
+
#include "mainwindow.moc"
#ifdef DEBUG_MAINW