Blame view

build3/apps/shared/new_function_cell.cpp 761 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
25
26
27
28
29
30
31
32
33
34
35
  #include "new_function_cell.h"
  #include "assert.h"
  
  namespace Shared {
  
  NewFunctionCell::NewFunctionCell(I18n::Message text) :
    EvenOddCell(),
    m_messageTextView(KDText::FontSize::Large, text, 0.5f, 0.5f)
  {
  }
  
  void NewFunctionCell::setEven(bool even) {
    EvenOddCell::setEven(even);
    m_messageTextView.setBackgroundColor(backgroundColor());
  }
  
  void NewFunctionCell::setHighlighted(bool highlight) {
    EvenOddCell::setHighlighted(highlight);
    m_messageTextView.setBackgroundColor(backgroundColor());
  }
  
  int NewFunctionCell::numberOfSubviews() const {
    return 1;
  }
  
  View * NewFunctionCell::subviewAtIndex(int index) {
    assert(index == 0);
    return &m_messageTextView;
  }
  
  void NewFunctionCell::layoutSubviews() {
    m_messageTextView.setFrame(bounds());
  }
  
  }