#include <KFileDialog>
#include <KApplication>
#include <KMessageBox>
+#include <KSelectAction>
#include <QMouseEvent>
#include <QStylePainter>
m_markerMenu = new QMenu(i18n("Go to marker..."), this);
m_markerMenu->setEnabled(false);
m_configMenu->addMenu(m_markerMenu);
- connect(m_markerMenu, SIGNAL(triggered(QAction *)), this, SLOT(slotGoToMarker(QAction *)));
+ connect(m_markerMenu, SIGNAL(triggered(QAction*)), this, SLOT(slotGoToMarker(QAction*)));
}
m_configMenu->addAction(KIcon("transform-scale"), i18n("Resize (100%)"), this, SLOT(slotSetSizeOneToOne()));
m_configMenu->addAction(KIcon("transform-scale"), i18n("Resize (50%)"), this, SLOT(slotSetSizeOneToTwo()));
if (id == Kdenlive::projectMonitor) {
m_effectWidget = new MonitorEditWidget(render, videoBox);
- connect(m_effectWidget, SIGNAL(showEdit(bool, bool)), this, SLOT(slotShowEffectScene(bool, bool)));
+ connect(m_effectWidget, SIGNAL(showEdit(bool,bool)), this, SLOT(slotShowEffectScene(bool,bool)));
m_toolbar->addAction(m_effectWidget->getVisibilityAction());
videoBox->layout()->addWidget(m_effectWidget);
m_effectWidget->hide();
if (markerMenu) {
m_contextMenu->addMenu(markerMenu);
QList <QAction *>list = markerMenu->actions();
- for (int i = 0; i < list.count(); i++) {
+ for (int i = 0; i < list.count(); ++i) {
if (list.at(i)->data().toString() == "edit_marker") {
m_editMarker = list.at(i);
break;
dropFrames->setCheckable(true);
dropFrames->setChecked(true);
connect(dropFrames, SIGNAL(toggled(bool)), this, SLOT(slotSwitchDropFrames(bool)));
-
+
m_configMenu->addAction(showTips);
m_configMenu->addAction(dropFrames);
-
}
void Monitor::slotGoToMarker(QAction *action)
QList <CommentedTime> markers = m_currentClip->commentedSnapMarkers();
if (!markers.isEmpty()) {
QList <int> marks;
- for (int i = 0; i < markers.count(); i++) {
+ for (int i = 0; i < markers.count(); ++i) {
int pos = (int) markers.at(i).time().frames(m_monitorManager->timecode().fps());
marks.append(pos);
QString position = m_monitorManager->timecode().getTimecode(markers.at(i).time()) + ' ' + markers.at(i).comment();
}
}
-void Monitor::setMarkers(QList <CommentedTime> markers)
+void Monitor::setMarkers(const QList<CommentedTime> &markers)
{
m_ruler->setMarkers(markers);
}
void Monitor::updateClipProducer(Mlt::Producer *prod)
{
if (render == NULL) return;
- render->setProducer(prod, render->seekFramePosition());
+ render->setProducer(prod, render->seekFramePosition());
}
void Monitor::slotSetClipProducer(DocClipBase *clip, QPoint zone, bool forceUpdate, int position)
if (render == NULL) return;
if (clip == NULL && m_currentClip != NULL) {
m_currentClip->lastSeekPosition = render->seekFramePosition();
- kDebug()<<"// SETTING NULL CLIP MONITOR";
m_currentClip = NULL;
m_length = -1;
render->setProducer(NULL, -1);
if (render->setProducer(prod, position) == -1) {
// MLT CONSUMER is broken
kDebug(QtWarningMsg) << "ERROR, Cannot start monitor";
- }
+ } else start();
} else {
if (m_currentClip) {
slotActivateMonitor();