2021-03-12 04:52:58 +08:00
|
|
|
#ifndef SPARAMTRACESELECTOR_H
|
|
|
|
#define SPARAMTRACESELECTOR_H
|
|
|
|
|
|
|
|
#include "tracemodel.h"
|
2021-10-21 19:00:34 +08:00
|
|
|
|
|
|
|
#include <QWidget>
|
2021-03-12 04:52:58 +08:00
|
|
|
#include <QComboBox>
|
|
|
|
|
|
|
|
class SparamTraceSelector : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
SparamTraceSelector(const TraceModel &model, unsigned int num_ports, bool empty_allowed = false, std::set<unsigned int> skip = {});
|
|
|
|
|
|
|
|
bool isValid();
|
|
|
|
|
|
|
|
std::vector<Trace*> getTraces();
|
|
|
|
unsigned int getPoints() { return points;};
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void selectionValid(bool valid);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void setInitialChoices();
|
|
|
|
void traceSelectionChanged(QComboBox *cb);
|
|
|
|
|
|
|
|
const TraceModel &model;
|
|
|
|
std::vector<QComboBox*> boxes;
|
|
|
|
unsigned int num_ports;
|
|
|
|
bool empty_allowed;
|
|
|
|
|
|
|
|
unsigned int points;
|
|
|
|
double minFreq, maxFreq;
|
|
|
|
bool valid;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SPARAMTRACESELECTOR_H
|