source: src/UIElements/Menu/MenuDescription.cpp@ 8bcf3f

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 8bcf3f was 8bcf3f, checked in by Frederik Heber <heber@…>, 14 years ago

New class MenuDescription containing information on menu items.

  • Property mode set to 100644
File size: 3.2 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 * MenuDescription.cpp
10 *
11 * Created on: Oct 26, 2010
12 * Author: heber
13 */
14
15#include <map>
16#include <string>
17
18#include "Menu/MenuDescription.hpp"
19
20/** Constructor of class MenuDescription.
21 *
22 */
23MenuDescription::MenuDescription()
24{
25 // put each menu into set
26 MenuSet.insert("analysis");
27 MenuSet.insert("atom");
28 MenuSet.insert("command");
29 MenuSet.insert("fragmentation");
30 MenuSet.insert("molecule");
31 MenuSet.insert("parser");
32 MenuSet.insert("selection");
33 MenuSet.insert("tesselation");
34 MenuSet.insert("world");
35
36 // put menu description into each menu category
37 MenuDescriptionsMap["analysis"] = "Analysis (pair correlation, volume)";
38 MenuDescriptionsMap["atom"] = "Edit atoms";
39 MenuDescriptionsMap["command"] = "Configuration";
40 MenuDescriptionsMap["fragmentation"] = "Fragmentation";
41 MenuDescriptionsMap["molecule"] = "Parse files into system";
42 MenuDescriptionsMap["parser"] = "Edit molecules (load, parse, save)";
43 MenuDescriptionsMap["selection"] = "Select atoms/molecules";
44 MenuDescriptionsMap["tesselation"] = "Tesselate molecules";
45 MenuDescriptionsMap["world"] = "Edit world";
46
47 // put menu name into each menu category
48 MenuNameMap["analysis"] = "Analysis";
49 MenuNameMap["atom"] = "Atoms";
50 MenuNameMap["command"] = "configuration options";
51 MenuNameMap["fragmentation"] = "Fragmentation";
52 MenuNameMap["molecule"] = "Molecules";
53 MenuNameMap["parser"] = "Input/Output";
54 MenuNameMap["selection"] = "Selection";
55 MenuNameMap["tesselation"] = "Tesselation";
56 MenuNameMap["world"] = "Globals";
57}
58
59/** Destructor of class MenuDescription.
60 *
61 */
62MenuDescription::~MenuDescription()
63{}
64
65/** Getter for MenuDescriptionsMap.
66 * \param token name of menu
67 * \return description string of the menu or empty
68 */
69const std::string MenuDescription::getDescription(std::string token) const
70{
71 if (MenuDescriptionsMap.find(token) != MenuDescriptionsMap.end())
72 return MenuDescriptionsMap.find(token)->second;
73 else
74 return std::string();
75}
76
77/** Getter for MenuNameMap.
78 * \param token name of menu
79 * \return description string of the menu or empty
80 */
81const std::string MenuDescription::getName(std::string token) const
82{
83 if (MenuNameMap.find(token) != MenuNameMap.end())
84 return MenuNameMap.find(token)->second;
85 else
86 return std::string();
87}
88
89/** Forward iterator from beginning of list of descriptions.
90 * \return iterator
91 */
92MenuDescription::iterator MenuDescription::getBeginIter()
93{
94 return MenuSet.begin();
95}
96
97/** Forward iterator at end of list of descriptions.
98 * \return iterator
99 */
100MenuDescription::iterator MenuDescription::getEndIter()
101{
102 return MenuSet.end();
103}
104
105/** Constant forward iterator from beginning of list of descriptions.
106 * \return constant iterator
107 */
108MenuDescription::const_iterator MenuDescription::getBeginIter() const
109{
110 return MenuSet.begin();
111}
112
113/** Constant forward iterator at end of list of descriptions.
114 * \return constant iterator
115 */
116MenuDescription::const_iterator MenuDescription::getEndIter() const
117{
118 return MenuSet.end();
119}
120
121
Note: See TracBrowser for help on using the repository browser.