mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-25 08:41:01 +01:00
[expression_editor] Handle Exp, Log, Power, Sqrt and Square events.
Change-Id: I96ab58d6f66fcb6aa95ba849d927236cfb5fcc28
This commit is contained in:
@@ -64,6 +64,14 @@ bool Controller::handleMoveEvent(Ion::Events::Event event) {
|
||||
if (event == Ion::Events::Down) {
|
||||
return m_cursor.moveDown();
|
||||
}
|
||||
if (event == Ion::Events::ShiftLeft) {
|
||||
//TODO
|
||||
return false;
|
||||
}
|
||||
if (event == Ion::Events::ShiftRight) {
|
||||
//TODO
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -71,6 +79,25 @@ ExpressionLayout * Controller::handleAddEvent(Ion::Events::Event event) {
|
||||
if (event == Ion::Events::Division) {
|
||||
return m_cursor.addEmptyFractionLayout();
|
||||
}
|
||||
if (event == Ion::Events::XNT) {
|
||||
//TODO
|
||||
return nullptr;
|
||||
}
|
||||
if (event == Ion::Events::Exp) {
|
||||
return m_cursor.addEmptyExponentialLayout();
|
||||
}
|
||||
if (event == Ion::Events::Log) {
|
||||
return m_cursor.addEmptyLogarithmLayout();
|
||||
}
|
||||
if (event == Ion::Events::Power) {
|
||||
return m_cursor.addEmptyPowerLayout();
|
||||
}
|
||||
if (event == Ion::Events::Sqrt) {
|
||||
return m_cursor.addEmptyRootLayout();
|
||||
}
|
||||
if (event == Ion::Events::Square) {
|
||||
return m_cursor.addEmptySquarePowerLayout();
|
||||
}
|
||||
if (event.hasText()) {
|
||||
return m_cursor.insertText(event.text());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user