Changeset 51c3e4 for src/UIElements


Ignore:
Timestamp:
Aug 25, 2010, 12:25:28 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, Candidate_v1.7.0, 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:
2be37b
Parents:
14c57a (diff), d17f3d (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.
Message:

Merge branch 'stable' into StructureRefactoring

Conflicts:

src/atom_trajectoryparticle.cpp

Location:
src/UIElements
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/CommandLineUI/CommandLineDialog.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * CommandLineDialog.cpp
  • src/UIElements/CommandLineUI/CommandLineStatusIndicator.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * CommandLineStatusIndicator.cpp
  • src/UIElements/CommandLineUI/CommandLineUIFactory.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * CommandLineUIFactory.cpp
  • src/UIElements/CommandLineUI/CommandLineWindow.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * CommandLineWindow.cpp
  • src/UIElements/Dialog.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * Dialog.cpp
  • src/UIElements/MainWindow.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * Window.cpp
  • src/UIElements/Menu/ActionMenuItem.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * ActionMenuItem.cpp
  • src/UIElements/Menu/DisplayMenuItem.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * DisplayMenuItem.cpp
  • src/UIElements/Menu/Menu.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * Menu.cpp
  • src/UIElements/Menu/MenuItem.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * MenuItem.cpp
  • src/UIElements/Menu/QT4/QTMenu.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * QTMenu.cpp
  • src/UIElements/Menu/SeperatorItem.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * SeperatorItem.cpp
  • src/UIElements/Menu/SubMenuItem.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * SubMenuItem.cpp
  • src/UIElements/Menu/TextMenu.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * TextMenu.cpp
  • src/UIElements/QT4/QTDialog.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * QTDialog.cpp
  • src/UIElements/QT4/QTMainWindow.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * QTMainWindow.cpp
  • src/UIElements/QT4/QTUIFactory.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * QTUIFactory.cpp
     
    3441  argv = new char*[1];
    3542  argv[0] = new char[256];
    36   strcpy(argv[0],ESPACKVersion);
     43  strcpy(argv[0],MOLECUILDERVERSION);
    3744  app = new QApplication(argc,argv);
    3845}
  • src/UIElements/TextUI/TextDialog.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * TextDialog.cpp
  • src/UIElements/TextUI/TextStatusIndicator.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * TextStatusIndicator.cpp
  • src/UIElements/TextUI/TextUIFactory.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * TextUIFactory.cpp
  • src/UIElements/TextUI/TextWindow.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * TextWindow.cpp
     
    4956{
    5057  map <std::string, TextMenu *> NametoTextMenuMap;
     58  std::set <char> ShortcutList;
     59  // reserve s for save and q for quite
     60  ShortcutList.insert('s');
     61  ShortcutList.insert('q');
    5162
    5263  // populate all actions
     
    6172  new SeperatorItem(main_menu);
    6273
    63   Action* undoAction = ActionRegistry::getInstance().getActionByName("Undo");
    64   new ActionMenuItem('u',"Undo last operation",main_menu,undoAction);
     74  Action* undoAction = ActionRegistry::getInstance().getActionByName("undo");
     75  new ActionMenuItem(getSuitableShortForm(ShortcutList,"Undo last operation"),"Undo last operation",main_menu,undoAction);
    6576
    66   Action* redoAction = ActionRegistry::getInstance().getActionByName("Redo");
    67   new ActionMenuItem('r',"Redo last operation",main_menu,redoAction);
     77  Action* redoAction = ActionRegistry::getInstance().getActionByName("redo");
     78  new ActionMenuItem(getSuitableShortForm(ShortcutList,"Redo last operation"),"Redo last operation",main_menu,redoAction);
    6879
    6980  new SeperatorItem(main_menu);
    7081
    71   Action *setMoleculeAction = new MethodAction("setMoleculeAction",boost::bind(&MoleculeListClass::flipChosen,World::getInstance().getMolecules()));
    72   new ActionMenuItem('a',"set molecule (in)active",main_menu,setMoleculeAction);
    73 
    74   TextMenu *Menu = NULL;
    75   std::set <char> ShortcutList;
    7682  for(map<std::string, pair<std::string,std::string> >::iterator iter = MapOfActions::getInstance().MenuDescription.begin(); iter != MapOfActions::getInstance().MenuDescription.end(); ++iter) {
    77     Menu = new TextMenu(Log() << Verbose(0), iter->second.second);
     83    TextMenu *Menu = new TextMenu(Log() << Verbose(0), iter->second.second);
    7884    NametoTextMenuMap.insert( pair <std::string, TextMenu *> (iter->first, Menu) );
    7985    new SubMenuItem(getSuitableShortForm(ShortcutList,iter->first),iter->second.first.c_str(),main_menu,Menu);
     
    8288  new SeperatorItem(main_menu);
    8389
     90  // save has reserved key 's'
    8491  Action *saveConfigAction = ActionRegistry::getInstance().getActionByName("output");
    8592  new ActionMenuItem('s',"save current setup to config files",main_menu,saveConfigAction);
     
    8895  new ActionMenuItem('q',"quit",main_menu,quitAction);
    8996
     97  // quit has reserved key 'q'
    9098  // go through all menus and create them
    91   for (map <std::string, TextMenu *>::iterator MenuRunner = NametoTextMenuMap.begin(); MenuRunner != NametoTextMenuMap.end(); ++MenuRunner) {
    92     cout << "Creating Menu " << MenuRunner->first << "." << endl;
     99  for (map <std::string, TextMenu *>::iterator MenuRunner = NametoTextMenuMap.begin(); MenuRunner != NametoTextMenuMap.end(); ++MenuRunner)
    93100    populateMenu(MenuRunner->second, MenuRunner->first);
    94   }
    95101
    96102  // Add status indicators etc...
     
    114120{
    115121  for (std::string::const_iterator CharRunner = name.begin(); CharRunner != name.end(); ++CharRunner) {
    116     if (ShortcutList.find(*CharRunner) == ShortcutList.end())
     122    if (ShortcutList.find(*CharRunner) == ShortcutList.end()) {
     123      ShortcutList.insert(*CharRunner);
    117124      return *CharRunner;
     125    }
    118126  }
    119   DoeLog(1) && (eLog() << Verbose(1) << "Could not find a suitable shortform for TextWindow::getSuitableShortForm()." << endl);
    120   return ((char)(ShortcutList.size() % 10) + '0');
     127  // if no letter matches, take digits
     128  int i=0;
     129  for (;i<10;++i) {
     130    if (ShortcutList.find((char)i + '0') == ShortcutList.end())
     131      break;
     132  }
     133  if (i != 10) {
     134    ShortcutList.insert((char)i + '0');
     135    return ((char)i + '0');
     136  } else {
     137    DoeLog(1) && (eLog() << Verbose(1) << "Could not find a suitable shortform for " << name << "." << endl);
     138    return '#';
     139  }
    121140}
    122141
     
    125144  Action *ActionItem = NULL;
    126145  set <char> ShortcutList;
     146  // reserve 'q' for quit
     147  ShortcutList.insert('q');
    127148  // through all actions for this menu
    128149  pair < multimap <std::string, std::string>::iterator, multimap <std::string, std::string>::iterator > MenuActions = MapOfActions::getInstance().MenuContainsActionMap.equal_range(MenuName);
    129150  for (multimap <std::string, std::string>::const_iterator MenuRunner = MenuActions.first; MenuRunner != MenuActions.second; ++MenuRunner) {
    130     cout << " Adding " << MenuRunner->second << " to submenu " << MenuName << endl;
    131151    ActionItem = ActionRegistry::getInstance().getActionByName(MenuRunner->second);
    132152    new ActionMenuItem(getSuitableShortForm(ShortcutList, MenuRunner->second),MapOfActions::getInstance().getDescription(MenuRunner->second).c_str(),Menu,ActionItem);
  • src/UIElements/UIFactory.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * UIFactory.cpp
  • src/UIElements/Views/MethodStringView.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * MethodStringView.cpp
  • src/UIElements/Views/QT4/GLMoleculeView.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * GLMoleculeView.cpp
  • src/UIElements/Views/QT4/QTMoleculeView.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * QTMoleculeView.cpp
  • src/UIElements/Views/QT4/QTStatusBar.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * QTStatusBar.cpp
  • src/UIElements/Views/QT4/QTWorldView.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * QTWorldView.cpp
  • src/UIElements/Views/StreamStringView.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * StreamStringView.cpp
  • src/UIElements/Views/StringView.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * StringView.cpp
  • src/UIElements/Views/View.cpp

    r14c57a r51c3e4  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * View.cpp
Note: See TracChangeset for help on using the changeset viewer.