aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2015-08-04 00:58:35 +0200
committerJean-Baptiste Mardelle <[email protected]>2015-08-04 00:58:35 +0200
commitcb6172a1671b2c35220261af9c6a7a3f3d9620c7 (patch)
tree716767459a939902ef0bcf04fdd55479b14b4772
parent76cf6ed75bf4437e797ae098a980adf562a30810 (diff)
Make "Show record control" available from Monitor menu, disable stopmotion widget that currently crashes
-rw-r--r--data/kdenliveui.rc3
-rw-r--r--src/mainwindow.cpp6
-rw-r--r--src/monitor/monitor.cpp10
-rw-r--r--src/monitor/monitor.h4
-rw-r--r--src/timeline/timeline.cpp2
5 files changed, 19 insertions, 6 deletions
diff --git a/data/kdenliveui.rc b/data/kdenliveui.rc
index 84bf6b9..a91b9fc 100644
--- a/data/kdenliveui.rc
+++ b/data/kdenliveui.rc
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="kdenlive" version="82" translationDomain="kdenlive">
+<kpartgui name="kdenlive" version="83" translationDomain="kdenlive">
<ToolBar name="extraToolBar" >
<text>Extra Toolbar</text>
<Action name="project_render" />
@@ -170,6 +170,7 @@
<Action name="mlt_mute" />
</Menu>
<Action name="switch_monitor" />
+ <Action name="switch_monitor_rec" />
<Action name="insert_project_tree" />
<Action name="insert_timeline" />
</Menu>
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index e8afc03..5017fb0 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -267,6 +267,9 @@ MainWindow::MainWindow(const QString &MltPath, const QUrl &Url, const QString &
action->setChecked(false);
m_stopmotion_actions->addAction("stopmotion_overlay", action);
+ // Monitor Record action
+ addAction("switch_monitor_rec", m_clipMonitor->recAction());
+
// Build effects menu
m_effectsMenu = new QMenu(i18n("Add Effect"));
m_effectActions = new KActionCategory(i18n("Effects"), actionCollection());
@@ -1202,7 +1205,8 @@ void MainWindow::setupActions()
proxyClip->setCheckable(true);
proxyClip->setChecked(false);
- addAction("stopmotion", i18n("Stop Motion Capture"), this, SLOT(slotOpenStopmotion()), QIcon::fromTheme("image-x-generic"));
+ //TODO: port stopmotion to new Monitor code
+ //addAction("stopmotion", i18n("Stop Motion Capture"), this, SLOT(slotOpenStopmotion()), QIcon::fromTheme("image-x-generic"));
addAction("ripple_delete", i18n("Ripple Delete"), this, SLOT(slotRippleDelete()), QIcon(), Qt::CTRL + Qt::Key_X);
QHash <QString, QAction*> actions;
diff --git a/src/monitor/monitor.cpp b/src/monitor/monitor.cpp
index e5cb3a7..8814b17 100644
--- a/src/monitor/monitor.cpp
+++ b/src/monitor/monitor.cpp
@@ -262,9 +262,15 @@ Monitor::~Monitor()
delete render;
}
-void Monitor::setupMenu(QMenu *goMenu, QAction *playZone, QAction *loopZone, QMenu *markerMenu, QAction *loopClip, QWidget* parent)
+QAction *Monitor::recAction()
{
- m_contextMenu = new QMenu(parent);
+ if (m_recManager) return m_recManager->switchAction();
+ return NULL;
+}
+
+void Monitor::setupMenu(QMenu *goMenu, QAction *playZone, QAction *loopZone, QMenu *markerMenu, QAction *loopClip)
+{
+ m_contextMenu = new QMenu(this);
m_contextMenu->addMenu(m_playMenu);
if (goMenu)
m_contextMenu->addMenu(goMenu);
diff --git a/src/monitor/monitor.h b/src/monitor/monitor.h
index 423cde0..16ec923 100644
--- a/src/monitor/monitor.h
+++ b/src/monitor/monitor.h
@@ -63,7 +63,7 @@ public:
void resetProfile(MltVideoProfile profile);
void setCustomProfile(const QString &profile, const Timecode &tc);
void pause();
- void setupMenu(QMenu *goMenu, QAction *playZone, QAction *loopZone, QMenu *markerMenu = NULL, QAction *loopClip = NULL, QWidget* parent = NULL);
+ void setupMenu(QMenu *goMenu, QAction *playZone, QAction *loopZone, QMenu *markerMenu = NULL, QAction *loopClip = NULL);
const QString sceneList();
const QString activeClipId();
GenTime position();
@@ -103,6 +103,8 @@ public:
bool startCapture(const QString &params, const QString &path, Mlt::Producer *p, bool livePreview);
bool stopCapture();
void reparent();
+ /** @brief Returns the action displaying record toolbar */
+ QAction *recAction();
protected:
void mousePressEvent(QMouseEvent * event);
diff --git a/src/timeline/timeline.cpp b/src/timeline/timeline.cpp
index 8bdb65b..ad6920d 100644
--- a/src/timeline/timeline.cpp
+++ b/src/timeline/timeline.cpp
@@ -817,7 +817,7 @@ int Timeline::addTrack(int ix, Mlt::Playlist &playlist) {
clipinfo.cropDuration = GenTime(length, fps);
clipinfo.track = ix;
position += length;
- qDebug()<<"// Loading clip: "<<idString<<" / SPEED: "<<speed<<"\n++++++++++++++++++++++++";
+ //qDebug()<<"// Loading clip: "<<idString<<" / SPEED: "<<speed<<"\n++++++++++++++++++++++++";
ClipItem *item = new ClipItem(binclip, clipinfo, fps, speed, strobe, m_trackview->getFrameWidth(), true);
item->updateState(idString);
m_scene->addItem(item);