Changeset 221 for Evidence/Edd
Legend:
- Unmodified
- Added
- Removed
-
Evidence
- Property svn:ignore
-
old new 2 2 Config 3 3 DColl 4 Bridge 5 History
-
- Property svn:ignore
-
Evidence/Edd/Edd.cc
r216 r221 73 73 ShowAsTime = false; 74 74 setFrame(false); 75 setAttribute(Qt::WA_DeleteOnClose); 75 76 76 77 // Connect to DIM handler … … 1145 1146 1146 1147 QGridLayout *Layout = new QGridLayout(this); 1148 setAttribute(Qt::WA_DeleteOnClose); 1147 1149 1148 1150 // Status display … … 1171 1173 1172 1174 QGridLayout *Layout = new QGridLayout(this); 1175 setAttribute(Qt::WA_DeleteOnClose); 1173 1176 EddLineDisplay *Line; 1174 1177 … … 1203 1206 TP_Feedback::TP_Feedback() { 1204 1207 1208 setAttribute(Qt::WA_DeleteOnClose); 1205 1209 QGridLayout *Layout = new QGridLayout(this); 1206 1210 EddLineDisplay *Line; … … 1237 1241 void TP_Feedback::FeedbackDetails() { 1238 1242 1243 setAttribute(Qt::WA_DeleteOnClose); 1239 1244 EddLineDisplay *Line; 1240 1245 QWidget *Widget = new QWidget(); … … 1257 1262 TP_DAQ::TP_DAQ() { 1258 1263 1264 setAttribute(Qt::WA_DeleteOnClose); 1259 1265 QGridLayout *Layout = new QGridLayout(this); 1260 1266 … … 1403 1409 TP_Evidence::TP_Evidence() { 1404 1410 1411 setAttribute(Qt::WA_DeleteOnClose); 1405 1412 QGridLayout *Layout = new QGridLayout(this); 1406 1413 EddLineDisplay *Line; … … 1473 1480 setCentralWidget(Central); 1474 1481 setStatusBar(new QStatusBar(this)); 1475 setGeometry(100, 100, 800, 650);1476 1482 setWindowTitle("Edd - Evidence Data Display"); 1477 1483 1478 1484 // Arrangement in tabs 1479 1485 TabWidget = new QTabWidget(Central); 1486 TabWidget->setTabsClosable(true); 1487 connect(TabWidget, SIGNAL(tabCloseRequested(int)), SLOT(DetachTab(int))); 1480 1488 TabWidget->addTab(new TP_DAQ, "Event scope"); 1481 TabWidget->addTab(new TP_Bias, " &Bias");1482 TabWidget->addTab(new TP_Feedback, " &Feedback");1483 TabWidget->addTab(new TP_Environment, " &Environment");1489 TabWidget->addTab(new TP_Bias, "Bias"); 1490 TabWidget->addTab(new TP_Feedback, "Feedback"); 1491 TabWidget->addTab(new TP_Environment, "Environment"); 1484 1492 TabWidget->addTab(new TP_Evidence, "Evidence"); 1485 1493 … … 1494 1502 1495 1503 // Show main window 1504 resize(TabWidget->sizeHint()*1.1); 1496 1505 show(); 1497 1506 } … … 1540 1549 } 1541 1550 1551 // Open tab as separate window 1552 void GUI::DetachTab(int Tab) { 1553 1554 QWidget *W = NULL; 1555 QMainWindow *M = new QMainWindow; 1556 1557 M->setCentralWidget(new QWidget(M)); 1558 M->setStatusBar(new QStatusBar(M)); 1559 1560 switch(Tab) { 1561 case 0: W = new TP_DAQ; break; 1562 case 1: W = new TP_Bias; break; 1563 case 2: W = new TP_Feedback; break; 1564 case 3: W = new TP_Environment; break; 1565 case 4: W = new TP_Evidence; break; 1566 default: break; 1567 } 1568 1569 if (W == NULL) { 1570 delete M->centralWidget(); 1571 delete M; 1572 return; 1573 } 1574 1575 W->setParent(M); 1576 M->resize(size()); 1577 M->setWindowTitle("Edd - " + TabWidget->tabText(Tab)); 1578 M->show(); 1579 } 1580 1542 1581 // Quit application when clicking close button on window 1543 1582 void GUI::closeEvent(QCloseEvent *) { -
Evidence/Edd/Edd.h
r216 r221 374 374 void MenuAbout(); 375 375 void MenuNewHistory(); 376 void DetachTab(int); 376 377 }; 377 378
Note:
See TracChangeset
for help on using the changeset viewer.