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

/Go4UserGUI/TGo4AdvancedUserWidgetSlots.cxx

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 "TGo4AdvancedUserWidgetSlots.h"
00017 
00018 #include "TGo4AdvancedUserWidget.h"
00019 #include "Go4CommandsAnalysis/TGo4ComGetObject.h"
00020 
00021 TGo4AdvancedUserWidgetSlots::TGo4AdvancedUserWidgetSlots(const char * name, const char * title,  TGo4AdvancedUserWidget * p)
00022                        :TGo4SlotsBaseClass(name , title), fxTGo4AdvancedUserWidget(p)
00023 {
00024    TGo4LockGuard Global;
00025    fxTGo4GUIRegistry = TGo4GUIRegistry::Instance();
00026     /*
00027      *   create a new Status object
00028      */
00029    fxTGo4AdvancedUserWidgetStatus= new TGo4AdvancedUserWidgetStatus("TGo4AdvancedUserWidgetStatus", "Status");
00030    /*
00031     *   register your three class to the registry
00032     */
00033    fxTGo4GUIRegistry->RegisterSlotClass(this, fxTGo4AdvancedUserWidgetStatus, p);
00034 
00035 }
00036 void TGo4AdvancedUserWidgetSlots::AddObject(TNamed *fxData)
00037 {
00038    /*
00039     * This method will be called from the Registry to deliver any object which were
00040     * requested from the analysis via SubmitCommand(Command, Name, reciver)
00041     */
00042 
00043    /*
00044     *    the fxData pointer will be deleted next time a new object is delivered!
00045     */
00046 
00047     fxTGo4AdvancedUserWidget->ObjectListAction(fxData->GetName());
00048 }
00049 
00050 void TGo4AdvancedUserWidgetSlots::SetGUI(TGo4AdvancedUserWidget *GUI)
00051 {
00052    /*
00053     *   this method can be used to set the Qt gui as a gui for this Slot (root object)
00054     *   it is usefull when you create applications tthat should work in background!
00055     */
00056 
00057    fxTGo4AdvancedUserWidget=GUI;
00058 }
00059 
00060 void TGo4AdvancedUserWidgetSlots::StatusChanged(TGo4Status *status)
00061 {
00062    TGo4LockGuard Global;
00063 
00064     /* if you use the dependent lists and mechanism in Go4
00065     *  you will need to impliment this method!
00066     */
00067 }
00068 
00069 TGo4AdvancedUserWidgetSlots::~TGo4AdvancedUserWidgetSlots()
00070 {
00071    TGo4LockGuard Global;
00072    delete fxTGo4AdvancedUserWidgetStatus;
00073 }
00074 
00075 TGo4Status * TGo4AdvancedUserWidgetSlots::GetStatus()
00076 {
00077    /*
00078     *it only returns the Status object of this Slot
00079     */
00080    return fxTGo4AdvancedUserWidgetStatus;
00081 }
00082 
00083 void TGo4AdvancedUserWidgetSlots::GetObjectAction(const char* Name)
00084 {
00085    TGo4LockGuard Global;
00086    /*
00087     *   Create the command to get the object
00088     */
00089    TGo4ComGetObject* com = new TGo4ComGetObject(Name);
00090 
00091    /*
00092     *   submit this command to the analysis
00093     */
00094    fxTGo4GUIRegistry->SubmitCommand(com,Name,this);
00095 }
00096 
00097 //----------------------------END OF GO4 SOURCE FILE ---------------------

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