Changeset a6f180


Ignore:
Timestamp:
Jan 15, 2010, 3:53:29 PM (15 years ago)
Author:
Tillmann Crueger <crueger@…>
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:
d3a5ea
Parents:
fa27ed
Message:

Moved method to rename molecules to a seperate Action

Location:
src
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/Action.hpp

    rfa27ed ra6f180  
    2929  virtual void undo()=0;
    3030  virtual bool canUndo()=0;
     31  //virtual bool shouldUndo()=0;
    3132
    3233  virtual const std::string getName();
  • src/Makefile.am

    rfa27ed ra6f180  
    55ANALYSISHEADER = analysis_bonds.hpp analysis_correlation.hpp
    66
    7 ACTIONSSOURCE = Actions/Action.cpp Actions/MethodAction.cpp Actions/ActionSequence.cpp Actions/MakroAction.cpp Actions/ErrorAction.cpp Actions/ActionRegistry.cpp
    8 ACTIONSHEADER = Actions/Action.hpp Actions/MethodAction.hpp Actions/ActionSequence.hpp Actions/MakroAction.hpp Actions/ErrorAction.hpp Actions/ActionRegistry.hpp
     7ACTIONSSOURCE = Actions/Action.cpp Actions/MethodAction.cpp Actions/ActionSequence.cpp Actions/MakroAction.cpp Actions/ErrorAction.cpp Actions/small_actions.cpp Actions/ActionRegistry.cpp
     8ACTIONSHEADER = Actions/Action.hpp Actions/MethodAction.hpp Actions/ActionSequence.hpp Actions/MakroAction.hpp Actions/ErrorAction.hpp Actions/small_actions.hpp Actions/ActionRegistry.hpp
    99
    1010VIEWSOURCE = Views/View.cpp Views/StringView.cpp Views/MethodStringView.cpp Views/StreamStringView.cpp
  • src/builder.cpp

    rfa27ed ra6f180  
    7373#include "Actions/ActionRegistry.hpp"
    7474#include "Actions/MethodAction.hpp"
     75#include "Actions/small_actions.hpp"
    7576
    7677
     
    908909  new ActionMenuItem('l',"load molecule from xyz file",editMoleculesMenu,loadMoleculeAction);
    909910
    910   Action *changeFilenameAction = new MethodAction("changeFilenameAction",boost::bind(&MoleculeListClass::changeName,molecules));
     911  Action *changeFilenameAction = new ChangeMoleculeNameAction(molecules);
    911912  new ActionMenuItem('n',"change molecule's name",editMoleculesMenu,changeFilenameAction);
    912913
  • src/molecule.hpp

    rfa27ed ra6f180  
    332332  void createNewMolecule(periodentafel *periode);
    333333  void loadFromXYZ(periodentafel *periode);
    334   void changeName();
    335334  void setMoleculeFilename();
    336335  void parseXYZIntoMolecule();
  • src/moleculelist.cpp

    rfa27ed ra6f180  
    879879}
    880880
    881 void MoleculeListClass::changeName(){
    882   char filename[MAXSTRINGSIZE];
    883   molecule *mol = NULL;
    884   int nr;
    885   do {
    886     Log() << Verbose(0) << "Enter index of molecule: ";
    887     cin >> nr;
    888     mol = ReturnIndex(nr);
    889   } while (mol == NULL);
    890   Log() << Verbose(0) << "Enter name: ";
    891   cin >> filename;
    892   strcpy(mol->name, filename);
    893 }
    894 
    895881void MoleculeListClass::setMoleculeFilename() {
    896882  char filename[MAXSTRINGSIZE];
Note: See TracChangeset for help on using the changeset viewer.