Skip to content

Commit

Permalink
[inference] Remove using namespace in .h
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcNumworks authored and PiaNumworks committed Dec 19, 2023
1 parent c0d119b commit 0743474
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class CategoricalController

// SelectableListViewDelegate
void listViewDidChangeSelectionAndDidScroll(
SelectableListView* l, int previousRow, KDPoint previousOffset,
Escher::SelectableListView* l, int previousRow, KDPoint previousOffset,
bool withinTemporarySelection = false) override;

// ListViewDataSource
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "input_categorical_cell.h"

using namespace Escher;

namespace Inference {

InputCategoricalCell::InputCategoricalCell(Responder* parentResponder,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,26 @@
#include <apps/i18n.h>
#include <escher/menu_cell_with_editable_text.h>

using namespace Escher;

namespace Inference {

// Cell with left and right margins for InputCategoricalController

class InputCategoricalCell : public HighlightCell {
class InputCategoricalCell : public Escher::HighlightCell {
public:
InputCategoricalCell(Responder* parentResponder = nullptr,
TextFieldDelegate* textFieldDelegate = nullptr);
InputCategoricalCell(Escher::Responder* parentResponder = nullptr,
Escher::TextFieldDelegate* textFieldDelegate = nullptr);

// View
KDSize minimalSizeForOptimalDisplay() const override;
void drawRect(KDContext* ctx, KDRect rect) const override;

// HighlightCell
void setHighlighted(bool highlight) override;
Responder* responder() override { return m_innerCell.responder(); }
Escher::Responder* responder() override { return m_innerCell.responder(); }
const char* text() const override { return m_innerCell.text(); }
Poincare::Layout layout() const override { return m_innerCell.layout(); }

TextField* textField() { return m_innerCell.textField(); }
Escher::TextField* textField() { return m_innerCell.textField(); }
void setMessages(I18n::Message labelMessage,
I18n::Message subLabelMessage = I18n::Message::Default);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ResultsGoodnessTabController::ContributionsController::ContributionsController(
Escher::Responder* parentResponder, Escher::ViewController* nextController,
GoodnessTest* statistic)
: CategoricalController(parentResponder, nextController,
Invocation::Builder<CategoricalController>(
Escher::Invocation::Builder<CategoricalController>(
&CategoricalController::ButtonAction, this)),
m_table(&m_selectableListView, this, statistic) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ void ResultGoodnessContributionsTable::drawRect(KDContext *ctx,
KDRect rect) const {
CategoricalTableCell::drawRect(ctx, rect);
// Draw over the next cell border to hide it
ctx->fillRect(KDRect(0, bounds().height() - Metric::CellSeparatorThickness,
bounds().width(), Metric::CellSeparatorThickness),
m_selectableTableView.backgroundColor());
ctx->fillRect(
KDRect(0, bounds().height() - Escher::Metric::CellSeparatorThickness,
bounds().width(), Escher::Metric::CellSeparatorThickness),
m_selectableTableView.backgroundColor());
}

void ResultGoodnessContributionsTable::fillCellForLocation(
Expand Down

0 comments on commit 0743474

Please sign in to comment.