[Kst] branches/work/kst/portto4/kst
Barth Netterfield
netterfield at astro.utoronto.ca
Sat Aug 15 06:12:30 CEST 2009
SVN commit 1011565 by netterfield:
Update dialog defaults lists
Fix rotated axis number label positioning
M +2 -2 devel-docs/Kst2Specs/Bugs
M +4 -0 devel-docs/Kst2Specs/FixedBugs
M +6 -2 devel-docs/Kst2Specs/Wishlist
M +29 -12 src/libkstapp/plotitem.cpp
M +18 -0 src/widgets/dialogdefaults.h
--- branches/work/kst/portto4/kst/devel-docs/Kst2Specs/Bugs #1011564:1011565
@@ -7,9 +7,9 @@
--------------------
-Rotated axis number label spacing is wrong
+Artifacts when resizing large arrowheads.
--------------------
-Artifacts when resizing large arrowheads.
+ASCII settings are ignored unless they are the global defaults.
--- branches/work/kst/portto4/kst/devel-docs/Kst2Specs/FixedBugs #1011564:1011565
@@ -1098,3 +1098,7 @@
Sensible filter in image dialog
+--------------------
+
+Rotated axis number label spacing is wrong
+
--- branches/work/kst/portto4/kst/devel-docs/Kst2Specs/Wishlist #1011564:1011565
@@ -26,6 +26,8 @@
----------
Printing from the command line. This existed in 1.x
+ Note: printing still requires parts of Qt which require a window session, so pure scripted
+ headless prints are not possible :-(
--------
@@ -44,11 +46,11 @@
--------
Export eps to vector format.
+ kst 1.x did this by printing to file a .ps file, and then modifying it by adding the bounding box.
-
--------
-Reasonable/sticky defaults for line widths
+Reasonable/sticky defaults for plotDefaults
See View::configurePlotFontDefaults for a place to do this...
Currently, new plots follow any existing plots, but there is no
sensibly set 1st plot default.
@@ -57,6 +59,7 @@
data source text box doesn't recognise initial ~ as a euphemism for
the user's home directory (QDirModel doesn't handle this...)
+ (nor QDir, though QDir seems to know about $HOME).
------------
@@ -65,6 +68,7 @@
------------
DECIDE: absolute or relative file names in kst files?
+ kst1.x uses absolute. This becomes a problem when the directory changes.
------------
--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.cpp #1011564:1011565
@@ -907,13 +907,18 @@
bound.moveCenter(p);
} else {
if (rotation < 0) {
+ qreal theta = (rotation >-30 ? rotation : -30);
+ qreal right = mapXToPlot(xLabelIt.key()) - bound.height() * (sin(theta*M_PI/180.0));
bound = t.mapRect(bound);
- p = QPointF(mapXToPlot(xLabelIt.key()) - bound.width() / 2, plotRect().bottom() + _calculatedAxisMarginVLead);
+ p = QPointF(right, plotRect().bottom() + _calculatedAxisMarginVLead);
+ bound.moveTopRight(p);
} else {
- p = QPointF(mapXToPlot(xLabelIt.key()) - bound.height() * 0.5, plotRect().bottom() + _calculatedAxisMarginVLead);
+ qreal theta = (rotation <30 ? rotation : 30);
+ qreal left = mapXToPlot(xLabelIt.key()) - bound.height() * (sin(theta*M_PI/180.0));
bound = t.mapRect(bound);
+ p = QPointF(left, plotRect().bottom() + _calculatedAxisMarginVLead);
+ bound.moveTopLeft(p);
}
- bound.moveTopLeft(p);
}
if (rect().left() > bound.left()) bound.setLeft(rect().left());
@@ -1009,19 +1014,31 @@
QRectF bound = painter->boundingRect(QRectF(), flags, yLabelIt.value());
QPointF p;
if (rotation < 0) {
- p = QPointF(plotRect().left() - _calculatedAxisMarginHLead,
- mapYToPlot(yLabelIt.key()) - bound.height() * 0.5);
+ qreal theta = (rotation >-45.0) ? rotation : -45.0;
+ qreal top;
+ if (rotation >-89) {
+ top = mapYToPlot(yLabelIt.key()) - bound.height()*0.5*cos(theta*2.0*M_PI/180.0);
+ } else {
+ top = mapYToPlot(yLabelIt.key()) - bound.width()*0.5;
+ }
bound = t.mapRect(bound);
- bound.moveLeft(plotRect().left() - bound.width());
- bound.moveTop(p.y());
- } else {
+ bound.moveRight(plotRect().left() - _calculatedAxisMarginHLead);
+ bound.moveTop(top);
+ } else if (rotation > 0) {
+ qreal theta = (rotation <45.0) ? rotation : 45.0;
+ qreal bottom;
+ if (rotation < 89) {
+ bottom = mapYToPlot(yLabelIt.key()) + bound.height()*0.5*cos(theta*2.0*M_PI/180.0);
+ } else {
+ bottom = mapYToPlot(yLabelIt.key()) + bound.width()*0.5;
+ }
bound = t.mapRect(bound);
+ bound.moveRight(plotRect().left() - _calculatedAxisMarginHLead);
+ bound.moveBottom(bottom);
+ } else { // no rotation.
p = QPointF(plotRect().left() - _calculatedAxisMarginHLead,
mapYToPlot(yLabelIt.key()) - bound.height() * 0.5);
bound.moveTopRight(p);
- if (rotation != 0) {
- bound.moveLeft(plotRect().left() - bound.width());
- }
}
if (rect().top() > bound.top()) bound.setTop(rect().top());
@@ -1149,7 +1166,7 @@
t.rotate(-1*rotation);
painter->rotate(rotation);
- painter->drawText(t.mapRect(bound), flags, label.value);
+ painter->drawText(t.mapRect(bound), Qt::TextSingleLine | Qt::AlignCenter, label.value);
painter->restore();
} else {
painter->drawText(bound, flags, label.value);
--- branches/work/kst/portto4/kst/src/widgets/dialogdefaults.h #1011564:1011565
@@ -67,3 +67,21 @@
// curve/xvectorfield QString datawizard, curvedialog
// export/filename QString exportgraphicsdialog
+// export/format QString exportgraphicsdialog
+// export/xsize exportgraphicsdialog
+// export/ysize exportgraphicsdialog
+// export/sizeOption exportgraphicsdialog
+
+// picture/startdir pictureitem.cpp
+
+// histogram/realTimeAutoBin histogramdialog.cpp
+
+// matrix/datasource matrixdialog.cpp
+// matrix/reqXStart matrixdialog.cpp
+// matrix/reqYStart matrixdialog.cpp
+// matrix/xCountFromEnd matrixdialog.cpp
+// matrix/xNumSteps matrixdialog.cpp
+// matrix/xReadToEnd matrixdialog.cpp
+// matrix/yCountFromEnd matrixdialog.cpp
+// matrix/yNumSteps matrixdialog.cpp
+// matrix/yReadToEnd matrixdialog.cpp
More information about the Kst
mailing list