![]() |
Just Intonation
Version 1.3.1 (19)
Explore key-independent dynamically adapting tuning in just intonation
|
Touchscreen keyboard. More...
#include <touchscreenkeyboard.h>
Public Slots | |
void | receiveTouchpadKeyboardEvent (QVariant keys) |
SLOT: Receive an event from the touchscreen keyboard. More... | |
void | setToggleMode (bool on) |
void | clear () |
Clear the keyboard memory and turn all notes off. More... | |
Signals | |
void | sendTouchpadMidiEvent (QMidiMessage event) |
Signal: On keypress send the corresponding Midi event to a different module. More... | |
void | highlightKey (QVariant key, QVariant on) |
Signal: Tells the Qml layer to highlight pressed keys. More... | |
Public Member Functions | |
TouchscreenKeyboard () | |
Constructor. More... | |
bool | init () |
bool | start () |
bool | stop () |
bool | exit () |
void | suspend () |
void | resume () |
Private Member Functions | |
void | switchNote (int key, bool on) |
Switch note on or off. More... | |
Private Attributes | |
QSet< int > | mPressedKeys |
Keeps track of pressed keys. More... | |
QVector< bool > | mSoundActive |
Flag wether the sound is turned on. More... | |
bool | mToggleMode |
Flag for desktop toggling mode. More... | |
bool | mActive |
Flag that allows to send data. More... | |
Touchscreen keyboard.
This class manages the data flow related to the touchscreen keyboard. The keyboard itself (its geometry and so on) is realized on the Qml side. The Qml Keyboard object yields signals containing a list with the MIDI-compliant indices of the pressed keys. The keyboard is insensitive to the intensity of the touch, i.e., all notes are played at constant volume.
The touchscreen keyboard can operate in two different modes. In the touchscreen mode the key is pressed only as long as it is actually touched. In the toggle mode one can toggle the keys by tapping or clicking between 'pressed' and 'not pressed'.
Definition at line 45 of file touchscreenkeyboard.h.
TouchscreenKeyboard::TouchscreenKeyboard | ( | ) |
Constructor.
Definition at line 29 of file touchscreenkeyboard.cpp.
|
slot |
Clear the keyboard memory and turn all notes off.
Definition at line 111 of file touchscreenkeyboard.cpp.
|
inline |
|
signal |
Signal: Tells the Qml layer to highlight pressed keys.
|
inline |
Definition at line 51 of file touchscreenkeyboard.h.
|
slot |
SLOT: Receive an event from the touchscreen keyboard.
The Qml layer calls this slot as soon as the status of the keyboard changes. This function finds out which of the keys have been pressed or released.
keys | : The list of keys (in Midi norm) which are currently pressed. |
Definition at line 49 of file touchscreenkeyboard.cpp.
|
inline |
|
signal |
Signal: On keypress send the corresponding Midi event to a different module.
|
inlineslot |
|
inline |
Definition at line 52 of file touchscreenkeyboard.h.
|
inline |
|
inline |
Definition at line 55 of file touchscreenkeyboard.h.
|
private |
Switch note on or off.
key | : Number of the key according to the Midi standard. |
on | : True if note is turned on, false if it is switched off. |
Definition at line 89 of file touchscreenkeyboard.cpp.
|
private |
Flag that allows to send data.
Definition at line 75 of file touchscreenkeyboard.h.
|
private |
Keeps track of pressed keys.
Definition at line 72 of file touchscreenkeyboard.h.
|
private |
Flag wether the sound is turned on.
Definition at line 73 of file touchscreenkeyboard.h.
|
private |
Flag for desktop toggling mode.
Definition at line 74 of file touchscreenkeyboard.h.