kopia lustrzana https://gitlab.com/eliggett/wfview
Started work on the UI for a split control interface.
rodzic
4137fce70c
commit
0a7f6b0b65
|
@ -395,3 +395,48 @@ void repeaterSetup::on_debugBtn_clicked()
|
|||
//emit getDTCS();
|
||||
emit getRptAccessMode();
|
||||
}
|
||||
|
||||
quint64 repeaterSetup::calcTransmitFreq(quint64 fOffset, bool isPlus)
|
||||
{
|
||||
quint64 txfcalc = 0;
|
||||
if(isPlus)
|
||||
txfcalc = currentMainFrequency + fOffset;
|
||||
else
|
||||
txfcalc = currentMainFrequency - fOffset;
|
||||
return txfcalc;
|
||||
}
|
||||
|
||||
void repeaterSetup::on_splitOffsetSetBtn_clicked()
|
||||
{
|
||||
freqt txFreq;
|
||||
bool ok = true;
|
||||
txFreq.Hz = ui->splitTransmitFreqEdit->text().toDouble(&ok) * 1E6;
|
||||
emit setTransmitFrequency(txFreq);
|
||||
}
|
||||
|
||||
void repeaterSetup::on_splitEnableChk_clicked(bool enabled)
|
||||
{
|
||||
emit setSplitModeEnabled(enabled);
|
||||
}
|
||||
|
||||
void repeaterSetup::on_splitPlusButton_clicked()
|
||||
{
|
||||
bool ok = true;
|
||||
quint64 fOffset = ui->splitOffsetEdit->text().toDouble(&ok) * 1E6;
|
||||
quint64 f;
|
||||
if(ok)
|
||||
{
|
||||
f = calcTransmitFreq(fOffset, true);
|
||||
ui->splitTransmitFreqEdit->setText(QString("%1").arg(QString::number(f/(double)1E6, 'f', 2)));
|
||||
}
|
||||
}
|
||||
|
||||
void repeaterSetup::on_splitMinusBtn_clicked()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void repeaterSetup::on_splitTxFreqSetBtn_clicked()
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -31,6 +31,10 @@ signals:
|
|||
void getDTCS();
|
||||
void setRptAccessMode(rptAccessTxRx tmode);
|
||||
void getRptAccessMode();
|
||||
void getSplitModeEnabled();
|
||||
void getTransmitFrequency();
|
||||
void setSplitModeEnabled(bool splitEnabled);
|
||||
void setTransmitFrequency(freqt transmitFreq);
|
||||
|
||||
public slots:
|
||||
void receiveDuplexMode(duplexMode dm);
|
||||
|
@ -38,6 +42,9 @@ public slots:
|
|||
void handleTone(quint16 tone);
|
||||
void handleTSQL(quint16 tsql);
|
||||
void handleDTCS(quint16 dcscode, bool tinv, bool rinv);
|
||||
void handleSplitMode(bool splitEnabled);
|
||||
void handleSplitFrequency(freqt transmitFreq);
|
||||
void handleUpdateCurrentMainFrequency(freqt mainfreq);
|
||||
|
||||
private slots:
|
||||
void on_rptSimplexBtn_clicked();
|
||||
|
@ -52,12 +59,19 @@ private slots:
|
|||
void on_toneTone_clicked();
|
||||
void on_toneTSQL_clicked();
|
||||
void on_toneDTCS_clicked();
|
||||
void on_splitOffsetSetBtn_clicked();
|
||||
void on_splitEnableChk_clicked(bool enabled);
|
||||
void on_splitPlusButton_clicked();
|
||||
void on_splitMinusBtn_clicked();
|
||||
|
||||
void on_splitTxFreqSetBtn_clicked();
|
||||
|
||||
private:
|
||||
Ui::repeaterSetup *ui;
|
||||
|
||||
freqt currentMainFrequency;
|
||||
void populateTones();
|
||||
void populateDTCS();
|
||||
quint64 calcTransmitFreq(quint64 fOffset, bool isPlus);
|
||||
rigCapabilities rig;
|
||||
bool haveRig = false;
|
||||
duplexMode currentdm;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<width>922</width>
|
||||
<height>217</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -71,7 +71,7 @@
|
|||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<widget class="QGroupBox" name="rptGrpbox">
|
||||
<property name="title">
|
||||
<string>Repeater Duplex</string>
|
||||
</property>
|
||||
|
@ -119,6 +119,97 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="splitModeGrpbox">
|
||||
<property name="title">
|
||||
<string>Split Mode</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="splitEnableChk">
|
||||
<property name="text">
|
||||
<string>Split Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Offset (MHz):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="splitOffsetEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="splitPlusButton">
|
||||
<property name="text">
|
||||
<string>+</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="splitMinusBtn">
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Tx Freq (MHz):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="splitTransmitFreqEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="splitTxFreqSetBtn">
|
||||
<property name="text">
|
||||
<string>Set</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
|
@ -231,7 +322,7 @@
|
|||
<resources/>
|
||||
<connections/>
|
||||
<buttongroups>
|
||||
<buttongroup name="rptDuplexBtns"/>
|
||||
<buttongroup name="rptToneBtns"/>
|
||||
<buttongroup name="rptDuplexBtns"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
|
Ładowanie…
Reference in New Issue