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

/Go4QtBaseWidgets/TGo4QFitterItem.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 "TGo4QFitterItem.h"
00017 
00018 #include "Go4Fit/TGo4Fitter.h"
00019 #include "Go4GUIRegistry/TGo4GUIRegistry.h"
00020 #include "Go4FitGUI/TGo4FitPanel.h"
00021 #include "Go4GUI/TGo4MainWindow.h"
00022 #include "Go4GUI/TGo4PreviewPanel.h"
00023 
00024 TGo4QFitterItem::TGo4QFitterItem( QListViewItem* parent, const QString & text, const QString & text1,  const QString & text2)
00025    : TGo4QDragDrop(parent, "fitter.png", text, text1, text2)
00026 {
00027 }
00028 
00029 TGo4QFitterItem::TGo4QFitterItem( QListView* parent, const QString & text, const QString & text1,  const QString & text2)
00030    : TGo4QDragDrop(parent, "fitter.png", text, text1, text2)
00031 {
00032 }
00033 
00034 TGo4QFitterItem::~TGo4QFitterItem()
00035 {
00036 }
00037 
00038 void TGo4QFitterItem::ItemDBkLocal()
00039 {
00040    TGo4FitPanel* fpanel = GetFitPanel();
00041    if (fpanel!=0)
00042       fpanel->ActivateByFitter(dynamic_cast<TGo4Fitter*>(GetWorkObject()));
00043 }
00044 
00045 
00046 TGo4FitPanel *TGo4QFitterItem::GetFitPanel()
00047 {
00048    TGo4MainWindow *fxPanel= dynamic_cast <TGo4MainWindow *> (fxTGo4GUIRegistry->GetMainWindow());
00049    TGo4FitPanel *FitPanel=fxPanel->FitPanelSlot();
00050    FitPanel->raise();
00051    FitPanel->show();
00052    return FitPanel;
00053 }
00054 
00055 
00056 void TGo4QFitterItem::DropAction(QWidget *Recvr)
00057 {
00058    TGo4PreviewPanel* panel = dynamic_cast<TGo4PreviewPanel *>(Recvr);
00059    if (panel==0) return;
00060    
00061    TGo4Fitter* fitter = dynamic_cast<TGo4Fitter*>(GetWorkObject());
00062    if (fitter==0) return;
00063    
00064    TGo4FitPanel* fpanel = GetFitPanel();
00065    if (fpanel!=0)
00066      fpanel->DropFitterOnPanel(fitter, panel);
00067 }
00068 
00069 //----------------------------END OF GO4 SOURCE FILE ---------------------

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