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 /****************************************************************************
00017 ** ui.h extension file, included from the uic-generated form implementation.
00018 **
00019 ** If you wish to add, delete or rename slots use Qt Designer which will
00020 ** update this file, preserving your code. Create an init() slot in place of
00021 ** a constructor, and a destroy() slot in place of a destructor.
00022 *****************************************************************************/
00023
00024 void TGo4MainUserPanel::destroy()
00025 {
00026
00027 }
00028
00029 void TGo4MainUserPanel::init()
00030 {
00031 /*
00032 * Set the Name (Caption) of the UserPanel
00033 */
00034 setCaption( trUtf8( "Go4MainUserPanel" ) );
00035 fxTGo4GUIRegistry = TGo4GUIRegistry::Instance();
00036 }
00037
00038 void TGo4MainUserPanel::ActionUser1()
00039 {
00040 TGo4UserWidget1 *fxTGo4UserWidget1= new TGo4UserWidget1();
00041 fxTGo4UserWidget1->show();
00042 //this will creat the new widget as a top level widget
00043 }
00044
00045
00046 void TGo4MainUserPanel::ActionUser2()
00047 {
00048
00049
00050 TGo4UserWidget1 *fxTGo4UserWidget1= new TGo4UserWidget1(fxTGo4GUIRegistry->GetCentralWindow());
00051 fxTGo4UserWidget1->show();
00052 //this will create a widget inside the Go4 workspace
00053
00054
00055 }
00056
00057
00058 void TGo4MainUserPanel::ActionUser3()
00059 {
00060 TGo4AdvancedUserWidget *userwidget;
00061 // check if widget is already existing. advanced user widget is unique instance.
00062 // constructor of userwidget will register userslots in gui registry
00063 // destructor of userwidget will unregister its slots
00064 TGo4AdvancedUserWidgetSlots* userslots= dynamic_cast <TGo4AdvancedUserWidgetSlots*> (fxTGo4GUIRegistry->GetSlotClass("TGo4AdvancedUserWidgetSlots"));
00065 if(userslots==0)
00066 {
00067 userwidget=new TGo4AdvancedUserWidget(fxTGo4GUIRegistry->GetCentralWindow());
00068 }
00069 else
00070 {
00071 userwidget = dynamic_cast <TGo4AdvancedUserWidget *> (fxTGo4GUIRegistry->GetGUIClass(userslots));
00072 if (userwidget==0)
00073 userwidget=new TGo4AdvancedUserWidget(fxTGo4GUIRegistry->GetCentralWindow());
00074 }
00075 userwidget->show();
00076 }
00077
00078 //----------------------------END OF GO4 SOURCE FILE ---------------------
1.2.15