//_______________________________________________________________________________________
void MakeFourView(TVirtualPad *pad=0)
{
//  Creates 4 pads view of the pad (or qPad)
//   ------------------------------
//   |              |             |
//   |              |             |
//   |              |             |
//   |    Front     |   Top       |
//   |    view      |   view      |
//   |              |             |
//   |              |             |
//   |              |             |
//   ---------------+-------------
//   |              |             |
//   |              |             |
//   |              |             |
//   |    Side      |  Spacial    |
//   |    view      |   view      |
//   |              |             |
//   |              |             |
//   |              |             |
//   ------------------------------
// begin_html  <P ALIGN=CENTER> <IMG SRC="gif/FourStarView.gif" ></P> end_html
//
  TVirtualPad *thisPad = pad;
  if (!thisPad) thisPad = qPad();
  TView *view = 0; 
  TList *thisPrimitives = 0; 
  if (thisPad && (thisPrimitives = thisPad->GetListOfPrimitives()) && (view =  thisPad->GetView()) ) 
  {
    Double_t min[3],max[3];
    view->GetRange(min,max);
    Int_t system = view->GetSystem();
    TCanvas *c = new TCanvas(" 4 views", thisPad->GetTitle(),600,600);
    c->Divide(2,2);
    TIter *next=  new TIter(thisPrimitives);
    for (int i =1; i <= 4; i++) {
      c->cd(i);
      TList *newPrimitives = qPad()->GetListOfPrimitives();
      TObject *obj = 0;
      while (obj = next->Next()) newPrimitives->Add(obj);
      TView *newView = new TView(system);
      newView->SetRange(min,max);
      next->Reset();
   }
   delete next;
   // set separate view;
   // Fron view
    Int_t j = 1;
    c->cd(j++); FrontView();
    c->cd(j++); TopView();
    c->cd(j++); SideView();
    c->cd(j++); RotateView(-30.0,60.0,0);
    c->Modified();
    c->Update();
  }
}
void TStatusLine::update()
{
    TView *p = TopView();
    ushort h = ( p != 0 ) ? p->getHelpCtx() : hcNoContext;
    if( helpCtx != h )
        {
        helpCtx = h;
        findItems();
        drawView();
        }
}
Exemple #3
0
// Constructor
ObjectOpenGL::ObjectOpenGL(QWidget *parent) :
        QGLWidget(parent)
{
    // Initialize each color
    BackGround_Color    =QColor::fromRgb(50 ,50 ,100);
    Axis_X_Color        =QColor::fromRgb(255,64  ,64  ,128);                       // Color of the X axis : red
    Axis_Y_Color        =QColor::fromRgb(64  ,255,64  ,128);                       // Color of the Y axis : green
    Axis_Z_Color        =QColor::fromRgb(64  , 64 ,255,128);                       // Color of the Z axis : blue
    Points_Color        =QColor::fromRgb(0  ,0  ,0  ,255);                       // Color of the points

    // Set initial value of angles
    angle_x=angle_y=angle_z=0;
    ax=ay=az=gx=gy=gz=mx=my=mz=0;

    // Start display in the isometric view
    //IsometricView();
    TopView();
}