MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / load_channel_view_indexs

Method load_channel_view_indexs

DSView/pv/mainwindow.cpp:1118–1146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1116 }
1117
1118 void MainWindow::load_channel_view_indexs(QJsonDocument &doc)
1119 {
1120 QJsonObject sessionObj = doc.object();
1121
1122 int mode = _device_agent->get_work_mode();
1123 if (mode != LOGIC)
1124 return;
1125
1126 std::vector<int> view_indexs;
1127
1128 for (const QJsonValue &value : sessionObj["channel"].toArray()){
1129 QJsonObject obj = value.toObject();
1130
1131 if (obj.contains("view_index")){
1132 view_indexs.push_back(obj["view_index"].toInt());
1133 }
1134 }
1135
1136 if (view_indexs.size()){
1137 int i = 0;
1138
1139 for (auto s : _session->get_signals()){
1140 s->set_view_index(view_indexs[i]);
1141 i++;
1142 }
1143
1144 _view->update_all_trace_postion();
1145 }
1146 }
1147
1148 bool MainWindow::on_store_session(QString name)
1149 {

Callers

nothing calls this directly

Calls 4

get_work_modeMethod · 0.80
sizeMethod · 0.80
set_view_indexMethod · 0.80

Tested by

no test coverage detected