Changeset 80951de for src/Actions


Ignore:
Timestamp:
Jul 22, 2010, 9:59:37 PM (15 years ago)
Author:
Frederik Heber <heber@…>
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:
30db64
Parents:
4c5aaf
Message:

Fixed all remaining Action's and derived classes that lacked createDialog().

Location:
src/Actions
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/ActionHistory.cpp

    r4c5aaf r80951de  
    8686}
    8787
     88Dialog* ActionHistory::UndoAction::createDialog(){
     89
     90}
     91
    8892Action::state_ptr ActionHistory::UndoAction::performCall(){
    8993  hist->undoLast();
     
    120124}
    121125
     126Dialog* ActionHistory::RedoAction::createDialog(){
     127
     128}
     129
    122130Action::state_ptr ActionHistory::RedoAction::performCall(){
    123131  hist->redoLast();
  • src/Actions/ActionHistory.hpp

    r4c5aaf r80951de  
    4040
    4141  private:
     42    virtual Dialog * createDialog();
    4243    virtual Action::state_ptr performCall();
    4344    virtual Action::state_ptr performUndo(Action::state_ptr);
     
    5859
    5960  private:
     61    virtual Dialog * createDialog();
    6062    virtual Action::state_ptr performCall();
    6163    virtual Action::state_ptr performUndo(Action::state_ptr);
  • src/Actions/ActionSequence.cpp

    r4c5aaf r80951de  
    1010#include "Actions/ActionSequence.hpp"
    1111#include "Actions/Action.hpp"
     12#include "UIElements/Dialog.hpp"
    1213
    1314#include "Helpers/Assert.hpp"
     
    3637    return theAction;
    3738  }
     39}
     40
     41// this method is used outside the ActionModule
     42// Each action registers itself with the history
     43void ActionSequence::callAllDialogs(){
     44  for(actionSet::iterator it=actions.begin(); it!=actions.end(); it++){
     45    // we want to have a global bookkeeping for all actions in the sequence, so
     46    // we bypass the normal call
     47    (*it)->createDialog()->display();
     48  }
     49}
     50
     51// This method is used internally when MakroActions are constructed.
     52// In this case only the makro Action should be registered and
     53// handle the states
     54ActionSequence::stateSet ActionSequence::callAllDialogs(bool){
     55  stateSet states;
     56  for(actionSet::iterator it=actions.begin(); it!=actions.end(); it++){
     57    // we want to have a global bookkeeping for all actions in the sequence, so
     58    // we bypass the normal call
     59    (*it)->createDialog()->display();
     60  }
     61  return states;
    3862}
    3963
  • src/Actions/ActionSequence.hpp

    r4c5aaf r80951de  
    3030
    3131  void callAll();
     32  void callAllDialogs();
    3233
    3334  bool canUndo();
     
    3637protected:
    3738  stateSet callAll(bool); // Dummy parameter to allow overloading
     39  stateSet callAllDialogs(bool); // Dummy parameter to allow overloading
    3840  stateSet undoAll(stateSet);
    3941  stateSet redoAll(stateSet);
  • src/Actions/Calculation.hpp

    r4c5aaf r80951de  
    6464  virtual T* doCalc()=0;
    6565private:
     66  virtual Dialog* createDialog();
    6667  virtual Action::state_ptr performCall();
    6768  virtual Action::state_ptr performUndo(Action::state_ptr);
  • src/Actions/Calculation_impl.hpp

    r4c5aaf r80951de  
    2727
    2828// methods inherited from Action
     29
     30template<typename T>
     31Dialog* Calculation<T>::createDialog(){
     32  return NULL;
     33}
    2934
    3035template<typename T>
  • src/Actions/ErrorAction.cpp

    r4c5aaf r80951de  
    2727}
    2828
     29Dialog* ErrorAction::createDialog() {
     30}
     31
    2932Action::state_ptr ErrorAction::performCall() {
    3033  Log() << Verbose(0) << errorMsg << endl;
  • src/Actions/ErrorAction.hpp

    r4c5aaf r80951de  
    2222
    2323private:
    24 
     24  virtual Dialog * createDialog();
    2525  virtual Action::state_ptr performCall();
    2626  virtual Action::state_ptr performUndo(Action::state_ptr);
  • src/Actions/MakroAction.cpp

    r4c5aaf r80951de  
    4444}
    4545
     46Dialog* MakroAction::createDialog() {
     47  actions->callAllDialogs();
     48}
    4649
    4750Action::state_ptr MakroAction::performCall(){
  • src/Actions/MakroAction.hpp

    r4c5aaf r80951de  
    3030
    3131private:
     32  virtual Dialog * createDialog();
    3233  virtual Action::state_ptr performCall();
    3334  virtual Action::state_ptr performUndo(Action::state_ptr);
  • src/Actions/ManipulateAtomsProcess.cpp

    r4c5aaf r80951de  
    2626ManipulateAtomsProcess::~ManipulateAtomsProcess()
    2727{}
     28
     29Dialog* ManipulateAtomsProcess::createDialog(){
     30
     31}
    2832
    2933Action::state_ptr ManipulateAtomsProcess::performCall(){
  • src/Actions/ManipulateAtomsProcess.hpp

    r4c5aaf r80951de  
    2929private:
    3030
     31  virtual Dialog* createDialog();
    3132  virtual Action::state_ptr performCall();
    3233  virtual Action::state_ptr performUndo(Action::state_ptr);
  • src/Actions/MethodAction.cpp

    r4c5aaf r80951de  
    2626{}
    2727
     28Dialog* MethodAction::createDialog() {
     29}
     30
    2831
    2932Action::state_ptr MethodAction::performCall() {
  • src/Actions/MethodAction.hpp

    r4c5aaf r80951de  
    2626
    2727private:
     28  virtual Dialog * createDialog();
    2829  virtual Action::state_ptr performCall();
    2930  virtual Action::state_ptr performUndo(Action::state_ptr);
Note: See TracChangeset for help on using the changeset viewer.