[escher] In alternate empty view delegate, make is empty method const

Change-Id: Iad3fbfef4deb76676b0373cfb3c919127efc3207
This commit is contained in:
Émilie Feral
2017-01-20 10:23:06 +01:00
parent ad0df1f2f6
commit 3555a6306c
15 changed files with 15 additions and 15 deletions

View File

@@ -22,7 +22,7 @@ View * GraphController::view() {
return &m_view;
}
bool GraphController::isEmpty() {
bool GraphController::isEmpty() const {
if (m_functionStore->numberOfActiveFunctions() == 0) {
return true;
}

View File

@@ -17,7 +17,7 @@ public:
void didBecomeFirstResponder() override;
ViewController * initialisationParameterController() override;
bool isEmpty() override;
bool isEmpty() const override;
const char * emptyMessage() override;
bool didChangeRange(InteractiveCurveViewRange * interactiveCurveViewRange) override;

View File

@@ -249,7 +249,7 @@ int ValuesController::typeAtLocation(int i, int j) {
return 3;
}
bool ValuesController::isEmpty() {
bool ValuesController::isEmpty() const {
if (m_functionStore->numberOfActiveFunctions() == 0) {
return true;
}

View File

@@ -31,7 +31,7 @@ public:
TableViewCell * reusableCell(int index, int type) override;
int reusableCellCount(int type) override;
int typeAtLocation(int i, int j) override;
bool isEmpty() override;
bool isEmpty() const override;
const char * emptyMessage() override;
Responder * defaultController() override;
static constexpr KDCoordinate k_topMargin = 10;

View File

@@ -78,7 +78,7 @@ void CalculationController::tableViewDidChangeSelection(SelectableTableView * t,
}
}
bool CalculationController::isEmpty() {
bool CalculationController::isEmpty() const {
if (m_store->numberOfPairs() == 0) {
return true;
}

View File

@@ -17,7 +17,7 @@ public:
void didBecomeFirstResponder() override;
void tableViewDidChangeSelection(SelectableTableView * t, int previousSelectedCellX, int previousSelectedCellY) override;
bool isEmpty() override;
bool isEmpty() const override;
const char * emptyMessage() override;
Responder * defaultController() override;

View File

@@ -18,7 +18,7 @@ ViewController * GraphController::initialisationParameterController() {
return &m_initialisationParameterController;
}
bool GraphController::isEmpty() {
bool GraphController::isEmpty() const {
if (m_store->numberOfPairs() < 2 || isinf(m_store->slope()) || isnan(m_store->slope())) {
return true;
}

View File

@@ -16,7 +16,7 @@ class GraphController : public InteractiveCurveViewController {
public:
GraphController(Responder * parentResponder, HeaderViewController * headerViewController, Store * store);
ViewController * initialisationParameterController() override;
bool isEmpty() override;
bool isEmpty() const override;
const char * emptyMessage() override;
private:
constexpr static float k_cursorTopMarginRatio = 0.025f;

View File

@@ -42,7 +42,7 @@ void BoxController::didBecomeFirstResponder() {
reloadBannerView();
}
bool BoxController::isEmpty() {
bool BoxController::isEmpty() const {
if (m_store->sumOfColumn(1) == 0) {
return true;
}

View File

@@ -15,7 +15,7 @@ public:
View * view() override;
bool handleEvent(Ion::Events::Event event) override;
void didBecomeFirstResponder() override;
bool isEmpty() override;
bool isEmpty() const override;
const char * emptyMessage() override;
Responder * defaultController() override;
private:

View File

@@ -46,7 +46,7 @@ void CalculationController::didBecomeFirstResponder() {
app()->setFirstResponder(&m_selectableTableView);
}
bool CalculationController::isEmpty() {
bool CalculationController::isEmpty() const {
if (m_store->sumOfColumn(1) == 0) {
return true;
}

View File

@@ -15,7 +15,7 @@ public:
bool handleEvent(Ion::Events::Event event) override;
void didBecomeFirstResponder() override;
bool isEmpty() override;
bool isEmpty() const override;
const char * emptyMessage() override;
Responder * defaultController() override;

View File

@@ -100,7 +100,7 @@ Button * HistogramController::buttonAtIndex(int index) {
return &m_settingButton;
}
bool HistogramController::isEmpty() {
bool HistogramController::isEmpty() const {
if (m_store->sumOfColumn(1) == 0) {
return true;
}

View File

@@ -24,7 +24,7 @@ public:
int numberOfButtons() const override;
Button * buttonAtIndex(int index) override;
bool isEmpty() override;
bool isEmpty() const override;
const char * emptyMessage() override;
Responder * defaultController() override;
private:

View File

@@ -7,7 +7,7 @@ class AlternateEmptyViewController;
class AlternateEmptyViewDelegate {
public:
virtual bool isEmpty() = 0;
virtual bool isEmpty() const = 0;
virtual const char * emptyMessage() = 0;
virtual Responder * defaultController() = 0;
};