kopia lustrzana https://gitlab.com/eliggett/wfview
Make cw textbox a combobox
rodzic
cba4ad345b
commit
7ebfcdefbd
14
cwsender.cpp
14
cwsender.cpp
|
@ -63,12 +63,16 @@ void cwSender::handleCurrentModeUpdate(mode_kind mode)
|
|||
|
||||
void cwSender::on_sendBtn_clicked()
|
||||
{
|
||||
if( (ui->textToSendEdit->text().length() > 0) &&
|
||||
(ui->textToSendEdit->text().length() <= 30) )
|
||||
if( (ui->textToSendEdit->currentText().length() > 0) &&
|
||||
(ui->textToSendEdit->currentText().length() <= 30) )
|
||||
{
|
||||
emit sendCW(ui->textToSendEdit->text());
|
||||
ui->transcriptText->appendPlainText(ui->textToSendEdit->text());
|
||||
ui->textToSendEdit->clear();
|
||||
emit sendCW(ui->textToSendEdit->currentText());
|
||||
ui->transcriptText->appendPlainText(ui->textToSendEdit->currentText());
|
||||
ui->textToSendEdit->addItem(ui->textToSendEdit->currentText());
|
||||
if (ui->textToSendEdit->count() > 5) {
|
||||
ui->textToSendEdit->removeItem(0);
|
||||
}
|
||||
ui->textToSendEdit->setCurrentIndex(-1);
|
||||
ui->textToSendEdit->setFocus();
|
||||
ui->statusbar->showMessage("Sending CW", 3000);
|
||||
}
|
||||
|
|
95
cwsender.ui
95
cwsender.ui
|
@ -18,13 +18,6 @@
|
|||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="5">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>WPM:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="8">
|
||||
<widget class="QPlainTextEdit" name="transcriptText">
|
||||
<property name="focusPolicy">
|
||||
|
@ -184,6 +177,13 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Break In</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="stopBtn">
|
||||
<property name="toolTip">
|
||||
|
@ -194,35 +194,54 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Break In</string>
|
||||
<item row="1" column="4">
|
||||
<widget class="QComboBox" name="breakinCombo">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Set the desired break-in mode:</p><p>1. None: You must manually key and unkey the radio.</p><p>2. Semi: Transmit is automatic and switches to receive at the end of the text.</p><p>3. Full: Same as semi, but with breaks between characters when possible.</p></body></html></string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Off</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Semi</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Full</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="textToSendEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>25</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
<widget class="QComboBox" name="textToSendEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Type the text you wish to send as CW here.</string>
|
||||
<property name="currentText">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>30</number>
|
||||
<property name="insertPolicy">
|
||||
<enum>QComboBox::InsertAtTop</enum>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Type here...</string>
|
||||
<string notr="true">Type here...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>WPM:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -252,28 +271,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QComboBox" name="breakinCombo">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Set the desired break-in mode:</p><p>1. None: You must manually key and unkey the radio.</p><p>2. Semi: Transmit is automatic and switches to receive at the end of the text.</p><p>3. Full: Same as semi, but with breaks between characters when possible.</p></body></html></string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Off</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Semi</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Full</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
|
|
Ładowanie…
Reference in New Issue