UI rework, QLCD error

This commit is contained in:
Chris Esposito 2019-02-17 17:14:20 +11:00
parent b78a65174f
commit 9eeb3f1e91
2 changed files with 583 additions and 430 deletions

View File

@ -61,7 +61,8 @@ void isoBuffer::insertIntoBuffer(short item)
short isoBuffer::bufferAt(uint32_t idx) const
{
if (idx > m_insertedCount)
qFatal("isoBuffer::bufferAt: invalid query");
qFatal("isoBuffer::bufferAt: invalid query, idx = %lu, m_insertedCount = %lu", idx, m_insertedCount);
return m_buffer[(m_back-1) + m_bufferLen - idx];
}

View File

@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1440</width>
<height>900</height>
<width>1493</width>
<height>1346</height>
</rect>
</property>
<property name="minimumSize">
@ -192,6 +192,10 @@
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<layout class="QVBoxLayout" name="verticalLayout_20">
<item>
<widget class="QCheckBox" name="pausedLabeL_CH1">
<property name="text">
@ -220,6 +224,63 @@
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_22">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Offset</string>
</property>
</widget>
</item>
<item>
<widget class="espoSpinBox" name="offsetSpinBox_CH1">
<property name="suffix">
<string>V</string>
</property>
<property name="decimals">
<number>2</number>
</property>
<property name="minimum">
<double>-20.000000000000000</double>
</property>
<property name="maximum">
<double>20.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Attenuation</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="attenuationComboBox_CH2">
<item>
<property name="text">
<string>1x</string>
</property>
</item>
<item>
<property name="text">
<string>5x</string>
</property>
</item>
<item>
<property name="text">
<string>10x</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2">
<property name="spacing">
@ -308,49 +369,6 @@
</layout>
</item>
</layout>
<zorder>acCoupledLabel_CH1</zorder>
<zorder>filterLabel_CH1</zorder>
<zorder>pausedLabeL_CH1</zorder>
<zorder>doubleSampleLabel</zorder>
</widget>
</item>
<item>
<widget class="QGroupBox" name="cursorGroup">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Cursor</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<widget class="QCheckBox" name="cursorHoriCheck">
<property name="text">
<string>Horizontal</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cursorVertCheck">
<property name="text">
<string>Vertical</string>
</property>
</widget>
</item>
<item>
<widget class="cursorEnabler" name="makeCursorsNicer">
<property name="text">
<string>CURSOR ENABLER</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
@ -375,6 +393,10 @@
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<layout class="QVBoxLayout" name="verticalLayout_23">
<item>
<widget class="QCheckBox" name="pausedLabel_CH2">
<property name="text">
@ -403,6 +425,60 @@
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_24">
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Offset</string>
</property>
</widget>
</item>
<item>
<widget class="espoSpinBox" name="offsetSpinBox_CH2">
<property name="suffix">
<string>V</string>
</property>
<property name="minimum">
<double>-20.000000000000000</double>
</property>
<property name="maximum">
<double>20.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Attenuation</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="attenuationComboBox_CH2_2">
<item>
<property name="text">
<string>1x</string>
</property>
</item>
<item>
<property name="text">
<string>5x</string>
</property>
</item>
<item>
<property name="text">
<string>10x</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_3">
<property name="spacing">
@ -493,6 +569,53 @@
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_25">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QGroupBox" name="cursorGroup">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Cursor</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<widget class="QCheckBox" name="cursorHoriCheck">
<property name="text">
<string>Horizontal</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cursorVertCheck">
<property name="text">
<string>Vertical</string>
</property>
</widget>
</item>
<item>
<widget class="cursorEnabler" name="makeCursorsNicer">
<property name="text">
<string>CURSOR ENABLER</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="triggerGroup">
<property name="enabled">
@ -508,6 +631,17 @@
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_14">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<layout class="QVBoxLayout" name="verticalLayout_27">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>Source</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="triggerChannelSelect">
<item>
@ -532,6 +666,17 @@
</item>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_26">
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>Level</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="triggerLevelValue">
<property name="minimum">
@ -545,6 +690,10 @@
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="singleShotCheckBox">
<property name="text">
@ -559,19 +708,6 @@
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="hideCH1Box">
<property name="text">
@ -586,6 +722,19 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="multimeterGroup">
<property name="enabled">
@ -600,8 +749,24 @@
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_14">
<item>
<layout class="QVBoxLayout" name="verticalLayout_28">
<item>
<widget class="QCheckBox" name="multimeterPauseCheckBox">
<property name="text">
<string>Paused</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="multimeterModeLabel">
<property name="text">
<string>Mode</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="multimeterModeSelect">
<item>
<property name="text">
@ -625,22 +790,86 @@
</item>
</widget>
</item>
<item row="0" column="1" rowspan="8">
<layout class="QFormLayout" name="formLayout">
<property name="horizontalSpacing">
<item>
<widget class="QLabel" name="multimeterResistanceLabel">
<property name="text">
<string>Series Resistance</string>
</property>
</widget>
</item>
<item>
<widget class="espoSpinBox" name="multimeterResistanceSelect">
<property name="suffix">
<string>Ω</string>
</property>
<property name="decimals">
<number>0</number>
</property>
<property name="verticalSpacing">
<number>0</number>
<property name="maximum">
<double>1000000.000000000000000</double>
</property>
<item row="0" column="0">
</widget>
</item>
<item>
<widget class="QLabel" name="multimeterRLabel">
<property name="text">
<string>Source</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="multimeterRComboBox">
<item>
<property name="text">
<string>Signal Gen CH2</string>
</property>
</item>
<item>
<property name="text">
<string>Power Supply</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_12">
<item>
<layout class="QVBoxLayout" name="verticalLayout_29">
<item>
<widget class="QLabel" name="multimeterMaxLabel">
<property name="text">
<string> Max</string>
</property>
</widget>
</item>
<item row="0" column="1">
<item>
<widget class="QLabel" name="multimeterMinLabel">
<property name="text">
<string> Min</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="multimeterMeanLabel">
<property name="text">
<string> Mean</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="multimeterRmsLabel">
<property name="text">
<string> RMS</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_30">
<item>
<widget class="QLCDNumber" name="multimeterMaxDisplay">
<property name="minimumSize">
<size>
@ -656,14 +885,7 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="multimeterMinLabel">
<property name="text">
<string> Min</string>
</property>
</widget>
</item>
<item row="1" column="1">
<item>
<widget class="QLCDNumber" name="multimeterMinDisplay">
<property name="minimumSize">
<size>
@ -679,14 +901,7 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="multimeterMeanLabel">
<property name="text">
<string> Mean</string>
</property>
</widget>
</item>
<item row="2" column="1">
<item>
<widget class="QLCDNumber" name="multimeterMeanDisplay">
<property name="minimumSize">
<size>
@ -702,14 +917,7 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="multimeterRmsLabel">
<property name="text">
<string> RMS</string>
</property>
</widget>
</item>
<item row="3" column="1">
<item>
<widget class="QLCDNumber" name="multimeterRmsDisplay">
<property name="minimumSize">
<size>
@ -727,60 +935,7 @@
</item>
</layout>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="multimeterPauseCheckBox">
<property name="text">
<string>Paused</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="multimeterResistanceLabel">
<property name="text">
<string>Series Resistance</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="multimeterModeLabel">
<property name="text">
<string>Mode</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="espoSpinBox" name="multimeterResistanceSelect">
<property name="suffix">
<string>Ω</string>
</property>
<property name="decimals">
<number>0</number>
</property>
<property name="maximum">
<double>1000000.000000000000000</double>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QComboBox" name="multimeterRComboBox">
<item>
<property name="text">
<string>Signal Gen CH2</string>
</property>
</item>
<item>
<property name="text">
<string>Power Supply</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="multimeterRLabel">
<property name="text">
<string>Source</string>
</property>
</widget>
</layout>
</item>
</layout>
</widget>
@ -1018,9 +1173,6 @@
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7"/>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
@ -1186,7 +1338,7 @@
<bool>false</bool>
</property>
<property name="title">
<string>Logic Analyzer CH2</string>
<string>Logic Analyzer CH&amp;2</string>
</property>
<property name="checkable">
<bool>true</bool>
@ -1333,7 +1485,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>1440</width>
<width>1493</width>
<height>36</height>
</rect>
</property>
@ -2374,12 +2526,12 @@
</action>
<action name="actionPinout">
<property name="text">
<string>Pinout</string>
<string>&amp;Pinout</string>
</property>
</action>
<action name="actionDocumentation">
<property name="text">
<string>Documentation</string>
<string>&amp;Documentation</string>
</property>
</action>
</widget>
@ -3449,54 +3601,6 @@
</hint>
</hints>
</connection>
<connection>
<sender>controller_iso</sender>
<signal>multimeterMax(double)</signal>
<receiver>multimeterMaxDisplay</receiver>
<slot>display(double)</slot>
<hints>
<hint type="sourcelabel">
<x>1251</x>
<y>892</y>
</hint>
<hint type="destinationlabel">
<x>1179</x>
<y>427</y>
</hint>
</hints>
</connection>
<connection>
<sender>controller_iso</sender>
<signal>multimeterMin(double)</signal>
<receiver>multimeterMinDisplay</receiver>
<slot>display(double)</slot>
<hints>
<hint type="sourcelabel">
<x>1251</x>
<y>892</y>
</hint>
<hint type="destinationlabel">
<x>1179</x>
<y>451</y>
</hint>
</hints>
</connection>
<connection>
<sender>controller_iso</sender>
<signal>multimeterMean(double)</signal>
<receiver>multimeterMeanDisplay</receiver>
<slot>display(double)</slot>
<hints>
<hint type="sourcelabel">
<x>1251</x>
<y>892</y>
</hint>
<hint type="destinationlabel">
<x>1179</x>
<y>475</y>
</hint>
</hints>
</connection>
<connection>
<sender>multimeterResistanceSelect</sender>
<signal>valueChanged(double)</signal>
@ -3513,54 +3617,6 @@
</hint>
</hints>
</connection>
<connection>
<sender>controller_iso</sender>
<signal>sendMultimeterLabel1(QString)</signal>
<receiver>multimeterMaxLabel</receiver>
<slot>setText(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>1251</x>
<y>892</y>
</hint>
<hint type="destinationlabel">
<x>1124</x>
<y>427</y>
</hint>
</hints>
</connection>
<connection>
<sender>controller_iso</sender>
<signal>sendMultimeterLabel2(QString)</signal>
<receiver>multimeterMinLabel</receiver>
<slot>setText(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>1251</x>
<y>892</y>
</hint>
<hint type="destinationlabel">
<x>1124</x>
<y>451</y>
</hint>
</hints>
</connection>
<connection>
<sender>controller_iso</sender>
<signal>sendMultimeterLabel3(QString)</signal>
<receiver>multimeterMeanLabel</receiver>
<slot>setText(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>1251</x>
<y>892</y>
</hint>
<hint type="destinationlabel">
<x>1124</x>
<y>475</y>
</hint>
</hints>
</connection>
<connection>
<sender>serialDecodingCheck_CH1</sender>
<signal>toggled(bool)</signal>
@ -4153,38 +4209,6 @@
</hint>
</hints>
</connection>
<connection>
<sender>controller_iso</sender>
<signal>multimeterRMS(double)</signal>
<receiver>multimeterRmsDisplay</receiver>
<slot>display(double)</slot>
<hints>
<hint type="sourcelabel">
<x>1189</x>
<y>877</y>
</hint>
<hint type="destinationlabel">
<x>1179</x>
<y>499</y>
</hint>
</hints>
</connection>
<connection>
<sender>controller_iso</sender>
<signal>sendMultimeterLabel4(QString)</signal>
<receiver>multimeterRmsLabel</receiver>
<slot>setText(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>1117</x>
<y>882</y>
</hint>
<hint type="destinationlabel">
<x>1124</x>
<y>499</y>
</hint>
</hints>
</connection>
<connection>
<sender>multimeterRComboBox</sender>
<signal>currentIndexChanged(int)</signal>
@ -4217,6 +4241,134 @@
</hint>
</hints>
</connection>
<connection>
<sender>controller_iso</sender>
<signal>multimeterRMS(double)</signal>
<receiver>multimeterRmsDisplay</receiver>
<slot>display(double)</slot>
<hints>
<hint type="sourcelabel">
<x>1189</x>
<y>877</y>
</hint>
<hint type="destinationlabel">
<x>1179</x>
<y>499</y>
</hint>
</hints>
</connection>
<connection>
<sender>controller_iso</sender>
<signal>sendMultimeterLabel1(QString)</signal>
<receiver>multimeterMaxLabel</receiver>
<slot>setText(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>1251</x>
<y>892</y>
</hint>
<hint type="destinationlabel">
<x>1124</x>
<y>427</y>
</hint>
</hints>
</connection>
<connection>
<sender>controller_iso</sender>
<signal>sendMultimeterLabel3(QString)</signal>
<receiver>multimeterMeanLabel</receiver>
<slot>setText(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>1251</x>
<y>892</y>
</hint>
<hint type="destinationlabel">
<x>1124</x>
<y>475</y>
</hint>
</hints>
</connection>
<connection>
<sender>controller_iso</sender>
<signal>multimeterMax(double)</signal>
<receiver>multimeterMaxDisplay</receiver>
<slot>display(double)</slot>
<hints>
<hint type="sourcelabel">
<x>1251</x>
<y>892</y>
</hint>
<hint type="destinationlabel">
<x>1179</x>
<y>427</y>
</hint>
</hints>
</connection>
<connection>
<sender>controller_iso</sender>
<signal>multimeterMean(double)</signal>
<receiver>multimeterMeanDisplay</receiver>
<slot>display(double)</slot>
<hints>
<hint type="sourcelabel">
<x>1251</x>
<y>892</y>
</hint>
<hint type="destinationlabel">
<x>1179</x>
<y>475</y>
</hint>
</hints>
</connection>
<connection>
<sender>controller_iso</sender>
<signal>sendMultimeterLabel2(QString)</signal>
<receiver>multimeterMinLabel</receiver>
<slot>setText(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>1251</x>
<y>892</y>
</hint>
<hint type="destinationlabel">
<x>1124</x>
<y>451</y>
</hint>
</hints>
</connection>
<connection>
<sender>controller_iso</sender>
<signal>sendMultimeterLabel4(QString)</signal>
<receiver>multimeterRmsLabel</receiver>
<slot>setText(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>1117</x>
<y>882</y>
</hint>
<hint type="destinationlabel">
<x>1124</x>
<y>499</y>
</hint>
</hints>
</connection>
<connection>
<sender>controller_iso</sender>
<signal>multimeterMin(double)</signal>
<receiver>multimeterMinDisplay</receiver>
<slot>display(double)</slot>
<hints>
<hint type="sourcelabel">
<x>1251</x>
<y>892</y>
</hint>
<hint type="destinationlabel">
<x>1179</x>
<y>451</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>timeBaseNeedsChanging(bool)</slot>