23 #include "ui_cwkeyergui.h" 34 m_doApplySettings(true),
35 m_keyScope(NoKeyScope)
45 this->releaseKeyboard();
89 ui->cwTextEdit->clear();
102 ui->cwSpeedText->setText(QString(
"%1").
arg(value));
110 ui->playDashes->setEnabled(!checked);
111 ui->playText->setEnabled(!checked);
112 ui->keyboardKeyer->setEnabled(!checked);
119 ui->playDots->setEnabled(!checked);
121 ui->playText->setEnabled(!checked);
122 ui->keyboardKeyer->setEnabled(!checked);
129 ui->playDots->setEnabled(!checked);
130 ui->playDashes->setEnabled(!checked);
132 ui->keyboardKeyer->setEnabled(!checked);
135 ui->playStop->setChecked(
true);
137 ui->playStop->setChecked(
false);
167 if (checked &&
ui->keyDashCapture->isChecked())
169 ui->keyDotCapture->setChecked(
false);
170 ui->keyDashCapture->setChecked(
false);
178 setFocusPolicy(Qt::StrongFocus);
187 setFocusPolicy(Qt::NoFocus);
194 if (checked &&
ui->keyDotCapture->isChecked())
196 ui->keyDotCapture->setChecked(
false);
197 ui->keyDashCapture->setChecked(
false);
206 setFocusPolicy(Qt::StrongFocus);
216 setFocusPolicy(Qt::NoFocus);
231 ui->keyDotCapture->setChecked(
false);
239 ui->keyDashCapture->setChecked(
false);
250 qDebug(
"CWKeyerGUI::on_keyboardKeyer_toggled: %s", checked ?
"true" :
"false");
251 ui->playDots->setEnabled(!checked);
252 ui->playDashes->setEnabled(!checked);
253 ui->playText->setEnabled(!checked);
270 qDebug(
"CWKeyerGUI::keyboardKeyPressed: dot %s", release ?
"released" :
"pressed");
279 qDebug(
"CWKeyerGUI::keyboardKeyPressed: dash %s", release ?
"released" :
"pressed");
334 else if (keyModifiers != Qt::NoModifier)
336 QString altGrStr = keyModifiers & Qt::GroupSwitchModifier ?
"Gr " :
"";
337 int maskedModifiers = (keyModifiers & 0x3FFFFFFF) + ((keyModifiers & 0x40000000)>>3);
338 label->setText(altGrStr + QKeySequence(maskedModifiers, key).toString());
342 label->setText(QKeySequence(key).toString());
static MainWindow * getInstance()
void commandKeysConnect(QObject *object, const char *slot)
void push(Message *message, bool emitSignal=true)
Push message onto queue.
void applySettings(bool force=false)
QByteArray serialize() const
void on_keyboardKeyer_toggled(bool checked)
void keyboardKeyPressed(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release)
void commandKeyPressed(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release)
void on_playDashes_toggled(bool checked)
void setCWKeyer(CWKeyer *cwKeyer)
void setSettings(const CWKeyerSettings &settings)
void setKeyLabel(QLabel *label, Qt::Key key, Qt::KeyboardModifiers keyModifiers)
void on_playStop_toggled(bool checked)
void on_cwSpeed_valueChanged(int value)
void on_cwTextEdit_editingFinished()
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
void on_keyDotCapture_toggled(bool checked)
void setKeyboardSilence()
bool deserialize(const QByteArray &data)
void on_playLoopCW_toggled(bool checked)
void on_playText_toggled(bool checked)
void on_cwTextClear_clicked(bool checked)
CommandKeyReceiver * m_commandKeyReceiver
CWKeyerSettings m_settings
void setRelease(bool release)
void on_keyDashCapture_toggled(bool checked)
Qt::KeyboardModifiers m_dotKeyModifiers
Qt::KeyboardModifiers m_dashKeyModifiers
void commandKeysDisconnect(QObject *object, const char *slot)
void on_playDots_toggled(bool checked)
void blockApplySettings(bool block)
const CWKeyerSettings & getSettings() const
void on_keyingStyle_toggled(bool checked)
QByteArray serialize() const
bool deserialize(const QByteArray &data)
CWKeyerGUI(QWidget *parent=nullptr)