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

/Go4GUI/TGo4ScaleOptions.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 
00024 void TGo4ScaleOptions::init()
00025 {
00026     fxTGo4PreviewPanel=0;
00027 }
00028 
00029 void TGo4ScaleOptions::SlotShiftL()
00030 {
00031    // TGo4LockGuard glob;
00032      if(fxTGo4PreviewPanel!=0)   {
00033         if(!fxTGo4PreviewPanel->ApplyToAllPads()){
00034             fxTGo4PreviewPanel->SlotShiftL(ExpandFactor->value());
00035         }else{
00036          QApplication::setOverrideCursor( Qt::WaitCursor );
00037          TPad *activepad=fxTGo4PreviewPanel->GetActivePad();
00038          TPad* fxPad=0;
00039          TIter iter(fxTGo4PreviewPanel->GetListOfPads());
00040          while((fxPad = dynamic_cast<TPad*>(iter())) !=0) {
00041             fxTGo4PreviewPanel->SetActivePad(fxPad);
00042             fxTGo4PreviewPanel->SlotShiftL(ExpandFactor->value());
00043          }
00044          fxTGo4PreviewPanel->SetActivePad(activepad);
00045          fxTGo4PreviewPanel->GetCanvas()->Update();
00046          QApplication::restoreOverrideCursor();
00047        }
00048      }
00049 }
00050 
00051 
00052 
00053 void TGo4ScaleOptions::SlotShiftR()
00054 {
00055    // TGo4LockGuard glob;
00056     if(fxTGo4PreviewPanel!=0)   {
00057         if(!fxTGo4PreviewPanel->ApplyToAllPads()){
00058             fxTGo4PreviewPanel->SlotShiftR(ExpandFactor->value());
00059         }else{
00060          QApplication::setOverrideCursor( Qt::WaitCursor );
00061          TPad *activepad=fxTGo4PreviewPanel->GetActivePad();
00062          TPad* fxPad=0;
00063          TIter iter(fxTGo4PreviewPanel->GetListOfPads());
00064          while((fxPad = dynamic_cast<TPad*>(iter())) !=0) {
00065                fxTGo4PreviewPanel->SetActivePad(fxPad);
00066                fxTGo4PreviewPanel->SlotShiftR(ExpandFactor->value());
00067          }
00068          fxTGo4PreviewPanel->SetActivePad(activepad);
00069          fxTGo4PreviewPanel->GetCanvas()->Update();
00070          QApplication::restoreOverrideCursor();
00071        }
00072      }
00073 
00074 }
00075 void TGo4ScaleOptions::SlotShiftU()
00076 {
00077    // TGo4LockGuard glob;
00078       if(fxTGo4PreviewPanel!=0)   {
00079         if(!fxTGo4PreviewPanel->ApplyToAllPads()){
00080             fxTGo4PreviewPanel->SlotShiftU(ExpandFactor->value());
00081         }else{
00082          QApplication::setOverrideCursor( Qt::WaitCursor );
00083          TPad *activepad=fxTGo4PreviewPanel->GetActivePad();
00084          TPad* fxPad=0;
00085          TIter iter(fxTGo4PreviewPanel->GetListOfPads());
00086          while((fxPad = dynamic_cast<TPad*>(iter())) !=0) {
00087                fxTGo4PreviewPanel->SetActivePad(fxPad);
00088                fxTGo4PreviewPanel->SlotShiftU(ExpandFactor->value());
00089          }
00090          fxTGo4PreviewPanel->SetActivePad(activepad);
00091          fxTGo4PreviewPanel->GetCanvas()->Update();
00092          QApplication::restoreOverrideCursor();
00093         }
00094      }
00095 
00096 }
00097 void TGo4ScaleOptions::SlotShiftD()
00098 {
00099     // TGo4LockGuard glob;
00100     if(fxTGo4PreviewPanel!=0)   {
00101         if(!fxTGo4PreviewPanel->ApplyToAllPads()){
00102             fxTGo4PreviewPanel->SlotShiftD(ExpandFactor->value());
00103         }else{
00104          QApplication::setOverrideCursor( Qt::WaitCursor );
00105          TPad *activepad=fxTGo4PreviewPanel->GetActivePad();
00106          TPad* fxPad=0;
00107          TIter iter(fxTGo4PreviewPanel->GetListOfPads());
00108          while((fxPad = dynamic_cast<TPad*>(iter())) !=0) {
00109                fxTGo4PreviewPanel->SetActivePad(fxPad);
00110                fxTGo4PreviewPanel->SlotShiftD(ExpandFactor->value());
00111          }
00112          fxTGo4PreviewPanel->SetActivePad(activepad);
00113          fxTGo4PreviewPanel->GetCanvas()->Update();
00114          QApplication::restoreOverrideCursor();
00115         }
00116      }
00117 
00118 }
00119 void TGo4ScaleOptions::SlotExpandX()
00120 {
00121    // TGo4LockGuard glob;
00122       if(fxTGo4PreviewPanel!=0)   {
00123         if(!fxTGo4PreviewPanel->ApplyToAllPads()){
00124             fxTGo4PreviewPanel->SlotExpandX(ExpandFactor->value());
00125         }else{
00126          QApplication::setOverrideCursor( Qt::WaitCursor );
00127          TPad *activepad=fxTGo4PreviewPanel->GetActivePad();
00128          TPad* fxPad=0;
00129          TIter iter(fxTGo4PreviewPanel->GetListOfPads());
00130          while((fxPad = dynamic_cast<TPad*>(iter())) !=0) {
00131                fxTGo4PreviewPanel->SetActivePad(fxPad);
00132                fxTGo4PreviewPanel->SlotExpandX(ExpandFactor->value());
00133          }
00134          fxTGo4PreviewPanel->SetActivePad(activepad);
00135          fxTGo4PreviewPanel->GetCanvas()->Update(); 
00136          QApplication::restoreOverrideCursor();
00137 
00138         }
00139      }
00140 
00141 }
00142 void TGo4ScaleOptions::SlotExpandY()
00143 {
00144      // TGo4LockGuard glob;
00145      if(fxTGo4PreviewPanel!=0)   {
00146         if(!fxTGo4PreviewPanel->ApplyToAllPads()){
00147             fxTGo4PreviewPanel->SlotExpandY(ExpandFactor->value());
00148         }else{
00149          QApplication::setOverrideCursor( Qt::WaitCursor );
00150          TPad *activepad=fxTGo4PreviewPanel->GetActivePad();
00151          TPad* fxPad=0;
00152          TIter iter(fxTGo4PreviewPanel->GetListOfPads());
00153          while((fxPad = dynamic_cast<TPad*>(iter())) !=0) {
00154                fxTGo4PreviewPanel->SetActivePad(fxPad);
00155                fxTGo4PreviewPanel->SlotExpandY(ExpandFactor->value());
00156          }
00157          fxTGo4PreviewPanel->SetActivePad(activepad);
00158          fxTGo4PreviewPanel->GetCanvas()->Update();
00159          QApplication::restoreOverrideCursor();
00160         }
00161      }
00162 }
00163 void TGo4ScaleOptions::SlotUExpandX()
00164 {
00165    // TGo4LockGuard glob;
00166       if(fxTGo4PreviewPanel!=0)   {
00167         if(!fxTGo4PreviewPanel->ApplyToAllPads()){
00168             fxTGo4PreviewPanel->SlotUExpandX(ExpandFactor->value());
00169         }else{
00170          QApplication::setOverrideCursor( Qt::WaitCursor );
00171          TPad *activepad=fxTGo4PreviewPanel->GetActivePad();
00172          TPad* fxPad=0;
00173          TIter iter(fxTGo4PreviewPanel->GetListOfPads());
00174          while((fxPad = dynamic_cast<TPad*>(iter())) !=0) {
00175                fxTGo4PreviewPanel->SetActivePad(fxPad);
00176                fxTGo4PreviewPanel->SlotUExpandX(ExpandFactor->value());
00177          }
00178          fxTGo4PreviewPanel->SetActivePad(activepad);
00179          fxTGo4PreviewPanel->GetCanvas()->Update();
00180          QApplication::restoreOverrideCursor();
00181         }
00182      }
00183 }
00184 void TGo4ScaleOptions::SlotUExpandY()
00185 {
00186    // TGo4LockGuard glob;
00187    if(fxTGo4PreviewPanel!=0)   {
00188         if(!fxTGo4PreviewPanel->ApplyToAllPads()){
00189             fxTGo4PreviewPanel->SlotUExpandY(ExpandFactor->value());
00190         }else{
00191          QApplication::setOverrideCursor( Qt::WaitCursor );
00192          TPad *activepad=fxTGo4PreviewPanel->GetActivePad();
00193          TPad* fxPad=0;
00194          TIter iter(fxTGo4PreviewPanel->GetListOfPads());
00195          while((fxPad = dynamic_cast<TPad*>(iter())) !=0) {
00196                fxTGo4PreviewPanel->SetActivePad(fxPad);
00197                fxTGo4PreviewPanel->SlotUExpandY(ExpandFactor->value());
00198          }
00199          fxTGo4PreviewPanel->SetActivePad(activepad);
00200          fxTGo4PreviewPanel->GetCanvas()->Update();
00201          QApplication::restoreOverrideCursor();
00202         }
00203      }
00204 }
00205 
00206 
00207 void TGo4ScaleOptions::SetViewPanel( TGo4PreviewPanel *View )
00208 {
00209     // TGo4LockGuard glob;
00210     fxTGo4PreviewPanel=View;
00211 
00212 }
00213 
00214 void TGo4ScaleOptions::resizeall()
00215 {
00216     // TGo4LockGuard glob;
00217     if(fxTGo4PreviewPanel!=0)   {
00218         if(!fxTGo4PreviewPanel->ApplyToAllPads()){
00219             fxTGo4PreviewPanel->ResizeAll();
00220         }else{
00221          QApplication::setOverrideCursor( Qt::WaitCursor );
00222          TPad *activepad=fxTGo4PreviewPanel->GetActivePad();
00223          TPad* fxPad=0;
00224          TIter iter(fxTGo4PreviewPanel->GetListOfPads());
00225          while((fxPad = dynamic_cast<TPad*>(iter())) !=0) {
00226                fxTGo4PreviewPanel->SetActivePad(fxPad);
00227                fxTGo4PreviewPanel->ResizeAll();
00228          }
00229          fxTGo4PreviewPanel->SetActivePad(activepad);
00230          fxTGo4PreviewPanel->GetCanvas()->Update();
00231          QApplication::restoreOverrideCursor();
00232         }
00233      }
00234 }
00235 
00236 void TGo4ScaleOptions::SetScaleValues()
00237 {
00238 if(fxTGo4PreviewPanel!=0)
00239 {
00240 double Xmin=0, Xmax=0, Ymin=0, Ymax=0,Zmin=0, Zmax=0;
00241 QString XMAX, XMIN, YMAX, YMIN, ZMIN, ZMAX;
00242 Bool_t autoscale= fxTGo4PreviewPanel->GetAutoScaleOption();
00243 fxTGo4PreviewPanel->GetRanges(Xmin,Xmax,Ymin,Ymax,Zmin,Zmax);
00244 XMIN.setNum(Xmin);
00245 XMAX.setNum(Xmax);
00246 YMIN.setNum(Ymin);
00247 YMAX.setNum(Ymax);
00248 ZMIN.setNum(Zmin);
00249 ZMAX.setNum(Zmax);
00250 TGo4SetScaleValues *fxSetValues=new TGo4SetScaleValues();
00251 fxSetValues->SetAutoScale(autoscale);
00252 TPad* pad=fxTGo4PreviewPanel->GetActivePad();
00253 TH1* h1=fxTGo4PreviewPanel->GetPadHistogram(pad);
00254 if(h1)
00255     {
00256         fxSetValues->SetDimension(h1->GetDimension());
00257         fxSetValues->AutoscaleChanged(autoscale); // enables/disables text edit for y
00258     }
00259 fxSetValues->XminV->setText(XMIN);
00260 fxSetValues->XmaxV->setText(XMAX);
00261 fxSetValues->YminV->setText(YMIN);
00262 fxSetValues->YmaxV->setText(YMAX);
00263 fxSetValues->ZminV->setText(ZMIN);
00264 fxSetValues->ZmaxV->setText(ZMAX);
00265 
00266 if (fxSetValues->exec())
00267     { //if SetValue is clicked
00268     autoscale=fxSetValues->IsAutoScale();
00269     Xmin=fxSetValues->GetXmin();
00270     Xmax=fxSetValues->GetXmax();
00271     Ymin=fxSetValues->GetYmin();
00272     Ymax=fxSetValues->GetYmax();
00273     Zmin=fxSetValues->GetZmin();
00274     Zmax=fxSetValues->GetZmax();
00275     fxTGo4PreviewPanel->SetScaleRange(Xmin,Xmax,Ymin,Ymax,Zmin,Zmax,autoscale);
00276     } //if (fxSetValues->exec())
00277 delete fxSetValues;
00278 } //if(fxTGo4PreviewPanel!=0)
00279 }
00280 
00281 //----------------------------END OF GO4 SOURCE FILE ---------------------

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