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

/Go4GUI/TGo4TreeViewer.ui.h

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 /****************************************************************************
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 void TGo4TreeViewer::CreateNewHist()
00024 {
00025      // TGo4LockGuard Global;
00026    TGo4MainWindow *fxMainWindow=(TGo4MainWindow *)fxTGo4GUIRegistry->GetMainWindow();
00027    fxMainWindow->CreateNewHist();
00028 }
00029 
00030 void TGo4TreeViewer::init()
00031 {
00032     // TGo4LockGuard glob;
00033     fxTGo4GUIRegistry = TGo4GUIRegistry::Instance();
00034     fxTGo4TreeViewerSlots = dynamic_cast <TGo4TreeViewerSlots *> (fxTGo4GUIRegistry->GetSlotClass("TGo4TreeViewerSlots"));
00035     if(fxTGo4TreeViewerSlots !=0) {
00036       fxTGo4TreeViewerSlots->SetGUI(this);
00037     }else{
00038       fxTGo4TreeViewerSlots = new TGo4TreeViewerSlots ("TGo4TreeViewerSlots", "Slots Class for Qt GUI", this);
00039     }
00040    fxTGo4TreeViewerStatus = dynamic_cast <TGo4TreeViewerStatus *> (fxTGo4TreeViewerSlots->GetStatus());
00041 }
00042 
00043 void TGo4TreeViewer::destroy()
00044 {
00045     fxTGo4TreeViewerSlots->SetGUI(0);
00046 }
00047 
00048 void TGo4TreeViewer::ClearTreeEditLines()
00049 {
00050     // TGo4LockGuard glob;
00051     X_LineEdit->clear();
00052     Y_LineEdit->clear();
00053     Z_LineEdit->clear();
00054     HisName_LineEdit->clear();
00055     cut_LineEdit->clear();
00056 }
00057 
00058 void TGo4TreeViewer::PlotTree()
00059 {
00060     // TGo4LockGuard glob;   
00061    QString histogramname=HisName_LineEdit->text();
00062    if(histogramname.isEmpty()) 
00063         histogramname=X_LineEdit->text()+Y_LineEdit->text()+Z_LineEdit->text(); 
00064    if( (X_LineEdit->IsRemoteDrop() && Y_LineEdit->text().isEmpty() && Z_LineEdit->text().isEmpty()) 
00065         || (X_LineEdit->IsRemoteDrop() && Y_LineEdit->IsRemoteDrop() && Z_LineEdit->text().isEmpty())  
00066         || (X_LineEdit->IsRemoteDrop() && Y_LineEdit->IsRemoteDrop() && Z_LineEdit->IsRemoteDrop())   )
00067         {
00069            QString theTree="";
00070            TGo4RemoteBrowserSlots* fxTGo4RemoteBrowserSlots = (TGo4RemoteBrowserSlots *) fxTGo4GUIRegistry->GetSlotClass("TGo4RemoteBrowserSlots");
00071            TGo4RemoteBrowser* fxTGo4RemoteBrowser = (TGo4RemoteBrowser *) fxTGo4GUIRegistry->GetGUIClass(fxTGo4RemoteBrowserSlots);
00072            QListViewItem* SelectedItem=fxTGo4RemoteBrowser->ListViewRemote->findItem(X_LineEdit->DropedString,0);
00073            if(SelectedItem==0) SelectedItem=fxTGo4RemoteBrowser->ListViewRemote->findItem(Y_LineEdit->DropedString,0);
00074            if(SelectedItem==0) SelectedItem=fxTGo4RemoteBrowser->ListViewRemote->findItem(Z_LineEdit->DropedString,0);
00075            while(SelectedItem!=0)
00076                {
00077                     if(dynamic_cast<TGo4QTreeItem *>(SelectedItem)!=0)
00078                         theTree=SelectedItem->text(0).data();
00079                     SelectedItem= SelectedItem->parent();
00080                }
00081             fxTGo4TreeViewerSlots->RemoteTreeDraw(theTree, X_LineEdit->text(),Y_LineEdit->text(),Z_LineEdit->text(),cut_LineEdit->text(),histogramname);
00082         }
00083    else if( (!X_LineEdit->IsRemoteDrop() && Y_LineEdit->text().isEmpty() && Z_LineEdit->text().isEmpty()) 
00084         || (!X_LineEdit->IsRemoteDrop() && !Y_LineEdit->IsRemoteDrop() && Z_LineEdit->text().isEmpty())  
00085         || (!X_LineEdit->IsRemoteDrop() && !Y_LineEdit->IsRemoteDrop() && !Z_LineEdit->IsRemoteDrop())   )
00086        {
00088             QApplication::setOverrideCursor( Qt::WaitCursor );
00089             fxTGo4TreeViewerSlots->TreeDraw(X_LineEdit->text(),Y_LineEdit->text(),Z_LineEdit->text(),cut_LineEdit->text(),histogramname);
00090             QApplication::restoreOverrideCursor(); 
00091        }
00092     else
00093         {
00094             QString text="Treeviewer ambiguity between local and remote. Please clear and drop leaves again.";
00095             TGo4MainWindow *MW= dynamic_cast<TGo4MainWindow *>(fxTGo4GUIRegistry->GetMainWindow());
00096             if(MW) MW->StatusMessage(text);
00097         }
00098 }
00099 
00100 
00101 //----------------------------END OF GO4 SOURCE FILE ---------------------

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