]> git.sesse.net Git - kdenlive/commitdiff
Title Widget-add spinbox for manual zoom:
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 19 Sep 2012 19:42:58 +0000 (21:42 +0200)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 19 Sep 2012 19:42:58 +0000 (21:42 +0200)
http://kdenlive.org/mantis/view.php?id=2740

src/titlewidget.cpp
src/widgets/titlewidget_ui.ui

index 86ab56908a7b5310c5a7d7df8ba3bad44dbcf4af..f1ce84d8cd4b751b70f8dcbf90821af6823d4c1e 100644 (file)
@@ -480,7 +480,7 @@ TitleWidget::TitleWidget(KUrl url, Timecode tc, QString projectTitlePath, Render
     connect(m_scene, SIGNAL(newRect(QGraphicsRectItem *)), this , SLOT(slotNewRect(QGraphicsRectItem *)));
     connect(m_scene, SIGNAL(newText(QGraphicsTextItem *)), this , SLOT(slotNewText(QGraphicsTextItem *)));
     connect(zoom_slider, SIGNAL(valueChanged(int)), this , SLOT(slotUpdateZoom(int)));
-
+    connect(zoom_spin, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateZoom(int)));
 
     // mbd: load saved settings
     readChoices();
@@ -860,8 +860,9 @@ void TitleWidget::initAnimation()
 
 void TitleWidget::slotUpdateZoom(int pos)
 {
+    zoom_spin->setValue(pos);
+    zoom_slider->setValue(pos);
     m_scene->setZoom((double) pos / 100);
-    zoom_label->setText(QString::number(pos) + '%');
 }
 
 void TitleWidget::slotZoom(bool up)
index 79b91a313d2b731b2f2e93ac2e94bef7371008fc..e12f7d3a1f1293364e957740ada33565ef30a40b 100644 (file)
       </widget>
      </item>
      <item>
-      <widget class="QLabel" name="zoom_label">
-       <property name="text">
-        <string>x1</string>
+      <widget class="QSpinBox" name="zoom_spin">
+       <property name="keyboardTracking">
+        <bool>false</bool>
+       </property>
+       <property name="suffix">
+        <string>%</string>
+       </property>
+       <property name="minimum">
+        <number>1</number>
+       </property>
+       <property name="maximum">
+        <number>200</number>
        </property>
       </widget>
      </item>