Logo Search packages:      
Sourcecode: valknut version File versions  Download package

void DCGuiApp::initView (  )  [private]

initialize the mainview

Definition at line 654 of file dcgui.cpp.

References pTransferViewDock, pWorkspace, and slotWorkspaceWindowActivated().

Referenced by DCGuiApp().

{
      QVBox* view_back = new QVBox( this );
//    view_back->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
      pWorkspace = new QWorkspace( view_back );
      setCentralWidget(view_back);
      pWorkspace->showMaximized();
      
      connect( pWorkspace, SIGNAL(windowActivated(QWidget *)), this, SLOT(slotWorkspaceWindowActivated( QWidget *)) );

      setDockMenuEnabled(FALSE);

      // create update manager
      //new DCUpdateManager(pWorkspace,0,WDestructiveClose);
      //g_pUpdateManager->installEventFilter(this);
      //g_pUpdateManager->hide();
      //g_pUpdateManager->setEnabled(FALSE);
      g_pUpdateManager = 0;
      
      // create connection manager view
      new DCConnectionManager(pWorkspace,0,WDestructiveClose);
      g_pConnectionManager->installEventFilter(this);
      g_pConnectionManager->hide();
      g_pConnectionManager->setEnabled(FALSE);

      // create hublist manager view
      new DCHubListManager(pWorkspace,0,WDestructiveClose);
      g_pHubListManager->installEventFilter(this);
      g_pHubListManager->hide();
      g_pHubListManager->setEnabled(FALSE);

      // create dock window for transfer view
      pTransferViewDock = new QDockWindow( QDockWindow::InDock, this );
      pTransferViewDock->setCaption(tr("Transfer List"));
      pTransferViewDock->setResizeEnabled(TRUE);
      moveDockWindow(pTransferViewDock,Qt::DockBottom);
      pTransferViewDock->hide();

      // create transfer view
      new DCTransferView(pTransferViewDock,0,WDestructiveClose);
      g_pTransferView->SetWorkspace(pWorkspace);
      g_pTransferView->installEventFilter(this);

      pTransferViewDock->setWidget(g_pTransferView);

      // create multi hub search view
      new DCHubSearch(pWorkspace,0,WDestructiveClose);
      g_pHubSearch->installEventFilter(this);
      g_pHubSearch->hide();
      g_pHubSearch->setEnabled(FALSE);

      // create spy view
      new DCSpy(pWorkspace,0,WDestructiveClose);
      g_pSpy->installEventFilter(this);
      g_pSpy->hide();
      g_pSpy->setEnabled(FALSE);

      // create users view
      new DCUsersList(pWorkspace,0,WDestructiveClose);
      g_pUsersList->installEventFilter(this);
      g_pUsersList->hide();
      g_pUsersList->setEnabled(FALSE);

/*    if ( g_pConfig->GetMode() == ecmACTIVE )
      {
            CString error;
            if ( g_pTransferView->DLM_InitListen(error) == FALSE )
            {
                  QString s;
                  s = error.Data();

                  if ( s == "" )
                        s = tr("(no error message from socket)");
                  else
                        s = "(" + s + ")";

                  QMessageBox::critical( 0, "Valknut",
                  QString(tr("TCP listen failed, change to passive mode! ") + s));

                  g_pConfig->SetMode(ecmPASSIVE);
            }
      }
      */
}


Generated by  Doxygen 1.6.0   Back to index