00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
00048
00049
00050
00051
00052
00053
00054
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