[solver] Add a message when they are more then 10 solutions

This commit is contained in:
Émilie Feral
2018-06-04 18:08:32 +02:00
parent a40f0dcd9c
commit fc38fd73f0
11 changed files with 102 additions and 19 deletions

View File

@@ -35,7 +35,26 @@ public:
int typeAtLocation(int i, int j) override;
/* Responder */
void didBecomeFirstResponder() override;
private:
class ContentView : public View {
public:
ContentView(SolutionsController * controller);
void drawRect(KDContext * ctx, KDRect rect) const override;
void setWarningMoreSolutions(bool warning);
SelectableTableView * selectableTableView() {
return &m_selectableTableView;
}
private:
constexpr static KDCoordinate k_topMargin = 50;
int numberOfSubviews() const override;
View * subviewAtIndex(int index) override;
void layoutSubviews() override;
MessageTextView m_warningMessageView0;
MessageTextView m_warningMessageView1;
SelectableTableView m_selectableTableView;
bool m_displayWarningMoreSolutions;
};
constexpr static int k_symbolCellWidth = 90;
constexpr static int k_valueCellWidth = 190;
constexpr static KDCoordinate k_defaultCellHeight = 20;
@@ -45,7 +64,7 @@ private:
Poincare::ExpressionLayout * m_delta2Layout;
Shared::ScrollableExactApproximateExpressionsCell m_exactValueCells[EquationStore::k_maxNumberOfExactSolutions];
EvenOddBufferTextCell m_approximateValueCells[EquationStore::k_maxNumberOfApproximateSolutions];
SelectableTableView m_selectableTableView;
ContentView m_contentView;
};
}