[Kst] branches/work/kst/portto4/kst
Barth Netterfield
netterfield at astro.utoronto.ca
Mon May 24 22:31:12 CEST 2010
SVN commit 1130244 by netterfield:
In shared axis mode, draw the top label inside the plot (so it is still shown).
M +25 -0 devel-docs/Kst2Specs/Bugs
M +9 -4 devel-docs/Kst2Specs/Wishlist
M +21 -9 src/libkstapp/plotitem.cpp
M +1 -0 src/libkstapp/plotitem.h
--- branches/work/kst/portto4/kst/devel-docs/Kst2Specs/Bugs #1130243:1130244
@@ -32,3 +32,28 @@
...etc
Opening the dialog has no defaults set for these. There should be.
+
+--------------------
+
+With live data, occasionally the last few (several) samples show as a
+flat-line (at about the value of the last sample at the previous update)
+which magically fixes itself upon the next update. I think I have
+reported this before.
+
+----------------------
+
+With live data, add a label which contains a scalar showing the
+"Last" value of a vector. As the data is scrolling by, sometimes this
+scalar will indicate a value strikingly similar to the "Min" (or perhaps
+"First") value on the plot rather than the Last value.
+
+------------------------
+
+Resizing with shared axis box doesn't resize borders
+
+-------------------------
+
+Loading a file with a shared axis box:
+ background black
+ no 'break shared axis' option in menu
+
--- branches/work/kst/portto4/kst/devel-docs/Kst2Specs/Wishlist #1130243:1130244
@@ -20,10 +20,6 @@
----------
-Tooltips/whats this where helpful.
-
-----------
-
Scientific notation (instead of C's %e notation) for extreme axis numbers
--------
@@ -33,6 +29,7 @@
--------
Edit multiple for vectors
+(or get rid of the option in the dialog)
--------
@@ -81,5 +78,13 @@
--------------------
+Tied zoom icon should be a mag glass + paper clip
+Replace layout mode icon with zoom icon, and invert sense
+
+--------------------
+
fit dialog should have curve placement options: overplot, replace, new plot.
+--------------------
+
+Legends can get larger than the plot if there are enought things in them. This should not be. Requires chewing of the cud...
--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.cpp #1130243:1130244
@@ -919,10 +919,6 @@
// qDebug() << "=============> rightLabel:" << rightLabel() << endl;
#endif
paintRightLabel(painter);
-#if DEBUG_LABEL_REGION
- // qDebug() << "=============> topLabel:" << topLabel() << endl;
-#endif
- paintTopLabel(painter);
#if BENCHMARK
b_2 = benchtmp.elapsed();
#endif
@@ -938,6 +934,12 @@
#endif
paintPlotMarkers(painter);
+
+#if DEBUG_LABEL_REGION
+ // qDebug() << "=============> topLabel:" << topLabel() << endl;
+#endif
+ paintTopLabel(painter);
+
#if BENCHMARK
b_5 = benchtmp.elapsed();
#endif
@@ -1978,8 +1980,12 @@
QRectF PlotItem::topLabelRect() const {
+ if (topLabelMargin()>0) {
return QRectF(0.0, 0.0, width() - leftLabelMargin() - rightLabelMargin(), topLabelMargin());
+ } else {
+ return QRectF(0.0, 0.0, width() - leftLabelMargin() - rightLabelMargin(), _calculatedTopLabelHeight);
}
+}
QRectF PlotItem::bottomLabelRect() const {
@@ -2269,7 +2275,11 @@
Label::renderLabel(*rc, parsed->chunk);
QTransform t;
+ if (_topLabelDetails->isVisible()) {
t.translate(plotRect().center().x() - rc->x / 2, rect().top());
+ } else {
+ t.translate(plotRect().center().x() - rc->x / 2, rect().top() + topLabelRect().height()/2);
+ }
connect(rc, SIGNAL(labelDirty()), this, SLOT(setTopLabelDirty()));
connect(rc, SIGNAL(labelDirty()), this, SLOT(redrawPlot()));
@@ -2283,11 +2293,10 @@
void PlotItem::paintTopLabel(QPainter *painter) {
- if (!_topLabelDetails->isVisible() || topLabel().isEmpty())
+ if (topLabel().isEmpty())
return;
generateTopLabel();
-
if (_topLabel.valid) {
painter->save();
painter->setTransform(_topLabel.transform, true);
@@ -2314,9 +2323,7 @@
void PlotItem::calculateTopLabelMargin(QPainter *painter) {
- if (!_topLabelDetails->isVisible()) {
- _calculatedTopLabelMargin = 0;
- } else {
+
painter->save();
painter->setFont(topLabelDetails()->calculatedFont());
@@ -2326,6 +2333,11 @@
painter->restore();
+ _calculatedTopLabelHeight = topLabelBound.height();
+
+ if (!_topLabelDetails->isVisible()) {
+ _calculatedTopLabelMargin = 0;
+ } else {
_calculatedTopLabelMargin = qMax(_calculatedAxisMarginTOverflow, topLabelBound.height());
//No more than 1/4 the height of the plot
--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.h #1130243:1130244
@@ -407,6 +407,7 @@
qreal _calculatedLeftLabelMargin;
qreal _calculatedRightLabelMargin;
qreal _calculatedTopLabelMargin;
+ qreal _calculatedTopLabelHeight;
qreal _calculatedBottomLabelMargin;
qreal _calculatedLabelMarginWidth;
qreal _calculatedLabelMarginHeight;
More information about the Kst
mailing list