[Kst] branches/work/kst/portto4/kst

Barth Netterfield netterfield at astro.utoronto.ca
Fri May 15 23:16:54 CEST 2009


SVN commit 968501 by netterfield:

Fix Don's line width big
Fix Don's range tab apply bug



 M  +1 -16     devel-docs/Kst2Specs/Bugs  
 M  +20 -0     devel-docs/Kst2Specs/FixedBugs  
 M  +12 -0     devel-docs/Kst2Specs/Wishlist  
 M  +13 -6     src/libkstapp/datadialog.cpp  
 M  +1 -0      src/libkstapp/datadialog.h  
 M  +9 -1      src/libkstapp/rangetab.cpp  
 M  +3 -1      src/libkstmath/curve.cpp  


--- branches/work/kst/portto4/kst/devel-docs/Kst2Specs/Bugs #968500:968501
@@ -20,16 +20,8 @@
 load it
   -the plot is now smaller than it was.
 It should be the same size as it started.
-** I think this is because my kst window, for some reason, is resizing.**
+** it is now much better than it used to be.  The shift is now only a few pixels **
 
----------
-
-Loading of a Kst file into a resized window does not adjust the loaded items to
-fit on the new window size.
-
-The View dimensions should be saved as part of the .kst file and if the newly created
-view on a load of a .kst file doesn't match, the resize logic should be triggered.
-*Mike*
 ------------
 
 Error in choice of offset mode.
@@ -123,18 +115,11 @@
 100, the range will be reported as -1 to 2.  Despite this, you still
 have to enter "0.1" and "100" to get this range.
 
-12. Changing the value of the fixed range limits doesn't active the
-"Apply" button.
-
 13. Hitting shift changes into y-zoom mode forever, rather than just
 changing it while shift is depressed.  After doing this it's difficult
 to get back to xy-zoom mode.  (I have to right click twice to open and
 close the context menu.)
 
-14. The weight of a drawn curve is apparently calculated as: (my weight)
-+ (sum of weights of all lower numbered curves).  Being unable to
-specify negative weights, curves just get heavier and heavier.
-
 15. The text label behaviour is un-intuitive.  The typical interface is
 to choose a position first, and then input some text.
 
--- branches/work/kst/portto4/kst/devel-docs/Kst2Specs/FixedBugs #968500:968501
@@ -584,3 +584,23 @@
 curve "2 vs. 1" I'm interested in.  Here, I have to go by trial and
 error.
 
+------------
+
+14. The weight of a drawn curve is apparently calculated as: (my weight)
++ (sum of weights of all lower numbered curves).  Being unable to
+specify negative weights, curves just get heavier and heavier.
+
+---------
+
+Loading of a Kst file into a resized window does not adjust the loaded items to
+fit on the new window size.
+
+The View dimensions should be saved as part of the .kst file and if the newly created
+view on a load of a .kst file doesn't match, the resize logic should be triggered.
+*Mike*
+
+---------
+
+12. Changing the value of the fixed range limits doesn't active the
+"Apply" button.
+
--- branches/work/kst/portto4/kst/devel-docs/Kst2Specs/Wishlist #968500:968501
@@ -83,3 +83,15 @@
 same data field.  ie, if the XY curve of [sine] is red, the spectrum
 curve of [sine] should also be red.
 
+---------
+
+Default X vector field:
+  We need to guess that is wanted for an X vector in dialogs which take an X vector	:
+    -wizard, or a create curve dialog called from a vector selector for an X vector: 
+	remember last X vector field name, or INDEX if last field name doesn't exist.
+    -Equations and Curves: Try in order
+	1) remember last vector used on X axis and use it again.
+	2) remember descriptive name last used on X axis and use any vector with this name.
+	3) Use a vector named INDEX
+	4) Use a generated vector
+   
\ No newline at end of file
--- branches/work/kst/portto4/kst/src/libkstapp/datadialog.cpp #968500:968501
@@ -16,6 +16,7 @@
 #include <QPushButton>
 #include <QDialogButtonBox>
 #include <QDebug>
+#include <QSpacerItem>
 
 #include "datadialog.h"
 
@@ -78,19 +79,22 @@
 
   QHBoxLayout *layout = new QHBoxLayout(box);
 
-  _nameLabel = new QLabel(tr("Name:"), box);
+  _nameLabel = new QLabel(tr("&Name:"), box);
   _tagString = new QLineEdit(box);
   connect(_tagString, SIGNAL(textChanged(QString)), this, SLOT(modified()));
   _nameLabel->setBuddy(_tagString);
 
   _shortName = new QLabel(QString(), box);
 
