Minor improvement in default node size
authorJohn Abraham <john.abraham@gatech.edu>
Sat, 28 Apr 2012 22:24:42 -0700
changeset 53 9d44c4b3a8c2
parent 52 521f899954ab
child 54 25fe34b731ec
Minor improvement in default node size
animator/animatormode.cpp
animator/animatorscene.cpp
animator/animnode.cpp
--- a/animator/animatormode.cpp	Sun Apr 08 23:05:22 2012 -0700
+++ b/animator/animatormode.cpp	Sat Apr 28 22:24:42 2012 -0700
@@ -129,7 +129,7 @@
                   << "2000%";
         m_nodeSizeComboBox->addItems(nodeSizes);
         connect(m_nodeSizeComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(nodeSizeSlot(QString)));
-        m_nodeSizeComboBox->setCurrentIndex(5);
+        m_nodeSizeComboBox->setCurrentIndex(7);
         m_nodeSizeComboBox->setGeometry(0, 0, 0, 10);
 
 
@@ -860,7 +860,6 @@
      fastFwdSlot();
      m_gridButton->setChecked(true);
      gridSlot();
-
      m_scene->setSceneInfoText("", false);
      m_bottomStatusLabel->setText("Parsing complete");
      m_parseProgressBar->reset();
@@ -890,6 +889,8 @@
     QApplication::processEvents();
     m_zoomOutButton->click();
     QApplication::processEvents();
+    m_nodeSizeComboBox->setCurrentIndex(7);
+    nodeSizeSlot("300%");
 
 
  }
@@ -962,7 +963,7 @@
          return 0.6;
      if(nodeSize == "80%")
          return 0.8;
-     if(nodeSize == "100%")
+     if(nodeSize == "")
          return 1;
      if(nodeSize == "200%")
          return 2;
--- a/animator/animatorscene.cpp	Sun Apr 08 23:05:22 2012 -0700
+++ b/animator/animatorscene.cpp	Sat Apr 28 22:24:42 2012 -0700
@@ -220,7 +220,8 @@
 void
 AnimatorScene::setCurrentScale(qreal xScale, qreal yScale)
 {
-   // qDebug(QString("Set Current Scale:")+ QString::number(xScale)+QString(" ")+QString::number(yScale));
+//    qDebug(QString("Current Scale:")+ QString::number(m_currentXscale)+QString(" ")+QString::number(m_currentYscale));
+//    qDebug(QString("Set Current Scale:")+ QString::number(xScale)+QString(" ")+QString::number(yScale));
     m_currentXscale = xScale;
     m_currentYscale = yScale;
     m_textTransform.scale(1/m_currentXscale, 1/m_currentYscale);
@@ -348,7 +349,8 @@
 void
 AnimatorScene::setNodeSize(qreal nNodeSize)
 {
-    m_nodeSize = nNodeSize;
+    //qDebug(QString("Current Scale:")+ QString::number(m_currentXscale)+QString(" ")+QString::number(m_currentYscale));
+    m_nodeSize = nNodeSize/m_currentXscale * 10;
     qreal packetWidth = 4.5;
     m_currentPacketPen.setWidthF(packetWidth / m_currentXscale);
     for (AnimNodeMap_t::const_iterator i = m_animNodes.begin();
@@ -356,7 +358,7 @@
          ++i)
     {
         AnimNode * aNode = i->second;
-        aNode->setSize(nNodeSize);
+        aNode->setSize(m_nodeSize);
     }
     showNodeId(m_showNodeId);
     update();
--- a/animator/animnode.cpp	Sun Apr 08 23:05:22 2012 -0700
+++ b/animator/animnode.cpp	Sat Apr 28 22:24:42 2012 -0700
@@ -124,7 +124,6 @@
     return m_nodeId;
 }
 
-
 void
 AnimNode::setSize(qreal size)
 {