31 , mSoundActive(128,false)
51 QList<QVariant> list = keys.toList();
53 for (QVariant var : list) actualKeys.insert(var.toInt());
59 entriesToDelete =
false;
60 for (
int key :
mPressedKeys)
if (not actualKeys.contains(key))
63 mPressedKeys.remove(key);
68 while (entriesToDelete);
71 for (
int key : actualKeys)
if (not
mPressedKeys.contains(key))
98 const qint8 volume = 90;
100 QMidiMessage((on ? 0x90 : 0x80), (key&0x7f), volume, 0.0));
117 for (quint8 command = 0xB0U; command < 0xC0U; command++)
void highlightKey(QVariant key, QVariant on)
Signal: Tells the Qml layer to highlight pressed keys.
QVector< bool > mSoundActive
Flag wether the sound is turned on.
bool mActive
Flag that allows to send data.
bool mToggleMode
Flag for desktop toggling mode.
void sendTouchpadMidiEvent(QMidiMessage event)
Signal: On keypress send the corresponding Midi event to a different module.
void receiveTouchpadKeyboardEvent(QVariant keys)
SLOT: Receive an event from the touchscreen keyboard.
QSet< int > mPressedKeys
Keeps track of pressed keys.
void switchNote(int key, bool on)
Switch note on or off.
void clear()
Clear the keyboard memory and turn all notes off.
TouchscreenKeyboard()
Constructor.