mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-18 04:43:40 +00:00
added edit dialog for median filter and optimized for speed
This commit is contained in:
parent
163b23f28d
commit
8e661aecd6
12 changed files with 342 additions and 77 deletions
|
|
@ -4,6 +4,7 @@ TraceMath::TraceMath()
|
|||
{
|
||||
input = nullptr;
|
||||
dataType = DataType::Invalid;
|
||||
error("Invalid input");
|
||||
}
|
||||
|
||||
TraceMath::Data TraceMath::getSample(unsigned int index)
|
||||
|
|
@ -51,9 +52,44 @@ void TraceMath::inputTypeChanged(TraceMath::DataType type)
|
|||
data.clear();
|
||||
inputSamplesChanged(0, input->data.size());
|
||||
emit outputTypeChanged(dataType);
|
||||
if(dataType == DataType::Invalid) {
|
||||
error("Invalid input data");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TraceMath::warning(QString warn)
|
||||
{
|
||||
statusString = warn;
|
||||
status = Status::Warning;
|
||||
emit statusChanged();
|
||||
}
|
||||
|
||||
void TraceMath::error(QString err)
|
||||
{
|
||||
statusString = err;
|
||||
status = Status::Error;
|
||||
emit statusChanged();
|
||||
}
|
||||
|
||||
void TraceMath::success()
|
||||
{
|
||||
if(status != Status::Ok) {
|
||||
status = Status::Ok;
|
||||
emit statusChanged();
|
||||
}
|
||||
}
|
||||
|
||||
QString TraceMath::getStatusDescription() const
|
||||
{
|
||||
return statusString;
|
||||
}
|
||||
|
||||
TraceMath::Status TraceMath::getStatus() const
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
TraceMath::DataType TraceMath::getDataType() const
|
||||
{
|
||||
return dataType;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue