Changeset 65b6e0 for src/menu.cpp
- Timestamp:
- Dec 16, 2009, 12:30:16 PM (16 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, Candidate_v1.7.0, 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:
- 21c246
- Parents:
- 4aa424
- git-author:
- Tillmann Crueger <crueger@…> (12/15/09 17:12:30)
- git-committer:
- Frederik Heber <heber@…> (12/16/09 12:30:16)
- File:
-
- 1 edited
-
src/menu.cpp (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/menu.cpp
r4aa424 r65b6e0 24 24 #include "periodentafel.hpp" 25 25 26 #include "Menu/Menu.hpp" 27 #include "Menu/TextMenu.hpp" 28 #include "Menu/ActionMenuItem.hpp" 29 #include "Menu/SeperatorItem.hpp" 30 #include "Actions/MethodAction.hpp" 31 32 33 #include <boost/bind.hpp> 34 26 35 /* copied methods for refactoring */ 27 36 /*TODO: Move these methods inside menu class … … 34 43 * \param *molecule molecules with atoms 35 44 */ 36 void menu::AddAtoms(periodentafel *periode, molecule *mol)45 void oldmenu::AddAtoms(periodentafel *periode, molecule *mol) 37 46 { 38 47 atom *first, *second, *third, *fourth; … … 232 241 * \param *mol molecule with all the atoms 233 242 */ 234 void menu::CenterAtoms(molecule *mol)243 void oldmenu::CenterAtoms(molecule *mol) 235 244 { 236 245 Vector x, y, helper; … … 290 299 * \param *mol molecule with all the atoms 291 300 */ 292 void menu::AlignAtoms(periodentafel *periode, molecule *mol)301 void oldmenu::AlignAtoms(periodentafel *periode, molecule *mol) 293 302 { 294 303 atom *first, *second, *third; … … 358 367 * \param *mol molecule with all the atoms 359 368 */ 360 void menu::MirrorAtoms(molecule *mol)369 void oldmenu::MirrorAtoms(molecule *mol) 361 370 { 362 371 atom *first, *second, *third; … … 405 414 * \param *mol molecule with all the atoms 406 415 */ 407 void menu::RemoveAtoms(molecule *mol)416 void oldmenu::RemoveAtoms(molecule *mol) 408 417 { 409 418 atom *first, *second; … … 469 478 * \param *mol molecule with all the atoms 470 479 */ 471 void menu::MeasureAtoms(periodentafel *periode, molecule *mol, config *configuration)480 void oldmenu::MeasureAtoms(periodentafel *periode, molecule *mol, config *configuration) 472 481 { 473 482 atom *first, *second, *third; … … 589 598 * \param *configuration configuration structure for the to be written config files of all fragments 590 599 */ 591 void menu::FragmentAtoms(molecule *mol, config *configuration)600 void oldmenu::FragmentAtoms(molecule *mol, config *configuration) 592 601 { 593 602 int Order1; … … 612 621 * \param *molecules list of molecules whose atoms are to be manipulated 613 622 */ 614 void menu::ManipulateAtoms(periodentafel *periode, MoleculeListClass *molecules, config *configuration)623 void oldmenu::ManipulateAtoms(periodentafel *periode, MoleculeListClass *molecules, config *configuration) 615 624 { 616 625 atom *first, *second; … … 731 740 * \param *molecules list of molecule to manipulate 732 741 */ 733 void menu::ManipulateMolecules(periodentafel *periode, MoleculeListClass *molecules, config *configuration)742 void oldmenu::ManipulateMolecules(periodentafel *periode, MoleculeListClass *molecules, config *configuration) 734 743 { 735 744 atom *first = NULL; … … 890 899 * \param *molecules list of molecules to add to 891 900 */ 892 void menu::EditMolecules(periodentafel *periode, MoleculeListClass *molecules)901 void oldmenu::EditMolecules(periodentafel *periode, MoleculeListClass *molecules) 893 902 { 894 903 char choice; // menu choice char … … 1006 1015 * \param *molecules list of molecules to add to 1007 1016 */ 1008 void menu::MergeMolecules(periodentafel *periode, MoleculeListClass *molecules)1017 void oldmenu::MergeMolecules(periodentafel *periode, MoleculeListClass *molecules) 1009 1018 { 1010 1019 char choice; // menu choice char … … 1120 1129 * \param *molecules list of molecules 1121 1130 */ 1122 void menu::testroutine(MoleculeListClass *molecules)1131 void oldmenu::testroutine(MoleculeListClass *molecules) 1123 1132 { 1124 1133 // the current test routine checks the functionality of the KeySet&Graph concept: … … 1198 1207 }; 1199 1208 1200 menu::menu()1209 oldmenu::oldmenu() 1201 1210 { 1202 1211 // TODO Auto-generated constructor stub 1203 1212 } 1204 1213 1205 menu::~menu()1214 oldmenu::~oldmenu() 1206 1215 { 1207 1216 // TODO Auto-generated destructor stub 1208 1217 } 1209 1218 1210 void menu::perform(MoleculeListClass *molecules, config *configuration, periodentafel *periode, char *ConfigFileName) 1211 { 1219 void oldmenu::perform(MoleculeListClass *molecules, config *configuration, periodentafel *periode, char *ConfigFileName) 1220 { 1221 TextMenu *main_menu = new TextMenu(Log() << Verbose(0), "Main Menu"); 1222 1223 ActionMenuItem *setMolecule = new ActionMenuItem('a',"set molecule (in)active",main_menu,new MethodAction()); 1224 ActionMenuItem *editMolecule = new ActionMenuItem('e',"edit molecules (load, parse, save)",main_menu,new MethodAction()); 1225 ActionMenuItem *manipulateAtomsGlobal = new ActionMenuItem('g',"globally manipulate atoms in molecule",main_menu,new MethodAction()); 1226 ActionMenuItem *mergeMolecules = new ActionMenuItem('M',"Merge molecules",main_menu,new MethodAction()); 1227 ActionMenuItem *manipulateAtoms = new ActionMenuItem('m',"manipulate atoms",main_menu,new MethodAction()); 1228 1229 new SeperatorItem(main_menu); 1230 ActionMenuItem *editConfig = new ActionMenuItem('c',"edit the current configuration",main_menu,new MethodAction()); 1231 new SeperatorItem(main_menu); 1232 ActionMenuItem *saveSetup = new ActionMenuItem('s',"save current setup to config file",main_menu,new MethodAction()); 1233 ActionMenuItem *callTest = new ActionMenuItem('T',"call the current test routine",main_menu,new MethodAction()); 1234 1235 MethodAction *quitAction = new MethodAction(); 1236 quitAction->executeMethod = boost::bind(&TextMenu::doQuit,main_menu); 1237 new ActionMenuItem('q',"quit",main_menu,quitAction); 1238 1239 1240 /*main_menu->addItem(setMolecule); 1241 main_menu->addItem(editMolecule); 1242 main_menu->addItem(manipulateAtomsGlobal); 1243 main_menu->addItem(mergeMolecules); 1244 main_menu->addItem(manipulateAtoms); 1245 //TODO: Seperator 1246 main_menu->addItem(editConfig); 1247 //TODO: Seperator 1248 main_menu->addItem(saveSetup); 1249 main_menu->addItem(callTest); 1250 main_menu->addItem(quit); 1251 1252 */ 1253 main_menu->display(); 1254 1255 1256 1257 #if 0 1212 1258 char choice; 1213 1259 int j; … … 1279 1325 }; 1280 1326 } while (choice != 'q'); 1327 #endif 1281 1328 }; 1282 1329 … … 1287 1334 * \param *molecules list of molecules structure with all the atoms and coordinates 1288 1335 */ 1289 void menu::SaveConfig(char *ConfigFileName, config *configuration, periodentafel *periode, MoleculeListClass *molecules)1336 void oldmenu::SaveConfig(char *ConfigFileName, config *configuration, periodentafel *periode, MoleculeListClass *molecules) 1290 1337 { 1291 1338 char filename[MAXSTRINGSIZE];
Note:
See TracChangeset
for help on using the changeset viewer.
