tcalc 0.2.0
 
Loading...
Searching...
No Matches
tcalc_gui::Keyboard Class Reference

Tcalc GUI keyboard. More...

#include <keyboard.hpp>

Inheritance diagram for tcalc_gui::Keyboard:

Signals

void key_clicked (const QString &key)
 Emitted when a key is clicked.
 

Public Member Functions

 Keyboard (QWidget *parent=nullptr)
 Construct a new Keyboard object.
 

Static Public Attributes

static const QList< QPair< QString, QPoint > > KEYMAP
 

Detailed Description

Tcalc GUI keyboard.

Constructor & Destructor Documentation

◆ Keyboard()

tcalc_gui::Keyboard::Keyboard ( QWidget *  parent = nullptr)
explicit

Construct a new Keyboard object.

Parameters
parentParent widget.

Member Function Documentation

◆ key_clicked

void tcalc_gui::Keyboard::key_clicked ( const QString &  key)
signal

Emitted when a key is clicked.

Parameters
keyKey name.

Member Data Documentation

◆ KEYMAP

const QList<QPair<QString, QPoint> > tcalc_gui::Keyboard::KEYMAP
inlinestatic
Initial value:
= {
{ "B", { 0, 0 } }, { "F", { 1, 0 } }, { "log", { 2, 0 } },
{ "exp", { 3, 0 } }, { "sqrt", { 4, 0 } }, { "pow", { 5, 0 } },
{ "sin", { 0, 1 } }, { "cos", { 1, 1 } }, { "tan", { 2, 1 } },
{ "asin", { 3, 1 } }, { "acos", { 4, 1 } }, { "atan", { 5, 1 } },
{ "1", { 0, 2 } }, { "2", { 1, 2 } }, { "3", { 2, 2 } },
{ "+", { 3, 2 } }, { "C", { 4, 2 } }, { "DEL", { 5, 2 } },
{ "4", { 0, 3 } }, { "5", { 1, 3 } }, { "6", { 2, 3 } },
{ "-", { 3, 3 } }, { "(", { 4, 3 } }, { ")", { 5, 3 } },
{ "7", { 0, 4 } }, { "8", { 1, 4 } }, { "9", { 2, 4 } },
{ "*", { 3, 4 } }, { "pi", { 4, 4 } }, { "e", { 5, 4 } },
{ ".", { 0, 5 } }, { "0", { 1, 5 } }, { "=", { 2, 5 } },
{ "/", { 3, 5 } }, { "ans", { 4, 5 } }
}

Keyboard keymap.


The documentation for this class was generated from the following files: