ATLAS Offline Software
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Private Attributes | Friends | List of all members
VP1ExaminerViewer Class Reference

#include <VP1ExaminerViewer.h>

Inheritance diagram for VP1ExaminerViewer:
Collaboration diagram for VP1ExaminerViewer:

Classes

class  Imp
 

Public Member Functions

 VP1ExaminerViewer (QWidget *parent=0, bool detectorViewButtons=true, const char *name=0, SbBool embed=TRUE, SoQtFullViewer::BuildFlag flag=BUILD_ALL, SoQtViewer::Type type=BROWSER)
 
 VP1ExaminerViewer (const VP1ExaminerViewer &)=delete
 
VP1ExaminerVieweroperator= (const VP1ExaminerViewer &)=delete
 
virtual ~VP1ExaminerViewer ()
 
virtual void removeDecorationMenuOption ()
 
virtual QByteArray saveState ()
 
virtual void restoreFromState (QByteArray)
 
virtual void viewAll ()
 
virtual void toggleCameraType ()
 
virtual void setCameraType (SoType type)
 
virtual void setSeekMode (SbBool enable)
 
virtual void setViewing (SbBool enable)
 
virtual void setBufferingType (SoQtViewer::BufferType)
 
virtual void setAntialiasing (SbBool smoothing, int numPasses)
 
virtual void setTransparencyType (SoGLRenderAction::TransparencyType)
 
virtual void setDrawStyle (SoQtViewer::DrawType, SoQtViewer::DrawStyle)
 
virtual void showPopupMenu ()
 
void setAmbientLight (int)
 
int ambientLight () const
 
virtual void setSceneGraph (SoNode *)
 
virtual SoNode * getSceneGraph ()
 
void fadeLastRecordedFrameToCurrent (double time_seconds)
 
bool isAntiAlias () const
 
void setAntiAlias (bool)
 
void startTour ()
 
bool startTourEachEvent () const
 
void startCustomTour ()
 
void dumpSceneToFile (QString filename="")
 
void dumpSceneToVRMLFile (QString filename="")
 
void produceSVGImage (QString filename="")
 
void produceEPSImage (QString filename="")
 
void storeCameraParametersForReset ()
 
void resetCamera ()
 
bool currentCamIsPerspective () const
 
QByteArray currentCameraState () const
 
QPixmap getSnapShotFromCamState (bool camStateIsPerspective, QByteArray camState, int width, int height, bool transp=false)
 
void setStereoOffsetSlot (float offset)
 
float getStereoOffsetSlot ()
 
SbBool setStereoTypeSlot (SoQtViewer::StereoType type)
 
SoQtViewer::StereoType getStereoTypeSlot (void) const
 
void setAnaglyphStereoColorMasksSlot (const SbBool left[3], const SbBool right[3])
 
void getAnaglyphStereoColorMasksSlot (SbBool left[3], SbBool right[3])
 
void launchStereoEditor ()
 

Static Public Member Functions

static QString str (const QString &s)
 
static QString str (const char *c)
 
static QString str (const bool b)
 
static QString str (const QColor &)
 
static QString str (const SbColor &)
 
static QString str (const VP1Interval &)
 
static QString str (const SbVec2d &)
 
static QString str (const SbVec2f &)
 
static QString str (const SbVec2s &)
 
static QString str (const SbVec3d &)
 
static QString str (const SbVec3f &)
 
static QString str (const SbVec3s &)
 
static QString str (const SbVec4d &)
 
static QString str (const SbVec4f &)
 
static QString str (short int n)
 
static QString str (unsigned short int n)
 
static QString str (long n)
 
static QString str (ulong n)
 
static QString str (int n)
 
static QString str (uint n)
 
static QString str (qlonglong n)
 
static QString str (qulonglong n)
 
static QString str (const double &d)
 
static QString str (const float &f)
 
static QString str (const void *)
 
template<class T >
static QString str (const T *t)
 
template<class T >
static QString str (const QFlags< T > &f)
 
template<class T >
static QString str (const HepGeom::BasicVector3D< T > &t)
 
static QString str (const Amg::Vector3D &t)
 
template<class T >
static QString str (const QList< T > &t)
 

Public Attributes

float stereo_offset_camera
 
float stereo_parallax_camera
 
float stereo_offset_viewer
 

Protected Member Functions

virtual void bottomWheelFinish ()
 
virtual void bottomWheelMotion (float val)
 
virtual void bottomWheelStart ()
 
virtual void leftWheelFinish ()
 
virtual void leftWheelMotion (float val)
 
virtual void leftWheelStart ()
 
virtual void rightWheelFinish ()
 
virtual void rightWheelMotion (float val)
 
virtual void rightWheelStart ()
 
virtual void createViewerButtons (QWidget *parent, SbPList *buttonlist)
 
virtual void buildPopupMenu ()
 
virtual SbBool processSoEvent (const SoEvent *const event)
 

Private Attributes

Impm_d
 

Friends

class VP1ExaminerViewer_SignalCatcher
 

Detailed Description

Definition at line 30 of file VP1ExaminerViewer.h.

Constructor & Destructor Documentation

◆ VP1ExaminerViewer() [1/2]

VP1ExaminerViewer::VP1ExaminerViewer ( QWidget *  parent = 0,
bool  detectorViewButtons = true,
const char *  name = 0,
SbBool  embed = TRUE,
SoQtFullViewer::BuildFlag  flag = BUILD_ALL,
SoQtViewer::Type  type = BROWSER 
)

Definition at line 526 of file VP1ExaminerViewer.cxx.

532 : SoQtExaminerViewer(parent,(name?name:"VP1ExaminerViewer"),embed,flag,type,false/*delay createViewerButtons call*/),
533  m_d(new Imp(this,detectorViewButtons))
534 {
535  VP1Msg::messageDebug("VP1ExaminerViewer::VP1ExaminerViewer()");
536  // Explicitly trigger the construction of viewer decorations.
537  QWidget * widget = buildWidget(getParentWidget());
538  if (rightWheelLabel)
539  rightWheelLabel->setVisible(false);//it will be shown again by the first setCameraType call
540  setBaseWidget(widget);
541  setLeftWheelString("Rotz");
543 // setRightWheelString("Zoom");
544  setRightWheelString("Zoom test");
545  leftWheel->setMinimumHeight(20);
546  rightWheel->setMinimumHeight(20);
547 
548 
549  /* set the clipping strategy and fix the clipping
550  *
551  * N.B.
552  * this code has been taken and adapted from CMSSW:
553  * http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/ISpy/Client/src/ISpy3DView.cc?view=co
554  */
555  setAutoClippingStrategy(CONSTANT_NEAR_PLANE, 0.9, fixedDistanceClipPlanesCB, this);
556 
557  // Let's build this now, otherwise there will be problems with making the connections later:
559  QObject::connect(&(m_d->animationSequencer),SIGNAL(clipVolumePercentOfATLAS(double)),m_d->customtoureditor,SLOT(setClipVolumePercentOfATLAS(double)));
562  if (m_d->customtoureditorState!=QByteArray()) {
564  m_d->customtoureditorState = QByteArray();
565  }
566 
567  // test Ric
568  VP1Msg::messageVerbose("is stereo: " + QString(isStereoViewing()) + " - offset: " + QString::number(getStereoOffsetSlot()) + " - type: " + QString::number(getStereoType()) );
569 }

◆ VP1ExaminerViewer() [2/2]

VP1ExaminerViewer::VP1ExaminerViewer ( const VP1ExaminerViewer )
delete

◆ ~VP1ExaminerViewer()

VP1ExaminerViewer::~VP1ExaminerViewer ( )
virtual

Definition at line 920 of file VP1ExaminerViewer.cxx.

921 {
922 #if SOQT_MAJOR_VERSION <= 1 && SOQT_MINOR_VERSION <= 4 && SOQT_MICRO_VERSION <= 1
923  //Fix bug in SoQt, in which the menu does not get deleted (reported and fixed upstream after SoQt 1.4.1)
924  delete prefmenu;
925 #endif
926  delete m_d;
927  SoQtExaminerViewer::setSceneGraph(0);
928 }

Member Function Documentation

◆ ambientLight()

int VP1ExaminerViewer::ambientLight ( ) const

Definition at line 2433 of file VP1ExaminerViewer.cxx.

2434 {
2435  return m_d->ambientLightPercentage;
2436 }

◆ bottomWheelFinish()

void VP1ExaminerViewer::bottomWheelFinish ( )
protectedvirtual

Definition at line 1518 of file VP1ExaminerViewer.cxx.

1519 {
1520  VP1Msg::messageVerbose("VP1ExaminerViewer::bottomWheelFinish()");
1521  m_d->grabFocus();
1522  SoQtExaminerViewer::bottomWheelFinish();
1523 }

◆ bottomWheelMotion()

void VP1ExaminerViewer::bottomWheelMotion ( float  val)
protectedvirtual

Definition at line 1526 of file VP1ExaminerViewer.cxx.

1527 {
1528  VP1Msg::messageVerbose("VP1ExaminerViewer::bottomWheelMotion()");
1529  m_d->grabFocus();
1530  SoQtExaminerViewer::bottomWheelMotion(val);
1531 }

◆ bottomWheelStart()

void VP1ExaminerViewer::bottomWheelStart ( )
protectedvirtual

Definition at line 1534 of file VP1ExaminerViewer.cxx.

1535 {
1536  VP1Msg::messageVerbose("VP1ExaminerViewer::bottomWheelStart()");
1537  m_d->grabFocus();
1538  SoQtExaminerViewer::bottomWheelStart();
1539 }

◆ buildPopupMenu()

void VP1ExaminerViewer::buildPopupMenu ( )
protectedvirtual

Definition at line 1369 of file VP1ExaminerViewer.cxx.

1370 {
1371  //We don't actually use this popupmenu.
1372 
1373  // SoQtExaminerViewer::buildPopupMenu();
1374 }

◆ createViewerButtons()

void VP1ExaminerViewer::createViewerButtons ( QWidget *  parent,
SbPList *  buttonlist 
)
protectedvirtual

Definition at line 931 of file VP1ExaminerViewer.cxx.

932 {
933  VP1Msg::messageVerbose("VP1ExaminerViewer::createViewerButtons");
934 
935  SoQtExaminerViewer::createViewerButtons(parent,buttonlist);
936  //buttonlist holds void pointers to pushbuttons
937 
938  if (buttonlist->getLength()==7) {
939  //Get pointers:
940  m_d->button_interact = static_cast<QPushButton*>(buttonlist->get(0));
941  m_d->button_examine = static_cast<QPushButton*>(buttonlist->get(1));
942  m_d->button_home = static_cast<QPushButton*>(buttonlist->get(2));
943  m_d->button_sethome = static_cast<QPushButton*>(buttonlist->get(3));
944  m_d->button_viewall = static_cast<QPushButton*>(buttonlist->get(4));
945  m_d->button_seek = static_cast<QPushButton*>(buttonlist->get(5));
946  m_d->button_togglecamera = static_cast<QPushButton*>(buttonlist->get(6));
947  //Other stuff? Connections? Change pixmaps?
948  m_d->button_interact->setToolTip("Pick mode (ESC/M toggles). Use this in order to select objects.");
949  m_d->button_examine->setToolTip("Navigation mode (ESC/M toggles). Use to ROTATE (left click), ZOOM (wheel or SHIFT+CTRL+left click) or PAN (middle click or SHIFT+left click or CTRL+left click).");
950  m_d->button_home->setToolTip("Change view to home view");
951  m_d->button_sethome->setToolTip("Store current view as new home");
952  m_d->button_viewall->setToolTip("View all objects currently displayed (V)");
953  m_d->button_seek->setToolTip("Seek to point (S). Sets cameras rotation centre to the clicked point and zooms towards it.");
954  m_d->button_togglecamera->setToolTip("Toggle (C) camera between perspective (P) and orthographic (O) mode.");
955  //These are just confusing anyway:
956  m_d->button_home->setVisible(false);
957  m_d->button_sethome->setVisible(false);
958  } else {
959  VP1Msg::message("VP1ExaminerViewer::createViewerButtons ERROR: Did not get list of exactly 7 buttons from base.");
960  }
961 }

◆ currentCameraState()

QByteArray VP1ExaminerViewer::currentCameraState ( ) const

Definition at line 1781 of file VP1ExaminerViewer.cxx.

1782 {
1783  SoCamera * cam(getCamera());
1784  return cam ? VP1QtInventorUtils::serializeSoCameraParameters(*cam) : QByteArray();
1785 }

◆ currentCamIsPerspective()

bool VP1ExaminerViewer::currentCamIsPerspective ( ) const

Definition at line 1775 of file VP1ExaminerViewer.cxx.

1776 {
1777  return getCameraType() == SoPerspectiveCamera::getClassTypeId();
1778 }

◆ dumpSceneToFile()

void VP1ExaminerViewer::dumpSceneToFile ( QString  filename = "")

Definition at line 2254 of file VP1ExaminerViewer.cxx.

2255 {
2256  VP1Msg::messageVerbose("VP1ExaminerViewer::dumpSceneToFile()");
2257 
2258  SoNode * rootnode = getSceneGraph();
2259  if (!rootnode)
2260  return;
2261 
2262  QWidget * w = getWidget();
2263  if (!w)
2264  return;
2265 
2266  if(filename.isEmpty()) {
2267  if (isAnimating())
2268  stopAnimating();
2269  filename = QFileDialog::getSaveFileName(w, "Select output file",
2271  "Inventor files (*.iv)",0,QFileDialog::DontResolveSymlinks);
2272  if(filename.isEmpty())
2273  return;
2274  if (!filename.endsWith(".iv"))
2275  filename += ".iv";
2277  }
2278 
2279  SoGroup * standardisedRoot(0);
2280  if ( rootnode->getTypeId().isDerivedFrom(SoGroup::getClassTypeId()))
2281  standardisedRoot = VP1HEPVisUtils::convertToStandardScene(static_cast<SoGroup*>(rootnode));
2282 
2283  if (standardisedRoot&&VP1QtInventorUtils::writeGraphToFile(standardisedRoot, filename))
2284  VP1Msg::messageDebug("VP1ExaminerViewer: Dumped scene to file "+filename);
2285  else
2286  VP1Msg::messageDebug("VP1ExaminerViewer: Error: Problems dumping scene to file "+filename);
2287 
2288 }

◆ dumpSceneToVRMLFile()

void VP1ExaminerViewer::dumpSceneToVRMLFile ( QString  filename = "")

Definition at line 2290 of file VP1ExaminerViewer.cxx.

2290  {
2291  VP1Msg::messageVerbose("VP1ExaminerViewer::dumpSceneToVRMLFile()");
2292 
2293  SoNode * rootnode = getSceneGraph();
2294  if (!rootnode)
2295  return;
2296 
2297  QWidget * w = getWidget();
2298  if (!w)
2299  return;
2300 
2301  if(filename.isEmpty()) {
2302  if (isAnimating())
2303  stopAnimating();
2304  filename = QFileDialog::getSaveFileName(w, "Select output file",
2306  "VRML2.0/X3D files (*.wrl)",0,QFileDialog::DontResolveSymlinks);
2307  if(filename.isEmpty())
2308  return;
2309  if (!filename.endsWith(".wrl"))
2310  filename += ".wrl";
2312  }
2313 
2314  SoGroup * standardisedRoot(0);
2315  if ( rootnode->getTypeId().isDerivedFrom(SoGroup::getClassTypeId()))
2316  standardisedRoot = VP1HEPVisUtils::convertToStandardScene(static_cast<SoGroup*>(rootnode));
2317 
2318  if (standardisedRoot&&VP1QtInventorUtils::writeGraphToVRMLFile(standardisedRoot, filename))
2319  VP1Msg::messageDebug("VP1ExaminerViewer: Dumped scene to VRML file "+filename);
2320  else
2321  VP1Msg::messageDebug("VP1ExaminerViewer: Error: Problems dumping scene to VRML file "+filename);
2322 
2323 }

◆ fadeLastRecordedFrameToCurrent()

void VP1ExaminerViewer::fadeLastRecordedFrameToCurrent ( double  time_seconds)

Definition at line 3144 of file VP1ExaminerViewer.cxx.

3145 {
3146  if (!m_d->ensureMenuInit())
3147  return;
3148  QString lastfile, nextfile;
3149  QString outdir = m_d->action_movieoutdir->data().toString();
3152  lastfile, nextfile );
3153 
3154  QImage img0(lastfile);
3155 
3156  if (lastfile.isEmpty()||img0.isNull()) {
3157  VP1Msg::messageDebug("VP1ExaminerViewer ERROR: No previous image found!");
3158  return;
3159  }
3160  if (nextfile.isEmpty())
3161  return;
3162 
3163  QImage img1 = VP1QtInventorUtils::renderToImage(this, img0.width(),img0.height(),false/*transp*/);
3164  if (img1.isNull())
3165  return;
3166 
3167  int nTransitionFrames = std::max(1,static_cast<int>(m_d->action_moviefps->data().toInt()*time_seconds+0.5));
3168  VP1Msg::messageDebug("VP1ExaminerViewer Creating "+VP1Msg::str(nTransitionFrames)+" transition frames");
3169 
3170  for (int i = 0; i < nTransitionFrames; ++i) {
3171  double fadefact((i+1.0)/(nTransitionFrames+1.0));//Should not be 0.0 or 1.0
3172  QString dummy, filename;
3174  QImage img = VP1QtUtils::fadeImage(img0, img1, fadefact );
3175  if (img.isNull()) {
3176  VP1Msg::messageDebug("VP1ExaminerViewer ERROR: Problems creating image!");
3177  } else {
3178  if (!img.save(filename))
3179  VP1Msg::messageDebug("VP1ExaminerViewer ERROR: Could not save image file "+filename);
3180  }
3181  }
3182 
3183  QString dummy, filename;
3185  if (!img1.save(filename))
3186  VP1Msg::messageDebug("VP1ExaminerViewer ERROR: Could not save image file "+filename);
3187 
3188 }

◆ getAnaglyphStereoColorMasksSlot()

void VP1ExaminerViewer::getAnaglyphStereoColorMasksSlot ( SbBool  left[3],
SbBool  right[3] 
)

Definition at line 590 of file VP1ExaminerViewer.cxx.

590  {
591  SoQtExaminerViewer::getAnaglyphStereoColorMasks(left, right);
592 }

◆ getSceneGraph()

SoNode * VP1ExaminerViewer::getSceneGraph ( )
virtual

Definition at line 3138 of file VP1ExaminerViewer.cxx.

3139 {
3140  return (m_d->actualSceneGraph && m_d->actualSceneGraph->getNumChildren()>1) ? m_d->actualSceneGraph->getChild(1) : 0;
3141 }

◆ getSnapShotFromCamState()

QPixmap VP1ExaminerViewer::getSnapShotFromCamState ( bool  camStateIsPerspective,
QByteArray  camState,
int  width,
int  height,
bool  transp = false 
)

Definition at line 1788 of file VP1ExaminerViewer.cxx.

1790 {
1791  SoCamera * cam = getCamera();
1792  if (!cam)
1793  return QPixmap();
1794  bool notifyenabled = cam->enableNotify(false);
1795 
1796  bool currentPersp(currentCamIsPerspective());
1797  QByteArray currentState(currentCameraState());
1798  if (currentPersp!=camStateIsPerspective)
1799  toggleCameraType();
1800  VP1QtInventorUtils::deserializeSoCameraParameters(camState,*(getCamera()));
1801  QPixmap pm = VP1QtInventorUtils::renderToPixmap(this, width, height,transp);
1802  if (currentPersp!=camStateIsPerspective)
1803  toggleCameraType();
1804  VP1QtInventorUtils::deserializeSoCameraParameters(currentState,*(getCamera()));
1805 
1806  if (notifyenabled) {
1807  cam->enableNotify(true);
1808  //We don't touch since we know that we didn't actually change anything: cam->touch();
1809  }
1810  return pm;
1811 }

◆ getStereoOffsetSlot()

float VP1ExaminerViewer::getStereoOffsetSlot ( )

Definition at line 577 of file VP1ExaminerViewer.cxx.

577  {
578  return SoQtExaminerViewer::getStereoOffset();
579 }

◆ getStereoTypeSlot()

SoQtViewer::StereoType VP1ExaminerViewer::getStereoTypeSlot ( void  ) const

Definition at line 584 of file VP1ExaminerViewer.cxx.

584  {
585  return SoQtExaminerViewer::getStereoType();
586 }

◆ isAntiAlias()

bool VP1ExaminerViewer::isAntiAlias ( ) const

Definition at line 1743 of file VP1ExaminerViewer.cxx.

1744 {
1745  return m_d->isantialias;
1746  // SbBool smoothing; int numPasses;
1747  // getAntialiasing(smoothing, numPasses);
1748  // return smoothing&&numPasses>1;
1749 }

◆ launchStereoEditor()

void VP1ExaminerViewer::launchStereoEditor ( )

Definition at line 2944 of file VP1ExaminerViewer.cxx.

2945 {
2946  VP1Msg::messageVerbose("VP1ExaminerViewer::launchStereoEditor()");
2947 
2948  if (!m_d->customstereoeditor) {
2950  // m_d->customstereoeditor->disableObjectWhenTourNotAvailable(m_d->customtour_execute);
2951  // if (m_d->customstereoeditorState!=QByteArray()) { //TODO: implement save stereo settings
2952  // m_d->customstereoeditor->setState(m_d->customstereoeditorState);
2953  // m_d->customstereoeditorState = QByteArray();
2954  // }
2955  }
2956  m_d->customstereoeditor->show();
2957  //Fixme: deal with minimised state!
2958  return;
2959 }

◆ leftWheelFinish()

void VP1ExaminerViewer::leftWheelFinish ( )
protectedvirtual

Definition at line 1542 of file VP1ExaminerViewer.cxx.

1543 {
1544  m_d->grabFocus();
1545  SoQtExaminerViewer::leftWheelFinish();
1546 }

◆ leftWheelMotion()

void VP1ExaminerViewer::leftWheelMotion ( float  val)
protectedvirtual

Definition at line 1549 of file VP1ExaminerViewer.cxx.

1550 {
1551  m_d->grabFocus();
1552 
1553  if (isAnimating())
1554  stopAnimating();
1555 
1556  float newval = 0.0;
1557  if (m_d->rotationMode==Imp::XROT)
1558  newval = m_d->rotXWheelMotion(val, getLeftWheelValue());
1559  else
1560  newval = m_d->rotZWheelMotion(val, getLeftWheelValue());
1561 
1562  SoQtFullViewer::leftWheelMotion(newval);//NB: We bypass SoQtExaminerViewer implementation
1563 }

◆ leftWheelStart()

void VP1ExaminerViewer::leftWheelStart ( )
protectedvirtual

Definition at line 1566 of file VP1ExaminerViewer.cxx.

1567 {
1568  m_d->grabFocus();
1569  SoQtExaminerViewer::leftWheelStart();
1570 }

◆ operator=()

VP1ExaminerViewer& VP1ExaminerViewer::operator= ( const VP1ExaminerViewer )
delete

◆ processSoEvent()

SbBool VP1ExaminerViewer::processSoEvent ( const SoEvent *const  event)
protectedvirtual

Definition at line 1391 of file VP1ExaminerViewer.cxx.

1392 {
1393 // VP1Msg::messageDebug("VP1ExaminerViewer::processSoEvent()");
1394 // std::cout << "event type: " << evt->getClassTypeId().getName() << " - " << evt->getTypeId().getName() << std::endl;
1395 
1396  if (evt->getTypeId().isDerivedFrom(SoKeyboardEvent::getClassTypeId())) {
1397  //We want to add a few shortcuts:
1398  // "A": View all
1399  // "P": Perspective camera
1400  // "O": Orthogonal camera
1401  // "C": Toggle camera mode
1402  // "M": Toggle view/selection mode.
1403  // If "Q" then we do NOT pass it on to the base class (because that closes the top window!!)
1404 
1405  m_d->grabFocus(); //probably redundant since we got the event, but can't hurt.
1406 
1407  if (SO_KEY_PRESS_EVENT(evt,SoKeyboardEvent::V)) {
1408  viewAll();
1409  return true;//eat event
1410  }
1411  if (SO_KEY_PRESS_EVENT(evt,SoKeyboardEvent::Q))
1412  return false;//do not eat event, but do not pass through to base.
1413  if (SO_KEY_PRESS_EVENT(evt,SoKeyboardEvent::C)) {
1414  toggleCameraType();
1415  return true;//eat event
1416  }
1417  if (SO_KEY_PRESS_EVENT(evt,SoKeyboardEvent::P)) {
1418  if (!currentCamIsPerspective() )
1419  toggleCameraType();
1420  return true;//eat event
1421  }
1422  if (SO_KEY_PRESS_EVENT(evt,SoKeyboardEvent::O)) {
1424  toggleCameraType();
1425  return true;//eat event
1426  }
1427  if (SO_KEY_PRESS_EVENT(evt,SoKeyboardEvent::M)) {
1428  setViewing(!isViewing());
1429  return true;//eat event
1430  }
1431  if (SO_KEY_PRESS_EVENT(evt,SoKeyboardEvent::A)) {
1433  m_d->grabFocus();//Needed since the GL calls triggered when setting antialiasing makes us loose focus (we obviusly just had it).
1434  return true;//eat event
1435  }
1436 
1437  //NB: We could emit keypressed signal when keyboardevent and base
1438  // class does not eat event.
1439 
1440  } else if (evt->getTypeId().isDerivedFrom(SoMouseButtonEvent::getClassTypeId())) {
1441  m_d->grabFocus();//Any click grabs focus:
1442  if (isViewing()) {//In viewing mode we open a popup menu on right clicks:
1443  const SoMouseButtonEvent * ev_mouse = static_cast<const SoMouseButtonEvent*>(evt);
1444  if ((ev_mouse->getButton() == SoMouseButtonEvent::BUTTON2/*right click*/)) {
1445  if (ev_mouse->getState() == SoButtonEvent::DOWN) {
1446  showPopupMenu();
1447  }
1448  return true;//eat all right-clicks in viewing mode.
1449  }
1450  }
1451  }
1452 
1453  return SoQtExaminerViewer::processSoEvent(evt);//pass event through
1454 }

◆ produceEPSImage()

void VP1ExaminerViewer::produceEPSImage ( QString  filename = "")

Definition at line 2374 of file VP1ExaminerViewer.cxx.

2375 {
2376  QWidget * w = getWidget();
2377  if (!w)
2378  return;
2379  if(filename.isEmpty()) {
2380  if (isAnimating())
2381  stopAnimating();
2382  filename = QFileDialog::getSaveFileName(w, "Select output file",
2384  "Encapsulated Postscript files (*.eps)",0,QFileDialog::DontResolveSymlinks);
2385  if(filename.isEmpty())
2386  return;
2387  if (!filename.endsWith(".eps"))
2388  filename += ".eps";
2390  }
2391 
2392  VP1Msg::messageVerbose("Attempting to produce eps output: "+filename);
2393 
2394  //The following code contributed by Laurent Duflot:
2395 
2396  // first method : direct calls to gl2ps
2397  if (FILE *output = fopen (filename.toStdString().c_str(), "w"))
2398  {
2399  int buffsize = 0, state = GL2PS_OVERFLOW;
2400  while (state == GL2PS_OVERFLOW)
2401  {
2402  buffsize += 1024*1024;
2403  gl2psBeginPage ("VP1"/*fixme: should contain run/evt number*/, "VP1", NULL,
2406  | GL2PS_SILENT
2409  | 0,
2410  GL_RGBA, 0, NULL,0, 0, 0,
2411  buffsize, output, NULL);
2412  actualRedraw();
2413  state = gl2psEndPage();
2414  }
2415  fclose (output);
2416  }
2417 }

