#include <KDChartPosition.h>
Definition at line 145 of file KDChartPosition.h.
Public Member Functions | |
const qreal | degrees (KDChartEnums::PositionValue pos) const |
bool | isNull () const |
const QPointF | point (Position position) const |
PositionPoints (QPointF northWest, QPointF northEast, QPointF southEast, QPointF southWest) | |
PositionPoints (const QRectF &rect) | |
PositionPoints (const QPointF &onePointForAllPositions) | |
PositionPoints (QPointF center, QPointF northWest, QPointF north, QPointF northEast, QPointF east, QPointF southEast, QPointF south, QPointF southWest, QPointF west) | |
PositionPoints () | |
void | setDegrees (KDChartEnums::PositionValue pos, qreal degrees) |
Public Attributes | |
QMap < KDChartEnums::PositionValue, qreal > | mapOfDegrees |
QPointF | mPositionCenter |
QPointF | mPositionEast |
QPointF | mPositionNorth |
QPointF | mPositionNorthEast |
QPointF | mPositionNorthWest |
QPointF | mPositionSouth |
QPointF | mPositionSouthEast |
QPointF | mPositionSouthWest |
QPointF | mPositionUnknown |
QPointF | mPositionWest |
KDChart::PositionPoints::PositionPoints | ( | ) |
KDChart::PositionPoints::PositionPoints | ( | QPointF | center, | |
QPointF | northWest, | |||
QPointF | north, | |||
QPointF | northEast, | |||
QPointF | east, | |||
QPointF | southEast, | |||
QPointF | south, | |||
QPointF | southWest, | |||
QPointF | west | |||
) |
Definition at line 150 of file KDChartPosition.h.
00160 : mPositionCenter( center ) 00161 , mPositionNorthWest( northWest ) 00162 , mPositionNorth( north ) 00163 , mPositionNorthEast( northEast ) 00164 , mPositionEast( east ) 00165 , mPositionSouthEast( southEast ) 00166 , mPositionSouth( south ) 00167 , mPositionSouthWest( southWest ) 00168 , mPositionWest( west ) 00169 {}
KDChart::PositionPoints::PositionPoints | ( | const QPointF & | onePointForAllPositions | ) |
Definition at line 170 of file KDChartPosition.h.
00172 : mPositionCenter( onePointForAllPositions ) 00173 , mPositionNorthWest( onePointForAllPositions ) 00174 , mPositionNorth( onePointForAllPositions ) 00175 , mPositionNorthEast( onePointForAllPositions ) 00176 , mPositionEast( onePointForAllPositions ) 00177 , mPositionSouthEast( onePointForAllPositions ) 00178 , mPositionSouth( onePointForAllPositions ) 00179 , mPositionSouthWest( onePointForAllPositions ) 00180 , mPositionWest( onePointForAllPositions ) 00181 {}
KDChart::PositionPoints::PositionPoints | ( | const QRectF & | rect | ) |
Definition at line 182 of file KDChartPosition.h.
References r.
00184 { 00185 const QRectF r( rect.normalized() ); 00186 mPositionCenter = r.center(); 00187 mPositionNorthWest = r.topLeft(); 00188 mPositionNorth = QPointF(r.center().x(), r.top()); 00189 mPositionNorthEast = r.topRight(); 00190 mPositionEast = QPointF(r.right(), r.center().y()); 00191 mPositionSouthEast = r.bottomRight(); 00192 mPositionSouth = QPointF(r.center().x(), r.bottom()); 00193 mPositionSouthWest = r.bottomLeft(); 00194 mPositionWest = QPointF(r.left(), r.center().y()); 00195 }
KDChart::PositionPoints::PositionPoints | ( | QPointF | northWest, | |
QPointF | northEast, | |||
QPointF | southEast, | |||
QPointF | southWest | |||
) |
Definition at line 196 of file KDChartPosition.h.
00201 : mPositionCenter( (northWest + southEast) / 2.0 ) 00202 , mPositionNorthWest( northWest ) 00203 , mPositionNorth( (northWest + northEast) / 2.0 ) 00204 , mPositionNorthEast( northEast ) 00205 , mPositionEast( (northEast + southEast) / 2.0 ) 00206 , mPositionSouthEast( southEast ) 00207 , mPositionSouth( (southWest + southEast) / 2.0 ) 00208 , mPositionSouthWest( southWest ) 00209 , mPositionWest( (northWest + southWest) / 2.0 ) 00210 {}
const qreal KDChart::PositionPoints::degrees | ( | KDChartEnums::PositionValue | pos | ) | const |
Definition at line 218 of file KDChartPosition.h.
00222 { 00223 if( mapOfDegrees.contains(pos) ) 00224 return mapOfDegrees[pos]; 00225 return 0.0;
bool KDChart::PositionPoints::isNull | ( | ) | const |
Definition at line 254 of file KDChartPosition.h.
Referenced by KDChart::RelativePosition::setReferencePoints().
00257 { 00258 return 00259 mPositionUnknown.isNull() && 00260 mPositionCenter.isNull() && 00261 mPositionNorthWest.isNull() && 00262 mPositionNorth.isNull() && 00263 mPositionNorthEast.isNull() && 00264 mPositionEast.isNull() && 00265 mPositionSouthEast.isNull() && 00266 mPositionSouth.isNull() && 00267 mPositionSouthWest.isNull() &&
const QPointF KDChart::PositionPoints::point | ( | Position | position | ) | const |
Definition at line 228 of file KDChartPosition.h.
References KDChart::Position::Center, KDChart::Position::East, KDChart::Position::North, KDChart::Position::NorthEast, KDChart::Position::NorthWest, KDChart::Position::South, KDChart::Position::SouthEast, KDChart::Position::SouthWest, and KDChart::Position::West.
00233 { 00234 //qDebug() << "point( " << position.name() << " )"; 00235 if( position == Position::Center) 00236 return mPositionCenter; 00237 if( position == Position::NorthWest) 00238 return mPositionNorthWest; 00239 if( position == Position::North) 00240 return mPositionNorth; 00241 if( position == Position::NorthEast) 00242 return mPositionNorthEast; 00243 if( position == Position::East) 00244 return mPositionEast; 00245 if( position == Position::SouthEast) 00246 return mPositionSouthEast; 00247 if( position == Position::South) 00248 return mPositionSouth; 00249 if( position == Position::SouthWest) 00250 return mPositionSouthWest; 00251 if( position == Position::West) 00252 return mPositionWest;
void KDChart::PositionPoints::setDegrees | ( | KDChartEnums::PositionValue | pos, | |
qreal | degrees | |||
) |
Definition at line 212 of file KDChartPosition.h.
00213 { 00214 mapOfDegrees[pos] = degrees; 00215 }
Definition at line 279 of file KDChartPosition.h.
Definition at line 270 of file KDChartPosition.h.
Definition at line 274 of file KDChartPosition.h.
Definition at line 272 of file KDChartPosition.h.
Definition at line 273 of file KDChartPosition.h.
Definition at line 271 of file KDChartPosition.h.
Definition at line 276 of file KDChartPosition.h.
Definition at line 275 of file KDChartPosition.h.
Definition at line 277 of file KDChartPosition.h.
Definition at line 269 of file KDChartPosition.h.
Definition at line 278 of file KDChartPosition.h.