kopia lustrzana https://gitlab.com/eliggett/wfview
Make cw textbox a combobox
rodzic
525f984f01
commit
b89ae0459e
14
cwsender.cpp
14
cwsender.cpp
|
@ -63,12 +63,16 @@ void cwSender::handleCurrentModeUpdate(mode_kind mode)
|
||||||
|
|
||||||
void cwSender::on_sendBtn_clicked()
|
void cwSender::on_sendBtn_clicked()
|
||||||
{
|
{
|
||||||
if( (ui->textToSendEdit->text().length() > 0) &&
|
if( (ui->textToSendEdit->currentText().length() > 0) &&
|
||||||
(ui->textToSendEdit->text().length() <= 30) )
|
(ui->textToSendEdit->currentText().length() <= 30) )
|
||||||
{
|
{
|
||||||
emit sendCW(ui->textToSendEdit->text());
|
emit sendCW(ui->textToSendEdit->currentText());
|
||||||
ui->transcriptText->appendPlainText(ui->textToSendEdit->text());
|
ui->transcriptText->appendPlainText(ui->textToSendEdit->currentText());
|
||||||
ui->textToSendEdit->clear();
|
ui->textToSendEdit->addItem(ui->textToSendEdit->currentText());
|
||||||
|
if (ui->textToSendEdit->count() > 5) {
|
||||||
|
ui->textToSendEdit->removeItem(0);
|
||||||
|
}
|
||||||
|
ui->textToSendEdit->setCurrentIndex(-1);
|
||||||
ui->textToSendEdit->setFocus();
|
ui->textToSendEdit->setFocus();
|
||||||
ui->statusbar->showMessage("Sending CW", 3000);
|
ui->statusbar->showMessage("Sending CW", 3000);
|
||||||
}
|
}
|
||||||
|
|
95
cwsender.ui
95
cwsender.ui
|
@ -18,13 +18,6 @@
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<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">
|
<item row="0" column="0" colspan="8">
|
||||||
<widget class="QPlainTextEdit" name="transcriptText">
|
<widget class="QPlainTextEdit" name="transcriptText">
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
|
@ -184,6 +177,13 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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">
|
<item row="1" column="1">
|
||||||
<widget class="QPushButton" name="stopBtn">
|
<widget class="QPushButton" name="stopBtn">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
@ -194,35 +194,54 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="3">
|
<item row="1" column="4">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QComboBox" name="breakinCombo">
|
||||||
<property name="text">
|
<property name="toolTip">
|
||||||
<string>Break In</string>
|
<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>
|
</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>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="1" column="2">
|
||||||
<widget class="QLineEdit" name="textToSendEdit">
|
<widget class="QComboBox" name="textToSendEdit">
|
||||||
<property name="minimumSize">
|
<property name="sizePolicy">
|
||||||
<size>
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
<width>25</width>
|
<horstretch>0</horstretch>
|
||||||
<height>0</height>
|
<verstretch>0</verstretch>
|
||||||
</size>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="editable">
|
||||||
<size>
|
<bool>true</bool>
|
||||||
<width>400</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="currentText">
|
||||||
<string>Type the text you wish to send as CW here.</string>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="maxLength">
|
<property name="insertPolicy">
|
||||||
<number>30</number>
|
<enum>QComboBox::InsertAtTop</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="placeholderText">
|
<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>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -252,28 +271,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusbar"/>
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
|
|
Ładowanie…
Reference in New Issue