mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
updates to work with qwt 5.0.1
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
TEMPLATE = app
|
||||
TARGET +=
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += /home/srhea/src/qwt-20060130/include ../lib ../srm
|
||||
INCLUDEPATH += /home/srhea/src/qwt-5.0.1/src ../lib ../srm
|
||||
CONFIG += static debug
|
||||
LIBS += /home/srhea/src/qwt-20060130/lib/libqwt.a ../lib/libgc.a
|
||||
LIBS += /home/srhea/src/qwt-5.0.1/lib/libqwt.a ../lib/libgc.a
|
||||
LIBS += ../srm/libsrm.a
|
||||
LIBS += -lm -lz
|
||||
macx {
|
||||
|
||||
@@ -98,8 +98,8 @@ LogTimeScaleDraw::tickLabel(const QFont &font, double value) const
|
||||
else
|
||||
lbl = label(value);
|
||||
|
||||
lbl.setFlags(0);
|
||||
lbl.setLayoutAttributes(QwtText::MinimumLayout);
|
||||
lbl.setRenderFlags(0);
|
||||
lbl.setLayoutAttribute(QwtText::MinimumLayout);
|
||||
|
||||
(void)lbl.textSize(font); // initialize the internal cache
|
||||
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
/*!
|
||||
Return a transformation, for logarithmic (base 10) scales
|
||||
*/
|
||||
QwtScaleTransformation LogTimeScaleEngine::transformation() const
|
||||
QwtScaleTransformation *LogTimeScaleEngine::transformation() const
|
||||
{
|
||||
return QwtScaleTransformation(QwtScaleTransformation::log10XForm,
|
||||
QwtScaleTransformation::log10InvXForm);
|
||||
return new QwtScaleTransformation(QwtScaleTransformation::Log10);
|
||||
//, log10XForm, QwtScaleTransformation::log10InvXForm);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -73,7 +73,7 @@ void LogTimeScaleEngine::autoScale(int maxNumSteps,
|
||||
if (testAttribute(QwtScaleEngine::IncludeReference))
|
||||
interval = interval.extend(logRef);
|
||||
|
||||
interval = interval.limit(LOG_MIN, LOG_MAX);
|
||||
interval = interval.limited(LOG_MIN, LOG_MAX);
|
||||
|
||||
if (interval.width() == 0.0)
|
||||
interval = buildInterval(interval.minValue());
|
||||
@@ -111,7 +111,7 @@ QwtScaleDiv LogTimeScaleEngine::divideScale(double x1, double x2,
|
||||
int maxMajSteps, int maxMinSteps, double stepSize) const
|
||||
{
|
||||
QwtDoubleInterval interval = QwtDoubleInterval(x1, x2).normalized();
|
||||
interval = interval.limit(LOG_MIN, LOG_MAX);
|
||||
interval = interval.limited(LOG_MIN, LOG_MAX);
|
||||
|
||||
if (interval.width() <= 0 )
|
||||
return QwtScaleDiv();
|
||||
@@ -143,7 +143,7 @@ QwtScaleDiv LogTimeScaleEngine::divideScale(double x1, double x2,
|
||||
QwtScaleDiv scaleDiv;
|
||||
if ( stepSize != 0.0 )
|
||||
{
|
||||
QwtTickList ticks[QwtScaleDiv::NTickTypes];
|
||||
QwtValueList ticks[QwtScaleDiv::NTickTypes];
|
||||
buildTicks(interval, stepSize, maxMinSteps, ticks);
|
||||
|
||||
scaleDiv = QwtScaleDiv(interval, ticks);
|
||||
@@ -157,7 +157,7 @@ QwtScaleDiv LogTimeScaleEngine::divideScale(double x1, double x2,
|
||||
|
||||
void LogTimeScaleEngine::buildTicks(
|
||||
const QwtDoubleInterval& interval, double stepSize, int maxMinSteps,
|
||||
QwtTickList ticks[QwtScaleDiv::NTickTypes]) const
|
||||
QwtValueList ticks[QwtScaleDiv::NTickTypes]) const
|
||||
{
|
||||
const QwtDoubleInterval boundingInterval =
|
||||
align(interval, stepSize);
|
||||
@@ -199,10 +199,10 @@ tick_info_t tick_info[] = {
|
||||
{ -1.0, NULL }
|
||||
};
|
||||
|
||||
QwtTickList LogTimeScaleEngine::buildMajorTicks(
|
||||
QwtValueList LogTimeScaleEngine::buildMajorTicks(
|
||||
const QwtDoubleInterval &interval, double stepSize) const
|
||||
{
|
||||
QwtTickList ticks;
|
||||
QwtValueList ticks;
|
||||
tick_info_t *walker = tick_info;
|
||||
while (walker->label) {
|
||||
ticks += walker->x;
|
||||
@@ -211,11 +211,11 @@ QwtTickList LogTimeScaleEngine::buildMajorTicks(
|
||||
return ticks;
|
||||
}
|
||||
|
||||
QwtTickList LogTimeScaleEngine::buildMinorTicks(
|
||||
const QwtTickList &majorTicks,
|
||||
QwtValueList LogTimeScaleEngine::buildMinorTicks(
|
||||
const QwtValueList &majorTicks,
|
||||
int maxMinSteps, double stepSize) const
|
||||
{
|
||||
QwtTickList minorTicks;
|
||||
QwtValueList minorTicks;
|
||||
return minorTicks;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ class LogTimeScaleEngine : public QwtScaleEngine
|
||||
int numMajorSteps, int numMinorSteps,
|
||||
double stepSize = 0.0) const;
|
||||
|
||||
virtual QwtScaleTransformation transformation() const;
|
||||
virtual QwtScaleTransformation *transformation() const;
|
||||
|
||||
protected:
|
||||
QwtDoubleInterval log10(const QwtDoubleInterval&) const;
|
||||
@@ -53,13 +53,13 @@ class LogTimeScaleEngine : public QwtScaleEngine
|
||||
|
||||
void buildTicks(
|
||||
const QwtDoubleInterval &, double stepSize, int maxMinSteps,
|
||||
QwtTickList ticks[QwtScaleDiv::NTickTypes]) const;
|
||||
QwtValueList ticks[QwtScaleDiv::NTickTypes]) const;
|
||||
|
||||
QwtTickList buildMinorTicks(
|
||||
const QwtTickList& majorTicks,
|
||||
QwtValueList buildMinorTicks(
|
||||
const QwtValueList& majorTicks,
|
||||
int maxMinMark, double step) const;
|
||||
|
||||
QwtTickList buildMajorTicks(
|
||||
QwtValueList buildMajorTicks(
|
||||
const QwtDoubleInterval &interval, double stepSize) const;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user