[expression_editor] Base app for development, to remove later.

Change-Id: I1d5b59f67fd146d2e2917546a7d8b9419a0a7036
This commit is contained in:
Léa Saviot
2017-12-05 15:32:25 +01:00
parent 4011290e7a
commit be9cde8ca4
10 changed files with 241 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
#include "controller.h"
namespace ExpressionEditor {
Controller::ContentView::ContentView(ExpressionAndLayout * expressionAndLayout) :
SolidColorView(KDColorWhite),
m_expressionView()
{
m_expressionView.setExpression(expressionAndLayout->expressionLayout());
}
void Controller::ContentView::layoutSubviews() {
m_expressionView.setFrame(KDRect(
k_margin,
k_margin,
bounds().width() - 2 * k_margin,
bounds().height() - 2 * k_margin));
}
KDSize Controller::ContentView::minimalSizeForOptimalDisplay() const {
return m_expressionView.minimalSizeForOptimalDisplay();
}
Controller::Controller(Responder * parentResponder, ExpressionAndLayout * expressionAndLayout) :
ViewController(parentResponder),
m_view(expressionAndLayout)
{
}
bool Controller::handleEvent(Ion::Events::Event event) {
return false;
}
}