Commit d7805e3f authored by Akhil K Gangadharan's avatar Akhil K Gangadharan

Add icon in Clip Monitor Toolbar for Insert Zone to Project Bin

parent c43eba33
......@@ -17,6 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "bin/projectitemmodel.h"
#include "monitor.h"
#include "bin/bin.h"
#include "bin/projectclip.h"
......@@ -207,6 +208,11 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *paren
m_recManager = new RecManager(this);
connect(m_recManager, &RecManager::warningMessage, this, &Monitor::warningMessage);
connect(m_recManager, &RecManager::addClipToProject, this, &Monitor::addClipToProject);
QAction *insertAction = new QAction(QIcon::fromTheme(QStringLiteral("document-new")), i18n("Insert Zone to Project Bin"), this);
connect(insertAction, &QAction::triggered, this, &Monitor::slotInsertZoneToProjectBin);
m_toolbar->addAction(insertAction);
m_toolbar->addSeparator();
}
if (id != Kdenlive::DvdMonitor) {
......@@ -1414,6 +1420,16 @@ void Monitor::slotSaveZone()
// render->saveZone(pCore->currentDoc()->projectDataFolder(), m_ruler->zone());
}
void Monitor::slotInsertZoneToProjectBin()
{
if (!isActive() || currentController() == nullptr) {
return;
}
QPoint info = getZoneInfo();
QString id;
pCore->projectItemModel()->requestAddBinSubClip(id, info.x(), info.y(), QString(), activeClipId());
}
void Monitor::setCustomProfile(const QString &profile, const Timecode &tc)
{
// TODO or deprecate
......
......@@ -249,6 +249,7 @@ private slots:
void slotSetVolume(int volume);
void slotEditMarker();
void slotExtractCurrentZone();
void slotInsertZoneToProjectBin();
void onFrameDisplayed(const SharedFrame &frame);
void slotStartDrag();
void setZoom();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment