mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
[expression_editor] Base app for development, to remove later.
Change-Id: I1d5b59f67fd146d2e2917546a7d8b9419a0a7036
This commit is contained in:
34
apps/expression_editor/controller.cpp
Normal file
34
apps/expression_editor/controller.cpp
Normal 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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user