-  _tagStringAuto = new QCheckBox(tr("Auto","automatic"), box);
+  _tagStringAuto = new QCheckBox(tr("&Auto","automatic"), box);
   connect(_tagStringAuto, SIGNAL(toggled(bool)), _tagString, SLOT(setDisabled(bool)));
 
-  QPushButton *button = new QPushButton(tr("Edit Multiple >>"));
-  connect(button, SIGNAL(clicked()), this, SLOT(slotEditMultiple()));
+  _expand = new QPushButton(tr("Edit Multiple >>"));
+  _expand->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+  connect(_expand, SIGNAL(clicked()), this, SLOT(slotEditMultiple()));
 
+  QLabel *spacer = new QLabel();
+
   if (_dataObject) {
     setTagString(_dataObject->descriptiveName());
     setShortName(_dataObject->shortName());
@@ -98,14 +102,15 @@
   } else {
     _tagStringAuto->setChecked(true);
     setTagString(QString());
-    button->setVisible(false);
+    _expand->setVisible(false);
   }
 
   layout->addWidget(_nameLabel);
   layout->addWidget(_tagString);
   layout->addWidget(_shortName);
   layout->addWidget(_tagStringAuto);
-  layout->addWidget(button);
+  layout->addWidget(spacer);
+  layout->addWidget(_expand);
 
   box->setLayout(layout);
 
@@ -180,6 +185,7 @@
     _shortName->setVisible(true);
     _tagStringAuto->setVisible(true);
     _nameLabel->setVisible(true);
+    _expand->setText(tr("Edit Multiple >>"));
     setMinimumWidth(currentWidth - extensionWidth);
     resize(currentWidth - extensionWidth, height());
     _mode = Edit;
@@ -189,6 +195,7 @@
     _shortName->setVisible(false);
     _tagStringAuto->setVisible(false);
     _nameLabel->setVisible(false);
+    _expand->setText(tr("<< Edit one %1").arg(_shortName->text()));
     setMinimumWidth(currentWidth + extensionWidth);
     resize(currentWidth + extensionWidth, height());
     _mode = EditMultiple;
--- branches/work/kst/portto4/kst/src/libkstapp/datadialog.h #968500:968501
@@ -75,6 +75,7 @@
     QCheckBox *_tagStringAuto;
     QLabel *_shortName;
     QLabel *_nameLabel;
+    QPushButton *_expand;
     ObjectPtr _dataObject;
     EditMode _mode;
     bool _modified;
--- branches/work/kst/portto4/kst/src/libkstapp/rangetab.cpp #968500:968501
@@ -34,6 +34,14 @@
   connect(_yBorder, SIGNAL(toggled(bool)), this, SIGNAL(modified()));
   connect(_ySpike, SIGNAL(toggled(bool)), this, SIGNAL(modified()));
   connect(_yFixed, SIGNAL(toggled(bool)), this, SIGNAL(modified()));
+
+  connect(_xMin, SIGNAL(textEdited(const QString &)), this, SIGNAL(modified()));
+  connect(_xMax, SIGNAL(textEdited(const QString &)), this, SIGNAL(modified()));
+  connect(_xRange, SIGNAL(textEdited(const QString &)), this, SIGNAL(modified()));
+
+  connect(_yMin, SIGNAL(textEdited(const QString &)), this, SIGNAL(modified()));
+  connect(_yMax, SIGNAL(textEdited(const QString &)), this, SIGNAL(modified()));
+  connect(_yRange, SIGNAL(textEdited(const QString &)), this, SIGNAL(modified()));
 }
 
 RangeTab::~RangeTab() {
@@ -94,4 +102,4 @@
   emit tabModified();
 }
 
-}
\ No newline at end of file
+}
--- branches/work/kst/portto4/kst/src/libkstmath/curve.cpp #968500:968501
@@ -676,6 +676,8 @@
 
 void Curve::paintObjects(const CurveRenderContext& context) {
   QPainter *p = context.painter;
+  p->save();
+
   Qt::PenStyle style = Kst::LineStyle[lineStyle()];
 
   if (hasBars()) {
@@ -689,7 +691,6 @@
         p->fillRect(rect, color());
     }
   }
-
   p->setPen(QPen(color(), _width, style));
 
   foreach(QPolygon poly, _polygons) {
@@ -704,6 +705,7 @@
   foreach(QPoint point, _points) {
     CurvePointSymbol::draw(PointType, p, point.x(), point.y(), _width);
   }
+  p->restore();
 }
 
 


More information about the Kst mailing list