+ m_spinX = new DragValue(i18nc("x axis position", "X"), 0, 0, -99000, 99000, -1, QString(), false, this);
+ m_ui.horizontalLayout->addWidget(m_spinX, 0, 0);
+
+ m_spinY = new DragValue(i18nc("y axis position", "Y"), 0, 0, -99000, 99000, -1, QString(), false, this);
+ m_ui.horizontalLayout->addWidget(m_spinY, 0, 1);
+
+ m_spinWidth = new DragValue(i18nc("Frame width", "W"), m_monitor->render->frameRenderWidth(), 0, 1, 99000, -1, QString(), false, this);
+ m_ui.horizontalLayout->addWidget(m_spinWidth, 0, 2);
+
+ m_spinHeight = new DragValue(i18nc("Frame height", "H"), m_monitor->render->renderHeight(), 0, 1, 99000, -1, QString(), false, this);
+ m_ui.horizontalLayout->addWidget(m_spinHeight, 0, 3);
+
+ m_ui.horizontalLayout->setColumnStretch(4, 10);
+
+ QMenu *menu = new QMenu(this);
+ QAction *adjustSize = new QAction(KIcon("zoom-fit-best"), i18n("Adjust to original size"), this);
+ connect(adjustSize, SIGNAL(triggered()), this, SLOT(slotAdjustToFrameSize()));
+ QAction *fitToWidth = new QAction(KIcon("zoom-fit-width"), i18n("Fit to width"), this);
+ connect(fitToWidth, SIGNAL(triggered()), this, SLOT(slotFitToWidth()));
+ QAction *fitToHeight = new QAction(KIcon("zoom-fit-height"), i18n("Fit to height"), this);
+ connect(fitToHeight, SIGNAL(triggered()), this, SLOT(slotFitToHeight()));
+
+ QAction *importKeyframes = new QAction(i18n("Import keyframes from clip"), this);
+ connect(importKeyframes, SIGNAL(triggered()), this, SIGNAL(importClipKeyframes()));
+ menu->addAction(importKeyframes);
+ QAction *resetKeyframes = new QAction(i18n("Reset all keyframes"), this);
+ connect(resetKeyframes, SIGNAL(triggered()), this, SLOT(slotResetKeyframes()));
+ menu->addAction(resetKeyframes);
+
+ QAction *resetNextKeyframes = new QAction(i18n("Reset keyframes after cursor"), this);
+ connect(resetNextKeyframes, SIGNAL(triggered()), this, SLOT(slotResetNextKeyframes()));
+ menu->addAction(resetNextKeyframes);
+ QAction *resetPreviousKeyframes = new QAction(i18n("Reset keyframes before cursor"), this);
+ connect(resetPreviousKeyframes, SIGNAL(triggered()), this, SLOT(slotResetPreviousKeyframes()));
+ menu->addAction(resetPreviousKeyframes);
+ menu->addSeparator();
+
+ QAction *syncTimeline = new QAction(KIcon("insert-link"), i18n("Synchronize with timeline cursor"), this);
+ syncTimeline->setCheckable(true);
+ syncTimeline->setChecked(KdenliveSettings::transitionfollowcursor());
+ connect(syncTimeline, SIGNAL(toggled(bool)), this, SLOT(slotSetSynchronize(bool)));
+ menu->addAction(syncTimeline);
+
+ QAction *alignleft = new QAction(KIcon("kdenlive-align-left"), i18n("Align left"), this);
+ connect(alignleft, SIGNAL(triggered()), this, SLOT(slotMoveLeft()));
+ QAction *alignhcenter = new QAction(KIcon("kdenlive-align-hor"), i18n("Center horizontally"), this);
+ connect(alignhcenter, SIGNAL(triggered()), this, SLOT(slotCenterH()));
+ QAction *alignright = new QAction(KIcon("kdenlive-align-right"), i18n("Align right"), this);
+ connect(alignright, SIGNAL(triggered()), this, SLOT(slotMoveRight()));
+ QAction *aligntop = new QAction(KIcon("kdenlive-align-top"), i18n("Align top"), this);
+ connect(aligntop, SIGNAL(triggered()), this, SLOT(slotMoveTop()));
+ QAction *alignvcenter = new QAction(KIcon("kdenlive-align-vert"), i18n("Center vertically"), this);
+ connect(alignvcenter, SIGNAL(triggered()), this, SLOT(slotCenterV()));
+ QAction *alignbottom = new QAction(KIcon("kdenlive-align-bottom"), i18n("Align bottom"), this);
+ connect(alignbottom, SIGNAL(triggered()), this, SLOT(slotMoveBottom()));
+
+ m_ui.buttonOptions->setMenu(menu);
+ m_ui.buttonOptions->setIcon(KIcon("configure"));
+ m_ui.buttonOptions->setToolTip(i18n("Options"));
+ m_ui.buttonOptions->setIconSize(iconSize);
+
+ QHBoxLayout *alignLayout = new QHBoxLayout;
+ alignLayout->setSpacing(0);
+ QToolButton *alignButton = new QToolButton;
+ alignButton->setDefaultAction(alignleft);
+ alignButton->setAutoRaise(true);
+ alignLayout->addWidget(alignButton);
+
+ alignButton = new QToolButton;
+ alignButton->setDefaultAction(alignhcenter);
+ alignButton->setAutoRaise(true);
+ alignLayout->addWidget(alignButton);
+
+ alignButton = new QToolButton;
+ alignButton->setDefaultAction(alignright);
+ alignButton->setAutoRaise(true);
+ alignLayout->addWidget(alignButton);
+
+ alignButton = new QToolButton;
+ alignButton->setDefaultAction(aligntop);
+ alignButton->setAutoRaise(true);
+ alignLayout->addWidget(alignButton);
+
+ alignButton = new QToolButton;
+ alignButton->setDefaultAction(alignvcenter);
+ alignButton->setAutoRaise(true);
+ alignLayout->addWidget(alignButton);
+
+ alignButton = new QToolButton;
+ alignButton->setDefaultAction(alignbottom);
+ alignButton->setAutoRaise(true);
+ alignLayout->addWidget(alignButton);
+
+ alignButton = new QToolButton;
+ alignButton->setDefaultAction(adjustSize);
+ alignButton->setAutoRaise(true);
+ alignLayout->addWidget(alignButton);
+
+ alignButton = new QToolButton;
+ alignButton->setDefaultAction(fitToWidth);
+ alignButton->setAutoRaise(true);
+ alignLayout->addWidget(alignButton);
+
+ alignButton = new QToolButton;
+ alignButton->setDefaultAction(fitToHeight);
+ alignButton->setAutoRaise(true);
+ alignLayout->addWidget(alignButton);
+ alignLayout->addStretch(10);
+
+ m_ui.horizontalLayout->addLayout(alignLayout, 1, 0, 1, 4);
+ //m_ui.horizontalLayout->addStretch(10);
+
+ m_spinSize = new DragValue(i18n("Size"), 100, 2, 1, 99000, -1, i18n("%"), false, this);
+ m_ui.horizontalLayout2->addWidget(m_spinSize);
+
+ m_opacity = new DragValue(i18n("Opacity"), 100, 0, 0, 100, -1, i18n("%"), true, this);
+ m_ui.horizontalLayout2->addWidget(m_opacity);
+
+
+ if (showRotation) {
+ m_rotateX = new DragValue(i18n("Rotate X"), 0, 0, -1800, 1800, -1, QString(), true, this);
+ m_rotateX->setObjectName("rotate_x");
+ m_ui.horizontalLayout3->addWidget(m_rotateX);
+ m_rotateY = new DragValue(i18n("Rotate Y"), 0, 0, -1800, 1800, -1, QString(), true, this);
+ m_rotateY->setObjectName("rotate_y");
+ m_ui.horizontalLayout3->addWidget(m_rotateY);
+ m_rotateZ = new DragValue(i18n("Rotate Z"), 0, 0, -1800, 1800, -1, QString(), true, this);
+ m_rotateZ->setObjectName("rotate_z");
+ m_ui.horizontalLayout3->addWidget(m_rotateZ);
+ connect(m_rotateX, SIGNAL(valueChanged(double)), this, SLOT(slotUpdateGeometry()));
+ connect(m_rotateY, SIGNAL(valueChanged(double)), this, SLOT(slotUpdateGeometry()));
+ connect(m_rotateZ, SIGNAL(valueChanged(double)), this, SLOT(slotUpdateGeometry()));
+ }
+