Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4QtBaseWidgets/TGo4WorkSpace.cpp

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #include "TGo4WorkSpace.h"
00017 
00018 #include <iostream.h>
00019 
00020 TGo4WorkSpace::TGo4WorkSpace(QWidget *parent)
00021    :QWorkspace( parent), fbTerminating(false)
00022 {
00023 
00024  //     setWFlags(Qt::WType_TopLevel);
00025       setSizeIncrement( QSize( 100, 100 ) );
00026     setBaseSize( QSize( 100, 100 ) );
00027    fxActivePanel=0;
00028 
00029 }
00030 void TGo4WorkSpace::closeEvent( QCloseEvent * ce )
00031 {
00032     ce->accept();
00033     delete this;
00034 }
00035 TGo4WorkSpace::~TGo4WorkSpace()
00036 {
00037 fbTerminating=true;
00038 }
00039 
00040 void TGo4WorkSpace::NewViewPanel(TGo4PreviewPanel *View)
00041 {
00042 
00043       emit  newChild(View);
00044       fxActivePanel=View;
00045 }
00046 void TGo4WorkSpace::DelViewPanel(TGo4PreviewPanel *View)
00047 {
00048    if(!fbTerminating) // this check is necessary if workspace is being deleted before main window and has removed viewpanels itself
00049       {
00050          emit childRemoved(View);
00051          if(View == fxActivePanel) fxActivePanel=0;
00052       }
00053 }
00054 
00055 void TGo4WorkSpace::ViewPanelActivated(TGo4PreviewPanel *child)
00056 {
00057    if(child!=0){
00058          fxActivePanel= child;
00059    }
00060 }
00061 
00062 
00063 void TGo4WorkSpace::ActivePadChanged(TGo4PreviewPanel *fxView, TPad *Pad)
00064 {
00065    emit ActivePad(fxView,Pad);
00066 }
00067 
00068 void TGo4WorkSpace::PadClicked(TGo4PreviewPanel *view, TPad *pad)
00069 {
00070    emit PadMouseClick(view,pad);
00071 }
00072 
00073 bool TGo4WorkSpace::eventFilter( QObject *fx , QEvent* e )
00074 {
00075 //   int i=0;
00076    switch (e->type()){
00077       case QEvent::Move:  // Move
00078 //           cout << i++ <<"  QMoveEvent " << endl;
00079            return false ;
00080            break;
00081       case QEvent::Resize :  //Resize
00082 //           cout << i++ << " QResizeEvent " << endl;
00083            return false;
00084            break;
00085       case QEvent::Paint :  //Paint
00086 //           cout << i++ << " QPaintEvent " << endl;
00087            return false;
00088            break;
00089       default:
00090 //         cout << i++ << " TGo4WorkSpace::eventFilter  "  << e->type() << endl;
00091          return QWidget::eventFilter( fx , e );
00092          break;
00093 
00094      }
00095 
00096 
00097 
00098 }
00099 
00100 
00101 
00102 
00103 
00104 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:56:04 2005 for Go4-v2.10-5 by doxygen1.2.15