#include "TimeAxis_p.h" #include "base/Plot.h" namespace YSG { Q_Ptr_cpp(TimeAxis) int TimeAxis::timePointSize(SRC src) { INIT_GET(TimeAxis) return renderState->mTimePointSize; } void TimeAxis::giveData(QTime time) { SpinLockGuard guard(&d()->mBufferLock); TimeAxisTempData* sc = d()->tempDataCache(); sc->mDataList.push_back(time); } void TimeAxis::setTickSpace(int tickSpace) { INIT_SET(TimeAxis) sc->mTickSpace = tickSpace; } bool TimeAxis::startCoordToEndCoord(SRC src) { INIT_GET(TimeAxis) return renderState->mStartCoordToEndCoord; } void TimeAxis::setFixedTimePointSize(int timePointSize) { INIT_SET(TimeAxis) sc->mFixedTimePointSize = true; sc->mTimePointSize = timePointSize; } void TimeAxis::unsetFixedTimePointSize() { INIT_SET(TimeAxis) sc->mFixedTimePointSize = false; sc->mTimePointSize = mPlot->width() + 1; } }