Changeset 257c77 for src/UIElements/TextUI
- Timestamp:
- Jun 17, 2010, 2:55:56 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:
- b47bfc
- Parents:
- 992fd7 (diff), 5f5a7b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/UIElements/TextUI
- Files:
-
- 2 added
- 6 moved
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/TextUI/TextStatusIndicator.cpp
r992fd7 r257c77 6 6 */ 7 7 8 #include "TextStatusIndicator.hpp" 8 #include "Helpers/MemDebug.hpp" 9 10 #include "TextUI/TextStatusIndicator.hpp" 9 11 10 12 #include <iostream> … … 14 16 using namespace std; 15 17 16 TextStatusIndicator::TextStatusIndicator() 18 TextStatusIndicator::TextStatusIndicator() : 19 Observer("TextStatusIndicator") 17 20 { 18 21 Process::AddObserver(this); -
src/UIElements/TextUI/TextUIFactory.cpp
r992fd7 r257c77 6 6 */ 7 7 8 #include "UIElements/TextUIFactory.hpp" 9 #include "UIElements/TextWindow.hpp" 10 #include "UIElements/TextDialog.hpp" 11 #include "Helpers/MemDebug.hpp" 8 #include "UIElements/TextUI/TextUIFactory.hpp" 9 #include "UIElements/TextUI/TextWindow.hpp" 10 #include "UIElements/TextUI/TextDialog.hpp" 12 11 13 12 TextUIFactory::TextUIFactory() … … 22 21 } 23 22 24 MainWindow* TextUIFactory::makeMainWindow( menuPopulaters populaters,MoleculeListClass *molecules, config *configuration, periodentafel *periode, char *ConfigFileName) {25 return new TextWindow( populaters,molecules,configuration,periode,ConfigFileName);23 MainWindow* TextUIFactory::makeMainWindow() { 24 return new TextWindow(); 26 25 } 27 26 -
src/UIElements/TextUI/TextUIFactory.hpp
r992fd7 r257c77 9 9 #define TEXTUIFACTORY_HPP_ 10 10 11 #include "UI Elements/UIFactory.hpp"11 #include "UIFactory.hpp" 12 12 13 13 class TextUIFactory : public UIFactory … … 19 19 20 20 virtual Dialog* makeDialog(); 21 virtual MainWindow* makeMainWindow( menuPopulaters,MoleculeListClass *, config *, periodentafel *, char *);21 virtual MainWindow* makeMainWindow(); 22 22 23 23 struct description : public UIFactory::factoryDescription { -
src/UIElements/TextUI/TextWindow.cpp
r992fd7 r257c77 6 6 */ 7 7 8 #include "UIElements/TextWindow.hpp" 8 #include "Helpers/MemDebug.hpp" 9 10 #include "TextUI/TextWindow.hpp" 9 11 10 12 #include <boost/bind.hpp> … … 24 26 #include "linkedcell.hpp" 25 27 #include "log.hpp" 26 #include "memoryusageobserver unittest.hpp"28 #include "memoryusageobserver.hpp" 27 29 #include "molecule.hpp" 28 30 #include "periodentafel.hpp" 31 #include "World.hpp" 29 32 30 33 #include "Legacy/oldmenu.hpp" … … 36 39 #include "Menu/DisplayMenuItem.hpp" 37 40 #include "Menu/SubMenuItem.hpp" 38 #include " UIElements/TextStatusIndicator.hpp"41 #include "TextUI/TextStatusIndicator.hpp" 39 42 #include "Actions/MethodAction.hpp" 43 #include "Actions/MoleculeAction/ChangeNameAction.hpp" 40 44 #include "Actions/ErrorAction.hpp" 41 45 #include "Actions/ActionRegistry.hpp" … … 49 53 50 54 // TODO: see what code can be moved to a base class for Graphic and Text Windows 51 TextWindow::TextWindow( menuPopulaters populaters,MoleculeListClass *molecules, config *configuration, periodentafel *periode, char *ConfigFileName)55 TextWindow::TextWindow() 52 56 { 57 MoleculeListClass *molecules = World::getInstance().getMolecules(); 58 config *configuration = World::getInstance().getConfig(); 59 periodentafel *periode = World::getInstance().getPeriode(); 60 char *ConfigFileName = NULL; 53 61 old_menu = new oldmenu; 54 62 … … 102 110 // call all functions used to build the submenus 103 111 104 populate rs.MakeEditMoleculesMenu(editMoleculesMenu,molecules,configuration,periode);112 populateEditMoleculesMenu(editMoleculesMenu); 105 113 106 114 Action *returnFromEditMoleculeAction = new TextMenu::LeaveAction(editMoleculesMenu); … … 126 134 main_menu->display(); 127 135 } 136 137 void TextWindow::populateEditMoleculesMenu(Menu* editMoleculesMenu) 138 { 139 MoleculeListClass *molecules = World::getInstance().getMolecules(); 140 periodentafel *periode = World::getInstance().getPeriode(); 141 142 // build the EditMoleculesMenu 143 Action *createMoleculeAction = new MethodAction("createMoleculeAction",boost::bind(&MoleculeListClass::createNewMolecule,molecules,periode)); 144 new ActionMenuItem('c',"create new molecule",editMoleculesMenu,createMoleculeAction); 145 146 Action *loadMoleculeAction = new MethodAction("loadMoleculeAction",boost::bind(&MoleculeListClass::loadFromXYZ,molecules,periode)); 147 new ActionMenuItem('l',"load molecule from xyz file",editMoleculesMenu,loadMoleculeAction); 148 149 Action *changeFilenameAction = new MoleculeChangeNameAction(); 150 new ActionMenuItem('n',"change molecule's name",editMoleculesMenu,changeFilenameAction); 151 152 Action *giveFilenameAction = new MethodAction("giveFilenameAction",boost::bind(&MoleculeListClass::setMoleculeFilename,molecules)); 153 new ActionMenuItem('N',"give molecules filename",editMoleculesMenu,giveFilenameAction); 154 155 Action *parseAtomsAction = new MethodAction("parseAtomsAction",boost::bind(&MoleculeListClass::parseXYZIntoMolecule,molecules)); 156 new ActionMenuItem('p',"parse atoms in xyz file into molecule",editMoleculesMenu,parseAtomsAction); 157 158 Action *eraseMoleculeAction = new MethodAction("eraseMoleculeAction",boost::bind(&MoleculeListClass::eraseMolecule,molecules)); 159 new ActionMenuItem('r',"remove a molecule",editMoleculesMenu,eraseMoleculeAction); 160 161 } -
src/UIElements/TextUI/TextWindow.hpp
r992fd7 r257c77 9 9 #define TEXTWINDOW_HPP_ 10 10 11 #include " UIElements/MainWindow.hpp"11 #include "MainWindow.hpp" 12 12 13 13 class TextMenu; … … 17 17 class TextStatusIndicator; 18 18 19 19 20 class TextWindow : public MainWindow 20 21 { 21 22 public: 22 TextWindow( menuPopulaters,MoleculeListClass *, config *, periodentafel *, char *);23 TextWindow(); 23 24 virtual ~TextWindow(); 24 25 25 26 virtual void display(); 26 27 private: 28 // populaters 29 void populateEditMoleculesMenu(Menu* editMoleculesMenu); 30 27 31 TextMenu *main_menu; 28 32
Note:
See TracChangeset
for help on using the changeset viewer.