diff options
Diffstat (limited to 'Applications/Calculator/CalculatorWidget.h')
-rw-r--r-- | Applications/Calculator/CalculatorWidget.h | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/Applications/Calculator/CalculatorWidget.h b/Applications/Calculator/CalculatorWidget.h index bc0d163535..8400ca756f 100644 --- a/Applications/Calculator/CalculatorWidget.h +++ b/Applications/Calculator/CalculatorWidget.h @@ -31,47 +31,49 @@ #include <AK/Vector.h> #include <LibGUI/GWidget.h> -class GTextBox; -class GButton; -class GLabel; +namespace GUI { +class Button; +class Label; +class TextBox; +} -class CalculatorWidget final : public GWidget { +class CalculatorWidget final : public GUI::Widget { C_OBJECT(CalculatorWidget) public: virtual ~CalculatorWidget() override; private: - explicit CalculatorWidget(GWidget*); - void add_button(GButton&, Calculator::Operation); - void add_button(GButton&, int); - void add_button(GButton&); + explicit CalculatorWidget(GUI::Widget*); + void add_button(GUI::Button&, Calculator::Operation); + void add_button(GUI::Button&, int); + void add_button(GUI::Button&); void update_display(); - virtual void keydown_event(GKeyEvent&) override; + virtual void keydown_event(GUI::KeyEvent&) override; Calculator m_calculator; Keypad m_keypad; - RefPtr<GTextBox> m_entry; - RefPtr<GLabel> m_label; + RefPtr<GUI::TextBox> m_entry; + RefPtr<GUI::Label> m_label; - RefPtr<GButton> m_digit_button[10]; - RefPtr<GButton> m_mem_add_button; - RefPtr<GButton> m_mem_save_button; - RefPtr<GButton> m_mem_recall_button; - RefPtr<GButton> m_mem_clear_button; - RefPtr<GButton> m_clear_button; - RefPtr<GButton> m_clear_error_button; - RefPtr<GButton> m_backspace_button; - RefPtr<GButton> m_decimal_point_button; - RefPtr<GButton> m_sign_button; - RefPtr<GButton> m_add_button; - RefPtr<GButton> m_subtract_button; - RefPtr<GButton> m_multiply_button; - RefPtr<GButton> m_divide_button; - RefPtr<GButton> m_sqrt_button; - RefPtr<GButton> m_inverse_button; - RefPtr<GButton> m_percent_button; - RefPtr<GButton> m_equals_button; + RefPtr<GUI::Button> m_digit_button[10]; + RefPtr<GUI::Button> m_mem_add_button; + RefPtr<GUI::Button> m_mem_save_button; + RefPtr<GUI::Button> m_mem_recall_button; + RefPtr<GUI::Button> m_mem_clear_button; + RefPtr<GUI::Button> m_clear_button; + RefPtr<GUI::Button> m_clear_error_button; + RefPtr<GUI::Button> m_backspace_button; + RefPtr<GUI::Button> m_decimal_point_button; + RefPtr<GUI::Button> m_sign_button; + RefPtr<GUI::Button> m_add_button; + RefPtr<GUI::Button> m_subtract_button; + RefPtr<GUI::Button> m_multiply_button; + RefPtr<GUI::Button> m_divide_button; + RefPtr<GUI::Button> m_sqrt_button; + RefPtr<GUI::Button> m_inverse_button; + RefPtr<GUI::Button> m_percent_button; + RefPtr<GUI::Button> m_equals_button; }; |