Changeset 0e5d14 for src/UIElements
- Timestamp:
- Jul 17, 2012, 12:17:21 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:
- 3f48c2
- Parents:
- e13b34
- git-author:
- Michael Ankele <ankele@…> (05/03/12 10:29:08)
- git-committer:
- Michael Ankele <ankele@…> (07/17/12 12:17:21)
- Location:
- src/UIElements
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Qt4/QtMainWindow.cpp
re13b34 r0e5d14 70 70 71 71 toolbar = new QtToolBar(this); 72 molecule3dDisplay->addToolBarActions(toolbar); 72 73 addToolBar(toolbar); 73 74 -
src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp
re13b34 r0e5d14 21 21 22 22 #include <Qt/qevent.h> 23 #include <Qt/qaction.h> 24 #include <QtGui/QToolBar> 23 25 24 26 #include "GLWorldScene.hpp" … … 67 69 AtomObserver::getInstance().signOff(this, AtomObservable::PositionChanged); 68 70 delete worldscene; 71 } 72 73 74 /** 75 * Add some widget specific actions to the toolbar: 76 * - camera rotation/translation mode 77 * - camera fit to domain 78 */ 79 void GLWorldView::addToolBarActions(QToolBar *toolbar) 80 { 81 toolbar->addSeparator(); 82 QAction *transAction = new QAction(QIcon::fromTheme("forward"), tr("camera translation mode"), this); 83 connect(transAction, SIGNAL(triggered()), this, SLOT(setCameraControlModeTranslation())); 84 toolbar->addAction(transAction); 85 QAction *rotAction = new QAction(QIcon::fromTheme("object-rotate-left"), tr("camera rotation mode"), this); 86 connect(rotAction, SIGNAL(triggered()), this, SLOT(setCameraControlModeRotation())); 87 toolbar->addAction(rotAction); 88 QAction *fitAction = new QAction(QIcon::fromTheme("zoom-best-fit"), tr("camera fit to domain"), this); 89 connect(fitAction, SIGNAL(triggered()), this, SLOT(fitCameraToDomain())); 90 toolbar->addAction(fitAction); 69 91 } 70 92 … … 191 213 192 214 215 /** 216 * Set the current camera control mode. 217 */ 193 218 void GLWorldView::setCameraControlMode(GLWorldView::CameraControlModeType mode) 194 219 { … … 206 231 } 207 232 233 /** 234 * Returns the current camera control mode. 235 * This needs to be invertable (rotation - translation), if the shift key is pressed. 236 */ 208 237 GLWorldView::CameraControlModeType GLWorldView::getCameraControlMode(bool inverted) 209 238 { -
src/UIElements/Views/Qt4/Qt3D/GLWorldView.hpp
re13b34 r0e5d14 24 24 class GLWorldScene; 25 25 class QGLPainter; 26 class QToolBar; 26 27 27 28 /** This class is the view on the 3D representation of the World, i.e. the whole … … 35 36 GLWorldView(QWidget *parent=0); 36 37 virtual ~GLWorldView(); 38 39 void addToolBarActions(QToolBar *toolbar); 37 40 38 41 // Observer functions
Note:
See TracChangeset
for help on using the changeset viewer.