◆ produceSVGImage()

void VP1ExaminerViewer::produceSVGImage ( QString  filename = "")

Definition at line 2326 of file VP1ExaminerViewer.cxx.

2327 {
2328  QWidget * w = getWidget();
2329  if (!w)
2330  return;
2331  if(filename.isEmpty()) {
2332  if (isAnimating())
2333  stopAnimating();
2334  filename = QFileDialog::getSaveFileName(w, "Select output file",
2336  "Scalable Vector Graphics files (*.svg)",0,QFileDialog::DontResolveSymlinks);
2337  if(filename.isEmpty())
2338  return;
2339  if (!filename.endsWith(".svg"))
2340  filename += ".svg";
2342  }
2343 
2344  VP1Msg::messageVerbose("Attempting to produce svg output: "+filename);
2345 
2346  //The following code contributed by Laurent Duflot:
2347 
2349 
2350  // want to render from above the SceneGraph so we get what the camera sees
2351  SoNode *rootA = static_cast<SoNode*>(SoQtRenderArea::getSceneGraph());
2352  if (!rootA ) return;
2353  SoNode *cam = static_cast<SoNode*>(this->getCamera());
2354  if ( ! cam ) return;
2355  SoSearchAction search;
2356  search.setNode(cam);
2357  search.apply(rootA);
2358  assert(search.getPath());
2359  SoNode* hiddenRoot =
2360  static_cast<SoFullPath *>(search.getPath())->getNodeFromTail(1);
2361 
2362  const SbViewportRegion& vpRegion = getViewportRegion();
2363  SoGL2PSAction* action = new SoGL2PSAction(vpRegion);
2364  action->setFileName(filename.toStdString().c_str());
2365  action->setFileFormat(SoGL2PSAction::SVG);
2366  action->enableFileWriting();
2367  action->apply(hiddenRoot);
2368  action->disableFileWriting();
2369  delete action;
2370 
2371 }

◆ removeDecorationMenuOption()

void VP1ExaminerViewer::removeDecorationMenuOption ( )
virtual

Definition at line 1377 of file VP1ExaminerViewer.cxx.

1378 {
1379 
1380  VP1Msg::messageVerbose("VP1ExaminerViewer::removeDecorationMenuOption()");
1381  if (m_d->decorationMenuRemoved || !prefmenu)
1382  return;
1383  m_d->decorationMenuRemoved = true;
1384  int id = prefmenu->getMenuItem("decoration");
1385  if (id!=-1)
1386  prefmenu->removeMenuItem(id);
1387 
1388 }

◆ resetCamera()

void VP1ExaminerViewer::resetCamera ( )

Definition at line 1760 of file VP1ExaminerViewer.cxx.

1761 {
1762  VP1Msg::messageVerbose("VP1ExaminerViewer::resetCamera()");
1763  if (m_d->resetCamera_state==QByteArray())
1764  return;
1765  if (isAnimating())
1766  stopAnimating();
1768  toggleCameraType();
1769  if (getCamera()&&m_d->resetCamera_state!=QByteArray())
1770  VP1QtInventorUtils::deserializeSoCameraParameters(m_d->resetCamera_state,*(getCamera()));//Fixme: Check return value?
1771 }

◆ restoreFromState()

void VP1ExaminerViewer::restoreFromState ( QByteArray  ba_state)
virtual

Definition at line 764 of file VP1ExaminerViewer.cxx.

765 {
766  VP1Msg::messageVerbose("VP1ExaminerViewer::restoreFromState");
767 
768  // ===> Setup stream for getting the contents of the byteArray:
769  QBuffer buffer(&ba_state);
770  buffer.open(QIODevice::ReadOnly);
771  QDataStream state(&buffer);
772  // ===> Check version and pass on state info to base class:
773  qint32 version;
774  state >> version;
775  if (version<0||version>6) {
776  VP1Msg::messageDebug("VP1ExaminerViewer Warning: Input state data is in wrong format - ignoring!");
777  return;
778  }
779  // ===> Decode the state info:
780 
781  //Background color:
782  QColor bgdcol;
783  state >> bgdcol;
784  if (bgdcol.isValid())
785  setBackgroundColor(VP1QtInventorUtils::qcol2sbcol(bgdcol));
786  VP1Msg::messageVerbose("restoreState background color = "+str(bgdcol));
787 
788  //Render buffer:
789  int ibuffer;
790  state >> ibuffer;
791  if (ibuffer==1) setBufferingType(BUFFER_SINGLE);
792  else if (ibuffer==2) setBufferingType(BUFFER_INTERACTIVE);
793  else setBufferingType(BUFFER_DOUBLE);
794  VP1Msg::messageVerbose("restoreState Render Buffer = ("+str(ibuffer)+")");
795 
796  //camtype and camera parameters:
797  bool isperspective;
798  state >> isperspective;
799  if (isperspective != currentCamIsPerspective())
801  QByteArray ba_cam;
802  state>>ba_cam;
803  if (getCamera()&&ba_cam!=QByteArray())
804  VP1QtInventorUtils::deserializeSoCameraParameters(ba_cam,*(getCamera()));//Fixme: Check return value?
805  VP1Msg::messageVerbose("restoreState camera type = "+str(isperspective?"Perspective":"Orthographic"));
806 
807  //misc:
808  bool isdeco, isheadlight, isviewing, decoremoved;
809  state >> isdeco; if (isdeco!=isDecoration()) setDecoration(isdeco);
810  state >> isheadlight; if (isheadlight!=isHeadlight()) setHeadlight(isheadlight);
811  state >> isviewing; if (isviewing!=isViewing()) setViewing(isviewing);
812  state >> decoremoved; if (decoremoved) removeDecorationMenuOption();
813  VP1Msg::messageVerbose("saveState (deco,headlight,viewing,nodecomenu) = ("
814  +str(isdeco)+", "+str(isheadlight)+", "+str(isviewing)+", "+str(decoremoved)+")");
815 
816  //Antialiasing state:
817  if (version<=5) {
818  SbBool smoothing; int numPasses;
819  state >> smoothing;
820  state >> numPasses;
821  m_d->isantialias=smoothing;
822  }
823  if (version>=6) {
824  state >> m_d->isantialias;
825  }
827  VP1Msg::messageVerbose("restoreState (isantialias)) = ("+str(m_d->isantialias)+")");
828  // getAntialiasing(current_smoothing, current_numPasses);
829  // state >> smoothing;
830  // state >> numPasses;
831  // if (numPasses<9999&&(current_smoothing!=smoothing||current_numPasses!=numPasses))
832  // setAntialiasing(smoothing,numPasses);
833  // VP1Msg::messageVerbose("restoreState (smoothing,numPasses)) = ("+str(smoothing)+", "+str(numPasses)+")");
834 
835  //Draw style:
836  int idrawstyle_still, idrawstyle_interactive;
837  state >> idrawstyle_still;
838  state >> idrawstyle_interactive;
839  setDrawStyle(STILL,Imp::intToDrawStyle(idrawstyle_still));
840  setDrawStyle(INTERACTIVE,Imp::intToDrawStyle(idrawstyle_interactive));
841  VP1Msg::messageVerbose("restoreState DrawStyle (still,interactive)) = ("+str(idrawstyle_still)+", "+str(idrawstyle_interactive)+")");
842 
843  //Transparency type:
844  int itransp;
845  state >> itransp;
847  VP1Msg::messageVerbose("restoreState Transparency Type = ("+str(itransp)+")");
848 
849  if (version>=1) {
850 
851  m_d->ensureMenuInit();
852  bool b;
853  state >> b; m_d->popup_tourReturnToStartAction->setChecked(b);
854  state >> b; m_d->popup_tourStartEachEvent->setChecked(b);
855 
856  qint32 ispeed;
857  state >> ispeed;
858  if (ispeed==-2) m_d->popup_tourSpeedVerySlow->setChecked(true);
859  else if (ispeed==-1) m_d->popup_tourSpeedSlow->setChecked(true);
860  else if (ispeed==1) m_d->popup_tourSpeedFast->setChecked(true);
861  else if (ispeed==2) m_d->popup_tourSpeedVeryFast->setChecked(true);
862 
863  state >> b; m_d->popup_tourPartsVertex->setChecked(b);
864  state >> b; m_d->popup_tourPartsInDet->setChecked(b);
865  state >> b; m_d->popup_tourPartsCalo->setChecked(b);
866  state >> b; m_d->popup_tourPartsMuon->setChecked(b);
867 
868  qint32 iloop;
869  state >> iloop;
870  if (iloop==2) m_d->popup_tourLoopTwice->setChecked(true);
871  else if (iloop==3) m_d->popup_tourLoopThrice->setChecked(true);
872  else if (iloop==999) m_d->popup_tourLoopForever->setChecked(true);
873 
874  }
875 
876  if (version>=2) {
877  state >> m_d->resetCamera_isPerspective;
878  state >> m_d->resetCamera_state;
880  bool v(m_d->resetCamera_state!=QByteArray());
881  if (m_d->popup_resetCameraAction->isVisible()!=v)
882  m_d->popup_resetCameraAction->setVisible(v);
883  }
884  }
885  if (version>=3) {
886  m_d->storedViews.clear();
887  QList<QByteArray> persistifiedViews;
888  state >> persistifiedViews;
889  for(QByteArray ba_pv : persistifiedViews) {
890  Imp::StoredView sv(ba_pv);
891  if (sv.isValid())
892  m_d->storedViews << sv;
893  }
895  }
896 
897  if (version>=4)
898  state >> m_d->ambientLightPercentage;
899 
900  if (version>=5) {
901  QByteArray ba;
902  state >> ba;
903  if (ba!=QByteArray()) {
904  if (!m_d->customtoureditor)
906  else
908  }
909  }
910 
913 
914  // ===> Finish up:
915  buffer.close();
916 }

◆ rightWheelFinish()

void VP1ExaminerViewer::rightWheelFinish ( )
protectedvirtual

Definition at line 1573 of file VP1ExaminerViewer.cxx.

1574 {
1575  m_d->grabFocus();
1576  SoQtExaminerViewer::rightWheelFinish();
1577 }

◆ rightWheelMotion()

void VP1ExaminerViewer::rightWheelMotion ( float  val)
protectedvirtual

Definition at line 1580 of file VP1ExaminerViewer.cxx.

1581 {
1582  m_d->grabFocus();
1583  SoQtExaminerViewer::rightWheelMotion(val);
1584 }

◆ rightWheelStart()

void VP1ExaminerViewer::rightWheelStart ( )
protectedvirtual

Definition at line 1587 of file VP1ExaminerViewer.cxx.

1588 {
1589  m_d->grabFocus();
1590  SoQtExaminerViewer::rightWheelStart();
1591 }

◆ saveState()

QByteArray VP1ExaminerViewer::saveState ( )
virtual

Definition at line 638 of file VP1ExaminerViewer.cxx.

639 {
640  VP1Msg::messageVerbose("VP1ExaminerViewer::saveState");
641 
642  // ===> Setup stream writing to a byteArray:
643  QByteArray byteArray;
644  QBuffer buffer(&byteArray);
645  buffer.open(QIODevice::WriteOnly);
646  QDataStream out(&buffer);
647 
648  // ===> Write Data:
649  //Version:
650  out << (qint32)6; //version
651 
652  //Background color:
653  QColor bgdcol(VP1QtInventorUtils::sbcol2qcol(getBackgroundColor()));
654  out << bgdcol;
655  VP1Msg::messageVerbose("saveState background color = "+str(bgdcol));
656 
657  //Render buffer:
658  int ibuffer(0);
659  if (getBufferingType()==BUFFER_SINGLE)
660  ibuffer=1;
661  else if (getBufferingType()==BUFFER_INTERACTIVE)
662  ibuffer=2;
663  out << ibuffer;
664  VP1Msg::messageVerbose("saveState Render Buffer = ("+str(ibuffer)+")");
665 
666  //Camera type and parameters:
667  bool isperspective(currentCamIsPerspective());
668  out << isperspective;
669  out << currentCameraState();
670  VP1Msg::messageVerbose("saveState camera type = "+str(isperspective?"Perspective":"Orthographic"));
671 
672  //Misc:
673  const bool isdeco(isDecoration()), isheadlight(isHeadlight()),isviewing(isViewing());
674  out << isdeco;
675  out << isheadlight;
676  out << isviewing;
678  VP1Msg::messageVerbose("saveState (deco,headlight,viewing,nodecomenu) = ("
679  +str(isdeco)+", "+str(isheadlight)+", "+str(isviewing)+", "+str(m_d->decorationMenuRemoved)+")");
680 
681  //Antialiasing state:
682  out << m_d->isantialias;//version 6+
683  VP1Msg::messageVerbose("saveState (isantialis)) = ("+str(m_d->isantialias)+")");
684  //OLD (up to version 5):
685  // SbBool smoothing; int numPasses;
686  // getAntialiasing(smoothing, numPasses);
687  // out << smoothing;
688  // out << numPasses;
689  // VP1Msg::messageVerbose("saveState (smoothing,numPasses)) = ("+str(smoothing)+", "+str(numPasses)+")");
690 
691  //Draw style:
692  int idrawstyle_still = Imp::drawStyleToInt(getDrawStyle(STILL));
693  int idrawstyle_interactive = Imp::drawStyleToInt(getDrawStyle(INTERACTIVE));
694  out << idrawstyle_still;
695  out << idrawstyle_interactive;
696  VP1Msg::messageVerbose("saveState DrawStyle (still,interactive)) = ("+str(idrawstyle_still)+", "+str(idrawstyle_interactive)+")");
697 
698  //Transparency type:
699  int itransp = VP1QtInventorUtils::transparencyTypeToInt(getTransparencyType());
700  out << itransp;
701  VP1Msg::messageVerbose("saveState Transparency Type = ("+str(itransp)+")");
702 
704  // Added for version 1 //
706 
707  m_d->ensureMenuInit();
708  out << m_d->popup_tourReturnToStartAction->isChecked();
709  out << m_d->popup_tourStartEachEvent->isChecked();
710 
711  qint32 ispeed(0);//medium
712  if (m_d->popup_tourSpeedVerySlow->isChecked()) ispeed = -2;
713  else if (m_d->popup_tourSpeedSlow->isChecked()) ispeed = -1;
714  else if (m_d->popup_tourSpeedFast->isChecked()) ispeed = 1;
715  else if (m_d->popup_tourSpeedVeryFast->isChecked()) ispeed = 2;
716  out << ispeed;
717 
718  out << m_d->popup_tourPartsVertex->isChecked();
719  out << m_d->popup_tourPartsInDet->isChecked();
720  out << m_d->popup_tourPartsCalo->isChecked();
721  out << m_d->popup_tourPartsMuon->isChecked();
722 
723  qint32 iloop(1);
724  if (m_d->popup_tourLoopTwice->isChecked()) iloop = 2;
725  else if (m_d->popup_tourLoopThrice->isChecked()) iloop = 3;
726  else if (m_d->popup_tourLoopForever->isChecked()) iloop = 999;
727  out << iloop;
728 
730  // Added for version 2 //
734 
736  // Added for version 3 //
738 
739  QList<QByteArray> persistifiedViews;
740  for(Imp::StoredView sv : m_d->storedViews)
741  persistifiedViews << sv.persistifiedState();
742  out << persistifiedViews;
743 
745  // Added for version 4 //
747 
749 
751  // Added for version 5 //
753 
754  out << (m_d->customtoureditor ? m_d->customtoureditor->state() : QByteArray());
755 
756  // ===> Finish up:
757  buffer.close();
758  return byteArray;
759 
760 }

