X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fgeometrywidget.cpp;h=34d2b972314f0481980da792580b7dc617822846;hb=7db53cd2efc5998a9c2357b6f79164995e338597;hp=cc378de928702483956f6969be7c9311c5da8b48;hpb=5422133bb35e7ef14b8feb701ace2cc075606e95;p=kdenlive diff --git a/src/geometrywidget.cpp b/src/geometrywidget.cpp index cc378de9..34d2b972 100644 --- a/src/geometrywidget.cpp +++ b/src/geometrywidget.cpp @@ -30,23 +30,22 @@ #include #include -#include #include #include -GeometryWidget::GeometryWidget(Monitor* monitor, Timecode timecode, int clipPos, bool isEffect, QWidget* parent): - QWidget(parent), - m_monitor(monitor), - m_timePos(new TimecodeDisplay(timecode)), - m_clipPos(clipPos), - m_inPoint(0), - m_outPoint(1), - m_isEffect(isEffect), - m_rect(NULL), - m_geometry(NULL), - m_showScene(true) +GeometryWidget::GeometryWidget(Monitor* monitor, Timecode timecode, int clipPos, bool isEffect, bool disabled, QWidget* parent): + QWidget(parent), + m_monitor(monitor), + m_timePos(new TimecodeDisplay(timecode)), + m_clipPos(clipPos), + m_inPoint(0), + m_outPoint(1), + m_isEffect(isEffect), + m_rect(NULL), + m_geometry(NULL), + m_showScene(true) { m_ui.setupUi(this); m_scene = monitor->getEffectScene(); @@ -128,9 +127,9 @@ GeometryWidget::GeometryWidget(Monitor* monitor, Timecode timecode, int clipPos, QHBoxLayout *settingsLayout = new QHBoxLayout(m_ui.frameSettings); settingsLayout->addWidget(m_config); settingsLayout->setContentsMargins(0, 0, 0, 0); - ((QGridLayout *)m_ui.widgetFirstColumn->layout())->addWidget(m_config->getShowHideButton(), 1, 2); + ((QGridLayout *)m_ui.widgetConfigButton->layout())->addWidget(m_config->getShowHideButton(), 1, 1); connect(m_config, SIGNAL(showScene(bool)), this, SLOT(slotShowScene(bool))); - + slotShowScene(!disabled); connect(m_scene, SIGNAL(actionFinished()), this, SLOT(slotUpdateGeometry())); @@ -141,6 +140,7 @@ GeometryWidget::GeometryWidget(Monitor* monitor, Timecode timecode, int clipPos, GeometryWidget::~GeometryWidget() { + m_scene->setEnabled(true); delete m_timePos; delete m_timeline; m_scene->removeItem(m_rect); @@ -188,7 +188,7 @@ void GeometryWidget::setupParam(const QDomElement elem, int minframe, int maxfra m_geometry->fetch(&item, 0); delete m_rect; - m_rect = new OnMonitorRectItem(QRectF(0, 0, item.w(), item.h())); + m_rect = new OnMonitorRectItem(QRectF(0, 0, item.w(), item.h()), m_monitor->render->dar(), m_scene); m_rect->setPos(item.x(), item.y()); m_rect->setZValue(0); m_scene->addItem(m_rect);