Just Intonation  Version 1.3.0 (18)
Explore scale-independent dynamically adapting tuning in just intonation
TouchscreenKeyboard Class Reference

Touchscreen keyboard. More...

#include <touchscreenkeyboard.h>

Inheritance diagram for TouchscreenKeyboard:
Inheritance graph
Collaboration diagram for TouchscreenKeyboard:
Collaboration graph

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

TouchscreenKeyboard::TouchscreenKeyboard ( )

Constructor.

Definition at line 29 of file touchscreenkeyboard.cpp.

Member Function Documentation

void TouchscreenKeyboard::clear ( )
slot

Clear the keyboard memory and turn all notes off.

Definition at line 111 of file touchscreenkeyboard.cpp.

bool TouchscreenKeyboard::exit ( )
inline

Definition at line 54 of file touchscreenkeyboard.h.

Here is the call graph for this function:

void TouchscreenKeyboard::highlightKey ( QVariant  key,
QVariant  on 
)
signal

Signal: Tells the Qml layer to highlight pressed keys.

bool TouchscreenKeyboard::init ( )
inline

Definition at line 51 of file touchscreenkeyboard.h.

void TouchscreenKeyboard::receiveTouchpadKeyboardEvent ( QVariant  keys)
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.

Parameters
keys: The list of keys (in Midi norm) which are currently pressed.

Definition at line 49 of file touchscreenkeyboard.cpp.

Here is the call graph for this function:

void TouchscreenKeyboard::resume ( )
inline

Definition at line 56 of file touchscreenkeyboard.h.

Here is the call graph for this function:

void TouchscreenKeyboard::sendTouchpadMidiEvent ( QMidiMessage  event)
signal

Signal: On keypress send the corresponding Midi event to a different module.

void TouchscreenKeyboard::setToggleMode ( bool  on)
inlineslot

Definition at line 60 of file touchscreenkeyboard.h.

Here is the call graph for this function:

bool TouchscreenKeyboard::start ( )
inline

Definition at line 52 of file touchscreenkeyboard.h.

bool TouchscreenKeyboard::stop ( )
inline

Definition at line 53 of file touchscreenkeyboard.h.

Here is the call graph for this function:

void TouchscreenKeyboard::suspend ( )
inline

Definition at line 55 of file touchscreenkeyboard.h.

void TouchscreenKeyboard::switchNote ( int  key,
bool  on 
)
private

Switch note on or off.

Parameters
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.

Member Data Documentation

bool TouchscreenKeyboard::mActive
private

Flag that allows to send data.

Definition at line 75 of file touchscreenkeyboard.h.

QSet<int> TouchscreenKeyboard::mPressedKeys
private

Keeps track of pressed keys.

Definition at line 72 of file touchscreenkeyboard.h.

QVector<bool> TouchscreenKeyboard::mSoundActive
private

Flag wether the sound is turned on.

Definition at line 73 of file touchscreenkeyboard.h.

bool TouchscreenKeyboard::mToggleMode
private

Flag for desktop toggling mode.

Definition at line 74 of file touchscreenkeyboard.h.


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