◆ setAmbientLight()

void VP1ExaminerViewer::setAmbientLight ( int  a)

Definition at line 2420 of file VP1ExaminerViewer.cxx.

2421 {
2422  VP1Msg::messageVerbose("setAmbientLight()");
2423 
2424  a = std::max(0,std::min(100,a));
2426  return;
2430 }

◆ setAnaglyphStereoColorMasksSlot()

void VP1ExaminerViewer::setAnaglyphStereoColorMasksSlot ( const SbBool  left[3],
const SbBool  right[3] 
)

Definition at line 587 of file VP1ExaminerViewer.cxx.

587  {
588  SoQtExaminerViewer::setAnaglyphStereoColorMasks(left, right);
589 }

◆ setAntiAlias()

void VP1ExaminerViewer::setAntiAlias ( bool  b)

Definition at line 1752 of file VP1ExaminerViewer.cxx.

1753 {
1754  m_d->isantialias=b;
1755  b ? setAntialiasing(true,4) : setAntialiasing(false,1);
1756  std::cout << "antiAliasing set." << std::endl;
1757 }

◆ setAntialiasing()

void VP1ExaminerViewer::setAntialiasing ( SbBool  smoothing,
int  numPasses 
)
virtual

Definition at line 1648 of file VP1ExaminerViewer.cxx.

1649 {
1650  VP1Msg::messageDebug("VP1ExaminerViewer::setAntialiasing()");
1651 
1652  SoQtExaminerViewer::setAntialiasing(smoothing, numPasses); // Needed for offscreen rendering (i.e. snapshots).
1653 
1654 
1655  // --- OLD AA method ---
1656  // QGLWidget* qglw = (QGLWidget*)getGLWidget();
1657  // QGLFormat fmt = qglw->format();
1658  // fmt.setSampleBuffers(smoothing);
1659  // fmt.setSamples(numPasses);
1660  // qglw->setFormat(fmt); // note: this is supposedly deprecated..
1661  // qglw->makeCurrent();
1662 
1663  // if(smoothing && numPasses > 1)
1664  // glEnable(GL_MULTISAMPLE);
1665  // else
1666  // glDisable(GL_MULTISAMPLE);
1667 
1668  bool printWarning = false;
1669  const char* env_aa;
1670  #ifndef BUILDVP1LIGHT
1671  env_aa = std::getenv("VP1_ADVANCED_ANTIALIASING");
1672  #else
1673  bool antialiasingIsOn = VP1QtUtils::expertSettingIsOn("general","ExpertSettings/VP1_ADVANCED_ANTIALIASING");
1674  if(antialiasingIsOn){
1675  env_aa = "1";
1676  } else {
1677  env_aa = "0";
1678  }
1679  #endif
1680  if (env_aa != NULL) {
1681  std::string env_aa_string( env_aa );
1682  if(env_aa_string == "1") {
1683 
1684  // print a warning message, on the first time
1685  if ( ! std::getenv("VP1_ADVANCED_ANTIALIASING_PRINTMSG")) {
1686  VP1Msg::messageWarningRed("You switched ON advanced anti-aliasing. That's very good, but please notice that this method DOES NOT WORK on LXPLUS machines, currently, because of their old graphics drivers! If you are on LXPLUS, this will likely freeze VP1... If that's the case, please restart VP1 without the '-advanced-aa' flag.");
1687  }
1688  ::setenv("VP1_ADVANCED_ANTIALIASING_PRINTMSG", "1", 1/*override present value*/); // TODO: move to Qt settings
1689 
1690  // --- NEW AA method (26Sep2017) --- it works, but not on LXPLUS!!
1691  if (smoothing) {
1692  VP1Msg::message("VP1ExaminerViewer: turning AA on.");
1693 
1694  VP1Msg::message("Sep 2017: AA is now done using a new technique so please let hn-atlas-vp1-help@cern.ch know of any problems.");
1695  //FIXME - remove above messages at some point? EJWM.
1696 
1697  if (getGLRenderAction()->isSmoothing() != smoothing)
1698  getGLRenderAction()->setSmoothing(smoothing); // --> quite ugly outcome!
1699 
1700  int buffers = 4;
1701  #if SOQT_MAJOR_VERSION > 1 || (SOQT_MAJOR_VERSION == 1 && SOQT_MINOR_VERSION >= 5)
1702  if (getSampleBuffers() != buffers)
1703  setSampleBuffers(buffers);
1704  #else
1705  if (buffers > 1)
1706  VP1Msg::message("Multisampling is not supported by SoQT < 1.5, this anti-aliasing mode is disabled");
1707  #endif
1708  }
1709  else {
1710  VP1Msg::message("VP1ExaminerViewer: turning AA off.");
1711  getGLRenderAction()->setSmoothing(smoothing);
1712  setSampleBuffers(0);
1713  }
1714  }
1715  else {
1716  printWarning = true;
1717  }
1718  }
1719  else {
1720  printWarning = true;
1721  }
1722 
1723  if (printWarning) {
1724  VP1Msg::messageWarningRed("Anti-aliasing is using low-quality mode only, because of problems with the graphic drivers installed on LXPLUS machines. If you are not running VP1 on LXPLUS machine (for example, if you are running it on a custom SLC6 machine), you can start VP1 again using the command-line flag '-advanced-aa'.");
1725  }
1726 
1727  m_d->isantialias=smoothing;
1728 }

◆ setBufferingType()

void VP1ExaminerViewer::setBufferingType ( SoQtViewer::BufferType  bt)
virtual

Definition at line 1642 of file VP1ExaminerViewer.cxx.

1643 {
1644  SoQtExaminerViewer::setBufferingType(bt);
1645 }

◆ setCameraType()

void VP1ExaminerViewer::setCameraType ( SoType  type)
virtual

Definition at line 1480 of file VP1ExaminerViewer.cxx.

1481 {
1482  VP1Msg::messageVerbose("VP1ExaminerViewer::setCameraType()");
1483  m_d->grabFocus();
1484  if (rightWheelLabel)
1485  rightWheelLabel->setUpdatesEnabled(false);
1486  SoQtExaminerViewer::setCameraType(type);
1487  setRightWheelString("Zoom");
1488  if (rightWheelLabel) {
1489  rightWheelLabel->setVisible(true);
1490  rightWheelLabel->setUpdatesEnabled(true);
1491  }
1492 
1493  // get default stereo values and set them as starting point for the stereo editor
1494  if (getCamera()) {
1495  stereo_offset_camera = getCamera()->getStereoAdjustment();
1496  stereo_parallax_camera = getCamera()->getBalanceAdjustment();
1497  stereo_offset_viewer = getStereoOffset();
1498  }
1499 }

◆ setDrawStyle()

void VP1ExaminerViewer::setDrawStyle ( SoQtViewer::DrawType  t,
SoQtViewer::DrawStyle  s 
)
virtual

Definition at line 1737 of file VP1ExaminerViewer.cxx.

1738 {
1739  SoQtExaminerViewer::setDrawStyle(t,s);
1740 }

◆ setSceneGraph()

void VP1ExaminerViewer::setSceneGraph ( SoNode *  n)
virtual

Definition at line 3115 of file VP1ExaminerViewer.cxx.

3116 {
3117  VP1Msg::messageVerbose("VP1ExaminerViewer::setSceneGraph()");
3118 
3119  if (!m_d->actualSceneGraph) {
3120  m_d->actualSceneGraph = new SoGroup;
3121  m_d->actualSceneGraph->ref();
3122  if (!m_d->environmentNode) {
3123  m_d->environmentNode = new SoEnvironment;
3124  m_d->environmentNode->ref();
3125  }
3127  m_d->actualSceneGraph->addChild(m_d->environmentNode);
3128  SoQtExaminerViewer::setSceneGraph(m_d->actualSceneGraph);
3129  }
3130  while(m_d->actualSceneGraph->getNumChildren()>1)
3131  m_d->actualSceneGraph->removeChild(1);
3132 
3133  if (n)
3134  m_d->actualSceneGraph->addChild(n);
3135 }

◆ setSeekMode()

void VP1ExaminerViewer::setSeekMode ( SbBool  enable)
virtual

Definition at line 1502 of file VP1ExaminerViewer.cxx.

1503 {
1504  VP1Msg::messageVerbose("VP1ExaminerViewer::setSeekMode()");
1505  m_d->grabFocus();
1506  SoQtExaminerViewer::setSeekMode(enable);
1507 }

◆ setStereoOffsetSlot()

void VP1ExaminerViewer::setStereoOffsetSlot ( float  offset)

Definition at line 573 of file VP1ExaminerViewer.cxx.

573  {
574  VP1Msg::messageDebug("VP1ExaminerViewer::setStereoOffsetSlot() - offset: " + QString::number(offset));
575  SoQtExaminerViewer::setStereoOffset(offset);
576 }

◆ setStereoTypeSlot()

SbBool VP1ExaminerViewer::setStereoTypeSlot ( SoQtViewer::StereoType  type)

Definition at line 580 of file VP1ExaminerViewer.cxx.

580  {
581  VP1Msg::messageDebug("VP1ExaminerViewer::setStereoTypeSlot() - type: " + QString::number(type));
582  return SoQtExaminerViewer::setStereoType(type);
583 }

◆ setTransparencyType()

void VP1ExaminerViewer::setTransparencyType ( SoGLRenderAction::TransparencyType  t)
virtual

Definition at line 1731 of file VP1ExaminerViewer.cxx.

1732 {
1733  SoQtExaminerViewer::setTransparencyType(t);
1734 }

◆ setViewing()

void VP1ExaminerViewer::setViewing ( SbBool  enable)
virtual

Definition at line 1510 of file VP1ExaminerViewer.cxx.

1511 {
1512  VP1Msg::messageVerbose("VP1ExaminerViewer::setViewing()");
1513  m_d->grabFocus();
1514  SoQtExaminerViewer::setViewing(enable);
1515 }

◆ showPopupMenu()

void VP1ExaminerViewer::showPopupMenu ( )
virtual

Definition at line 2439 of file VP1ExaminerViewer.cxx.

