]> git.sesse.net Git - kdenlive/commitdiff
small ui update for autotrack / obscure filter
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 25 Oct 2008 14:29:18 +0000 (14:29 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 25 Oct 2008 14:29:18 +0000 (14:29 +0000)
svn path=/branches/KDE4/; revision=2561

src/geometryval.cpp
src/keyframehelper.cpp
src/widgets/geometryval_ui.ui

index f75c21dcd4946178447993e13584fec46da637c8..2c40d6e098e651b1b95b8a045ab0a495ecc215fa 100644 (file)
@@ -345,6 +345,14 @@ void Geometryval::setupParam(const QDomElement& par, int minFrame, int maxFrame)
     QString val = par.attribute("value");
     if (par.attribute("fixed") == "1") {
         m_fixedMode = true;
+        ui.buttonPrevious->setHidden(true);
+        ui.buttonNext->setHidden(true);
+        ui.buttonDelete->setHidden(true);
+        ui.buttonAdd->setHidden(true);
+        ui.spinTransp->setMaximum(500);
+        ui.label_pos->setHidden(true);
+        m_helper->setHidden(true);
+        ui.spinPos->setHidden(true);
     }
     char *tmp = (char *) qstrdup(val.toUtf8().data());
     if (m_geom) m_geom->parse(tmp, maxFrame - minFrame, m_profile.width, m_profile.height);
@@ -353,10 +361,7 @@ void Geometryval::setupParam(const QDomElement& par, int minFrame, int maxFrame)
 
     //kDebug() << " / / UPDATING TRANSITION VALUE: " << m_geom->serialise();
     //read param her and set rect
-    if (m_fixedMode) {
-        m_helper->setHidden(true);
-        ui.spinPos->setHidden(true);
-    } else {
+    if (!m_fixedMode) {
         m_helper->setKeyGeometry(m_geom, maxFrame - minFrame - 1);
         m_helper->update();
         /*QDomDocument doc;
@@ -383,8 +388,8 @@ void Geometryval::setupParam(const QDomElement& par, int minFrame, int maxFrame)
     slotPositionChanged(0, false);
     if (!m_fixedMode) {
         connect(ui.spinPos, SIGNAL(valueChanged(int)), this , SLOT(slotPositionChanged(int)));
-        connect(ui.spinTransp, SIGNAL(valueChanged(int)), this , SLOT(slotTransparencyChanged(int)));
     }
+    connect(ui.spinTransp, SIGNAL(valueChanged(int)), this , SLOT(slotTransparencyChanged(int)));
 }
 
 void Geometryval::updateTransitionPath() {
index 6d74ce805471535ab1feef819d697d89be12ff5d..c77c4da477d34f9a7832d7be63247cb3c6a35a0f 100644 (file)
@@ -101,7 +101,7 @@ const int KeyframeHelper::value() const {
 }
 
 void KeyframeHelper::setValue(const int pos) {
-    if (pos == m_position) return;
+    if (pos == m_position || m_geom == NULL) return;
     m_position = pos;
     update();
 }
index 9fb6bfc038c863e2eb3216381e34ec8e381b2d0c..d2d961744c457d2a6b1a9e0bde21c8c7d650a1ae 100644 (file)
      </property>
     </widget>
    </item>
-   <item row="2" column="5" >
-    <widget class="QLabel" name="label_2" >
-     <property name="text" >
-      <string>Opacity</string>
-     </property>
-    </widget>
-   </item>
    <item row="2" column="6" >
     <widget class="QSpinBox" name="spinTransp" >
      <property name="maximum" >
     </widget>
    </item>
    <item row="2" column="8" >
-    <widget class="QLabel" name="label_3" >
+    <widget class="QLabel" name="label_pos" >
      <property name="text" >
       <string>Pos</string>
      </property>
      </property>
     </spacer>
    </item>
+   <item row="2" column="5" >
+    <widget class="QLabel" name="label_opacity" >
+     <property name="text" >
+      <string>Opacity</string>
+     </property>
+    </widget>
+   </item>
   </layout>
+  <zorder>widget</zorder>
+  <zorder>keyframeWidget</zorder>
+  <zorder>buttonMenu</zorder>
+  <zorder>buttonPrevious</zorder>
+  <zorder>buttonNext</zorder>
+  <zorder>buttonAdd</zorder>
+  <zorder>buttonDelete</zorder>
+  <zorder>spinTransp</zorder>
+  <zorder>label_pos</zorder>
+  <zorder>spinPos</zorder>
+  <zorder>label_opacity</zorder>
  </widget>
  <resources/>
  <connections/>