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

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

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