2440 {
2441  VP1Msg::messageVerbose("VP1ExaminerViewer: Showing popup menu.");
2442  if (!m_d->ensureMenuInit())
2443  return;
2445 
2446  //Execute
2447  QAction * selAct = m_d->popup_menu->exec(QCursor::pos());
2448 
2449  //Act on selection:
2450  if (!selAct) {
2451  VP1Msg::messageVerbose(" => No selection.");
2452  return;
2453  }
2454  if ( selAct == m_d->popup_bgdColAction ) {
2455  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu Change background colour.");
2456  if (isAnimating())
2457  stopAnimating();
2458  QColor oldcol = VP1QtInventorUtils::sbcol2qcol(getBackgroundColor());
2459  QColor col = QColorDialog::getColor(oldcol, getWidget());
2460  if (col!=oldcol)
2461  setBackgroundColor(VP1QtInventorUtils::qcol2sbcol(col));
2462  return;
2463  }
2464  if ( selAct == m_d->popup_ambientLightAction ) {
2465  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu ambient light editor triggered");
2466  bool ok;
2467  // int newamb = QInputDialog::getInteger(getWidget(), "Change ambient light",
2468  int newamb = QInputDialog::getInt(getWidget(), "Change ambient light",
2469  "New ambient light percentage:",
2470  ambientLight(),0,100,1,&ok);
2471  if (ok)
2472  setAmbientLight(newamb);
2473  return;
2474  }
2475  if ( selAct == m_d->popup_headLightAction ) {
2476  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu head light changed to "+VP1Msg::str(m_d->popup_headLightAction->isChecked()));
2477  setHeadlight(m_d->popup_headLightAction->isChecked());
2478  return;
2479  }
2480  if ( selAct == m_d->popup_hidedecorationsaction ) {
2481  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu hide controls changed to "+VP1Msg::str(m_d->popup_hidedecorationsaction->isChecked()));
2482  setDecoration(! m_d->popup_hidedecorationsaction->isChecked());
2483  return;
2484  }
2485  if ( selAct == m_d->popup_antiAliasAction ) {
2486  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu anti aliasing changed to "+VP1Msg::str(m_d->popup_antiAliasAction->isChecked()));
2487  setAntiAlias(m_d->popup_antiAliasAction->isChecked());
2488  m_d->grabFocus();//Needed since the GL calls triggered when setting antialiasing makes us loose focus (we obviusly just had it).
2489  VP1Msg::messageVerbose("Anti-aliasing, done.");
2490  return;
2491  }
2492  if ( selAct == m_d->popup_dumpSceneAction ) {
2493  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu Dump scene to an *.iv (OpenInventor) file");
2494  dumpSceneToFile();
2495  return;
2496  }
2497  if ( selAct == m_d->popup_dumpSceneVRMLAction ) {
2498  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu Dump scene to a *.wrl (VRML) file");
2500  return;
2501  }
2502 
2503  if ( selAct == m_d->popup_toSVGAction ) {
2504  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu Produce SVG image");
2505  produceSVGImage();
2506  return;
2507  }
2508 
2509  if ( selAct == m_d->popup_toEPSAction ) {
2510  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu Produce EPS image");
2511  produceEPSImage();
2512  return;
2513  }
2514 
2515  if ( selAct == m_d->popup_resetCameraAction ) {
2516  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu Reset camera");
2517  resetCamera();
2518  return;
2519  }
2520  if (m_d->popup_drawstyle_still_actions.contains(selAct)) {
2521  SoQtViewer::DrawStyle ds = Imp::intToViewerDrawStyle(selAct->data().toInt());
2522  if (VP1Msg::verbose())
2523  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu still draw style selected: "
2525  if (ds!=getDrawStyle(STILL))
2526  setDrawStyle(STILL,ds);
2527  return;
2528  }
2529  if (m_d->popup_drawstyle_interactive_actions.contains(selAct)) {
2530  SoQtViewer::DrawStyle ds = Imp::intToViewerDrawStyle(selAct->data().toInt());
2531  if (VP1Msg::verbose())
2532  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu interactive draw style selected: "
2534  if (ds!=getDrawStyle(INTERACTIVE))
2535  setDrawStyle(INTERACTIVE,ds);
2536  return;
2537  }
2538  if (m_d->popup_transptype_actions.contains(selAct)) {
2539  SoGLRenderAction::TransparencyType type = VP1QtInventorUtils::intToTransparencyType(selAct->data().toInt());
2540  if (VP1Msg::verbose())
2541  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu transparency type selected: "
2544  return;
2545  }
2546 
2547  if (m_d->storeViewActions.contains(selAct)) {
2548  QString name = selAct->data().toString();
2549  VP1Msg::messageVerbose("Storing current view as "+name);
2550 
2551  bool camPerspective = currentCamIsPerspective();
2552  QByteArray camState = currentCameraState();
2553  QPixmap snapShot = VP1QtInventorUtils::renderToPixmap(this, 40, 40,false);
2554 
2555  Imp::StoredView sv(camState, camPerspective, snapShot, name);
2556  //Remove old stored views with that name (if any)
2557  int i(0);
2558  bool replaced(false);
2559  for(Imp::StoredView oldsv : m_d->storedViews) {
2560  if (oldsv.name()==name) {
2561  m_d->storedViews.replace(i,sv);
2562  replaced = true;
2563  break;
2564  }
2565  ++i;
2566  }
2567  if (!replaced)
2568  m_d->storedViews << sv;
2570  return;
2571  }
2572 
2573  if (m_d->zoomToViewActions.contains(selAct)) {
2574  QString name = selAct->data().toString();
2575  SoGroup * root = dynamic_cast<SoGroup*>(getSceneGraph());
2576  SoCamera * camera = getCamera();
2577  if (root&&camera) {
2578  for(Imp::StoredView sv : m_d->storedViews) {
2579  if (sv.name()==name) {
2580  if (isAnimating())
2581  stopAnimating();
2582  VP1CameraHelper::animatedZoomToCameraState( camera,root,sv.camState(),1.5, 100.0, 100.0, true );
2583  break;
2584  }
2585  }
2586  } else {
2587  VP1Msg::messageDebug("VP1CameraHelper Error: Attempting to zoom"
2588  " to stored view, but can't get root and camera pointers");
2589  }
2590  return;
2591  }
2592 
2593 
2594 
2595  if (m_d->restoreViewActions.contains(selAct)) {
2596  QString name = selAct->data().toString();
2597  SoGroup * root = dynamic_cast<SoGroup*>(getSceneGraph());
2598  SoCamera * camera = getCamera();
2599  if (root&&camera) {
2600  for(Imp::StoredView sv : m_d->storedViews) {
2601  if (sv.name()==name) {
2602  if (!m_d->fitsCurrentCamType(sv))
2603  toggleCameraType();
2604  if (isAnimating())
2605  stopAnimating();
2606  QByteArray ba = sv.camState();
2608  break;
2609  }
2610  }
2611  } else {
2612  VP1Msg::messageDebug("VP1CameraHelper Error: Attempting to zoom"
2613  " to stored view, but can't get root and camera pointers");
2614  }
2615  return;
2616 
2617  }
2618 
2619  if (m_d->deleteViewActions.contains(selAct)) {
2620  QString name = selAct->data().toString();
2621  int i(0);
2622  for(Imp::StoredView sv : m_d->storedViews) {
2623  if (sv.name()==name) {
2624  m_d->storedViews.removeAt(i);
2625  break;
2626  }
2627  ++i;
2628  }
2630  return;
2631  }
2632 
2633  if (selAct==m_d->customtour_launcheditor) {
2634  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu Launch custom tour editor.");
2635  if (!m_d->customtoureditor) {
2637  QObject::connect(&(m_d->animationSequencer),SIGNAL(clipVolumePercentOfATLAS(double)),m_d->customtoureditor,SLOT(setClipVolumePercentOfATLAS(double)));
2640  if (m_d->customtoureditorState!=QByteArray()) {
2642  m_d->customtoureditorState = QByteArray();
2643  }
2644  }
2645  m_d->customtoureditor->show();
2646  //Fixme: deal with minimised state!
2647  return;
2648  }
2649 
2650  if (selAct==m_d->customtour_execute) {
2651  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu Execute custom tour.");
2652  startCustomTour();
2653  return;
2654  }
2655 
2656  if (selAct==m_d->action_movieenabled) {
2657  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu movie enabled changed.");
2659  return;
2660  }
2661  if (selAct==m_d->action_moviewidth) {
2662  int old = m_d->action_moviewidth->data().toInt();
2663  bool ok;
2664  // int newwidth = QInputDialog::getInteger(getWidget(), "Change movie width",
2665  int newwidth = QInputDialog::getInt(getWidget(), "Change movie width",
2666  "New movie width:", old,1,4000,1,&ok);
2667  if (ok&&old!=newwidth) {
2668  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu changed movie width to "+VP1Msg::str(newwidth));
2669  m_d->action_moviewidth->setData(newwidth);
2671  }
2672  return;
2673  }
2674  if (selAct==m_d->action_movieheight) {
2675  int old = m_d->action_movieheight->data().toInt();
2676  bool ok;
2677  // int newheight = QInputDialog::getInteger(getWidget(), "Change movie height",
2678  int newheight = QInputDialog::getInt(getWidget(), "Change movie height",
2679  "New movie height:", old,1,4000,1,&ok);
2680  if (ok&&old!=newheight) {
2681  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu changed movie height to "+VP1Msg::str(newheight));
2682  m_d->action_movieheight->setData(newheight);
2684  }
2685  return;
2686  }
2687  if (selAct==m_d->action_moviefps) {
2688  int old = m_d->action_moviefps->data().toInt();
2689  bool ok;
2690  // int newfps = QInputDialog::getInteger(getWidget(), "Change movie FPS",
2691  int newfps = QInputDialog::getInt(getWidget(), "Change movie FPS",
2692  "New movie frames per second:", old,1,4000,1,&ok);
2693  if (ok&&old!=newfps) {
2694  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu changed movie fps to "+VP1Msg::str(newfps));
2695  m_d->action_moviefps->setData(newfps);
2697  }
2698  return;
2699  }
2700  if (selAct==m_d->action_movieoutdir) {
2701  QString old = m_d->action_movieoutdir->data().toString();
2702  QString newoutdir = QFileDialog::getExistingDirectory ( getWidget(), "Select movie frame output directory",old);
2703  if (!newoutdir.isEmpty()&&old!=newoutdir) {
2704  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu changed movie outdir to "+VP1Msg::str(newoutdir));
2705  m_d->action_movieoutdir->setData(newoutdir);
2707  }
2708  return;
2709  }
2710  if (selAct==m_d->action_moviefadetocurrentview) {
2712  return;
2713  }
2714 
2715  if (selAct==m_d->popup_tourReturnToStartAction
2716  ||selAct==m_d->popup_tourStartEachEvent
2717  ||selAct==m_d->popup_tourSpeedVerySlow
2718  ||selAct==m_d->popup_tourSpeedSlow
2719  ||selAct==m_d->popup_tourSpeedMedium
2720  ||selAct==m_d->popup_tourSpeedFast
2721  ||selAct==m_d->popup_tourSpeedVeryFast
2722  ||selAct==m_d->popup_tourPartsVertex
2723  ||selAct==m_d->popup_tourPartsInDet
2724  ||selAct==m_d->popup_tourPartsCalo
2725  ||selAct==m_d->popup_tourPartsMuon
2726  ||selAct==m_d->popup_tourLoopOnce
2727  ||selAct==m_d->popup_tourLoopTwice
2728  ||selAct==m_d->popup_tourLoopThrice
2729  ||selAct==m_d->popup_tourLoopForever) {
2730  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu tour setting changed.");
2731  return;
2732  }
2733  if (selAct==m_d->popup_tourExecute) {
2734  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu Tour Execute selected => starting tour.");
2735  startTour();
2736  return;
2737  }
2738 
2739 
2740  // stereo view actions
2741 
2742 
2743  if (selAct==m_d->stereo_launcheditor) {
2744  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu Launch custom STEREO editor.");
2745  if (!m_d->customstereoeditor) {
2747 // m_d->customstereoeditor->disableObjectWhenTourNotAvailable(m_d->customtour_execute);
2748 // if (m_d->customstereoeditorState!=QByteArray()) { //TODO: implement save stereo settings
2749 // m_d->customstereoeditor->setState(m_d->customstereoeditorState);
2750 // m_d->customstereoeditorState = QByteArray();
2751 // }
2752  }
2753  m_d->customstereoeditor->show();
2754  //Fixme: deal with minimised state!
2755  return;
2756  }
2757 
2758 // N.B.!! --> those separate actions below are not needed anymore,
2759 // because we introduced the stereo editor window
2760 
2761 // if (m_d->popup_stereo_offset_actions.contains(selAct)) {
2762 //
2764 // float old = m_d->stereo_offset_value; //->data().toFloat();
2765 //
2766 // // new value
2767 // float offset = selAct->data().toFloat();
2768 //
2769 // int newoffset = offset;
2770 // if (old != newoffset) {
2771 // VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu stereo offset selected: "
2772 // +VP1Msg::str(newoffset));
2773 // m_d->stereo_offset_value = newoffset;
2774 // }
2775 //
2776 // setStereoOffsetSlot(offset);
2777 // return;
2778 // }
2779 //
2780 // if (selAct==m_d->popup_stereo_offset_value_action) {
2781 //
2782 // float old = m_d->popup_stereo_offset_value_action->data().toFloat();
2783 // bool ok;
2784 // int newoffset = QInputDialog::getDouble(getWidget(), "Change stereo OFFSET - 0.1 is the standard offset between left and right eye",
2785 // "New stereo offset: ", old,0.1,4000,1,&ok);
2786 // if (ok && old != newoffset) {
2787 // VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu changed stereo offset to "+VP1Msg::str(newoffset));
2788 // m_d->popup_stereo_offset_value_action->setData(newoffset);
2789 // setStereoOffsetSlot(newoffset);
2790 // m_d->popup_stereo_offset_value_action->setText("Change STEREO offset [current: "+QString::number(newoffset)+"]");
2791 // }
2792 // return;
2793 // }
2794 //
2795  if (selAct==m_d->popup_focal_value_action) {
2796 
2797  // float old = m_d->popup_focal_value_action->data().toFloat();
2798  bool ok;
2799  SoPerspectiveCamera * camera = dynamic_cast<SoPerspectiveCamera*>(getCamera());
2800  if (! (camera==NULL) ) {
2801  float current_value = camera->focalDistance.getValue();
2802  int newfocal = QInputDialog::getDouble(getWidget(),
2803  "Change focal length", // title
2804  "New focal length: ", // label
2805  current_value, // initial value
2806  0.1, // min value
2807  2147483647, // max value
2808  1, // decimals
2809  &ok);
2810  if (ok && current_value != newfocal) {
2811  VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu changed focal length to "+VP1Msg::str(newfocal));
2812  m_d->popup_focal_value_action->setData(newfocal);
2813  // SoCamera *camera = getCamera();
2814  camera->focalDistance.setValue(newfocal);
2815  // camera->heightAngle.setValue(newfocal);
2816  m_d->popup_focal_value_action->setText("Change FOCAL LENGTH value [current: "+QString::number(newfocal)+"]");
2817  }
2818  } else {
2819  VP1Msg::message("Warning! No 'camera'...");
2820  }
2821  return;
2822  }
2823 //
2824 //
2825 // if (m_d->popup_stereo_type_actions.contains(selAct)) {
2826 //
2827 // SoQtViewer::StereoType type = m_d->intToViewerStereoType(selAct->data().toInt());
2828 //
2829 // if (VP1Msg::verbose())
2830 // VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu stereo type selected: "
2831 // +m_d->viewerStereoType2PrettyString(type));
2832 //
2833 // setStereoTypeSlot(type);
2834 //
2835 // // enable the relevant menus
2836 // if (type == SoQtViewer::STEREO_ANAGLYPH) {
2837 // m_d->stereo_set_anaglyph_menu->setEnabled(true);
2838 // } else {
2839 // m_d->stereo_set_anaglyph_menu->setEnabled(false);
2840 // }
2841 //
2842 //
2843 // return;
2844 // }
2845 // if (m_d->popup_stereo_anaglyph_actions.contains(selAct)) {
2846 //
2847 // QString type = selAct->data().toString();
2848 //
2849 // if (VP1Msg::verbose())
2850 // VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu stereo anaglyph selected: "
2851 // +type);
2852 //
2853 // // default values for normal Anaglyph red-cyan view
2854 // SbBool leftFilter[3] = {true, false, false};
2855 // SbBool rightFilter[3] = {false, true, true};
2856 //
2857 // if (type.contains("Left-eye")) {
2858 // SbBool leftFilter[3] = {true, true, true};
2859 // SbBool rightFilter[3] = {false, false, false};
2860 // setAnaglyphStereoColorMasksSlot(leftFilter, rightFilter);
2861 // }
2862 // else if (type.contains("Right-eye")) {
2863 // SbBool leftFilter[3] = {false, false, false};
2864 // SbBool rightFilter[3] = {true, true, true};
2865 // setAnaglyphStereoColorMasksSlot(leftFilter, rightFilter);
2866 // }
2867 // else {
2868 // setAnaglyphStereoColorMasksSlot(leftFilter, rightFilter);
2869 // }
2870 // return;
2871 // }
2872 //
2873 //
2874 // // STEREO - Camera
2875 // if (selAct==m_d->popup_stereo_offset_value_action_camera) {
2876 //
2877 // float old = m_d->popup_stereo_offset_value_action_camera->data().toFloat();
2878 // bool ok;
2879 // float newoffset = QInputDialog::getDouble(getWidget(), "Change stereo OFFSET (Camera) - 0.1 is the standard offset between left and right eye",
2880 // "New stereo offset: ", old,0.1,4000,1,&ok);
2881 // if (ok && old != newoffset) {
2882 // VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu changed CAMERA stereo offset to "+VP1Msg::str(newoffset));
2883 // m_d->popup_stereo_offset_value_action_camera->setData(newoffset);
2884 //
2885 // SoCamera *camera = getCamera();
2886 // camera->setStereoAdjustment(newoffset);
2888 // m_d->popup_stereo_offset_value_action_camera->setText("Change CAMERA STEREO offset [current: "+QString::number(newoffset)+"]");
2889 // }
2890 // return;
2891 // }
2892 // if (selAct==m_d->popup_stereo_balance_value_action_camera) {
2893 //
2894 // float old = m_d->popup_stereo_balance_value_action_camera->data().toFloat();
2895 // bool ok;
2896 // float newoffset = QInputDialog::getDouble(getWidget(), "Change stereo OFFSET (Camera) - 0.1 is the standard offset between left and right eye",
2897 // "New stereo offset: ", old,0.1,4000,1,&ok);
2898 // if (ok && old != newoffset) {
2899 // VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu changed CAMERA stereo offset to "+VP1Msg::str(newoffset));
2900 // m_d->popup_stereo_balance_value_action_camera->setData(newoffset);
2901 //
2902 // SoCamera *camera = getCamera();
2903 // camera->setBalanceAdjustment(newoffset);
2905 // m_d->popup_stereo_balance_value_action_camera->setText("Change CAMERA STEREO balance [current: "+QString::number(newoffset)+"]");
2906 // }
2907 // return;
2908 // }
2909 //
2910 //
2911 // if (m_d->popup_stereo_anaglyph_actions_camera.contains(selAct)) {
2912 //
2913 // QString type = selAct->data().toString();
2914 //
2915 // if (VP1Msg::verbose())
2916 // VP1Msg::messageVerbose("VP1ExaminerViewer::showPopupMenu CAMERA stereo view mode selected: "
2917 // +type);
2918 //
2919 // SoCamera *camera = getCamera();
2920 //
2921 // if (type.contains("Left-eye")) {
2922 // camera->setStereoMode(SoCamera::LEFT_VIEW);
2923 // }
2924 // else if (type.contains("Right-eye")) {
2925 // camera->setStereoMode(SoCamera::RIGHT_VIEW);
2926 // }
2927 // else {
2928 // camera->setStereoMode(SoCamera::MONOSCOPIC);
2929 // }
2930 // return;
2931 // }
2932 
2933 
2934 
2935 
2936  // default
2937  VP1Msg::messageDebug("VP1ExaminerViewer::showPopupMenu ERROR: Unknown selected item!");
2938  return;
2939 
2940 }

◆ startCustomTour()

void VP1ExaminerViewer::startCustomTour ( )

Definition at line 1244 of file VP1ExaminerViewer.cxx.

1245 {
1246  VP1Msg::messageVerbose("startCustomTour begin.");
1247 
1249  return;
1250 
1251  m_d->grabFocus();
1252  if (isAnimating())
1253  stopAnimating();
1254  bool jump(m_d->action_movieenabled->isChecked());
1256  toggleCameraType();
1257  jump = true;
1258  }
1262  //Start animation:
1264 }

◆ startTour()

void VP1ExaminerViewer::startTour ( )

Definition at line 1164 of file VP1ExaminerViewer.cxx.

1165 {
1166  VP1Msg::messageVerbose("VP1ExaminerViewer::startTour()");
1167  if (m_d->detectorViewButtons)
1169 }

◆ startTourEachEvent()

bool VP1ExaminerViewer::startTourEachEvent ( ) const

Definition at line 1172 of file VP1ExaminerViewer.cxx.

1173 {
1174  VP1Msg::messageVerbose("VP1ExaminerViewer::startTourEachEvent()");
1175  return m_d->popup_tourStartEachEvent ? m_d->popup_tourStartEachEvent->isChecked() : false;
1176 }

◆ storeCameraParametersForReset()

void VP1ExaminerViewer::storeCameraParametersForReset ( )

Definition at line 1814 of file VP1ExaminerViewer.cxx.

1815 {
1816  if (m_d->resetCamera_state!=QByteArray())
1817  return;
1818  //Camera type and parameters:
1821 
1823  m_d->popup_resetCameraAction->setVisible(true);
1824 }

◆ str() [1/30]

static QString VP1String::str ( const Amg::Vector3D t)
inlinestaticinherited

Definition at line 98 of file VP1String.h.

98 { return "("+str(t.x())+", "+str(t.y())+", "+str(t.z())+")"; }

◆ str() [2/30]

static QString VP1String::str ( const bool  b)
inlinestaticinherited

Definition at line 53 of file VP1String.h.

53 { return b?"True":"False"; }

◆ str() [3/30]

static QString VP1String::str ( const char *  c)
inlinestaticinherited

Definition at line 50 of file VP1String.h.

50 { return c; }

◆ str() [4/30]

static QString VP1String::str ( const double &  d)
inlinestaticinherited

Definition at line 81 of file VP1String.h.

81 { return QString::number(d); }

◆ str() [5/30]

static QString VP1String::str ( const float &  f)
inlinestaticinherited

Definition at line 82 of file VP1String.h.

82 { return QString::number(f); }

◆ str() [6/30]

template<class T >
static QString VP1String::str ( const HepGeom::BasicVector3D< T > &  t)
inlinestaticinherited

Definition at line 95 of file VP1String.h.

95 { return "("+str(t.x())+", "+str(t.y())+", "+str(t.z())+")"; }

◆ str() [7/30]

QString VP1String::str ( const QColor &  c)
staticinherited

Definition at line 30 of file VP1String.cxx.

31 {
32  return c.isValid() ? c.name() : "Invalid";
33 }

◆ str() [8/30]

template<class T >
static QString VP1String::str ( const QFlags< T > &  f)
inlinestaticinherited

Definition at line 91 of file VP1String.h.

91 { return "0x"+QString::number(f, 16).toUpper().rightJustified(8,'0'); }

◆ str() [9/30]

template<class T >
static QString VP1String::str ( const QList< T > &  t)
inlinestaticinherited

Definition at line 102 of file VP1String.h.

102 { return "QList of size"+QString::number(t.size()); }

◆ str() [10/30]

static QString VP1String::str ( const QString &  s)
inlinestaticinherited

Definition at line 49 of file VP1String.h.

49 { return s; }

◆ str() [11/30]

QString VP1String::str ( const SbColor &  c)
staticinherited

Definition at line 36 of file VP1String.cxx.

37 {
39 }

◆ str() [12/30]

QString VP1String::str ( const SbVec2d &  v)
staticinherited

Definition at line 61 of file VP1String.cxx.

