2 #include "../constant.h" 3 #include "../apps_container.h" 46 TabTableController::didBecomeFirstResponder();
57 return I18n::Message::NoValueToCompute;
61 return tabController();
65 return k_totalNumberOfRows;
77 I18n::Message titles[k_totalNumberOfRows] = {I18n::Message::TotalSize, I18n::Message::Minimum, I18n::Message::Maximum, I18n::Message::Range, I18n::Message::Mean, I18n::Message::StandardDeviationSigma, I18n::Message::Deviation, I18n::Message::FirstQuartile, I18n::Message::ThirdQuartile, I18n::Message::Median, I18n::Message::InterquartileRange, I18n::Message::Sum, I18n::Message::SquareSum, I18n::Message::SampleStandardDeviationS};
84 double calculation = (m_store->*calculationMethods[j])();
94 return k_titleCellWidth;
105 for (
int k = 0; k < i; k++) {
121 return (result < offsetX || offsetX == 0) ? i : i - 1;
129 assert(index < k_totalNumberOfRows);
131 return m_titleCells[index];
133 return m_calculationCells[index];
137 return k_maxNumberOfDisplayableRows;
144 Responder * CalculationController::tabController()
const {
148 View * CalculationController::loadView() {
149 for (
int i = 0; i < k_maxNumberOfDisplayableRows; i++) {
155 return TabTableController::loadView();
159 void CalculationController::unloadView(
View * view) {
160 for (
int i = 0; i < k_maxNumberOfDisplayableRows; i++) {
161 delete m_titleCells[i];
162 m_titleCells[i] =
nullptr;
163 delete m_calculationCells[i];
164 m_calculationCells[i] =
nullptr;
166 TabTableController::unloadView(
view);
void didBecomeFirstResponder() override
int numberOfRows() override
double sumOfOccurrences()
void setAlignment(float horizontalAlignment, float verticalAlignment)
HighlightCell * selectedCell()
KDCoordinate cumulatedWidthFromIndex(int i) override
virtual void setEven(bool even)
KDCoordinate cumulatedHeightFromIndex(int j) override
static constexpr KDCoordinate CommonRightMargin
Responder * parentResponder() const
static constexpr KDColor GreyDark
double sumOfColumn(int i)
double standardDeviation()
const char * title() override
void setTextColor(KDColor textColor)
void setText(const char *textContent)
void store(const char *storedText)
enum Message uint16_t enum Language uint16_t const char * translate(Message m, Language l=(Language) 0)
I18n::Message emptyMessage() override
int numberOfColumns() override
int indexFromCumulatedWidth(KDCoordinate offsetX) override
int reusableCellCount(int type) override
HighlightCell * reusableCell(int index, int type) override
double sampleStandardDeviation()
static constexpr int LargeNumberOfSignificantDigits
bool handleEvent(Ion::Events::Event event) override
double(Store::* CalculPointer)()
int indexFromCumulatedHeight(KDCoordinate offsetY) override
static constexpr KDCoordinate CommonLeftMargin
bool isEmpty() const override
void setMessage(I18n::Message textContent, KDColor textColor=KDColorBlack)
void willDisplayCellAtLocation(HighlightCell *cell, int i, int j) override
void setFirstResponder(Responder *responder)
static Clipboard * sharedClipboard()
KDCoordinate columnWidth(int i) override
virtual void setHighlighted(bool highlight)
void selectCellAtLocation(int i, int j)
int typeAtLocation(int i, int j) override
KDCoordinate rowHeight(int j) override
SelectableTableView * selectableTableView()
Responder * defaultController() override