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

void DCGuiApp::slotViewDock (  )  [private, slot]

dock the application

Definition at line 1520 of file dcgui.cpp.

References m_bTransferViewDockVisible, m_bTray, m_bWasMaximized, m_DesktopPosition, m_pTrayIcon, and pTransferViewDock.

Referenced by Dock(), initActions(), and slotTrayMenu().

{
      if ( !m_pTrayIcon )
      {
            QMessageBox::information(this, tr("Dock Application"), tr("The system tray icon must be enabled to dock the application."));
            return;
      }
      
      statusBar()->message(tr("Dock/Undock application..."));
      ///////////////////////////////////////////////////////////////////
      //dock/undock the application

      if ( m_bTray )
      {
            if ( m_bWasMaximized )
            {
                  showMaximized();
            }
            else
            {
                  show();
            }
            // show dcgui in front of any applications after undock
            raise();
            // restore desktop position
            move(m_DesktopPosition);

            // restore transferview settings
            if ( m_bTransferViewDockVisible )
            {
                  pTransferViewDock->show();
            }

            m_bTray = FALSE;
      }
      else
      {
            if ( isMinimized() )
            {
                  showNormal();
            }
            else
            {
                  // save old desktop position
                  m_DesktopPosition = pos();
                  // save old maximized status
                  m_bWasMaximized = isMaximized();
                  // hide application
                  hide();
            
                  m_bTray = TRUE;
            }
      }

      statusBar()->message(tr("Ready."));
}


Generated by  Doxygen 1.6.0   Back to index