61 { double x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [13/30]

QString VP1String::str ( const SbVec2f &  v)
staticinherited

Definition at line 62 of file VP1String.cxx.

62 { float x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [14/30]

QString VP1String::str ( const SbVec2s &  v)
staticinherited

Definition at line 63 of file VP1String.cxx.

63 { short x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [15/30]

QString VP1String::str ( const SbVec3d &  v)
staticinherited

Definition at line 64 of file VP1String.cxx.

64 { double x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [16/30]

QString VP1String::str ( const SbVec3f &  v)
staticinherited

Definition at line 65 of file VP1String.cxx.

65 { float x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [17/30]

QString VP1String::str ( const SbVec3s &  v)
staticinherited

Definition at line 66 of file VP1String.cxx.

66 { short x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [18/30]

QString VP1String::str ( const SbVec4d &  v)
staticinherited

Definition at line 67 of file VP1String.cxx.

67 { double x,y,z,t; v.getValue(x,y,z,t); return "("+str(x)+", "+str(y)+", "+str(z)+", "+str(t)+")"; }

◆ str() [19/30]

QString VP1String::str ( const SbVec4f &  v)
staticinherited

Definition at line 68 of file VP1String.cxx.

68 { float x,y,z,t; v.getValue(x,y,z,t); return "("+str(x)+", "+str(y)+", "+str(z)+", "+str(t)+")"; }

◆ str() [20/30]

template<class T >
static QString VP1String::str ( const T *  t)
inlinestaticinherited

Definition at line 87 of file VP1String.h.

87 { return str(static_cast<const void* >(t)); }

◆ str() [21/30]

QString VP1String::str ( const void *  p)
staticinherited

Definition at line 48 of file VP1String.cxx.

49 {
50  if (p) {
51  std::ostringstream s;
52  s << p;
53  // Explicitly naming QString here avoids a cppcheck warning.
54  return QString (s.str().c_str());
55  } else {
56  return "NULL";
57  }
58 }

◆ str() [22/30]

QString VP1String::str ( const VP1Interval i)
staticinherited

Definition at line 42 of file VP1String.cxx.

43 {
44  return i.toString();
45 }

◆ str() [23/30]

static QString VP1String::str ( int  n)
inlinestaticinherited

Definition at line 77 of file VP1String.h.

77 { return QString::number(n); }

◆ str() [24/30]

static QString VP1String::str ( long  n)
inlinestaticinherited

Definition at line 75 of file VP1String.h.

75 { return QString::number(n); }

◆ str() [25/30]

static QString VP1String::str ( qlonglong  n)
inlinestaticinherited

Definition at line 79 of file VP1String.h.

79 { return QString::number(n); }

◆ str() [26/30]

static QString VP1String::str ( qulonglong  n)
inlinestaticinherited

Definition at line 80 of file VP1String.h.

80 { return QString::number(n); }

◆ str() [27/30]

static QString VP1String::str ( short int  n)
inlinestaticinherited

Definition at line 73 of file VP1String.h.

73 { return QString::number(n); }

◆ str() [28/30]

static QString VP1String::str ( uint  n)
inlinestaticinherited

Definition at line 78 of file VP1String.h.

78 { return QString::number(n); }

◆ str() [29/30]

static QString VP1String::str ( ulong  n)
inlinestaticinherited

Definition at line 76 of file VP1String.h.

76 { return QString::number(n); }

◆ str() [30/30]

static QString VP1String::str ( unsigned short int  n)
inlinestaticinherited

Definition at line 74 of file VP1String.h.

74 { return QString::number(n); }

◆ toggleCameraType()

void VP1ExaminerViewer::toggleCameraType ( )
virtual

Definition at line 1472 of file VP1ExaminerViewer.cxx.

1473 {
1474  VP1Msg::messageVerbose("VP1ExaminerViewer::toggleCameraType()");
1475  m_d->grabFocus();
1476  SoQtExaminerViewer::toggleCameraType();
1477 }

◆ viewAll()

void VP1ExaminerViewer::viewAll ( )
virtual

Definition at line 1457 of file VP1ExaminerViewer.cxx.

1458 {
1459  VP1Msg::messageVerbose("VP1ExaminerViewer::viewAll()");
1460  m_d->grabFocus();
1461  if (currentCamIsPerspective()) {
1462  //Fix for bad camera:
1463  toggleCameraType();
1464  toggleCameraType();
1465  //Fixme: Instead make a reset camera followed by a 0 second "zoom" to correct orientation?
1466  }
1467  SoQtExaminerViewer::viewAll();
1468 
1469 }

Friends And Related Function Documentation

◆ VP1ExaminerViewer_SignalCatcher

friend class VP1ExaminerViewer_SignalCatcher
friend

Definition at line 131 of file VP1ExaminerViewer.h.

Member Data Documentation

◆ m_d

Imp* VP1ExaminerViewer::m_d
private

Definition at line 130 of file VP1ExaminerViewer.h.

◆ stereo_offset_camera

float VP1ExaminerViewer::stereo_offset_camera

Definition at line 91 of file VP1ExaminerViewer.h.

◆ stereo_offset_viewer

float VP1ExaminerViewer::stereo_offset_viewer

Definition at line 93 of file VP1ExaminerViewer.h.

◆ stereo_parallax_camera

float VP1ExaminerViewer::stereo_parallax_camera

Definition at line 92 of file VP1ExaminerViewer.h.


The documentation for this class was generated from the following files:
SoGL2PSAction::SVG
@ SVG
Definition: SoGL2PSAction.h:35
VP1ExaminerViewer::Imp::popup_tourSpeedMedium
QAction * popup_tourSpeedMedium
Definition: VP1ExaminerViewer.cxx:235
VP1ExaminerViewer::Imp::action_movieoutdir
QAction * action_movieoutdir
Definition: VP1ExaminerViewer.cxx:257
VP1ExaminerViewer::setViewing
virtual void setViewing(SbBool enable)
Definition: VP1ExaminerViewer.cxx:1510
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
VP1ExaminerViewer::Imp::popup_toEPSAction
QAction * popup_toEPSAction
Definition: VP1ExaminerViewer.cxx:224
VP1CustomTourEditor::setState
void setState(QByteArray)
Definition: VP1CustomTourEditor.cxx:75
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:257
VP1ExaminerViewer::Imp::popup_ambientLightAction
QAction * popup_ambientLightAction
Definition: VP1ExaminerViewer.cxx:219
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
VP1ExaminerViewer::Imp::button_sethome
QPushButton * button_sethome
Definition: VP1ExaminerViewer.cxx:292
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
max
#define max(a, b)
Definition: cfImp.cxx:41
VP1QtInventorUtils::deserializeSoCameraParameters
static bool deserializeSoCameraParameters(QByteArray &, SoCamera &)
Definition: VP1QtInventorUtils.cxx:959
VP1ExaminerViewer::stereo_offset_viewer
float stereo_offset_viewer
Definition: VP1ExaminerViewer.h:93
VP1CameraHelper::getLastAndNextFrameFileNames
static void getLastAndNextFrameFileNames(QString outputdir, QString prefix, QString &lastOfExistingFiles, QString &nextAvailableFile)
Definition: VP1CameraHelper.cxx:793
VP1ExaminerViewer::removeDecorationMenuOption
virtual void removeDecorationMenuOption()
Definition: VP1ExaminerViewer.cxx:1377
VP1ExaminerViewer::Imp::takeTourButtonClicked
void takeTourButtonClicked()
Definition: VP1ExaminerViewer.cxx:1267
VP1ExaminerViewer::Imp::detectorViewButtons
bool detectorViewButtons
Definition: VP1ExaminerViewer.cxx:281
VP1ExaminerViewer::Imp::updatePopupMenuStates
void updatePopupMenuStates()
Definition: VP1ExaminerViewer.cxx:2215
VP1ExaminerViewer::Imp::customtour_execute
QAction * customtour_execute
Definition: VP1ExaminerViewer.cxx:251
VP1QtInventorUtils::renderToImage
static QImage renderToImage(VP1ExaminerViewer *ra, int pixels_x, int pixels_y, bool transparent_background=false, double actualRenderedSizeFact=1.0)
Definition: VP1QtInventorUtils.cxx:436
VP1ExaminerViewer::Imp::lastSVGFile
QString lastSVGFile
Definition: VP1ExaminerViewer.cxx:322
hist_file_dump.d
d
Definition: hist_file_dump.py:137
VP1ExaminerViewer::Imp::popup_tourSpeedVerySlow
QAction * popup_tourSpeedVerySlow
Definition: VP1ExaminerViewer.cxx:233
VP1ExaminerViewer::Imp::decorationMenuRemoved
bool decorationMenuRemoved
Definition: VP1ExaminerViewer.cxx:299
VP1ExaminerViewer::toggleCameraType
virtual void toggleCameraType()
Definition: VP1ExaminerViewer.cxx:1472
VP1ExaminerViewer::Imp::popup_antiAliasAction
QAction * popup_antiAliasAction
Definition: VP1ExaminerViewer.cxx:217
VP1ExaminerViewer::Imp::restoreViewActions
QList< QAction * > restoreViewActions
Definition: VP1ExaminerViewer.cxx:365
DMTest::C
C_v1 C
Definition: C.h:26
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
VP1ExaminerViewer::Imp::rotZWheelMotion
float rotZWheelMotion(float value, float oldvalue)
Definition: VP1ExaminerViewer.cxx:1594
VP1ExaminerViewer::Imp::resetCamera_isPerspective
bool resetCamera_isPerspective
Definition: VP1ExaminerViewer.cxx:324
AnimationSequencer::startAnimating
void startAnimating(bool skipFirstFrame=false)
Definition: AnimationSequencer.cxx:83
VP1ExaminerViewer::Imp::customtour_launcheditor
QAction * customtour_launcheditor
Definition: VP1ExaminerViewer.cxx:250
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
VP1ExaminerViewer::Imp::popup_transptype_actions
QList< QAction * > popup_transptype_actions
Definition: VP1ExaminerViewer.cxx:227
VP1ExaminerViewer::currentCamIsPerspective
bool currentCamIsPerspective() const
Definition: VP1ExaminerViewer.cxx:1775
VP1ExaminerViewer::setAntialiasing
virtual void setAntialiasing(SbBool smoothing, int numPasses)
Definition: VP1ExaminerViewer.cxx:1648
VP1ExaminerViewer::Imp::rotXWheelMotion
float rotXWheelMotion(float value, float oldvalue)
Definition: VP1ExaminerViewer.cxx:1607
VP1ExaminerViewer::Imp::ambientLightPercentage
int ambientLightPercentage
Definition: VP1ExaminerViewer.cxx:312
VP1ExaminerViewer::Imp::popup_resetCameraAction
QAction * popup_resetCameraAction
Definition: VP1ExaminerViewer.cxx:225
VP1ExaminerViewer::Imp::rotationMode
ROTATIONMODE rotationMode
Which mode is left wheel in?
Definition: VP1ExaminerViewer.cxx:194
GL2PS_EPS
#define GL2PS_EPS
Definition: gl2ps.h:95
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
sendEI_SPB.root
root
Definition: sendEI_SPB.py:34
VP1ExaminerViewer::produceEPSImage
void produceEPSImage(QString filename="")
Definition: VP1ExaminerViewer.cxx:2374
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
VP1ExaminerViewer::Imp::movieFrameFileNamePrefix
QString movieFrameFileNamePrefix
Definition: VP1ExaminerViewer.cxx:315
VP1ExaminerViewer::Imp::action_moviewidth
QAction * action_moviewidth
Definition: VP1ExaminerViewer.cxx:254
VP1ExaminerViewer::Imp::popup_focal_value_action
QAction * popup_focal_value_action
Definition: VP1ExaminerViewer.cxx:261
VP1ExaminerViewer::setTransparencyType
virtual void setTransparencyType(SoGLRenderAction::TransparencyType)
Definition: VP1ExaminerViewer.cxx:1731
x
#define x
VP1String::str
static QString str(const QString &s)
Definition: VP1String.h:49
search
void search(TDirectory *td, const std::string &s, std::string cwd, node *n)
recursive directory search for TH1 and TH2 and TProfiles
Definition: hcg.cxx:738
GL2PS_DRAW_BACKGROUND
#define GL2PS_DRAW_BACKGROUND
Definition: gl2ps.h:120
VP1CustomTourEditor::tourAvailable
bool tourAvailable() const
Definition: VP1CustomTourEditor.cxx:398
VP1ExaminerViewer::Imp::popup_tourReturnToStartAction
QAction * popup_tourReturnToStartAction
Definition: VP1ExaminerViewer.cxx:230
VP1ExaminerViewer::Imp::button_viewall
QPushButton * button_viewall
Definition: VP1ExaminerViewer.cxx:293
VP1ExaminerViewer::viewAll
virtual void viewAll()
Definition: VP1ExaminerViewer.cxx:1457
VP1ExaminerViewer::produceSVGImage
void produceSVGImage(QString filename="")
Definition: VP1ExaminerViewer.cxx:2326
VP1ExaminerViewer::dumpSceneToFile
void dumpSceneToFile(QString filename="")
Definition: VP1ExaminerViewer.cxx:2254
dqt_zlumi_alleff_HIST.A
A
Definition: dqt_zlumi_alleff_HIST.py:110
VP1ExaminerViewer::ambientLight
int ambientLight() const
Definition: VP1ExaminerViewer.cxx:2433
plotting.efficiency.outdir
outdir
Definition: efficiency.py:19
VP1ExaminerViewer::Imp::lastDumpFile
QString lastDumpFile
Definition: VP1ExaminerViewer.cxx:321
VP1ExaminerViewer::Imp::popup_tourLoopTwice
QAction * popup_tourLoopTwice
Definition: VP1ExaminerViewer.cxx:243
getColor
unsigned long getColor(unsigned int r, unsigned int g, unsigned int b)
VP1ExaminerViewer::Imp::drawStyleToInt
static int drawStyleToInt(SoQtViewer::DrawStyle)
Definition: VP1ExaminerViewer.cxx:598
VP1QtInventorUtils::transparencyType2PrettyString
static QString transparencyType2PrettyString(SoGLRenderAction::TransparencyType)
Definition: VP1QtInventorUtils.cxx:705
createCoolChannelIdFile.buffer
buffer
Definition: createCoolChannelIdFile.py:12
VP1ExaminerViewer::setBufferingType
virtual void setBufferingType(SoQtViewer::BufferType)
Definition: VP1ExaminerViewer.cxx:1642
VP1Settings::defaultFileSelectDirectory
static QString defaultFileSelectDirectory()
Definition: VP1Settings.cxx:22
VP1ExaminerViewer::Imp::fitsCurrentCamType
bool fitsCurrentCamType(const StoredView &sv)
Definition: VP1ExaminerViewer.cxx:353
VP1ExaminerViewer::Imp::zoomToViewActions
QList< QAction * > zoomToViewActions
Definition: VP1ExaminerViewer.cxx:367
VP1ExaminerViewer::Imp::popup_tourPartsMuon
QAction * popup_tourPartsMuon
Definition: VP1ExaminerViewer.cxx:241
VP1CustomTourEditor::state
QByteArray state() const
Definition: VP1CustomTourEditor.cxx:58
VP1ExaminerViewer::getSceneGraph
virtual SoNode * getSceneGraph()
Definition: VP1ExaminerViewer.cxx:3138
lumiFormat.i
int i
Definition: lumiFormat.py:92
z
#define z
VP1ExaminerViewer::Imp::popup_tourPartsInDet
QAction * popup_tourPartsInDet
Definition: VP1ExaminerViewer.cxx:239
beamspotman.n
n
Definition: beamspotman.py:731
VP1ExaminerViewer::dumpSceneToVRMLFile
void dumpSceneToVRMLFile(QString filename="")
Definition: VP1ExaminerViewer.cxx:2290
VP1ExaminerViewer::Imp::lastEPSFile
QString lastEPSFile
Definition: VP1ExaminerViewer.cxx:323
VP1ExaminerViewer::Imp::resetCamera_state
QByteArray resetCamera_state
Definition: VP1ExaminerViewer.cxx:325
VP1ExaminerViewer::stereo_parallax_camera
float stereo_parallax_camera
Definition: VP1ExaminerViewer.h:92
VP1ExaminerViewer::Imp::popup_drawstyle_interactive_actions
QList< QAction * > popup_drawstyle_interactive_actions
Definition: VP1ExaminerViewer.cxx:229
GL2PS_OVERFLOW
#define GL2PS_OVERFLOW
Definition: gl2ps.h:114
GL2PS_SILENT
#define GL2PS_SILENT
Definition: gl2ps.h:122
master.flag
bool flag
Definition: master.py:29
VP1ExaminerViewer::startTour
void startTour()
Definition: VP1ExaminerViewer.cxx:1164
VP1CustomTourEditor
Definition: VP1CustomTourEditor.h:26
VP1ExaminerViewer::Imp::popup_tourExecute
QAction * popup_tourExecute
Definition: VP1ExaminerViewer.cxx:231
VP1ExaminerViewer::currentCameraState
QByteArray currentCameraState() const
Definition: VP1ExaminerViewer.cxx:1781
test_pyathena.parent
parent
Definition: test_pyathena.py:15
VP1ExaminerViewer::Imp::action_movieenabled
QAction * action_movieenabled
Definition: VP1ExaminerViewer.cxx:253
python.xAODType.dummy
dummy
Definition: xAODType.py:4
VP1QtInventorUtils::qcol2sbcol
static SbColor qcol2sbcol(const QColor &)
Definition: VP1QtInventorUtils.cxx:1134
VP1ExaminerViewer::Imp::button_togglecamera
QPushButton * button_togglecamera
Definition: VP1ExaminerViewer.cxx:295
VP1QtUtils::expertSettingIsOn
static bool expertSettingIsOn(const QString &type, const QString &name)
Definition: VP1QtUtils.cxx:60
getCastorRun.setenv
def setenv()
Definition: getCastorRun.py:9
AnimationSequencer::sequence
AnimationSequence & sequence()
Definition: AnimationSequencer.cxx:75
VP1CustomTourEditor::tourIsPerspective
bool tourIsPerspective() const
Definition: VP1CustomTourEditor.cxx:409
VP1ExaminerViewer::Imp::popup_bgdColAction
QAction * popup_bgdColAction
Definition: VP1ExaminerViewer.cxx:218
VP1ExaminerViewer::Imp::popup_tourSpeedVeryFast
QAction * popup_tourSpeedVeryFast
Definition: VP1ExaminerViewer.cxx:237
VP1ExaminerViewer::Imp::stereo_launcheditor
QAction * stereo_launcheditor
Definition: VP1ExaminerViewer.cxx:252
VP1ExaminerViewer::Imp::updateEnvironmentNode
void updateEnvironmentNode()
Definition: VP1ExaminerViewer.cxx:273
VP1ExaminerViewer::Imp::ensureMenuInit
bool ensureMenuInit()
Definition: VP1ExaminerViewer.cxx:1850
VP1ExaminerViewer::Imp::updateMovieMenuVisuals
void updateMovieMenuVisuals()
Definition: VP1ExaminerViewer.cxx:1827
VP1ExaminerViewer::Imp::storedViews
QList< StoredView > storedViews
Definition: VP1ExaminerViewer.cxx:355
VP1ExaminerViewer::Imp::viewerDrawStyle2PrettyString
static QString viewerDrawStyle2PrettyString(SoQtViewer::DrawStyle)
Definition: VP1ExaminerViewer.cxx:3094
VP1ExaminerViewer::resetCamera
void resetCamera()
Definition: VP1ExaminerViewer.cxx:1760
min
#define min(a, b)
Definition: cfImp.cxx:40
merge.output
output
Definition: merge.py:17
VP1ExaminerViewer::Imp::popup_headLightAction
QAction * popup_headLightAction
Definition: VP1ExaminerViewer.cxx:216
GL2PS_BEST_ROOT
#define GL2PS_BEST_ROOT
Definition: gl2ps.h:123
VP1ExaminerViewer::setDrawStyle
virtual void setDrawStyle(SoQtViewer::DrawType, SoQtViewer::DrawStyle)
Definition: VP1ExaminerViewer.cxx:1737
VP1QtInventorUtils::sbcol2qcol
static QColor sbcol2qcol(const SbColor &)
Definition: VP1QtInventorUtils.cxx:1140
VP1ExaminerViewer::Imp::storedViewsChanged
void storedViewsChanged()
Definition: VP1ExaminerViewer.cxx:356
VP1ExaminerViewer::Imp::XROT
@ XROT
Definition: VP1ExaminerViewer.cxx:193
VP1ExaminerViewer::setAmbientLight
void setAmbientLight(int)
Definition: VP1ExaminerViewer.cxx:2420
VP1ExaminerViewer::Imp::popup_tourSpeedSlow
QAction * popup_tourSpeedSlow
Definition: VP1ExaminerViewer.cxx:234
VP1ExaminerViewer::setAntiAlias
void setAntiAlias(bool)
Definition: VP1ExaminerViewer.cxx:1752
VP1ExaminerViewer::Imp::customstereoeditor
VP1CustomStereoEditor * customstereoeditor
Definition: VP1ExaminerViewer.cxx:214
python.selection.number
number
Definition: selection.py:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
VP1CameraHelper::animatedZoomToCameraState
static VP1CameraHelper * animatedZoomToCameraState(SoCamera *camera, SoGroup *sceneroot, const QByteArray &camstate, double duration_in_secs=1.0, double clipVolPercent=100.0, double lastClipVolPercent=100.0, bool varySpeed=true, bool forceCircular=false)
Definition: VP1CameraHelper.cxx:301
VP1ExaminerViewer::Imp::action_movieheight
QAction * action_movieheight
Definition: VP1ExaminerViewer.cxx:255
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
VP1QtInventorUtils::transparencyTypeToInt
static int transparencyTypeToInt(SoGLRenderAction::TransparencyType)
Definition: VP1QtInventorUtils.cxx:663
VP1ExaminerViewer::Imp::isantialias
bool isantialias
Definition: VP1ExaminerViewer.cxx:288
VP1Msg::messageVerbose
static void messageVerbose(const QString &)
Definition: VP1Msg.cxx:84
VP1ExaminerViewer::startCustomTour
void startCustomTour()
Definition: VP1ExaminerViewer.cxx:1244
VP1ExaminerViewer::Imp::updateAmbientLightText
void updateAmbientLightText()
Definition: VP1ExaminerViewer.cxx:308
VP1ExaminerViewer::Imp::popup_tourSpeedFast
QAction * popup_tourSpeedFast
Definition: VP1ExaminerViewer.cxx:236
VP1ExaminerViewer::Imp::popup_tourLoopThrice
QAction * popup_tourLoopThrice
Definition: VP1ExaminerViewer.cxx:244
VP1ExaminerViewer::fadeLastRecordedFrameToCurrent
void fadeLastRecordedFrameToCurrent(double time_seconds)
Definition: VP1ExaminerViewer.cxx:3144
VP1ExaminerViewer::Imp::popup_drawstyle_still_actions
QList< QAction * > popup_drawstyle_still_actions
Definition: VP1ExaminerViewer.cxx:228
VP1ExaminerViewer::Imp::action_moviefps
QAction * action_moviefps
Definition: VP1ExaminerViewer.cxx:256
query_example.col
col
Definition: query_example.py:7
VP1ExaminerViewer::Imp::popup_tourLoopOnce
QAction * popup_tourLoopOnce
Definition: VP1ExaminerViewer.cxx:242
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
AnimationSequence::clearAllFrames
void clearAllFrames()
Definition: AnimationSequence.h:50
VP1ExaminerViewer::Imp::button_home
QPushButton * button_home
Definition: VP1ExaminerViewer.cxx:291
VP1ExaminerViewer::stereo_offset_camera
float stereo_offset_camera
Definition: VP1ExaminerViewer.h:91
VP1ExaminerViewer::Imp::storeViewActions
QList< QAction * > storeViewActions
Definition: VP1ExaminerViewer.cxx:364
python.PyAthena.v
v
Definition: PyAthena.py:157
VP1QtUtils::fadeImage
static QImage fadeImage(QImage img0, QImage img1, double fadefact)
Definition: VP1QtUtils.cxx:176
get_generator_info.version
version
Definition: get_generator_info.py:33
VP1QtInventorUtils::writeGraphToFile
static bool writeGraphToFile(SoNode *root, const QString &filename)
Definition: VP1QtInventorUtils.cxx:1421
VP1ExaminerViewer::Imp::intToViewerDrawStyle
static SoQtViewer::DrawStyle intToViewerDrawStyle(int)
Definition: VP1ExaminerViewer.cxx:3073
VP1ExaminerViewer::Imp::popup_toSVGAction
QAction * popup_toSVGAction
Definition: VP1ExaminerViewer.cxx:223
VP1ExaminerViewer::Imp::intToDrawStyle
static SoQtViewer::DrawStyle intToDrawStyle(int)
Definition: VP1ExaminerViewer.cxx:618
VP1ExaminerViewer::Imp::popup_tourLoopForever
QAction * popup_tourLoopForever
Definition: VP1ExaminerViewer.cxx:245
VP1ExaminerViewer::Imp::popup_tourPartsCalo
QAction * popup_tourPartsCalo
Definition: VP1ExaminerViewer.cxx:240
a
TList * a
Definition: liststreamerinfos.cxx:10
VP1Msg::messageDebug
static void messageDebug(const QString &)
Definition: VP1Msg.cxx:39
VP1CustomStereoEditor
Definition: VP1CustomStereoEditor.h:30
SCT_ConditionsAlgorithms::CoveritySafe::getenv
std::string getenv(const std::string &variableName)
get an environment variable
Definition: SCT_ConditionsUtilities.cxx:17
y
#define y
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
VP1ExaminerViewer::Imp::popup_hidedecorationsaction
QAction * popup_hidedecorationsaction
Definition: VP1ExaminerViewer.cxx:226
VP1ExaminerViewer::getStereoOffsetSlot
float getStereoOffsetSlot()
Definition: VP1ExaminerViewer.cxx:577
CSV_InDetExporter.old
old
Definition: CSV_InDetExporter.py:145
VP1Msg::message
static void message(const QString &, IVP1System *sys=0)
Definition: VP1Msg.cxx:30
VP1ExaminerViewer::Imp::popup_tourPartsVertex
QAction * popup_tourPartsVertex
Definition: VP1ExaminerViewer.cxx:238
SoGL2PSAction
SoGL2PSAction inherits Inventor/SoGLRenderAction.
Definition: SoGL2PSAction.h:17
python.CaloScaleNoiseConfig.action
action
Definition: CaloScaleNoiseConfig.py:77
VP1ExaminerViewer::Imp::customtoureditorState
QByteArray customtoureditorState
Definition: VP1ExaminerViewer.cxx:212
VP1ExaminerViewer::Imp::popup_dumpSceneAction
QAction * popup_dumpSceneAction
Definition: VP1ExaminerViewer.cxx:221
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
VP1QtInventorUtils::intToTransparencyType
static SoGLRenderAction::TransparencyType intToTransparencyType(int)
Definition: VP1QtInventorUtils.cxx:683
VP1HEPVisUtils::convertToStandardScene
static SoGroup * convertToStandardScene(SoGroup *)
Definition: VP1HEPVisUtils.cxx:157
VP1ExaminerViewer::Imp::deleteViewActions
QList< QAction * > deleteViewActions
Definition: VP1ExaminerViewer.cxx:366
VP1ExaminerViewer::Imp::action_moviefadetocurrentview
QAction * action_moviefadetocurrentview
Definition: VP1ExaminerViewer.cxx:258
VP1ExaminerViewer::Imp::applyMovieSettingsToAnimationSequencer
void applyMovieSettingsToAnimationSequencer()
Definition: VP1ExaminerViewer.cxx:1225
VP1ExaminerViewer::Imp::popup_menu
QMenu * popup_menu
Definition: VP1ExaminerViewer.cxx:215
LArCellConditions.sv
bool sv
Definition: LArCellConditions.py:45
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
GL2PS_BSP_SORT
#define GL2PS_BSP_SORT
Definition: gl2ps.h:105
VP1QtInventorUtils::renderToPixmap
static QPixmap renderToPixmap(VP1ExaminerViewer *ra, int pixels_x, int pixels_y, bool transparent_background=false, double actualRenderedSizeFact=1.0)
Definition: VP1QtInventorUtils.cxx:593
VP1Controller::setCustomTourEditor
static void setCustomTourEditor(VP1CustomTourEditor *editor)
Definition: VP1Controller.h:60
VP1ExaminerViewer::Imp::ZROT
@ ZROT
Definition: VP1ExaminerViewer.cxx:193
fixedDistanceClipPlanesCB
SbVec2f fixedDistanceClipPlanesCB(void *data, const SbVec2f &nearfar)
set the clipping strategy and fix the clipping
Definition: VP1ExaminerViewer.cxx:512
VP1CustomTourEditor::disableObjectWhenTourNotAvailable
void disableObjectWhenTourNotAvailable(QObject *)
Definition: VP1CustomTourEditor.cxx:451
VP1ExaminerViewer::Imp::button_examine
QPushButton * button_examine
Definition: VP1ExaminerViewer.cxx:290
VP1ExaminerViewer::Imp::animationSequencer
AnimationSequencer animationSequencer
Definition: VP1ExaminerViewer.cxx:282
VP1ExaminerViewer::Imp::customtoureditor
VP1CustomTourEditor * customtoureditor
Definition: VP1ExaminerViewer.cxx:213
VP1CustomTourEditor::addTourToAnimationSequencer
void addTourToAnimationSequencer(AnimationSequencer &, bool jumpDirectlyToFirstFrame) const
Definition: VP1CustomTourEditor.cxx:419
VP1ExaminerViewer::showPopupMenu
virtual void showPopupMenu()
Definition: VP1ExaminerViewer.cxx:2439
VP1Msg::verbose
static bool verbose()
Definition: VP1Msg.h:31
VP1ExaminerViewer::Imp::grabFocus
void grabFocus()
Definition: VP1ExaminerViewer.cxx:1216
VP1ExaminerViewer::Imp::popup_tourStartEachEvent
QAction * popup_tourStartEachEvent
Definition: VP1ExaminerViewer.cxx:232
VP1ExaminerViewer::Imp::actualSceneGraph
SoGroup * actualSceneGraph
Definition: VP1ExaminerViewer.cxx:204
gl2psBeginPage
GL2PSDLL_API GLint gl2psBeginPage(const char *title, const char *producer, GLint viewport[4], GLint format, GLint sort, GLint options, GLint colormode, GLint colorsize, GL2PSrgba *colormap, GLint nr, GLint ng, GLint nb, GLint buffersize, FILE *stream, const char *filename)
Definition: gl2ps.cxx:5583
VP1Msg::messageWarningRed
static void messageWarningRed(const QString &str, IVP1System *sys=0)
Definition: VP1Msg.cxx:57
VP1QtInventorUtils::writeGraphToVRMLFile
static bool writeGraphToVRMLFile(SoNode *root, const QString &filename)
Definition: VP1QtInventorUtils.cxx:1456
GL2PS_USE_CURRENT_VIEWPORT
#define GL2PS_USE_CURRENT_VIEWPORT
Definition: gl2ps.h:129
VP1ExaminerViewer::Imp::popup_dumpSceneVRMLAction
QAction * popup_dumpSceneVRMLAction
Definition: VP1ExaminerViewer.cxx:222
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
SoGL2PSAction::initClass
static void initClass()
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition: SoGL2PSAction.cxx:24
VP1QtInventorUtils::serializeSoCameraParameters
static QByteArray serializeSoCameraParameters(const SoCamera &)
Definition: VP1QtInventorUtils.cxx:884
python.compressB64.c
def c
Definition: compressB64.py:93
VP1ExaminerViewer::Imp::environmentNode
SoEnvironment * environmentNode
Definition: VP1ExaminerViewer.cxx:205
VP1ExaminerViewer::m_d
Imp * m_d
Definition: VP1ExaminerViewer.h:129
GL2PS_OCCLUSION_CULL
#define GL2PS_OCCLUSION_CULL
Definition: gl2ps.h:124
VP1ExaminerViewer::Imp::button_interact
QPushButton * button_interact
Definition: VP1ExaminerViewer.cxx:289
VP1ExaminerViewer::Imp::button_seek
QPushButton * button_seek
Definition: VP1ExaminerViewer.cxx:294
gl2psEndPage
GL2PSDLL_API GLint gl2psEndPage(void)
Definition: gl2ps.cxx:5750
VP1ExaminerViewer::isAntiAlias
bool isAntiAlias() const
Definition: VP1ExaminerViewer.cxx:1743