Changeset 8f3f40 for src/UIElements/Menu/TextMenu/TextMenu.hpp
- Timestamp:
- Dec 4, 2010, 11:42:38 PM (15 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:
- f0f9a6
- Parents:
- 0af7ef
- git-author:
- Frederik Heber <heber@…> (11/08/10 10:31:40)
- git-committer:
- Frederik Heber <heber@…> (12/04/10 23:42:38)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/UIElements/Menu/TextMenu/TextMenu.hpp ¶
r0af7ef r8f3f40 25 25 26 26 /** TextMenu is a specialization of MenuInterface to access TxMenu-like menus. 27 * 28 * Basically, this class is to be used in the MainWindow class of the TextUI. 29 * There, we simply instantiate the class and call init() in order to add all 30 * MenuItem's from MenuDescriptions and Action's ActionRegistry. 31 * 27 32 * \sa QtMenu. 28 33 */ … … 31 36 { 32 37 public: 38 /** Constructor for class TextMenu. 39 * Initializes outputter and token and takes note whether to delete the 40 * MenuInstance or not. 41 */ 33 42 TextMenu(std::ostream &_outputter, const std::string &_token) : 34 43 MenuInterface(_token), … … 46 55 {} 47 56 57 /** Destructor of MenuInstance. 58 * 59 */ 48 60 virtual ~TextMenu() 49 61 { … … 52 64 } 53 65 66 /** Display this MenuInstance. 67 * 68 */ 54 69 void display() 55 70 { … … 57 72 } 58 73 74 /** Returns a pointer to the contained/wrapped MenuInstance. 75 * \return pointer to template class pointer 76 */ 59 77 T * const getMenuInstance() 60 78 { … … 62 80 } 63 81 82 /** Reserves a specific trigger key such that it is not used during init(). 83 * \param trigger trigger key 84 * \param &name token given for reference. 85 */ 64 86 void reserveShortcut(char trigger, const std::string &name) 65 87 { … … 78 100 MenuShortcutMap ShortcutMap; 79 101 102 /** Adds an ActionItem by simply creating a new one. 103 * \param &token token of Action (token in ActionRegistry) 104 * \param &description descriptive text to be shown 105 */ 80 106 virtual void addActionItem(const std::string &token, const std::string &description) 81 107 { … … 83 109 } 84 110 111 /** Adds a (dead) separator item. 112 * 113 */ 85 114 virtual void addSeparatorItem() 86 115 { … … 88 117 } 89 118 119 /** Adds a Menu to this current Menu. 120 * We also create here a leave action for this submenu to be able to return 121 * to the current one again 122 * \param &token token of the menu 123 * \param &description descriptive text 124 */ 90 125 virtual void addSubmenuItem(const std::string &token, const std::string &description) 91 126 { … … 102 137 } 103 138 139 /** Return the next available trigger key suitable to this name. 140 * This function is used internally to make sure that each key is unique to 141 * each Action/Menu. The chosen trigger key is also stored in an internal ShortcutMap. 142 * \param &name text shown in menu 143 * \return trigger key 144 */ 104 145 char getSuitableShortForm(const std::string &name) 105 146 {
Note:
See TracChangeset
for help on using the changeset viewer.