Changeset 4cf323d for src/UIElements/Qt4/QtMainWindow.cpp
- Timestamp:
- Oct 25, 2010, 12:08:39 PM (14 years ago)
- 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:
- 379b7e, 9784cf
- Parents:
- 81126a
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Qt4/QtMainWindow.cpp
r81126a r4cf323d 7 7 8 8 /* 9 * Q TMainWindow.cpp9 * QtMainWindow.cpp 10 10 * 11 11 * Created on: Jan 14, 2010 … … 18 18 #endif 19 19 20 #include "Q TMainWindow.hpp"20 #include "QtMainWindow.hpp" 21 21 22 22 #include<Qt/qapplication.h> … … 40 40 #include "Actions/MapOfActions.hpp" 41 41 #include "Menu/Menu.hpp" 42 #include "Menu/Q T4/QTMenu.hpp"42 #include "Menu/Qt4/QtMenu.hpp" 43 43 #include "Menu/ActionMenuItem.hpp" 44 #include "Views/Q T4/QTWorldView.hpp"45 #include "Views/Q T4/GLMoleculeView.hpp"46 #include "Views/Q T4/QTMoleculeView.hpp"47 #include "Views/Q T4/QTStatusBar.hpp"44 #include "Views/Qt4/QtWorldView.hpp" 45 #include "Views/Qt4/GLMoleculeView.hpp" 46 #include "Views/Qt4/QtMoleculeView.hpp" 47 #include "Views/Qt4/QtStatusBar.hpp" 48 48 49 49 using namespace std; 50 50 51 Q TMainWindow::QTMainWindow(QApplication *_theApp) :51 QtMainWindow::QtMainWindow(QApplication *_theApp) : 52 52 theApp(_theApp) 53 53 { … … 55 55 QSplitter *splitter2 = new QSplitter (Qt::Vertical, splitter1 ); 56 56 57 worldDisplay = new Q TWorldView(splitter2);57 worldDisplay = new QtWorldView(splitter2); 58 58 59 moleculeDisplay = new Q TMoleculeView();59 moleculeDisplay = new QtMoleculeView(); 60 60 molecule3dDisplay = new GLMoleculeView(); 61 61 62 62 MenuBar = menuBar(); 63 63 64 std::map <std::string, Q TMenu *> NametoTextMenuMap;64 std::map <std::string, QtMenu *> NametoTextMenuMap; 65 65 // go through all menus and create them 66 Q TMenu *Menu = NULL;66 QtMenu *Menu = NULL; 67 67 for(std::map<std::string, std::pair<std::string,std::string> >::iterator iter = MapOfActions::getInstance().MenuDescription.begin(); iter != MapOfActions::getInstance().MenuDescription.end(); ++iter) { 68 68 cout << "Creating menu " << iter->first << endl; 69 Menu = new Q TMenu(iter->first.c_str());69 Menu = new QtMenu(iter->first.c_str()); 70 70 MenuBar->addMenu(Menu); 71 NametoTextMenuMap.insert( pair <std::string, Q TMenu *> (iter->first, Menu) );71 NametoTextMenuMap.insert( pair <std::string, QtMenu *> (iter->first, Menu) ); 72 72 //new SubMenuItem(getSuitableShortForm(iter->first),iter->second.first,main_menu,Menu); 73 73 } … … 77 77 78 78 // go through all actions and add them to its menu 79 for (std::map <std::string, Q TMenu *>::iterator MenuRunner = NametoTextMenuMap.begin(); MenuRunner != NametoTextMenuMap.end(); ++MenuRunner) {79 for (std::map <std::string, QtMenu *>::iterator MenuRunner = NametoTextMenuMap.begin(); MenuRunner != NametoTextMenuMap.end(); ++MenuRunner) { 80 80 cout << "Creating Action " << MenuRunner->first << " in menu " << MenuRunner->second << endl; 81 81 populateMenu(MenuRunner->second, MenuRunner->first); … … 88 88 splitter2->addWidget(worldDisplay); 89 89 90 statusBar = new Q TStatusBar(this);90 statusBar = new QtStatusBar(this); 91 91 setStatusBar(statusBar); 92 92 … … 95 95 } 96 96 97 Q TMainWindow::~QTMainWindow()97 QtMainWindow::~QtMainWindow() 98 98 { 99 99 menuBar()->clear(); … … 101 101 } 102 102 103 void Q TMainWindow::display() {103 void QtMainWindow::display() { 104 104 this->show(); 105 105 theApp->exec(); 106 106 } 107 107 108 char Q TMainWindow::getSuitableShortForm(set <char> &ShortcutList, const std::string name) const108 char QtMainWindow::getSuitableShortForm(set <char> &ShortcutList, const std::string name) const 109 109 { 110 110 for (std::string::const_iterator CharRunner = name.begin(); CharRunner != name.end(); ++CharRunner) { … … 116 116 } 117 117 118 void Q TMainWindow::populateMenu(QTMenu* Menu, const std::string &MenuName)118 void QtMainWindow::populateMenu(QtMenu* Menu, const std::string &MenuName) 119 119 { 120 120 Action *ActionItem = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.