|
ATLAS Offline Software
|
#include <VP1CustomTourEditor.h>
Definition at line 26 of file VP1CustomTourEditor.h.
◆ VP1CustomTourEditor()
Definition at line 100 of file VP1CustomTourEditor.cxx.
101 : QWidget(0,Qt::WindowStaysOnTopHint),
m_d(
new Imp)
105 m_d->
ui.setupUi(
this);
106 m_d->
ui.groupBox_utilityZoom->setChecked(
false);
107 m_d->
ui.widget_utilityZoomContents->setVisible(
false);
109 setWindowIcon(QIcon(QString(
":/vp1/icons/icons/3d_32x32.png")));
111 m_d->
ui.scrollArea->setWidgetResizable(
true);
114 connect(
new QShortcut(QKeySequence(Qt::Key_Escape),
this),SIGNAL(activated()),
this,SLOT(hide()));
115 connect(
m_d->
ui.pushButton_close,SIGNAL(clicked()),
this,SLOT(hide()));
◆ ~VP1CustomTourEditor()
VP1CustomTourEditor::~VP1CustomTourEditor |
( |
| ) |
|
|
virtual |
◆ addTourToAnimationSequencer()
void VP1CustomTourEditor::addTourToAnimationSequencer |
( |
AnimationSequencer & |
as, |
|
|
bool |
jumpDirectlyToFirstFrame |
|
) |
| const |
Definition at line 419 of file VP1CustomTourEditor.cxx.
423 bool firstInDirectJump(jumpDirectlyToFirstFrame);
427 if (firstInDirectJump) {
429 firstInDirectJump =
false;
◆ buttonClicked
void VP1CustomTourEditor::buttonClicked |
( |
| ) |
|
|
privateslot |
Definition at line 299 of file VP1CustomTourEditor.cxx.
301 if (
m_d->
ui.pushButton_addCurrentView==sender()) {
307 }
else if (
m_d->
ui.pushButton_refreshPreviews==sender()) {
310 }
else if (
m_d->
ui.pushButton_execute==sender()) {
312 }
else if (
m_d->
ui.pushButton_utilityZoomShow==sender()) {
313 SoCamera * cam =
m_d->
viewer->getCamera();
315 if (!cam||!
root||!
root->getTypeId().isDerivedFrom(SoGroup::getClassTypeId()))
318 double r(
m_d->
ui.doubleSpinBox_radius->value()*1000.0);
323 double a(
r/sqrt(3.0));
324 SbBox3f box(-
a,-
a,-
a,
a,
a,
a);
326 SbVec3f upvec = SbVec3f(0,1,0);
327 bool notifyenabled = cam->enableNotify(
false);
330 box, 0.0, 100.0, 1.0,lookat,upvec);
332 cam->enableNotify(
true);
◆ clipVolumePercentOfATLAS
void VP1CustomTourEditor::clipVolumePercentOfATLAS |
( |
double |
| ) |
|
|
signal |
◆ clipVolumeRadiusChanged
void VP1CustomTourEditor::clipVolumeRadiusChanged |
( |
double |
| ) |
|
|
signal |
◆ closeEvent()
void VP1CustomTourEditor::closeEvent |
( |
QCloseEvent * |
ev | ) |
|
|
protected |
◆ disableObjectWhenTourNotAvailable()
void VP1CustomTourEditor::disableObjectWhenTourNotAvailable |
( |
QObject * |
o | ) |
|
◆ enabledFrameListChanged
void VP1CustomTourEditor::enabledFrameListChanged |
( |
| ) |
|
|
privateslot |
Definition at line 366 of file VP1CustomTourEditor.cxx.
368 int nEnabledPerspectiveFrames, nEnabledOrthographicFrames;
370 nEnabledOrthographicFrames );
374 s =
"Add at least two frames for tour";
377 if (nEnabledPerspectiveFrames>0&&nEnabledOrthographicFrames>0) {
378 s =
"Mixed camera types are forbidden";
381 if (nEnabledPerspectiveFrames>0)
382 s=
"Perspective camera tour";
384 s=
"Orthographic camera tour";
387 m_d->
ui.label_statustext->setText(
s);
390 if (o->isWidgetType())
391 static_cast<QWidget*
>(o)->setEnabled(enable);
393 static_cast<QAction*
>(o)->setEnabled(enable);
◆ frameDelete
void VP1CustomTourEditor::frameDelete |
( |
| ) |
|
|
privateslot |
◆ frameShow
void VP1CustomTourEditor::frameShow |
( |
| ) |
|
|
privateslot |
◆ frameStepToEarlier
void VP1CustomTourEditor::frameStepToEarlier |
( |
| ) |
|
|
privateslot |
◆ frameStepToLater
void VP1CustomTourEditor::frameStepToLater |
( |
| ) |
|
|
privateslot |
◆ setClipVolumePercentOfATLAS
void VP1CustomTourEditor::setClipVolumePercentOfATLAS |
( |
double |
percent | ) |
|
|
slot |
◆ setState()
void VP1CustomTourEditor::setState |
( |
const QByteArray & |
ba | ) |
|
Definition at line 75 of file VP1CustomTourEditor.cxx.
84 QList<QByteArray> frameStates =
s.restore<QList<QByteArray> >();
85 s.restore(
m_d->
ui.doubleSpinBox_theta);
86 s.restore(
m_d->
ui.doubleSpinBox_radius);
87 s.restore(
m_d->
ui.groupBox_utilityZoom);
88 s.warnUnrestored(
this);
90 m_d->
ui.widget_utilityZoomContents->setVisible(
m_d->
ui.groupBox_utilityZoom->isChecked());
92 for (
const QByteArray& ba2 : frameStates)
◆ state()
QByteArray VP1CustomTourEditor::state |
( |
| ) |
const |
Definition at line 58 of file VP1CustomTourEditor.cxx.
61 QList<QByteArray> frameStates;
64 s.ignoreWidget(frame);
67 s.save(
m_d->
ui.doubleSpinBox_theta);
68 s.save(
m_d->
ui.doubleSpinBox_radius);
69 s.save(
m_d->
ui.groupBox_utilityZoom);
◆ swap
◆ tourAvailable()
bool VP1CustomTourEditor::tourAvailable |
( |
| ) |
const |
Definition at line 398 of file VP1CustomTourEditor.cxx.
400 int nEnabledPerspectiveFrames, nEnabledOrthographicFrames;
402 nEnabledOrthographicFrames );
403 if (nEnabledPerspectiveFrames>0&&nEnabledOrthographicFrames>0)
◆ tourIsPerspective()
bool VP1CustomTourEditor::tourIsPerspective |
( |
| ) |
const |
Definition at line 409 of file VP1CustomTourEditor.cxx.
411 int nEnabledPerspectiveFrames, nEnabledOrthographicFrames;
413 nEnabledOrthographicFrames );
415 return nEnabledOrthographicFrames==0;
◆ m_d
Imp* VP1CustomTourEditor::m_d |
|
private |
The documentation for this class was generated from the following files:
int countEnabledFrames(int &nEnabledPerspectiveFrames, int &nEnabledOrthographicFrames) const
static bool deserializeSoCameraParameters(QByteArray &, SoCamera &)
Ui::VP1CustomTourEditorForm ui
void updateFrameStepControlsEnablement()
virtual void toggleCameraType()
Scalar theta() const
theta method
void enabledFrameListChanged()
bool currentCamIsPerspective() const
void addFrame(VP1CustomTourFrameWidget *frame)
QList< QObject * > objectsToDisableWhenTourUnavailable
bool tourAvailable() const
void updateFrameListVisuals()
void clipVolumeRadiusChanged(double)
virtual SoNode * getSceneGraph()
void updateFrameSnapshot(VP1CustomTourFrameWidget *)
void addFrame(REGION reg, const SbVec3f &dir, const SbVec3f &upvec, double t, bool variableSpeed=false, bool forceCircular=false, double clip=100.0)
QByteArray currentCameraState() const
QWidget * frameHolderWidget
VP1ExaminerViewer * viewer
AnimationSequence & sequence()
QList< VP1CustomTourFrameWidget * > frames
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)
void clipVolumePercentOfATLAS(double)
VP1CustomTourEditor * theclass
static VP1CameraHelper * animatedZoomToBBox(SoCamera *camera, SoGroup *sceneroot, const SbBox3f &box, double duration_in_secs=1.0, double clipVolPercent=100.0, double slack=1.0, const SbVec3f &lookat=SbVec3f(999, 999, 999), const SbVec3f &upvec=SbVec3f(999, 999, 999), bool varySpeed=true, bool forceCircular=false)