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

/Go4QtBaseWidgets/TGo4QParaItem.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 "TGo4QParaItem.h"
00017 
00018 #include "Go4CommandsAnalysis/TGo4ComGetParameter.h"
00019 #include "Go4GUIRegistry/TGo4GUIRegistry.h"
00020 #include "Go4GUI/TGo4ParaEditSlots.h"
00021 
00022 TGo4QParaItem::TGo4QParaItem( QListViewItem* parent, const QString & text, const QString & text1,  const QString & text2)
00023    :TGo4QItem (parent, "parameter.png", text, text1, text2)
00024 {
00025 }
00026 
00027 TGo4QParaItem::TGo4QParaItem( QListView* parent, const QString & text, const QString & text1,  const QString & text2)
00028    :TGo4QItem (parent, "parameter.png", text, text1, text2)
00029 {
00030 }
00031 
00032 TGo4QParaItem::~TGo4QParaItem(){}
00033 
00034 void TGo4QParaItem::ItemDBkRemote()
00035 {
00036    TGo4ParaEditSlots *fxTGo4ParaEditSlots=GetParaEditor();
00037    TGo4ComGetParameter* com = new TGo4ComGetParameter(text(0).data());
00038    fxTGo4GUIRegistry->SubmitCommand(com,  text(0).data(),fxTGo4ParaEditSlots);
00039 }
00040 void TGo4QParaItem::ItemDBkLocal()
00041 {
00042    TGo4ParaEditSlots *fxTGo4ParaEditSlots=GetParaEditor();
00043    fxTGo4ParaEditSlots->AddObject(dynamic_cast<TNamed*>(GetWorkObject()));
00044    
00045 /*   if(fxItemObject!=0){
00046       fxTGo4ParaEditSlots->AddObject((TNamed *)fxItemObject);
00047    }else if(fxObj!=0){
00048       fxTGo4ParaEditSlots->AddObject((TNamed *)fxObj);
00049    }else if(fxKey!=0){
00050       TObject *Obj=fxKey->ReadObj();
00051       fxTGo4ParaEditSlots->AddObject((TNamed *)Obj);
00052       SetFileObj(Obj);
00053    }
00054 */
00055 }
00056 
00057 
00058 TGo4ParaEditSlots *TGo4QParaItem::GetParaEditor()
00059 {
00060    char SlotName[256];
00061    snprintf(SlotName,255,"%s%s",text(0).data(),"_Slots" );
00062    TGo4ParaEditSlots *fxTGo4ParaEditSlots= dynamic_cast <TGo4ParaEditSlots *>
00063                            (fxTGo4GUIRegistry->GetSlotClass(SlotName));
00064    if(fxTGo4ParaEditSlots==0){
00065       fxTGo4ParaEditSlots = new TGo4ParaEditSlots(SlotName, "Parameter Editor");
00066    }
00067 
00068    return fxTGo4ParaEditSlots;
00069 
00070 }
00071 //----------------------------END OF GO4 SOURCE FILE ---------------------

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