From bd4b63e492b84d262661f55448954640e5e5bbda 2012-11-26 12:58:47 From: Michal Klocek Date: 2012-11-26 12:58:47 Subject: [PATCH] Adds logdomains to factory method --- diff --git a/src/chartdataset.cpp b/src/chartdataset.cpp index b39cb8f..33134f6 100644 --- a/src/chartdataset.cpp +++ b/src/chartdataset.cpp @@ -435,7 +435,7 @@ AbstractDomain::DomainType ChartDataSet::selectDomain(QList axes } if(vertical==LogType && horizontal== LogType) { - return AbstractDomain::XLogYLogDomain; + return AbstractDomain::LogXLogYDomain; } return AbstractDomain::UndefinedDomain; @@ -447,14 +447,14 @@ AbstractDomain* ChartDataSet::createDomain(AbstractDomain::DomainType type) { switch(type) { - case AbstractDomain::XLogYLogDomain: - return 0; + case AbstractDomain::LogXLogYDomain: + return new LogXLogYDomain(); case AbstractDomain::XYDomain: return new XYDomain(); case AbstractDomain::XLogYDomain: - return 0; + return new XLogYDomain(); case AbstractDomain::LogXYDomain: - return 0; + return new LogXYDomain(); default: return 0; } diff --git a/src/domain/logxlogydomain_p.h b/src/domain/logxlogydomain_p.h index 6616926..d8aed1b 100644 --- a/src/domain/logxlogydomain_p.h +++ b/src/domain/logxlogydomain_p.h @@ -42,7 +42,7 @@ public: explicit LogXLogYDomain(QObject *object = 0); virtual ~LogXLogYDomain(); - DomainType type(){ return AbstractDomain::XLogYLogDomain;} + DomainType type(){ return AbstractDomain::LogXLogYDomain;} void setRange(qreal minX, qreal maxX, qreal minY, qreal maxY); diff --git a/src/domain/xlogydomain_p.h b/src/domain/xlogydomain_p.h index 40ead0f..b3cb0b7 100644 --- a/src/domain/xlogydomain_p.h +++ b/src/domain/xlogydomain_p.h @@ -42,7 +42,7 @@ public: explicit XLogYDomain(QObject *object = 0); virtual ~XLogYDomain(); - DomainType type(){ return AbstractDomain::XLogYDomain;} + DomainType type(){ return AbstractDomain::XLogYDomain;}; void setRange(qreal minX, qreal maxX, qreal minY, qreal maxY);