source: src/documentation/constructs/queries.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 eee1b7, checked in by Frederik Heber <heber@…>, 12 years ago

DOCU: Documentation on ShapeRegistry, QtUI changes, validators, and parameters.

  • Property mode set to 100644
File size: 2.7 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 queries.dox
10 *
11 * Created on: Jan 20, 2013
12 * Author: ankele
13 */
14
15
16/** \page queries Queries
17 *
18 * \section description General description
19 *
20 * Queries represent the process of asking the user to input a value as an
21 * option for \ref actions. How that is done depends on the current UI and
22 * the type of the value.
23 *
24 * \section internals Internals
25 *
26 * What happens when an action needs, say, an integer valued Parameter?
27 * - the action object has an element of type Parameter<int> declared in its .def file (including a validator defining the constraints)
28 * - the action's call() requests the current UI (for example QT) to create a dialog. The QT GUI creates a QtDialog
29 * - Action::call() also calls Dialog::query<T>() for each of its parameters telling the dialog what to ask from the user later on (in this case query<Parameter<int>>() )
30 * - Action::call() calls Dialog::display()
31 * - for each query Dialog::display() calls Query::handle() (in non QT UIs this will read temporary input from the user)
32 * - Dialog::display() then tests if the temporary values in all queries are valid (Query::isValid() )
33 * - if all values are correct, they are stored in the Parameter objects (Query::setValue() )
34 * - Action::performCall() (really perform the action)
35 *
36 * QtDialog needs to be more interactive:
37 * - it has its own QtDialog::display()
38 * - QtDialog::display() shows the dialog box and waits till the user closes it
39 * - the int query is shown as an QSpinBox, any user input will call QtDialog::update()
40 * - QtDialog::update() tests if all values are valid and enables/disables the OK button accordingly
41 *
42 * The internal workings of queries:
43 * - Dialog::query<T>() in turn calls the virtual Dialog::queryInt(), so effectivly QtDialog::queryInt() is being called
44 * - QtDialog::queryInt() creates a new IntQtQuery object and stores it in the dialog's query list
45 * - class hierarchy: IntQtQuery - QtQuery<int> - TQuery<int> - Query
46 * - the base class Query only stores additional info for the user
47 * - TQuery stores the Parameter and the temporary value
48 * - QtQuery is used to ignore the handle() call
49 * - IntQtQuery sets up the input box and handles the GUI signals
50 *
51 * List queries (like QtIntsQuery) are a bit more tricky. It creates a QtIntQuery as a child. The value from the child query can be added to QtIntsQuery's list of values. To handle communication between parent and child the child is being embedded in its own (special) dialog owned by the parent.
52 *
53 * \date 2013-01-29
54 *
55 */
Note: See TracBrowser for help on using the repository browser.