mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:17:35 +00:00
Calculator: Add support for copy+paste using system clipboard
This commit is contained in:
parent
1ba1ca76d8
commit
9bc3c3c962
3 changed files with 29 additions and 1 deletions
|
@ -147,6 +147,17 @@ void CalculatorWidget::add_digit_button(GUI::Button& button, int digit)
|
|||
};
|
||||
}
|
||||
|
||||
String CalculatorWidget::get_entry()
|
||||
{
|
||||
return m_entry->text();
|
||||
}
|
||||
|
||||
void CalculatorWidget::set_entry(double value)
|
||||
{
|
||||
m_keypad.set_value(value);
|
||||
update_display();
|
||||
}
|
||||
|
||||
void CalculatorWidget::update_display()
|
||||
{
|
||||
m_entry->set_text(m_keypad.to_string());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue