12#include "KDChartLeveyJenningsAxis_p.h"
22#include "KDChartPainterSaver_p.h"
25#include <KDABLibFakes>
53void LeveyJenningsAxis::init()
58 <<
tr(
"+2sd") <<
tr(
"+3sd");
82 if (
type !=
d->type) {
119 Q_ASSERT_X(
d->diagram(),
"LeveyJenningsAxis::paint",
120 "Function call not allowed: The axis is not assigned to any diagram.");
124 "Bad function call: PaintContext::coodinatePlane() NOT a levey jennings plane.");
128 if (!
d->diagram()->model())
145 :
diag->calculatedMeanValue();
147 :
diag->calculatedStandardDeviation();
163 Q_ASSERT_X(values.
count() <=
labels().count(),
"LeveyJenningsAxis::paintAsOrdinate",
"Need to have at least 5 labels");
178 for (
int i = 0;
i < values.
count(); ++
i) {
187 if (values.
at(
i) >
diag->expectedMeanValue() + 4 *
diag->expectedStandardDeviation())
190 if (values.
at(
i) <
diag->expectedMeanValue() - 4 *
diag->expectedStandardDeviation())
229 if (range.first.secsTo(range.second) < 86400)
247 if (range.first.secsTo(range.second) < 86400)
@ MeasureOrientationMinimum
virtual const QString customizedLabel(const QString &label) const
Reimplement this method if you want to adjust axis labels before they are printed.
const AbstractDiagram * diagram() const
void setLabels(const QStringList &list)
Use this to specify your own set of strings, to be used as axis labels.
QStringList labels() const
void setTextAttributes(const TextAttributes &a)
Use this to specify the text attributes to be used for axis labels.
TextAttributes textAttributes() const
Returns the text attributes to be used for axis labels.
AbstractDiagram defines the interface for diagram classes.
virtual bool isOrdinate() const
void paintCtx(PaintContext *) override
virtual bool isAbscissa() const
virtual Position position() const
QRect geometry() const override
~LeveyJenningsAxis() override
Qt::DateFormat dateFormat() const
void setDateFormat(Qt::DateFormat format)
void paintCtx(PaintContext *) override
LeveyJenningsGridAttributes::GridType type() const
void setType(LeveyJenningsGridAttributes::GridType type)
virtual void paintAsAbscissa(PaintContext *)
bool compare(const LeveyJenningsAxis *other) const
LeveyJenningsAxis(LeveyJenningsDiagram *diagram=nullptr)
virtual void paintAsOrdinate(PaintContext *)
Levey Jennings coordinate plane This is actually nothing real more than a plain cartesian coordinate ...
LeveyDiagram defines a Levey Jennings chart.
Stores information about painting diagrams.
AbstractCoordinatePlane * coordinatePlane() const
QPainter * painter() const
static QPen scalePen(const QPen &pen)
A set of text attributes.
QObject * parent() const const
T qobject_cast(QObject *object)
QString tr(const char *sourceText, const char *disambiguation, int n)
void setClipping(bool enable)
void setPen(const QColor &color)
void setRenderHint(QPainter::RenderHint hint, bool on)
void setColor(const QColor &color)
QRect toRect() const const
QString fromLatin1(const char *str, int size)
const T & at(int i) const const
int count(const T &value) const const