Changeset 10560 for trunk/FACT++
- Timestamp:
- 05/04/11 13:47:19 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r10556 r10560 340 340 DimStampedInfo fDimFtmDynamicData; 341 341 342 vector<DimInfo*> fDim;343 342 map<string, DimInfo*> fServices; 344 343 … … 652 651 // ======================= DNS ========================================== 653 652 654 void handleDimDNS(int version) 655 { 653 void handleDimDNS(const DimData &d) 654 { 655 const int version = d.get<unsigned int>(); 656 656 657 ostringstream str; 657 658 str << "V" << version/100 << 'r' << version%100; … … 762 763 763 764 fLoggerFilenameNight->setEnabled(connected); 764 if (connected) 765 fLoggerFilenameNight->setText(d.c_str()+4); 765 if (!connected) 766 return; 767 768 fLoggerFilenameNight->setText(d.c_str()+4); 766 769 767 770 const uint32_t files = d.get<uint32_t>(); … … 788 791 789 792 fLoggerFilenameRun->setEnabled(connected); 790 if (connected) 791 fLoggerFilenameRun->setText(d.c_str()+4); 793 if (!connected) 794 return; 795 796 fLoggerFilenameRun->setText(d.c_str()+4); 792 797 793 798 const uint32_t files = d.get<uint32_t>(); … … 1284 1289 // ====================== Dim infoHandler================================ 1285 1290 1286 void handleDimInfo(const DimData &d)1287 {1288 if (d.info==&fDimDNS)1289 return handleDimDNS(d.get<unsigned int>());1290 1291 cout << "HandleDimInfo " << d.name << endl;1292 1293 if (d.info==&fDimLoggerStats)1294 return handleLoggerStats(d);1295 1296 if (d.info==&fDimLoggerFilenameNight)1297 return handleLoggerFilenameNight(d);1298 1299 if (d.info==&fDimLoggerNumSubs)1300 return handleLoggerNumSubs(d);1301 1302 if (d.info==&fDimLoggerFilenameRun)1303 return handleLoggerFilenameRun(d);1304 1305 if (d.info==&fDimFtmTriggerCounter)1306 return handleFtmTriggerCounter(d);1307 1308 if (d.info==&fDimFtmDynamicData)1309 return handleFtmDynamicData(d);1310 1311 if (d.info==&fDimFtmPassport)1312 return handleFtmPassport(d);1313 1314 if (d.info==&fDimFtmFtuList)1315 return handleFtmFtuList(d);1316 1317 if (d.info==&fDimFtmStaticData)1318 return handleFtmStaticData(d);1319 1320 if (d.info==&fDimFtmError)1321 return handleFtmError(d);1322 }1323 1324 1291 void handleDimService(const string &txt) 1325 1292 { 1326 1293 fDimSvcText->append(txt.c_str()); 1327 1294 } 1328 1329 1295 1330 1296 void infoHandlerService(DimInfo &info) … … 1380 1346 } 1381 1347 1348 void PostInfoHandler(void (FactGui::*handler)(const DimData&)) 1349 { 1350 QApplication::postEvent(this, 1351 new FunctionEvent(boost::bind(handler, this, DimData(getInfo())))); 1352 } 1353 1382 1354 void infoHandler() 1383 1355 { … … 1385 1357 getInfo()->getTimestamp(); 1386 1358 1387 if (std::find(fDim.begin(), fDim.end(), getInfo())!=fDim.end()) 1388 { 1389 QApplication::postEvent(this, 1390 new FunctionEvent(boost::bind(&FactGui::handleDimInfo, this, DimData(getInfo())))); 1391 return; 1392 } 1359 if (getInfo()==&fDimDNS) 1360 return PostInfoHandler(&FactGui::handleDimDNS); 1361 1362 cout << "HandleDimInfo " << getInfo()->getName() << endl; 1363 1364 if (getInfo()==&fDimLoggerStats) 1365 return PostInfoHandler(&FactGui::handleLoggerStats); 1366 1367 if (getInfo()==&fDimLoggerFilenameNight) 1368 return PostInfoHandler(&FactGui::handleLoggerFilenameNight); 1369 1370 if (getInfo()==&fDimLoggerNumSubs) 1371 return PostInfoHandler(&FactGui::handleLoggerNumSubs); 1372 1373 if (getInfo()==&fDimLoggerFilenameRun) 1374 { 1375 return PostInfoHandler(&FactGui::handleLoggerFilenameRun); 1376 1377 if (getInfo()==&fDimFtmTriggerCounter) 1378 { 1379 return PostInfoHandler(&FactGui::handleFtmTriggerCounter); 1380 1381 if (getInfo()==&fDimFtmDynamicData) 1382 return PostInfoHandler(&FactGui::handleFtmDynamicData); 1383 1384 if (getInfo()==&fDimFtmPassport) 1385 return PostInfoHandler(&FactGui::handleFtmPassport); 1386 1387 if (getInfo()==&fDimFtmFtuList) 1388 return PostInfoHandler(&FactGui::handleFtmFtuList); 1389 1390 if (getInfo()==&fDimFtmStaticData) 1391 return PostInfoHandler(&FactGui::handleFtmStaticData); 1392 1393 if (getInfo()==&fDimFtmError) 1394 return PostInfoHandler(&FactGui::handleFtmError); 1393 1395 1394 1396 for (map<string,DimInfo*>::iterator i=fServices.begin(); i!=fServices.end(); i++) … … 1604 1606 DimClient::sendCommand("CHAT/MSG", "GUI online."); 1605 1607 // + MessageDimRX 1606 1607 fDim.push_back(&fDimFtmDynamicData);1608 fDim.push_back(&fDimFtmTriggerCounter);1609 fDim.push_back(&fDimFtmStaticData);1610 fDim.push_back(&fDimFtmFtuList);1611 fDim.push_back(&fDimFtmPassport);1612 fDim.push_back(&fDimFtmError);1613 fDim.push_back(&fDimLoggerStats);1614 fDim.push_back(&fDimLoggerFilenameNight);1615 fDim.push_back(&fDimLoggerFilenameRun);1616 fDim.push_back(&fDimLoggerNumSubs);1617 fDim.push_back(&fDimDNS);1618 1608 1619 1609 // --------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.