Blame view

build4/epsilon-master/apps/regression/column_title_cell.cpp 970 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  #include "column_title_cell.h"
  
  namespace Regression {
  
  void ColumnTitleCell::setColor(KDColor color) {
    m_functionColor = color;
    m_firstBufferTextView.setTextColor(color);
    m_secondBufferTextView.setTextColor(color);
    reloadCell();
  }
  
  void ColumnTitleCell::drawRect(KDContext * ctx, KDRect rect) const {
    EvenOddDoubleBufferTextCellWithSeparator::drawRect(ctx, rect);
    ctx->fillRect(KDRect(Metric::TableSeparatorThickness, 0, bounds().width(), k_colorIndicatorThickness), m_functionColor);
  }
  
  void ColumnTitleCell::layoutSubviews() {
    KDCoordinate width = bounds().width() - Metric::TableSeparatorThickness;
    KDCoordinate height = bounds().height();
    m_firstBufferTextView.setFrame(KDRect(Metric::TableSeparatorThickness, k_colorIndicatorThickness, width/2, height - k_colorIndicatorThickness));
    m_secondBufferTextView.setFrame(KDRect(Metric::TableSeparatorThickness + width/2, k_colorIndicatorThickness, width/2, height - k_colorIndicatorThickness));
  }
  
  }