Changeset 221 for Evidence/Edd


Ignore:
Timestamp:
06/07/10 15:00:41 (15 years ago)
Author:
ogrimm
Message:
Added Bridge server, History service separated from DColl
Location:
Evidence
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Evidence

    • Property svn:ignore
      •  

        old new  
        22Config
        33DColl
         4Bridge
         5History
  • Evidence/Edd/Edd.cc

    r216 r221  
    7373  ShowAsTime = false;
    7474  setFrame(false);
     75  setAttribute(Qt::WA_DeleteOnClose);
    7576 
    7677  // Connect to DIM handler
     
    11451146
    11461147  QGridLayout *Layout = new QGridLayout(this);
     1148  setAttribute(Qt::WA_DeleteOnClose);
    11471149
    11481150  // Status display
     
    11711173
    11721174  QGridLayout *Layout = new QGridLayout(this);
     1175  setAttribute(Qt::WA_DeleteOnClose);
    11731176  EddLineDisplay *Line;
    11741177 
     
    12031206TP_Feedback::TP_Feedback() {
    12041207
     1208  setAttribute(Qt::WA_DeleteOnClose);
    12051209  QGridLayout *Layout = new QGridLayout(this);
    12061210  EddLineDisplay *Line;
     
    12371241void TP_Feedback::FeedbackDetails() {
    12381242
     1243  setAttribute(Qt::WA_DeleteOnClose);
    12391244  EddLineDisplay *Line;
    12401245  QWidget *Widget = new QWidget();
     
    12571262TP_DAQ::TP_DAQ() {
    12581263
     1264  setAttribute(Qt::WA_DeleteOnClose);
    12591265  QGridLayout *Layout = new QGridLayout(this);
    12601266
     
    14031409TP_Evidence::TP_Evidence() {
    14041410
     1411  setAttribute(Qt::WA_DeleteOnClose);
    14051412  QGridLayout *Layout = new QGridLayout(this);
    14061413  EddLineDisplay *Line;
     
    14731480  setCentralWidget(Central);
    14741481  setStatusBar(new QStatusBar(this));
    1475   setGeometry(100, 100, 800, 650);
    14761482  setWindowTitle("Edd - Evidence Data Display");
    14771483
    14781484  // Arrangement in tabs
    14791485  TabWidget = new QTabWidget(Central);
     1486  TabWidget->setTabsClosable(true);
     1487  connect(TabWidget, SIGNAL(tabCloseRequested(int)), SLOT(DetachTab(int)));
    14801488  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");
    14841492  TabWidget->addTab(new TP_Evidence, "Evidence");
    14851493
     
    14941502
    14951503  // Show main window
     1504  resize(TabWidget->sizeHint()*1.1);
    14961505  show();
    14971506
     
    15401549}
    15411550
     1551// Open tab as separate window
     1552void 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
    15421581// Quit application when clicking close button on window
    15431582void GUI::closeEvent(QCloseEvent *) {
  • Evidence/Edd/Edd.h

    r216 r221  
    374374    void MenuAbout();
    375375    void MenuNewHistory();
     376        void DetachTab(int);
    376377};
    377378
Note: See TracChangeset for help on using the changeset viewer.