! \overload A convenience method which turns a QDateTime object into a double value that corresponds to seconds since Epoch (1. Jan 1970, 00:00 UTC). This is the format used as axis coordinates by QCPAxisTickerDateTime. The accuracy achieved by this method is one millisecond, irrespective of the used Qt version (it works around the lack of a QDateTime::toMSecsSinceEpoch in Qt 4.6)
| 6120 | \see keyToDateTime |
| 6121 | */ |
| 6122 | double QCPAxisTickerDateTime::dateTimeToKey(const QDateTime dateTime) |
| 6123 | { |
| 6124 | # if QT_VERSION < QT_VERSION_CHECK(4, 7, 0) |
| 6125 | return dateTime.toTime_t()+dateTime.time().msec()/1000.0; |
| 6126 | # else |
| 6127 | return dateTime.toMSecsSinceEpoch()/1000.0; |
| 6128 | # endif |
| 6129 | } |
| 6130 | |
| 6131 | /*! \overload |
| 6132 |
nothing calls this directly
no outgoing calls
no test coverage detected