Skip to content

Commit 65166b4

Browse files
committedJul 21, 2011
Add option to revert I/Q correction values to the previously stored values.
1 parent fc92621 commit 65166b4

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed
 

‎iqbalance.cc

+14
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,20 @@ void CIqBalance::on_doubleSpinBoxGain_valueChanged(double value)
126126
}
127127

128128

129+
/*! \brief Revert button has been clicked.
130+
*
131+
* Revert I/Q correction values to the previously stored values.
132+
*/
133+
void CIqBalance::on_revertButton_clicked()
134+
{
135+
QSettings settings;
136+
ui->doubleSpinBoxDCI->setValue(settings.value("DCICorr","0.0").toDouble());
137+
ui->doubleSpinBoxDCQ->setValue(settings.value("DCQCorr","0.0").toDouble());
138+
ui->doubleSpinBoxPhase->setValue(settings.value("PhaseCorr","0.0").toDouble());
139+
ui->doubleSpinBoxGain->setValue(settings.value("GainCorr","1.0").toDouble());
140+
}
141+
142+
129143
/*! \brief Reset button has been clicked. */
130144
void CIqBalance::on_resetButton_clicked()
131145
{

‎iqbalance.h

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ private slots:
4646
void on_doubleSpinBoxDCQ_valueChanged(double value);
4747
void on_doubleSpinBoxPhase_valueChanged(double value);
4848
void on_doubleSpinBoxGain_valueChanged(double value);
49+
void on_revertButton_clicked();
4950
void on_resetButton_clicked();
5051

5152
private:

‎iqbalance.ui

+10
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,16 @@ p, li { white-space: pre-wrap; }
173173
</property>
174174
</widget>
175175
</item>
176+
<item row="2" column="1">
177+
<widget class="QPushButton" name="revertButton">
178+
<property name="toolTip">
179+
<string>Revert to previously stored values</string>
180+
</property>
181+
<property name="text">
182+
<string>Revert</string>
183+
</property>
184+
</widget>
185+
</item>
176186
</layout>
177187
</widget>
178188
</item>

0 commit comments

Comments
 (0)
Please sign in to comment.