mainwindow.cpp 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. #include "mainwindow.h"
  2. #include "ui_mainwindow.h"
  3. MainWindow::MainWindow(QWidget *parent)
  4. : QMainWindow(parent)
  5. , ui(new Ui::MainWindow)
  6. {
  7. ui->setupUi(this);
  8. this->setWindowTitle("蓝方模型创建及雷达信号模拟生成软件");
  9. //radarServer = new RadarServer(this, 1234);
  10. radarServerThread = new QThread(this);
  11. radarSigGenThread = new QThread(this);
  12. tableview = new QStandardItemModel;
  13. tableview->setHorizontalHeaderItem(0,new QStandardItem("雷达编号"));
  14. tableview->setHorizontalHeaderItem(1,new QStandardItem("模型编号"));
  15. tableview->setHorizontalHeaderItem(2,new QStandardItem("信号类型"));
  16. tableview->setHorizontalHeaderItem(3,new QStandardItem("载波频率"));
  17. tableview->setHorizontalHeaderItem(4,new QStandardItem("PRF模式"));
  18. tableview->setHorizontalHeaderItem(5,new QStandardItem("脉内调制带宽"));
  19. rows = 0;
  20. radarServer = new RadarServer();
  21. radarSigGen = new RadarSigGen();
  22. radarServer->moveToThread(radarServerThread);
  23. radarSigGen->moveToThread(radarSigGenThread);
  24. connect(radarServer,SIGNAL(SigRadarGen(int)),radarSigGen,SLOT(SlotRadarGen(int)));
  25. radarServerThread->start();
  26. radarSigGenThread->start();
  27. ui->lineEdit_sigType->setText(QString::fromStdString("相位编码"));
  28. ui->lineEdit_fc->setText(QString::number(1e9,'f',2));
  29. ui->lineEdit_T->setText(QString::number(5e-6,'f',6));
  30. ui->lineEdit_PRF->setText(QString::number(1/(20e6),'f',8));
  31. ui->lineEdit_BW->setText(QString::number(20e6,'f',2));
  32. simDisplay = new SimDisplay(this);
  33. ui->lineEdit_sigType->setDisabled(true);
  34. ui->lineEdit_fc->setDisabled(true);
  35. ui->lineEdit_T->setDisabled(true);
  36. ui->lineEdit_PRF->setDisabled(true);
  37. ui->lineEdit_BW->setDisabled(true);
  38. xAxis = new QValueAxis;
  39. xAxis->setLabelFormat("%i");
  40. xAxis->setTitleText("Time");
  41. MyChart.addAxis(xAxis, Qt::AlignBottom);
  42. MyChart.setTitle(QString::fromStdString("信号生成预览"));
  43. yAxis = new QValueAxis;
  44. yAxis->setTitleText("Signal Value");
  45. MyChart.addAxis(yAxis, Qt::AlignLeft);
  46. }
  47. MainWindow::~MainWindow()
  48. {
  49. delete ui;
  50. }
  51. void MainWindow::on_pushButton_42_clicked()
  52. {
  53. simDisplay->show();
  54. simDisplay->setModal(true);
  55. }
  56. void MainWindow::on_comboBox_radarType_currentIndexChanged(const QString &arg1)
  57. {
  58. }
  59. void MainWindow::on_pushButton_5_clicked()
  60. {
  61. // 1.获取画布
  62. std::string chooseIndex = ui->comboBox_28->currentText().toStdString();
  63. MyChartView = ui->SimShow;
  64. MyChart.removeAllSeries();
  65. // MyLineSeries.attachAxis(MyAxisX);
  66. // MyLineSeries.attachAxis(MyAxisY);
  67. double *currentSig;
  68. for(int i=0;i<interceptRadarNum;i++)
  69. {
  70. if(chooseIndex==interceptRadarList[i]->getIndex()){
  71. currentSig = interceptRadarList[i]->getSig();
  72. len = interceptRadarList[i]->getLen();
  73. }
  74. }
  75. qDebug()<<len;
  76. // 3.给序列对象添加数据
  77. // QVector<QPointF> MyPointf ;
  78. QLineSeries *MyLineSeries = new QLineSeries();
  79. for (int i = 0; i < (int)len; i++) {
  80. MyLineSeries->append(i, currentSig[i]);
  81. }
  82. // for(int i = 0; i < 100000; i ++)
  83. // {
  84. // MyPointf << QPointF(i,currentSig[i]);
  85. // }
  86. // MyLineSeries.replace(MyPointf);
  87. MyChart.addSeries(MyLineSeries);
  88. MyLineSeries->attachAxis(xAxis);
  89. // Set up the Y axis
  90. MyLineSeries->attachAxis(yAxis);
  91. // MyLineSeries.attachAxis(&MyAxisX);
  92. // MyLineSeries.attachAxis(&MyAxisY);
  93. MyChartView->setRenderHint(QPainter::Antialiasing);
  94. MyChartView->setRubberBand(QChartView::RectangleRubberBand);
  95. MyChartView->setDragMode(QGraphicsView::ScrollHandDrag);
  96. MyChartView->setChart(&MyChart);
  97. }
  98. void MainWindow::on_CreateInterceptRadarButton_clicked()
  99. {
  100. if(ui->comboBox_radarType->currentIndex()==0){//模型001
  101. radarSigGen->SlotRadarGen(1);
  102. interceptRadarList[interceptRadarNum] = new interceptRadar();
  103. interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
  104. interceptRadarList[interceptRadarNum]->setLen(400000);
  105. interceptRadarList[interceptRadarNum]->setFs(*(radarSigGen->fs));
  106. qDebug()<<*(radarSigGen->len);
  107. interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
  108. ui->lineEdit_sigType->setText(QString::fromStdString("相位编码"));
  109. ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
  110. ui->lineEdit_T->setText(QString::fromStdString("-"));
  111. ui->lineEdit_PRF->setText(QString::fromStdString("抖动"));
  112. ui->lineEdit_BW->setText(QString::fromStdString("1us"));
  113. int lines = 0;
  114. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
  115. tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
  116. tableview->setItem(rows, lines++, new QStandardItem("相位编码"));
  117. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
  118. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
  119. tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
  120. ui->tableView_6->setModel(tableview);
  121. ui->tableView_11->setModel(tableview);
  122. ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
  123. }
  124. if(ui->comboBox_radarType->currentIndex()==1){//模型101
  125. radarSigGen->SlotRadarGen(2);
  126. interceptRadarList[interceptRadarNum] = new interceptRadar();
  127. interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
  128. interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
  129. interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
  130. ui->lineEdit_sigType->setText(QString::fromStdString("矩形脉冲"));
  131. ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
  132. ui->lineEdit_T->setText(QString::fromStdString("-"));
  133. ui->lineEdit_PRF->setText(QString::fromStdString("抖动"));
  134. ui->lineEdit_BW->setText(QString::fromStdString("1us"));
  135. int lines = 0;
  136. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
  137. tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
  138. tableview->setItem(rows, lines++, new QStandardItem("矩形脉冲"));
  139. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
  140. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
  141. tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
  142. ui->tableView_6->setModel(tableview);
  143. ui->tableView_11->setModel(tableview);
  144. ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
  145. }
  146. if(ui->comboBox_radarType->currentIndex()==2){//模型102
  147. radarSigGen->SlotRadarGen(3);
  148. interceptRadarList[interceptRadarNum] = new interceptRadar();
  149. interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
  150. interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
  151. interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
  152. ui->lineEdit_sigType->setText(QString::fromStdString("矩形脉冲"));
  153. ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
  154. ui->lineEdit_T->setText(QString::fromStdString("-"));
  155. ui->lineEdit_PRF->setText(QString::fromStdString("固定"));
  156. ui->lineEdit_BW->setText(QString::fromStdString("1us"));
  157. int lines = 0;
  158. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
  159. tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
  160. tableview->setItem(rows, lines++, new QStandardItem("矩形脉冲"));
  161. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
  162. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
  163. tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
  164. ui->tableView_6->setModel(tableview);
  165. ui->tableView_11->setModel(tableview);
  166. ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
  167. }
  168. if(ui->comboBox_radarType->currentIndex()==3){//模型103
  169. radarSigGen->SlotRadarGen(4);
  170. interceptRadarList[interceptRadarNum] = new interceptRadar();
  171. interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
  172. interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
  173. interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
  174. ui->lineEdit_sigType->setText(QString::fromStdString("矩形脉冲"));
  175. ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
  176. ui->lineEdit_T->setText(QString::fromStdString("-"));
  177. ui->lineEdit_PRF->setText(QString::fromStdString("固定"));
  178. ui->lineEdit_BW->setText(QString::fromStdString("0.5us"));
  179. int lines = 0;
  180. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
  181. tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
  182. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
  183. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
  184. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
  185. tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
  186. ui->tableView_6->setModel(tableview);
  187. ui->tableView_11->setModel(tableview);
  188. ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
  189. }
  190. if(ui->comboBox_radarType->currentIndex()==4){//模型201
  191. radarSigGen->SlotRadarGen(5);
  192. interceptRadarList[interceptRadarNum] = new interceptRadar();
  193. interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
  194. interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
  195. interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
  196. ui->lineEdit_sigType->setText(QString::fromStdString("相位编码"));
  197. ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
  198. ui->lineEdit_T->setText(QString::fromStdString("-"));
  199. ui->lineEdit_PRF->setText(QString::fromStdString("抖动"));
  200. ui->lineEdit_BW->setText(QString::fromStdString("1us"));
  201. int lines = 0;
  202. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
  203. tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
  204. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
  205. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
  206. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
  207. tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
  208. ui->tableView_6->setModel(tableview);
  209. ui->tableView_11->setModel(tableview);
  210. ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
  211. }
  212. if(ui->comboBox_radarType->currentIndex()==5){//模型202
  213. radarSigGen->SlotRadarGen(6);
  214. interceptRadarList[interceptRadarNum] = new interceptRadar();
  215. interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
  216. interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
  217. interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
  218. ui->lineEdit_sigType->setText(QString::fromStdString("相位编码"));
  219. ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
  220. ui->lineEdit_T->setText(QString::fromStdString("-"));
  221. ui->lineEdit_PRF->setText(QString::fromStdString("固定"));
  222. ui->lineEdit_BW->setText(QString::fromStdString("1us"));
  223. int lines = 0;
  224. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
  225. tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
  226. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
  227. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
  228. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
  229. tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
  230. ui->tableView_6->setModel(tableview);
  231. ui->tableView_11->setModel(tableview);
  232. ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
  233. }
  234. if(ui->comboBox_radarType->currentIndex()==6){//模型203
  235. radarSigGen->SlotRadarGen(7);
  236. interceptRadarList[interceptRadarNum] = new interceptRadar();
  237. interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
  238. interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
  239. interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
  240. ui->lineEdit_sigType->setText(QString::fromStdString("相位编码"));
  241. ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
  242. ui->lineEdit_T->setText(QString::fromStdString("-"));
  243. ui->lineEdit_PRF->setText(QString::fromStdString("固定"));
  244. ui->lineEdit_BW->setText(QString::fromStdString("0.5us"));
  245. int lines = 0;
  246. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
  247. tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
  248. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
  249. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
  250. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
  251. tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
  252. ui->tableView_6->setModel(tableview);
  253. ui->tableView_11->setModel(tableview);
  254. ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
  255. }
  256. if(ui->comboBox_radarType->currentIndex()==7){//模型301
  257. radarSigGen->SlotRadarGen(8);
  258. interceptRadarList[interceptRadarNum] = new interceptRadar();
  259. interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
  260. interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
  261. interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
  262. ui->lineEdit_sigType->setText(QString::fromStdString("线性调频"));
  263. ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
  264. ui->lineEdit_T->setText(QString::fromStdString("1GHz"));
  265. ui->lineEdit_PRF->setText(QString::fromStdString("抖动"));
  266. ui->lineEdit_BW->setText(QString::fromStdString("1us"));
  267. int lines = 0;
  268. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
  269. tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
  270. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
  271. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
  272. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
  273. tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
  274. ui->tableView_6->setModel(tableview);
  275. ui->tableView_11->setModel(tableview);
  276. ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
  277. }
  278. if(ui->comboBox_radarType->currentIndex()==8){//模型302
  279. radarSigGen->SlotRadarGen(9);
  280. interceptRadarList[interceptRadarNum] = new interceptRadar();
  281. interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
  282. interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
  283. interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
  284. ui->lineEdit_sigType->setText(QString::fromStdString("线性调频"));
  285. ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
  286. ui->lineEdit_T->setText(QString::fromStdString("1GHz"));
  287. ui->lineEdit_PRF->setText(QString::fromStdString("固定"));
  288. ui->lineEdit_BW->setText(QString::fromStdString("1us"));
  289. int lines = 0;
  290. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
  291. tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
  292. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
  293. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
  294. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
  295. tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
  296. ui->tableView_6->setModel(tableview);
  297. ui->tableView_11->setModel(tableview);
  298. ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
  299. }
  300. if(ui->comboBox_radarType->currentIndex()==9){//模型303
  301. radarSigGen->SlotRadarGen(10);
  302. interceptRadarList[interceptRadarNum] = new interceptRadar();
  303. interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
  304. interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
  305. interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
  306. ui->lineEdit_sigType->setText(QString::fromStdString("线性调频"));
  307. ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
  308. ui->lineEdit_T->setText(QString::fromStdString("500MHz"));
  309. ui->lineEdit_PRF->setText(QString::fromStdString("固定"));
  310. ui->lineEdit_BW->setText(QString::fromStdString("0.5us"));
  311. int lines = 0;
  312. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
  313. tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
  314. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
  315. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
  316. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
  317. tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
  318. ui->tableView_6->setModel(tableview);
  319. ui->tableView_11->setModel(tableview);
  320. ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
  321. }
  322. if(ui->comboBox_radarType->currentIndex()==10){//模型401
  323. radarSigGen->SlotRadarGen(11);
  324. interceptRadarList[interceptRadarNum] = new interceptRadar();
  325. interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
  326. interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
  327. interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
  328. ui->lineEdit_sigType->setText(QString::fromStdString("调频连续"));
  329. ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
  330. ui->lineEdit_T->setText(QString::fromStdString("1GHz"));
  331. ui->lineEdit_PRF->setText(QString::fromStdString("抖动"));
  332. ui->lineEdit_BW->setText(QString::fromStdString("1us"));
  333. int lines = 0;
  334. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
  335. tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
  336. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
  337. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
  338. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
  339. tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
  340. ui->tableView_6->setModel(tableview);
  341. ui->tableView_11->setModel(tableview);
  342. ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
  343. }
  344. if(ui->comboBox_radarType->currentIndex()==11){//模型402
  345. radarSigGen->SlotRadarGen(12);
  346. interceptRadarList[interceptRadarNum] = new interceptRadar();
  347. interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
  348. interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
  349. interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
  350. ui->lineEdit_sigType->setText(QString::fromStdString("调频连续"));
  351. ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
  352. ui->lineEdit_T->setText(QString::fromStdString("1GHz"));
  353. ui->lineEdit_PRF->setText(QString::fromStdString("固定"));
  354. ui->lineEdit_BW->setText(QString::fromStdString("1us"));
  355. int lines = 0;
  356. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
  357. tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
  358. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
  359. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
  360. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
  361. tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
  362. ui->tableView_6->setModel(tableview);
  363. ui->tableView_11->setModel(tableview);
  364. ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
  365. }
  366. if(ui->comboBox_radarType->currentIndex()==12){//模型403
  367. radarSigGen->SlotRadarGen(13);
  368. interceptRadarList[interceptRadarNum] = new interceptRadar();
  369. interceptRadarList[interceptRadarNum]->setIndex(ui->lineEdit_interceptRadarId->text().toStdString());
  370. interceptRadarList[interceptRadarNum]->setLen(*(radarSigGen->len));
  371. interceptRadarList[interceptRadarNum++]->setSig(radarSigGen->sig);
  372. ui->lineEdit_sigType->setText(QString::fromStdString("调频连续"));
  373. ui->lineEdit_fc->setText(QString::fromStdString("9.5GHz"));
  374. ui->lineEdit_T->setText(QString::fromStdString("500MHz"));
  375. ui->lineEdit_PRF->setText(QString::fromStdString("固定"));
  376. ui->lineEdit_BW->setText(QString::fromStdString("0.5us"));
  377. int lines = 0;
  378. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_interceptRadarId->text()));
  379. tableview->setItem(rows, lines++, new QStandardItem(ui->comboBox_radarType->currentText()));
  380. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_sigType->text()));
  381. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_fc->text()));
  382. tableview->setItem(rows, lines++, new QStandardItem(ui->lineEdit_PRF->text()));
  383. tableview->setItem(rows++, lines++, new QStandardItem(ui->lineEdit_BW->text()));
  384. ui->tableView_6->setModel(tableview);
  385. ui->tableView_11->setModel(tableview);
  386. ui->comboBox_28->addItem(ui->lineEdit_interceptRadarId->text());
  387. }
  388. }