00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 void TGo4HisDrawOptions::init()
00024 {
00025
00026 fxTGo4PreviewPanel=0;
00027 fxTGo4PadOptions=0;
00028 }
00029
00030 void TGo4HisDrawOptions::SetDrawOptions( int t )
00031 {
00032
00033 if(fxTGo4PreviewPanel!=0){
00034 TPad *SelectedPad=fxTGo4PreviewPanel->GetActivePad();
00035 if(!fxTGo4PreviewPanel->ApplyToAllPads()){
00036 fxTGo4PadOptions= fxTGo4PreviewPanel->GetPadOptions(SelectedPad);
00037 if(fxTGo4PadOptions)
00038 fxTGo4PadOptions->SetHisDrawStyle(t);
00039 QApplication::setOverrideCursor( Qt::WaitCursor );
00040 fxTGo4PreviewPanel->Redraw();
00041 QApplication::restoreOverrideCursor();
00042 }else{
00043 TObject *entry=0;
00044 TIter iter(fxTGo4PreviewPanel->GetListOfPads());
00045 QApplication::setOverrideCursor( Qt::WaitCursor );
00046 while((entry=iter()) !=0) {
00047 TPad *fxPad=dynamic_cast <TPad *>(entry);
00048 fxTGo4PreviewPanel->SetActivePad(fxPad);
00049 fxTGo4PadOptions= fxTGo4PreviewPanel->GetPadOptions(fxPad );
00050 if(fxTGo4PadOptions)
00051 fxTGo4PadOptions->SetHisDrawStyle(t);
00052 fxTGo4PreviewPanel->Redraw();
00053 }
00054
00055 fxTGo4PreviewPanel->SetActivePad(SelectedPad);
00056 fxTGo4PreviewPanel->GetCanvas()->Update();
00057 SetViewPanel(fxTGo4PreviewPanel);
00058 QApplication::restoreOverrideCursor();
00059 }
00060 }
00061
00062
00063 }
00064
00065
00066 void TGo4HisDrawOptions::SetErrorBars( int t )
00067 {
00068
00069 if(fxTGo4PreviewPanel!=0){
00070 TPad *SelectedPad=fxTGo4PreviewPanel->GetActivePad();
00071 if(!fxTGo4PreviewPanel->ApplyToAllPads()){
00072 fxTGo4PadOptions= fxTGo4PreviewPanel->GetPadOptions(SelectedPad);
00073 if(fxTGo4PadOptions)
00074 fxTGo4PadOptions->SetHisErrorStyle(t);
00075 QApplication::setOverrideCursor( Qt::WaitCursor );
00076 fxTGo4PreviewPanel->Redraw();
00077 QApplication::restoreOverrideCursor();
00078 }else{
00079 TObject *entry=0;
00080 TIter iter(fxTGo4PreviewPanel->GetListOfPads());
00081 QApplication::setOverrideCursor( Qt::WaitCursor );
00082 while((entry=iter()) !=0) {
00083 TPad *fxPad=dynamic_cast <TPad *>(entry);
00084 fxTGo4PreviewPanel->SetActivePad(fxPad);
00085 fxTGo4PadOptions= fxTGo4PreviewPanel->GetPadOptions(fxPad );
00086 if(fxTGo4PadOptions)
00087 fxTGo4PadOptions->SetHisErrorStyle(t);
00088 fxTGo4PreviewPanel->Redraw();
00089 }
00090 fxTGo4PreviewPanel->SetActivePad(SelectedPad);
00091 fxTGo4PreviewPanel->GetCanvas()->Update();
00092 SetViewPanel(fxTGo4PreviewPanel);
00093 QApplication::restoreOverrideCursor();
00094 }
00095 }
00096 }
00097
00098 void TGo4HisDrawOptions::SetCoordinates( int t )
00099 {
00100
00101 if(fxTGo4PreviewPanel!=0){
00102 TPad *SelectedPad=fxTGo4PreviewPanel->GetActivePad();
00103 if(!fxTGo4PreviewPanel->ApplyToAllPads()){
00104 fxTGo4PadOptions= fxTGo4PreviewPanel->GetPadOptions(SelectedPad);
00105 if(fxTGo4PadOptions)
00106 fxTGo4PadOptions->SetHisCoordStyle(t);
00107 QApplication::setOverrideCursor( Qt::WaitCursor );
00108 fxTGo4PreviewPanel->Redraw();
00109 QApplication::restoreOverrideCursor();
00110 }else{
00111 TObject *entry=0;
00112 TIter iter(fxTGo4PreviewPanel->GetListOfPads());
00113 QApplication::setOverrideCursor( Qt::WaitCursor );
00114 while((entry = iter()) !=0 ) {
00115 TPad *fxPad=dynamic_cast <TPad *>(entry);
00116 fxTGo4PreviewPanel->SetActivePad(fxPad);
00117 fxTGo4PadOptions= fxTGo4PreviewPanel->GetPadOptions(fxPad );
00118 if(fxTGo4PadOptions)
00119 fxTGo4PadOptions->SetHisCoordStyle(t);
00120 fxTGo4PreviewPanel->Redraw();
00121 }
00122 fxTGo4PreviewPanel->SetActivePad(SelectedPad);
00123 fxTGo4PreviewPanel->GetCanvas()->Update();
00124 SetViewPanel(fxTGo4PreviewPanel);
00125 QApplication::restoreOverrideCursor();
00126 }
00127 }
00128 }
00129
00130
00131 void TGo4HisDrawOptions::XaxisStyle( int t )
00132 {
00133
00134 if(fxTGo4PreviewPanel!=0){
00135 TPad *SelectedPad=fxTGo4PreviewPanel->GetActivePad();
00136 if(!fxTGo4PreviewPanel->ApplyToAllPads()){
00137 fxTGo4PreviewPanel->XaxisStyle(t);
00138 fxTGo4PadOptions= fxTGo4PreviewPanel->GetPadOptions(SelectedPad);
00139 if(fxTGo4PadOptions)
00140 fxTGo4PadOptions->SetHisXStyle(t);
00141 }else{
00142 TObject *entry=0;
00143 TIter iter(fxTGo4PreviewPanel->GetListOfPads());
00144 QApplication::setOverrideCursor( Qt::WaitCursor );
00145 while((entry = iter()) !=0) {
00146 TPad *fxPad=dynamic_cast <TPad *>(entry);
00147 fxTGo4PreviewPanel->SetActivePad(fxPad);
00148 fxTGo4PreviewPanel->XaxisStyle(t);
00149 fxTGo4PadOptions= fxTGo4PreviewPanel->GetPadOptions(fxPad);
00150 if(fxTGo4PadOptions)
00151 fxTGo4PadOptions->SetHisXStyle(t);
00152
00153 }
00154 fxTGo4PreviewPanel->SetActivePad(SelectedPad);
00155 fxTGo4PreviewPanel->GetCanvas()->Update();
00156 SetViewPanel(fxTGo4PreviewPanel);
00157 QApplication::restoreOverrideCursor();
00158 }
00159 }
00160
00161 }
00162
00163 void TGo4HisDrawOptions::YaxisStyle( int t )
00164 {
00165
00166 if(fxTGo4PreviewPanel!=0) {
00167 TPad *SelectedPad=fxTGo4PreviewPanel->GetActivePad();
00168 if(!fxTGo4PreviewPanel->ApplyToAllPads()){
00169 fxTGo4PreviewPanel->YaxisStyle(t);
00170 fxTGo4PadOptions= fxTGo4PreviewPanel->GetPadOptions(SelectedPad);
00171 if(fxTGo4PadOptions)
00172 fxTGo4PadOptions->SetHisYStyle(t);
00173 }else {
00174 TObject *entry=0;
00175 TIter iter(fxTGo4PreviewPanel->GetListOfPads());
00176 QApplication::setOverrideCursor( Qt::WaitCursor );
00177 while((entry = iter())!=0) {
00178 TPad *fxPad=dynamic_cast <TPad *>(entry);
00179 fxTGo4PreviewPanel->SetActivePad(fxPad);
00180 fxTGo4PreviewPanel->YaxisStyle(t);
00181 fxTGo4PadOptions= fxTGo4PreviewPanel->GetPadOptions(fxPad);
00182 if(fxTGo4PadOptions)
00183 fxTGo4PadOptions->SetHisYStyle(t);
00184 }
00185 fxTGo4PreviewPanel->SetActivePad(SelectedPad);
00186 fxTGo4PreviewPanel->GetCanvas()->Update();
00187 SetViewPanel(fxTGo4PreviewPanel);
00188 QApplication::restoreOverrideCursor();
00189 }
00190
00191 }
00192 }
00193
00194 void TGo4HisDrawOptions::ZaxisStyle( int t )
00195 {
00196
00197 if(fxTGo4PreviewPanel!=0) {
00198 TPad *SelectedPad=fxTGo4PreviewPanel->GetActivePad();
00199 if(!fxTGo4PreviewPanel->ApplyToAllPads()){
00200 fxTGo4PreviewPanel->ZaxisStyle(t);
00201 fxTGo4PadOptions= fxTGo4PreviewPanel->GetPadOptions(SelectedPad);
00202 if(fxTGo4PadOptions)
00203 fxTGo4PadOptions->SetHisZStyle(t);
00204 }else{
00205 TObject *entry=0;
00206 TIter iter(fxTGo4PreviewPanel->GetListOfPads());
00207 QApplication::setOverrideCursor( Qt::WaitCursor );
00208 while((entry = iter()) !=0 ) {
00209 TPad *fxPad=dynamic_cast <TPad *>(entry);
00210 fxTGo4PreviewPanel->SetActivePad(fxPad);
00211 fxTGo4PreviewPanel->ZaxisStyle(t);
00212 fxTGo4PadOptions= fxTGo4PreviewPanel->GetPadOptions(fxPad);
00213 if(fxTGo4PadOptions)
00214 fxTGo4PadOptions->SetHisZStyle(t);
00215 }
00216
00217 fxTGo4PreviewPanel->SetActivePad(SelectedPad);
00218 fxTGo4PreviewPanel->GetCanvas()->Update();
00219 SetViewPanel(fxTGo4PreviewPanel);
00220 QApplication::restoreOverrideCursor();
00221 }
00222 }
00223
00224 }
00225
00226
00227
00228 void TGo4HisDrawOptions::SetViewPanel( TGo4PreviewPanel *ViewPanel )
00229 {
00230
00231 fxTGo4PreviewPanel=ViewPanel;
00232 if(ViewPanel !=0){
00233 TPad *SelectedPad=ViewPanel->GetActivePad();
00234 fxTGo4PadOptions= ViewPanel->GetPadOptions(SelectedPad);
00235 if(fxTGo4PadOptions!=0){
00236 DrawOption->setCurrentItem(fxTGo4PadOptions->GetHisDrawStyle());
00237 ErrorBars->setCurrentItem(fxTGo4PadOptions->GetHisErrorStyle());
00238 Coordinates->setCurrentItem(fxTGo4PadOptions->GetHisCoordStyle());
00239 XStyle->setCurrentItem(fxTGo4PadOptions->GetHisXStyle());
00240 YStyle->setCurrentItem(fxTGo4PadOptions->GetHisYStyle());
00241 ZStyle->setCurrentItem(fxTGo4PadOptions->GetHisZStyle());
00242 AutoScaleBox->setChecked(fxTGo4PadOptions->GetAutoScale());
00243 }
00244 }
00245 }
00246
00247
00248 void TGo4HisDrawOptions::SetAutoScale( bool on )
00249 {
00250 if(fxTGo4PreviewPanel)
00251 fxTGo4PreviewPanel->SetAutoScaleOption(on);
00252 }
00253
00254
00255
00256
00257
00258
00259