[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Mon Oct 24 06:07:54 CEST 2005
SVN commit 473569 by staikos:
remove a duplicate d2i and fix warning
M +1 -0 datarangewidget.ui
M +0 -6 datarangewidget.ui.h
M +5 -1 kstplotlabel.cpp
--- trunk/extragear/graphics/kst/kst/datarangewidget.ui #473568:473569
@@ -308,6 +308,7 @@
<include location="global" impldecl="in implementation">qpixmap.h</include>
<include location="global" impldecl="in implementation">qpainter.h</include>
<include location="local" impldecl="in implementation">kst.h</include>
+ <include location="local" impldecl="in implementation">kstmath.h</include>
<include location="local" impldecl="in implementation">kstvectordefaults.h</include>
<include location="local" impldecl="in implementation">kstpoint.h</include>
<include location="local" impldecl="in implementation">kstcolorsequence.h</include>
--- trunk/extragear/graphics/kst/kst/datarangewidget.ui.h #473568:473569
@@ -125,12 +125,6 @@
return Equation::interpret(txt);
}
-namespace {
- inline int d2i(double x) {
- return int(floor(x+0.5));
- }
-}
-
int KstDataRange::f0Value()
{
return ::d2i(interpret(F0->text().latin1()) * KST::timeDefinitions[_units->currentItem()].factor);
--- trunk/extragear/graphics/kst/kst/kstplotlabel.cpp #473568:473569
@@ -19,6 +19,7 @@
#include "enodes.h"
#include "kst.h"
+#include "kstmath.h"
#include "kstdatacollection.h"
#include "kstsettings.h"
#include "labelrenderer.h"
@@ -168,6 +169,7 @@
return _fontSize;
}
+
bool KstPlotLabel::interpreted() const {
return _interpret;
}
@@ -180,9 +182,10 @@
QSize KstPlotLabel::size() const {
double r = fabs(_rotation*M_PI/180.0);
- return QSize(_textWidth*cos(r) + _textHeight*sin(r), _textHeight*cos(r) + _textWidth*sin(r));
+ return QSize(d2i(_textWidth*cos(r) + _textHeight*sin(r)), d2i(_textHeight*cos(r) + _textWidth*sin(r)));
}
+
void KstPlotLabel::load(const QDomElement& e) {
bool upLS = false;
QDomNode n = e.firstChild();
@@ -250,6 +253,7 @@
return *this;
}
+
void KstPlotLabel::updateAbsFontSize(int x_pix, int y_pix) {
double x_s, y_s, s;
More information about the Kst
mailing list