| 30 | |
| 31 | |
| 32 | GraphVisualizer::GraphVisualizer(QWidget *parent) : QWidget(parent), |
| 33 | _segmentPainter(new SegmentPainter()), |
| 34 | _isLog(false), |
| 35 | _dispWarning(false) |
| 36 | { |
| 37 | // Colors and pen |
| 38 | _backgroundColor = ContextManager::theme()->getColor(ThemeManager::LIST_BACKGROUND); |
| 39 | _gridColor = ContextManager::theme()->getColor(ThemeManager::LIST_TEXT); |
| 40 | _currentPointPen = QPen(_gridColor, 2, Qt::SolidLine, Qt::RoundCap); |
| 41 | _gridColor.setAlpha(40); |
| 42 | _labelColor = _gridColor; |
| 43 | _labelColor.setAlpha(180); |
| 44 | _curveColor = ContextManager::theme()->getColor(ThemeManager::HIGHLIGHTED_BACKGROUND); |
| 45 | _warningColor = ContextManager::theme()->getFixedColor(ThemeManager::RED, ThemeManager::LIST_BACKGROUND); |
| 46 | _segmentPainter->setColor(_curveColor); |
| 47 | _defaultValueColor = _gridColor; |
| 48 | _defaultValueColor.setAlpha(180); |
| 49 | |
| 50 | // Fonts |
| 51 | _fontLabels = QFont(font().family(), 9, QFont::Bold); |
| 52 | _fontWarning = QFont(font().family(), 10, QFont::Bold); |
| 53 | |
| 54 | // Catch all mouse move events |
| 55 | this->setMouseTracking(true); |
| 56 | } |
| 57 | |
| 58 | GraphVisualizer::~GraphVisualizer() |
| 59 | { |
nothing calls this directly
no test coverage detected