MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / generate

Method generate

3rdparty/qcustomplot/qcustomplot.cpp:6186–6209  ·  view source on GitHub ↗

! This is the method called by QCPAxis in order to actually generate tick coordinates (\a ticks), tick label strings (\a tickLabels) and sub tick coordinates (\a subTicks). The ticks are generated for the specified \a range. The generated labels typically follow the specified \a locale, \a formatChar and number \a precision, however this might be different (or even irrelevant) for cer

Source from the content-addressed store, hash-verified

6184 to \a ticks by index.
6185*/
6186void QCPAxisTicker::generate(const QCPRange &range, const QLocale &locale, QChar formatChar, int precision, QVector<double> &ticks, QVector<double> *subTicks, QVector<QString> *tickLabels)
6187{
6188 // generate (major) ticks:
6189 double tickStep = getTickStep(range);
6190 ticks = createTickVector(tickStep, range);
6191 trimTicks(range, ticks, true); // trim ticks to visible range plus one outer tick on each side (incase a subclass createTickVector creates more)
6192
6193 // generate sub ticks between major ticks:
6194 if (subTicks)
6195 {
6196 if (!ticks.isEmpty())
6197 {
6198 *subTicks = createSubTickVector(getSubTickCount(tickStep), ticks);
6199 trimTicks(range, *subTicks, false);
6200 } else
6201 *subTicks = QVector<double>();
6202 }
6203
6204 // finally trim also outliers (no further clipping happens in axis drawing):
6205 trimTicks(range, ticks, false);
6206 // generate labels for visible ticks if requested:
6207 if (tickLabels)
6208 *tickLabels = createLabelVector(ticks, locale, formatChar, precision);
6209}
6210
6211/*! \internal
6212

Callers 3

setupTickVectorsMethod · 0.80
getTempFileNameMethod · 0.80
getTempFileNameMethod · 0.80

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected