source: src/documentation/constructs/qt-gui.dox@ 732507

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
Last change on this file since 732507 was 8c9049, checked in by Frederik Heber <heber@…>, 12 years ago

DOCU: Updates for qt-gui and shaperegistry documentation.

  • Property mode set to 100644
File size: 5.0 KB
Line 
1/*
2 * Project: MoleCuilder
3 * Description: creates and alters molecular systems
4 * Copyright (C) 2010 University of Bonn. All rights reserved.
5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
6 */
7
8/**
9 * \file qt-gui.dox
10 *
11 * Created on: Jan 5, 2012
12 * Author: heber
13 */
14
15/**
16 * \page qt-gui Qt GUI
17 *
18 * The Qt GUI is the most advanced interface and thus the most complex.
19 *
20 * In the following we want to explain some of the details that are involved.
21 *
22 * \section qt-gui-qt3d Qt3D and the way to get atoms and bonds displayed
23 *
24 * Atoms and Bonds have to displayed, the widget for this is GLWorldView. To
25 * this class belongs GLWorldScene that contains lots of GLMoleculeObject's or
26 * nodes in the speak of Qt3D. We have four derived class for these kind of
27 * objects:
28 * -# GLMoleculeObject_atom: for each atom,
29 * -# GLMoleculeObject_bond: for each "side" of the bond (each represents half of
30 * the bond that join in the middle between the two atoms),
31 * -# GLMoleculeObject_molecule: for each molecule (shows a box is selected),
32 * -# GLMoleculeObject_shape: shows the shapes in the ShapeRegistry.
33 *
34 * We can only add new nodes to the Qt3D scene at the level of GLWorldScene,
35 * hence all insertion go through this instance to add new nodes. Destruction
36 * may occur anywhere as the new nodes are parentized to the scene.
37 *
38 * \subsection qt-gui-qt3d-atoms How atom object are constructed/destroyed.
39 *
40 * Atoms are rendered as spheres, see createAtom(). GLWorldView gets notified
41 * by the World about new and removed atoms via the Channel's World::AtomInserted
42 * and World::AtomRemoved. It translates these into Qt signals with the correct
43 * affected atom, by looking at
44 * \code
45 * const atom *_atom = World::getInstance().lastChanged<atom>();
46 * \endcode
47 * These signals call slots of GLWorldScene that has a map of all contained
48 * GLMoleculeObject, one for either of the two kinds:
49 * -# GLWorldScene::atomInserted(): create a new node and connect its signals
50 * with us, add to map
51 * -# GLWorldScene::atomRemoved(): disconnect, remove from map, destroy
52 *
53 * We do not need to destroy the node itself as it is connected via the Observer
54 * mechanism to the associated atom
55 *
56 * \subsection qt-gui-qt3d-bonds How bond object are constructed/destroyed.
57 *
58 * Bonds are displayed as cylinders that elongate from one atom to the midpoint
59 * of the bond (i.e. the spot in between the two atoms). That is we have always
60 * two cylinders per bond. That's why we need to distinguish
61 * GLMoleculeObject_bond::SideOfBond to get the right node.
62 *
63 * Bonds are not as easy as atoms: The World does not know about bonds being
64 * created or destroyed, only the atoms themselves know about them.
65 *
66 * That's way the atom node object GLMoleculeObject_atom is an Observer of is
67 * associated atom and listens to the Channel AtomObservable::BondsAdded. It then
68 * translates this into a Qt signal that calls a slot GLWorldScene:BondInserted.
69 *
70 *
71 * Bonds themselves are also Observables, as are atoms. Hence,
72 * GLMoleculeObject_bond connect via the Observer mechanism to their associated
73 * bond and are thus notified when they are destroyed.
74 *
75 * Additionally, we use GLWorldScene to do some bookkeeping about all bond nodes.
76 * This is not strictly required but might in general be useful. Hence, signals
77 * notify GLWorldScene also about GLWorldScene::bondRemoved that are emitted by
78 * the node itself.
79 *
80 * \section QtElementList
81 *
82 * Lists for each element how often it occures in the world. Selecting an entry
83 * calls SelectionAtomByElementAction to select all atoms of that particular
84 * element.
85 *
86 * It observes the World and performs a complete refill on any message. To reduce
87 * performance issues it marks the list as dirty and refills it the next time the
88 * GUI is idle. This way many successive changes to the world only lead to a
89 * single refill.
90 *
91 * \section QtMoleculeList
92 *
93 * Lists all the molecules currently in the world grouped by their formula.
94 * Selecting an entry calls the SelectionMoleculeByIdAction.
95 *
96 * It observes the World the same way QtElementList does.
97 *
98 * \section QtShapeController
99 *
100 * This is the interface for the ShapeRegistry. It lists all the shapes in the
101 * registry and lets the user select them. It also features buttons to call
102 * actions creating and manipulating the selected shapes.
103 *
104 * As an Observer it handles the following messages from ShapeRegistry:
105 * - ShapeRegistry::ShapeInserted
106 * - ShapeRegistry::ShapeRemoved
107 * - ShapeRegistry::SelectionChanged
108 *
109 * \section QtInfoBox
110 *
111 * Shows information about the atom and molecule the cursor is currently hovering
112 * over inside the GLWorldView.
113 *
114 * GLWorldView emits hoverChanged signals (via QT's signal slot mechanism) which
115 * the QtInfoBox receives. QtInfoBox then creates its info pages for the atom
116 * being transmitted as the signal's parameter.
117 *
118 * The info pages are Observers for the atom/molecule. When recieving subjectKilled
119 * they automatically clear the info box.
120 *
121 * \date 2013-02-22
122 */
Note: See TracBrowser for help on using the repository browser.