Changeset 4a75d9 for src/UIElements


Ignore:
Timestamp:
May 8, 2010, 8:14:04 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:
8e1f7af
Parents:
ecb799
Message:

...UIFactory::makeMainWindow() now has only a single parameter, namely menuPopulaters.

  • as molecules and periodentafel can be accessed globally from singleton World, there is no need to pass these around anymore.
  • typedef MenuMaker and populateEditMoleculesMenu() equally stripped.
Location:
src/UIElements
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/CommandLineUIFactory.cpp

    recb799 r4a75d9  
    2828}
    2929
    30 MainWindow* CommandLineUIFactory::makeMainWindow(menuPopulaters populaters,MoleculeListClass *molecules, config *configuration, periodentafel *periode, char *ConfigFileName) {
    31   return new CommandLineWindow(populaters,molecules,configuration,periode,ConfigFileName);
     30MainWindow* CommandLineUIFactory::makeMainWindow(menuPopulaters populaters) {
     31  return new CommandLineWindow(populaters);
    3232}
  • src/UIElements/CommandLineUIFactory.hpp

    recb799 r4a75d9  
    1919
    2020  virtual Dialog* makeDialog();
    21   virtual MainWindow* makeMainWindow(menuPopulaters,MoleculeListClass *, config *, periodentafel *, char *);
     21  virtual MainWindow* makeMainWindow(menuPopulaters);
    2222
    2323protected:
  • src/UIElements/CommandLineWindow.cpp

    recb799 r4a75d9  
    1616
    1717// TODO: see what code can be moved to a base class for Graphic and CommandLine Windows
    18 CommandLineWindow::CommandLineWindow(menuPopulaters populaters,MoleculeListClass *molecules, config *configuration, periodentafel *periode, char *ConfigFileName)
     18CommandLineWindow::CommandLineWindow(menuPopulaters populaters)
    1919{
    2020
  • src/UIElements/CommandLineWindow.hpp

    recb799 r4a75d9  
    1616{
    1717public:
    18   CommandLineWindow(menuPopulaters,MoleculeListClass *, config *, periodentafel *, char *);
     18  CommandLineWindow(menuPopulaters);
    1919  virtual ~CommandLineWindow();
    2020
  • src/UIElements/MainWindow.hpp

    recb799 r4a75d9  
    2828 * The type of menuPopulators
    2929 */
    30 typedef void (*MenuMaker)(Menu*,MoleculeListClass*, config*, periodentafel*);
     30typedef void (*MenuMaker)(Menu*);
    3131
    3232/**
  • src/UIElements/TextUIFactory.cpp

    recb799 r4a75d9  
    2727}
    2828
    29 MainWindow* TextUIFactory::makeMainWindow(menuPopulaters populaters,MoleculeListClass *molecules, config *configuration, periodentafel *periode, char *ConfigFileName) {
    30   return new TextWindow(populaters,molecules,configuration,periode,ConfigFileName);
     29MainWindow* TextUIFactory::makeMainWindow(menuPopulaters populaters) {
     30  return new TextWindow(populaters);
    3131}
    3232
  • src/UIElements/TextUIFactory.hpp

    recb799 r4a75d9  
    1919
    2020  virtual Dialog* makeDialog();
    21   virtual MainWindow* makeMainWindow(menuPopulaters,MoleculeListClass *, config *, periodentafel *, char *);
     21  virtual MainWindow* makeMainWindow(menuPopulaters);
    2222
    2323protected:
  • src/UIElements/TextWindow.cpp

    recb799 r4a75d9  
    2727#include "molecule.hpp"
    2828#include "periodentafel.hpp"
     29#include "World.hpp"
    2930
    3031#include "Legacy/oldmenu.hpp"
     
    4849
    4950// TODO: see what code can be moved to a base class for Graphic and Text Windows
    50 TextWindow::TextWindow(menuPopulaters populaters,MoleculeListClass *molecules, config *configuration, periodentafel *periode, char *ConfigFileName)
     51TextWindow::TextWindow(menuPopulaters populaters)
    5152{
     53  MoleculeListClass *molecules = World::getInstance().getMolecules();
     54  config *configuration = NULL;
     55  periodentafel *periode = World::getInstance().getPeriode();
     56  char *ConfigFileName = NULL;
    5257  old_menu = new oldmenu;
    5358
     
    101106  // call all functions used to build the submenus
    102107
    103   populaters.MakeEditMoleculesMenu(editMoleculesMenu,molecules,configuration,periode);
     108  populaters.MakeEditMoleculesMenu(editMoleculesMenu);
    104109
    105110  Action *returnFromEditMoleculeAction = new TextMenu::LeaveAction(editMoleculesMenu);
  • src/UIElements/TextWindow.hpp

    recb799 r4a75d9  
    2020{
    2121public:
    22   TextWindow(menuPopulaters,MoleculeListClass *, config *, periodentafel *, char *);
     22  TextWindow(menuPopulaters);
    2323  virtual ~TextWindow();
    2424
  • src/UIElements/UIFactory.hpp

    recb799 r4a75d9  
    3838   * Produce some kind of main window, of whichever type was chosen when the factory was created
    3939   */
    40   virtual MainWindow* makeMainWindow(menuPopulaters,MoleculeListClass *, config *, periodentafel *, char *)=0;
     40  virtual MainWindow* makeMainWindow(menuPopulaters)=0;
    4141
    4242  /**
Note: See TracChangeset for help on using the changeset viewer.