Ignore:
Timestamp:
Jul 22, 2010, 8:56:43 PM (14 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:
ff4fd2a
Parents:
ce8755
git-author:
Frederik Heber <heber@…> (07/22/10 20:55:17)
git-committer:
Frederik Heber <heber@…> (07/22/10 20:56:43)
Message:

converted ConvexEnvelopeAction to new createDialog().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/TesselationAction/ConvexEnvelopeAction.cpp

    rce8755 r8ae5d5  
    1717#include "UIElements/UIFactory.hpp"
    1818#include "UIElements/Dialog.hpp"
    19 #include "Actions/MapOfActions.hpp"
     19#include "UIElements/ValueStorage.hpp"
    2020
    21 #include "atom.hpp"
    2221#include "boundary.hpp"
    2322#include "config.hpp"
     
    5150{}
    5251
     52Dialog* TesselationConvexEnvelopeAction::createDialog() {
     53  Dialog *dialog = UIFactory::getInstance().makeDialog();
     54
     55  dialog->queryEmpty(NAME, ValueStorage::getInstance().getDescription(NAME));
     56  dialog->queryString("convex-file", ValueStorage::getInstance().getDescription("convex-file"));
     57  dialog->queryString("nonconvex-file", ValueStorage::getInstance().getDescription("nonconvex-file"));
     58
     59  return dialog;
     60}
     61
    5362Action::state_ptr TesselationConvexEnvelopeAction::performCall() {
    5463  string filenameConvex;
    5564  string filenameNonConvex;
    56   Dialog *dialog = UIFactory::getInstance().makeDialog();
    5765  molecule * mol = NULL;
    58   bool Success = false;
     66  bool Success = true;
    5967  config *configuration = World::getInstance().getConfig();
    6068
    61   dialog->queryMolecule(NAME, &mol, MapOfActions::getInstance().getDescription(NAME));
    62   dialog->queryString("convex-file", &filenameConvex, MapOfActions::getInstance().getDescription("convex-file"));
    63   dialog->queryString("nonconvex-file", &filenameNonConvex, MapOfActions::getInstance().getDescription("nonconvex-file"));
     69  ValueStorage::getInstance().queryCurrentValue("convex-file", filenameConvex);
     70  ValueStorage::getInstance().queryCurrentValue("nonconvex-file", filenameNonConvex);
    6471
    65   if(dialog->display()) {
     72  for (World::MoleculeSelectionIterator iter = World::getInstance().beginMoleculeSelection(); iter != World::getInstance().endMoleculeSelection(); ++iter) {
     73    mol = iter->second;
    6674    class Tesselation *TesselStruct = NULL;
    6775    const LinkedCell *LCList = NULL;
     
    8189    delete(TesselStruct);
    8290    delete(LCList);
    83     delete dialog;
    84     if (Success)
    85       return Action::success;
    86     else
    87       return Action::failure;
    8891  }
    89   delete dialog;
    90   return Action::failure;
     92  if (Success)
     93    return Action::success;
     94  else
     95    return Action::failure;
    9196}
    9297
Note: See TracChangeset for help on using the changeset viewer.