|
44 | 44 | #include "FilterPropertiesDialog.h" |
45 | 45 | #include "EmbeddedTriggerPropertiesDialog.h" |
46 | 46 | #include "MeasurementsDialog.h" |
| 47 | +#include "../scopehal/DensityFunctionWaveform.h" |
47 | 48 |
|
48 | 49 | using namespace std; |
49 | 50 |
|
@@ -1049,7 +1050,10 @@ void FilterGraphEditor::ClearOldPropertiesDialogs() |
1049 | 1050 | void FilterGraphEditor::OutputPortTooltip(StreamDescriptor stream) |
1050 | 1051 | { |
1051 | 1052 | ImGui::BeginTooltip(); |
1052 | | - switch(stream.GetType()) |
| 1053 | + |
| 1054 | + //Channel type |
| 1055 | + auto stype = stream.GetType(); |
| 1056 | + switch(stype) |
1053 | 1057 | { |
1054 | 1058 | case Stream::STREAM_TYPE_ANALOG: |
1055 | 1059 | ImGui::TextUnformatted("Analog channel"); |
@@ -1095,6 +1099,33 @@ void FilterGraphEditor::OutputPortTooltip(StreamDescriptor stream) |
1095 | 1099 | ImGui::TextUnformatted("Unknown channel type"); |
1096 | 1100 | break; |
1097 | 1101 | } |
| 1102 | + |
| 1103 | + //Get the data type and print (unless it's a scalar) |
| 1104 | + if(stype != Stream::STREAM_TYPE_ANALOG_SCALAR) |
| 1105 | + { |
| 1106 | + auto data = stream.GetData(); |
| 1107 | + if(!data) |
| 1108 | + ImGui::Text("No waveform data"); |
| 1109 | + else |
| 1110 | + { |
| 1111 | + auto srate = stream.GetXAxisUnits().PrettyPrint(data->m_timescale); |
| 1112 | + if(dynamic_cast<DensityFunctionWaveform*>(data)) |
| 1113 | + ImGui::Text("2D density plot"); |
| 1114 | + else if(dynamic_cast<UniformAnalogWaveform*>(data)) |
| 1115 | + ImGui::Text("Uniformly sampled analog data, %zu samples at %s intervals", data->size(), srate.c_str()); |
| 1116 | + else if(dynamic_cast<UniformDigitalWaveform*>(data)) |
| 1117 | + ImGui::Text("Uniformly sampled digital data, %zu samples at %s intervals", data->size(), srate.c_str()); |
| 1118 | + else if(dynamic_cast<SparseAnalogWaveform*>(data)) |
| 1119 | + ImGui::Text("Sparsely sampled analog data, %zu samples at %s resolution", data->size(), srate.c_str()); |
| 1120 | + else if(dynamic_cast<SparseDigitalWaveform*>(data)) |
| 1121 | + ImGui::Text("Sparsely sampled digital data, %zu samples at %s resolution", data->size(), srate.c_str()); |
| 1122 | + else if(dynamic_cast<UniformWaveformBase*>(data)) |
| 1123 | + ImGui::Text("Uniformly sampled data, %zu samples at %s intervals", data->size(), srate.c_str()); |
| 1124 | + else if(dynamic_cast<SparseWaveformBase*>(data)) |
| 1125 | + ImGui::Text("Sparsely sampled data, %zu samples at %s resolution", data->size(), srate.c_str()); |
| 1126 | + } |
| 1127 | + } |
| 1128 | + |
1098 | 1129 | ImGui::EndTooltip(); |
1099 | 1130 |
|
1100 | 1131 | m_parent->AddStatusHelp("mouse_lmb_drag", "Create connection to new or existing node"); |
|
0 commit comments