[Kst] branches/work/kst/portto4/kst/src/libkstapp
Barth Netterfield
netterfield at astro.utoronto.ca
Wed May 26 19:12:33 CEST 2010
SVN commit 1130881 by netterfield:
Finish fixing Z mode with shared axis boxes.
Shared axis boxes work usefully now (I hope).
M +23 -1 plotitem.cpp
M +4 -0 plotitem.h
M +1 -1 viewitem.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.cpp #1130880:1130881
@@ -853,6 +853,10 @@
void PlotItem::paint(QPainter *painter) {
+ if (maskedByMaximization()) {
+ return;
+ }
+
#if BENCHMARK
QTime bench_time;
bench_time.start();
@@ -2687,7 +2691,12 @@
_plotMaximizedSourceRect.setHeight(_plotMaximizedSourceRect.height()*y_rescale);
_plotMaximizedSourcePosition.setX(_plotMaximizedSourcePosition.x()*x_rescale);
_plotMaximizedSourcePosition.setY(_plotMaximizedSourcePosition.y()*y_rescale);
-
+ xAxis()->setAxisVisible(_plotMaximizedBottomVisible);
+ yAxis()->setAxisVisible(_plotMaximizedLeftVisible);
+ _leftLabelDetails->setVisible(_plotMaximizedLeftVisible);
+ _bottomLabelDetails->setVisible(_plotMaximizedBottomVisible);
+ _rightLabelDetails->setVisible(_plotMaximizedRightVisible);
+ _topLabelDetails->setVisible(_plotMaximizedTopVisible);
_plotMaximized = false;
PlotItemManager::self()->removeFocusPlot(this);
setParent(_plotMaximizedSourceParent);
@@ -2697,6 +2706,16 @@
parentView()->setChildMaximized(false);
parentView()->setFontRescale(1.0);
} else {
+ _plotMaximizedBottomVisible = _bottomLabelDetails->isVisible();
+ xAxis()->setAxisVisible(true);
+ _bottomLabelDetails->setVisible(true);
+ _plotMaximizedLeftVisible = _leftLabelDetails->isVisible();
+ yAxis()->setAxisVisible(true);
+ _leftLabelDetails->setVisible(true);
+ _plotMaximizedRightVisible = _rightLabelDetails->isVisible();
+ _rightLabelDetails->setVisible(true);
+ _plotMaximizedTopVisible = _topLabelDetails->isVisible();
+ _topLabelDetails->setVisible(true);
_plotMaximized = true;
_plotMaximizedSourcePosition = pos();
_plotMaximizedSourceRect = viewRect();
@@ -2716,6 +2735,9 @@
parentView()->setChildMaximized(true);
parentView()->setFontRescale(rescale);
}
+ if (isInSharedAxisBox()) {
+ parentView()->setPlotBordersDirty(true);
+ }
setPlotBordersDirty();
}
--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.h #1130880:1130881
@@ -449,6 +449,10 @@
QRectF _plotMaximizedSourceParentRect;
qreal _plotMaximizedSourceZValue;
ViewItem* _plotMaximizedSourceParent;
+ bool _plotMaximizedBottomVisible;
+ bool _plotMaximizedTopVisible;
+ bool _plotMaximizedLeftVisible;
+ bool _plotMaximizedRightVisible;
bool _allowUpdates;
--- branches/work/kst/portto4/kst/src/libkstapp/viewitem.cpp #1130880:1130881
@@ -676,7 +676,7 @@
painter->setBrush(brush());
paint(painter); //this is the overload that subclasses should use...
- if (!parentView()->isPrinting()) {
+ if (!parentView()->isPrinting() && !parentView()->childMaximized()) {
painter->save();
painter->setPen(Qt::DotLine);
painter->setBrush(Qt::NoBrush);
More information about the Kst
mailing list