mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-25 08:41:01 +01:00
[apps/shared] Move apps/graph/list/new_function_cell to shared folder to
be used by sequence Change-Id: Ie42a8b6cc60e652ab49379dd72b00f2efdc6ebda
This commit is contained in:
35
apps/shared/new_function_cell.cpp
Normal file
35
apps/shared/new_function_cell.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#include "new_function_cell.h"
|
||||
#include "assert.h"
|
||||
|
||||
namespace Shared {
|
||||
|
||||
NewFunctionCell::NewFunctionCell() :
|
||||
EvenOddCell(),
|
||||
m_pointerTextView(PointerTextView(KDText::FontSize::Large, nullptr, 0.5f, 0.5f))
|
||||
{
|
||||
m_pointerTextView.setText(text());
|
||||
}
|
||||
|
||||
void NewFunctionCell::reloadCell() {
|
||||
EvenOddCell::reloadCell();
|
||||
m_pointerTextView.setBackgroundColor(backgroundColor());
|
||||
}
|
||||
|
||||
int NewFunctionCell::numberOfSubviews() const {
|
||||
return 1;
|
||||
}
|
||||
|
||||
View * NewFunctionCell::subviewAtIndex(int index) {
|
||||
assert(index == 0);
|
||||
return &m_pointerTextView;
|
||||
}
|
||||
|
||||
void NewFunctionCell::layoutSubviews() {
|
||||
m_pointerTextView.setFrame(bounds());
|
||||
}
|
||||
|
||||
const char * NewFunctionCell::text() {
|
||||
return "Ajouter une fonction";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user