123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476 |
- #include "mainwindow.h"
- #include "ui_mainwindow.h"
- MainWindow::MainWindow(QWidget *parent)
- : QMainWindow(parent)
- , ui(new Ui::MainWindow)
- {
- ui->setupUi(this);
- this->setWindowTitle("蓝方模型创建及雷达信号模拟生成软件");
- //radarServer = new RadarServer(this, 1234);
- radarServerThread = new QThread(this);
- radarSigGenThread = new QThread(this);
- tableview = new QStandardItemModel;
- tableview->setHorizontalHeaderItem(0,new QStandardItem("雷达编号"));
- tableview->setHorizontalHeaderItem(1,new QStandardItem("模型编号"));
- tableview->setHorizontalHeaderItem(2,new QStandardItem("信号类型"));
- tableview->setHorizontalHeaderItem(3,new QStandardItem("载波频率"));
- tableview->setHorizontalHeaderItem(4,new QStandardItem("PRF模式"));
- tableview->setHorizontalHeaderItem(5,new QStandardItem("脉内调制带宽"));
- rows = 0;
- radarServer = new RadarServer();
- radarSigGen = new RadarSigGen();
- radarServer->moveToThread(radarServerThread);
- radarSigGen->moveToThread(radarSigGenThread);
- connect(radarServer,SIGNAL(SigRadarGen(int)),radarSigGen,SLOT(SlotRadarGen(int)));
- radarServerThread->start();
- radarSigGenThread->start();
- ui->lineEdit_sigType->setText(QString::fromStdString("相位编码"));
- ui->lineEdit_fc->setText(QString::number(1e9,'f',2));
- ui->lineEdit_T->setText(QString::number(5e-6,'f',6));
- ui->lineEdit_PRF->setText(QString::number(1/(20e6),'f',8));
- ui->lineEdit_BW->setText(QString::number(20e6,'f',2));
- simDisplay = new SimDisplay(this);
- ui->lineEdit_sigType->setDisabled(true);
- ui->lineEdit_fc->setDisabled(true);
- ui->lineEdit_T->setDisabled(true);
- ui->lineEdit_PRF->setDisabled(true);
- ui->lineEdit_BW->setDisabled(true);
- xAxis = new QValueAxis;
- xAxis->setLabelFormat("%i");
- xAxis->setTitleText("Time");
- MyChart.addAxis(xAxis, Qt::AlignBottom);
- MyChart.setTitle(QString::fromStdString("信号生成预览"));
- yAxis = new QValueAxis;
- yAxis->setTitleText("Signal Value");
- MyChart.addAxis(yAxis, Qt::AlignLeft);
- }
- MainWindow::~MainWindow()
- {
- delete ui;
- }
- void MainWindow::on_pushButton_42_clicked()
- {
- simDisplay->show();
- simDisplay->setModal(true);
- }
- void MainWindow::on_comboBox_radarType_currentIndexChanged(const QString &arg1)
- {
- }
- void MainWindow::on_pushButton_5_clicked()
- {
- // 1.获取画布
- std::string chooseIndex = ui->comboBox_28->currentText().toStdString();
- MyChartView = ui->SimShow;
- MyChart.removeAllSeries();
- // MyLineSeries.attachAxis(MyAxisX);
- // MyLineSeries.attachAxis(MyAxisY);
- double *currentSig;
- for(int i=0;i<interceptRadarNum;i++)
- {
- if(chooseIndex==interceptRadarList[i]->getIndex()){
- currentSig = interceptRadarList[i]->getSig();
- len = interceptRadarList[i]->getLen();
- }
- }
- qDebug()<<len;
- // 3.给序列对象添加数据
- // QVector<QPointF> MyPointf ;
- QLineSeries *MyLineSeries = new QLineSeries();
- for (int i = 0; i < (int)len; i++) {
- MyLineSeries->append(i, currentSig[i]);
- }
- // for(int i = 0; i < 100000; i ++)
- // {
- // MyPointf << QPointF(i,currentSig[i]);
- // }
- // MyLineSeries.replace(MyPointf);
- MyChart.addSeries(MyLineSeries);
- MyLineSeries->attachAxis(xAxis);
- // Set up the Y axis
- MyLineSeries->attachAxis(yAxis);
- // MyLineSeries.attachAxis(&MyAxisX);
- // MyLineSeries.attachAxis(&MyAxisY);
- MyChartView->setRenderHint(QPainter::Antialiasing);
- MyChartView->setRubberBand(QChartView::RectangleRubberBand);
- MyChartView->setDragMode(QGraphicsView::ScrollHandDrag);
- MyChartView->setChart(&MyChart);
- }
- void MainWindow::on_CreateInterceptRadarButton_clicked()
- {
- if(ui->comboBox_radarType->currentIndex()==0){//模型001
- radarSigGen->SlotRadarGen(1);
- interceptRadarList[interceptRadarNum] = new interceptRadar();
- interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
- interceptRadarList[interceptRadarNum]->setLen(400000);
- interceptRadarList[interceptRadarNum]->setFs(*(radarSigGen->fs));
- qDebug()<<*(radarSigGen->len);
- interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
- ui->lineEdit_sigType->setText(QString::fromStdString("相位编码"));
- ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
- ui->lineEdit_T->setText(QString::fromStdString("-"));
- ui->lineEdit_PRF->setText(QString::fromStdString("抖动"));
- ui->lineEdit_BW->setText(QString::fromStdString("1us"));
- int lines = 0;
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
- tableview->setItem(rows, lines++, new QStandardItem("相位编码"));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
- tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
- ui->tableView_6->setModel(tableview);
- ui->tableView_11->setModel(tableview);
- ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
- }
- if(ui->comboBox_radarType->currentIndex()==1){//模型101
- radarSigGen->SlotRadarGen(2);
- interceptRadarList[interceptRadarNum] = new interceptRadar();
- interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
- interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
- interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
- ui->lineEdit_sigType->setText(QString::fromStdString("矩形脉冲"));
- ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
- ui->lineEdit_T->setText(QString::fromStdString("-"));
- ui->lineEdit_PRF->setText(QString::fromStdString("抖动"));
- ui->lineEdit_BW->setText(QString::fromStdString("1us"));
- int lines = 0;
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
- tableview->setItem(rows, lines++, new QStandardItem("矩形脉冲"));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
- tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
- ui->tableView_6->setModel(tableview);
- ui->tableView_11->setModel(tableview);
- ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
- }
- if(ui->comboBox_radarType->currentIndex()==2){//模型102
- radarSigGen->SlotRadarGen(3);
- interceptRadarList[interceptRadarNum] = new interceptRadar();
- interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
- interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
- interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
- ui->lineEdit_sigType->setText(QString::fromStdString("矩形脉冲"));
- ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
- ui->lineEdit_T->setText(QString::fromStdString("-"));
- ui->lineEdit_PRF->setText(QString::fromStdString("固定"));
- ui->lineEdit_BW->setText(QString::fromStdString("1us"));
- int lines = 0;
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
- tableview->setItem(rows, lines++, new QStandardItem("矩形脉冲"));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
- tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
- ui->tableView_6->setModel(tableview);
- ui->tableView_11->setModel(tableview);
- ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
- }
- if(ui->comboBox_radarType->currentIndex()==3){//模型103
- radarSigGen->SlotRadarGen(4);
- interceptRadarList[interceptRadarNum] = new interceptRadar();
- interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
- interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
- interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
- ui->lineEdit_sigType->setText(QString::fromStdString("矩形脉冲"));
- ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
- ui->lineEdit_T->setText(QString::fromStdString("-"));
- ui->lineEdit_PRF->setText(QString::fromStdString("固定"));
- ui->lineEdit_BW->setText(QString::fromStdString("0.5us"));
- int lines = 0;
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
- tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
- ui->tableView_6->setModel(tableview);
- ui->tableView_11->setModel(tableview);
- ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
- }
- if(ui->comboBox_radarType->currentIndex()==4){//模型201
- radarSigGen->SlotRadarGen(5);
- interceptRadarList[interceptRadarNum] = new interceptRadar();
- interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
- interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
- interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
- ui->lineEdit_sigType->setText(QString::fromStdString("相位编码"));
- ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
- ui->lineEdit_T->setText(QString::fromStdString("-"));
- ui->lineEdit_PRF->setText(QString::fromStdString("抖动"));
- ui->lineEdit_BW->setText(QString::fromStdString("1us"));
- int lines = 0;
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
- tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
- ui->tableView_6->setModel(tableview);
- ui->tableView_11->setModel(tableview);
- ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
- }
- if(ui->comboBox_radarType->currentIndex()==5){//模型202
- radarSigGen->SlotRadarGen(6);
- interceptRadarList[interceptRadarNum] = new interceptRadar();
- interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
- interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
- interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
- ui->lineEdit_sigType->setText(QString::fromStdString("相位编码"));
- ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
- ui->lineEdit_T->setText(QString::fromStdString("-"));
- ui->lineEdit_PRF->setText(QString::fromStdString("固定"));
- ui->lineEdit_BW->setText(QString::fromStdString("1us"));
- int lines = 0;
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
- tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
- ui->tableView_6->setModel(tableview);
- ui->tableView_11->setModel(tableview);
- ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
- }
- if(ui->comboBox_radarType->currentIndex()==6){//模型203
- radarSigGen->SlotRadarGen(7);
- interceptRadarList[interceptRadarNum] = new interceptRadar();
- interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
- interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
- interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
- ui->lineEdit_sigType->setText(QString::fromStdString("相位编码"));
- ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
- ui->lineEdit_T->setText(QString::fromStdString("-"));
- ui->lineEdit_PRF->setText(QString::fromStdString("固定"));
- ui->lineEdit_BW->setText(QString::fromStdString("0.5us"));
- int lines = 0;
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
- tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
- ui->tableView_6->setModel(tableview);
- ui->tableView_11->setModel(tableview);
- ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
- }
- if(ui->comboBox_radarType->currentIndex()==7){//模型301
- radarSigGen->SlotRadarGen(8);
- interceptRadarList[interceptRadarNum] = new interceptRadar();
- interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
- interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
- interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
- ui->lineEdit_sigType->setText(QString::fromStdString("线性调频"));
- ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
- ui->lineEdit_T->setText(QString::fromStdString("1GHz"));
- ui->lineEdit_PRF->setText(QString::fromStdString("抖动"));
- ui->lineEdit_BW->setText(QString::fromStdString("1us"));
- int lines = 0;
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
- tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
- ui->tableView_6->setModel(tableview);
- ui->tableView_11->setModel(tableview);
- ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
- }
- if(ui->comboBox_radarType->currentIndex()==8){//模型302
- radarSigGen->SlotRadarGen(9);
- interceptRadarList[interceptRadarNum] = new interceptRadar();
- interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
- interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
- interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
- ui->lineEdit_sigType->setText(QString::fromStdString("线性调频"));
- ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
- ui->lineEdit_T->setText(QString::fromStdString("1GHz"));
- ui->lineEdit_PRF->setText(QString::fromStdString("固定"));
- ui->lineEdit_BW->setText(QString::fromStdString("1us"));
- int lines = 0;
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
- tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
- ui->tableView_6->setModel(tableview);
- ui->tableView_11->setModel(tableview);
- ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
- }
- if(ui->comboBox_radarType->currentIndex()==9){//模型303
- radarSigGen->SlotRadarGen(10);
- interceptRadarList[interceptRadarNum] = new interceptRadar();
- interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
- interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
- interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
- ui->lineEdit_sigType->setText(QString::fromStdString("线性调频"));
- ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
- ui->lineEdit_T->setText(QString::fromStdString("500MHz"));
- ui->lineEdit_PRF->setText(QString::fromStdString("固定"));
- ui->lineEdit_BW->setText(QString::fromStdString("0.5us"));
- int lines = 0;
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
- tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
- ui->tableView_6->setModel(tableview);
- ui->tableView_11->setModel(tableview);
- ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
- }
- if(ui->comboBox_radarType->currentIndex()==10){//模型401
- radarSigGen->SlotRadarGen(11);
- interceptRadarList[interceptRadarNum] = new interceptRadar();
- interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
- interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
- interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
- ui->lineEdit_sigType->setText(QString::fromStdString("调频连续"));
- ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
- ui->lineEdit_T->setText(QString::fromStdString("1GHz"));
- ui->lineEdit_PRF->setText(QString::fromStdString("抖动"));
- ui->lineEdit_BW->setText(QString::fromStdString("1us"));
- int lines = 0;
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
- tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
- ui->tableView_6->setModel(tableview);
- ui->tableView_11->setModel(tableview);
- ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
- }
- if(ui->comboBox_radarType->currentIndex()==11){//模型402
- radarSigGen->SlotRadarGen(12);
- interceptRadarList[interceptRadarNum] = new interceptRadar();
- interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
- interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
- interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
- ui->lineEdit_sigType->setText(QString::fromStdString("调频连续"));
- ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
- ui->lineEdit_T->setText(QString::fromStdString("1GHz"));
- ui->lineEdit_PRF->setText(QString::fromStdString("固定"));
- ui->lineEdit_BW->setText(QString::fromStdString("1us"));
- int lines = 0;
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
- tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
- ui->tableView_6->setModel(tableview);
- ui->tableView_11->setModel(tableview);
- ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
- }
- if(ui->comboBox_radarType->currentIndex()==12){//模型403
- radarSigGen->SlotRadarGen(13);
- interceptRadarList[interceptRadarNum] = new interceptRadar();
- interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
- interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
- interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
- ui->lineEdit_sigType->setText(QString::fromStdString("调频连续"));
- ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
- ui->lineEdit_T->setText(QString::fromStdString("500MHz"));
- ui->lineEdit_PRF->setText(QString::fromStdString("固定"));
- ui->lineEdit_BW->setText(QString::fromStdString("0.5us"));
- int lines = 0;
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
- tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
- tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
- ui->tableView_6->setModel(tableview);
- ui->tableView_11->setModel(tableview);
- ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
- }
- }
|