Changeset 8e7dd9 for src/UIElements/Views/Qt4
- Timestamp:
- Jul 18, 2012, 2:02:27 PM (12 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- f31b34
- Parents:
- 8d5fde3
- git-author:
- Michael Ankele <ankele@…> (07/12/12 14:41:48)
- git-committer:
- Michael Ankele <ankele@…> (07/18/12 14:02:27)
- Location:
- src/UIElements/Views/Qt4/Qt3D
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp
r8d5fde3 r8e7dd9 22 22 #include <Qt/qevent.h> 23 23 #include <Qt/qaction.h> 24 #include <QtGui/QMenu> 24 25 #include <QtGui/QToolBar> 26 #include <QtGui/QToolButton> 25 27 #include <Qt/qtimer.h> 26 28 #include <Qt/qsettings.h> … … 50 52 setOption(QGLView::CameraNavigation, false); 51 53 setCameraControlMode(Rotate); 54 defaultEyeSeparation = 4.0; 52 55 53 56 createDomainBox(); … … 119 122 connect(selMolAction, SIGNAL(triggered()), worldscene, SLOT(setSelectionModeMolecule())); 120 123 toolbar->addAction(selMolAction); 124 125 QToolButton *stereoButton = new QToolButton(toolbar); 126 QMenu *stereoMenu = new QMenu(); 127 QAction *stereoHardwareAction = new QAction(QIcon::fromTheme("zoom-best-fit"), tr("hardware"), this); 128 connect(stereoHardwareAction, SIGNAL(triggered()), this, SLOT(setCameraStereoModeHardware())); 129 stereoMenu->addAction(stereoHardwareAction); 130 QAction *stereoLeftRightAction = new QAction(QIcon::fromTheme("zoom-best-fit"), tr("left right"), this); 131 connect(stereoLeftRightAction, SIGNAL(triggered()), this, SLOT(setCameraStereoModeLeftRight())); 132 stereoMenu->addAction(stereoLeftRightAction); 133 QAction *stereoRightLeftAction = new QAction(QIcon::fromTheme("zoom-best-fit"), tr("right left"), this); 134 connect(stereoRightLeftAction, SIGNAL(triggered()), this, SLOT(setCameraStereoModeRightLeft())); 135 stereoMenu->addAction(stereoRightLeftAction); 136 QAction *stereoTopBottomAction = new QAction(QIcon::fromTheme("zoom-best-fit"), tr("top bottom"), this); 137 connect(stereoTopBottomAction, SIGNAL(triggered()), this, SLOT(setCameraStereoModeTopBottom())); 138 stereoMenu->addAction(stereoTopBottomAction); 139 QAction *stereoBottomTopAction = new QAction(QIcon::fromTheme("zoom-best-fit"), tr("bottom top"), this); 140 connect(stereoBottomTopAction, SIGNAL(triggered()), this, SLOT(setCameraStereoModeBottomTop())); 141 stereoMenu->addAction(stereoBottomTopAction); 142 QAction *stereoAnaglyphAction = new QAction(QIcon::fromTheme("zoom-best-fit"), tr("anaglyph"), this); 143 connect(stereoAnaglyphAction, SIGNAL(triggered()), this, SLOT(setCameraStereoModeAnaglyph())); 144 stereoMenu->addAction(stereoAnaglyphAction); 145 stereoButton->setMenu(stereoMenu); 146 stereoButton->setPopupMode(QToolButton::InstantPopup); 147 toolbar->addWidget(stereoButton); 121 148 } 122 149 … … 411 438 } 412 439 440 void GLWorldView::setCameraStereoModeDisable() 441 { 442 setStereoType(QGLView::Hardware); 443 camera()->setEyeSeparation(0.0); 444 updateGL(); 445 } 446 447 void GLWorldView::setCameraStereoModeHardware() 448 { 449 setStereoType(QGLView::Hardware); 450 camera()->setEyeSeparation(defaultEyeSeparation); 451 updateGL(); 452 } 453 454 void GLWorldView::setCameraStereoModeLeftRight() 455 { 456 setStereoType(QGLView::LeftRight); 457 camera()->setEyeSeparation(defaultEyeSeparation); 458 updateGL(); 459 } 460 461 void GLWorldView::setCameraStereoModeRightLeft() 462 { 463 setStereoType(QGLView::RightLeft); 464 camera()->setEyeSeparation(defaultEyeSeparation); 465 updateGL(); 466 } 467 468 void GLWorldView::setCameraStereoModeTopBottom() 469 { 470 setStereoType(QGLView::TopBottom); 471 camera()->setEyeSeparation(defaultEyeSeparation); 472 updateGL(); 473 } 474 475 void GLWorldView::setCameraStereoModeBottomTop() 476 { 477 setStereoType(QGLView::BottomTop); 478 camera()->setEyeSeparation(defaultEyeSeparation); 479 updateGL(); 480 } 481 482 void GLWorldView::setCameraStereoModeAnaglyph() 483 { 484 setStereoType(QGLView::RedCyanAnaglyph); 485 camera()->setEyeSeparation(defaultEyeSeparation); 486 updateGL(); 487 } 488 413 489 void GLWorldView::mousePressEvent(QMouseEvent *event) 414 490 { -
src/UIElements/Views/Qt4/Qt3D/GLWorldView.hpp
r8d5fde3 r8e7dd9 86 86 void setCameraControlModeRotation(); 87 87 void setCameraControlModeTranslation(); 88 void setCameraStereoModeDisable(); 89 void setCameraStereoModeHardware(); 90 void setCameraStereoModeLeftRight(); 91 void setCameraStereoModeRightLeft(); 92 void setCameraStereoModeTopBottom(); 93 void setCameraStereoModeBottomTop(); 94 void setCameraStereoModeAnaglyph(); 88 95 89 96 protected: … … 106 113 QTimer *redrawTimer; 107 114 bool needsRedraw; 115 116 double defaultEyeSeparation; 108 117 }; 109 118
Note:
See TracChangeset
for help on using the changeset viewer.