Changeset 3c53fa for src/UIElements/Views/Qt4/QtInfoBox.cpp
- Timestamp:
- Jul 18, 2012, 2:02:27 PM (12 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:
- 7c9921
- Parents:
- 0eb7bf3
- git-author:
- Michael Ankele <ankele@…> (07/12/12 15:59:13)
- git-committer:
- Michael Ankele <ankele@…> (07/18/12 14:02:27)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/QtInfoBox.cpp
r0eb7bf3 r3c53fa 7 7 8 8 /* 9 * Qt MoleculeView.cpp9 * QtInfoBox.cpp 10 10 * 11 11 * Created on: Mar 4, 2010 … … 18 18 #endif 19 19 20 #include "Views/Qt4/Qt MoleculeView.hpp"20 #include "Views/Qt4/QtInfoBox.hpp" 21 21 22 22 #include <iostream> … … 32 32 /***************** Basic structure for tab layout ***********/ 33 33 34 Qt MoleculeView::QtMoleculeView() :34 QtInfoBox::QtInfoBox() : 35 35 QTabWidget(), 36 36 curAtom(NULL), nextAtom(NULL), … … 43 43 } 44 44 45 Qt MoleculeView::~QtMoleculeView()45 QtInfoBox::~QtInfoBox() 46 46 { 47 47 clearTabs(); 48 48 } 49 49 50 void QtMoleculeView::nameChanged(QTMoleculePage *page, std::string name){} 51 52 void QtMoleculeView::atomHover(const atom *_atom) 50 void QtInfoBox::atomHover(const atom *_atom) 53 51 { 54 52 nextAtom = _atom; … … 56 54 } 57 55 58 void Qt MoleculeView::timerTimeout()56 void QtInfoBox::timerTimeout() 59 57 { 60 58 if (nextAtom) … … 62 60 } 63 61 64 void Qt MoleculeView::clearTabs()62 void QtInfoBox::clearTabs() 65 63 { 66 64 if (page_atom){ … … 76 74 } 77 75 78 void Qt MoleculeView::showAtom(const atom *_atom)76 void QtInfoBox::showAtom(const atom *_atom) 79 77 { 80 78 // Remove old tabs. … … 85 83 // Show new tabs. 86 84 if (curAtom){ 87 page_atom = new Q TAtomPage(curAtom);85 page_atom = new QtAtomInfoPage(curAtom); 88 86 addTab(page_atom, "Atom"); 89 87 connect(page_atom, SIGNAL(atomKilled()), this, SLOT(clearTabs())); 90 88 91 89 if (curAtom->getMolecule()){ 92 page_mol = new Q TMoleculePage(curAtom->getMolecule());90 page_mol = new QtMoleculeInfoPage(curAtom->getMolecule()); 93 91 addTab(page_mol, "Molecule"); 94 92 connect(page_mol, SIGNAL(moleculeKilled()), this, SLOT(clearTabs())); … … 106 104 } 107 105 108 Q TAtomPage::QTAtomPage(const atom *_atom) :106 QtAtomInfoPage::QtAtomInfoPage(const atom *_atom) : 109 107 Observer("QTAtomPage"), 110 108 atomRef(_atom) … … 126 124 } 127 125 128 Q TAtomPage::~QTAtomPage()126 QtAtomInfoPage::~QtAtomInfoPage() 129 127 { 130 128 if (atomRef) … … 132 130 } 133 131 134 void Q TAtomPage::update(Observable *subject){132 void QtAtomInfoPage::update(Observable *subject){ 135 133 /*if(name != atomRef->name){ 136 134 name = atomRef->name; … … 139 137 } 140 138 141 void Q TAtomPage::subjectKilled(Observable *subject){139 void QtAtomInfoPage::subjectKilled(Observable *subject){ 142 140 atomRef = NULL; 143 141 emit atomKilled(); … … 146 144 /************************ Tab for single Molecules *****************/ 147 145 148 Q TMoleculePage::QTMoleculePage(const molecule *_mol) :146 QtMoleculeInfoPage::QtMoleculeInfoPage(const molecule *_mol) : 149 147 Observer("QTMoleculePage"), 150 148 mol(_mol) … … 165 163 } 166 164 167 Q TMoleculePage::~QTMoleculePage(){165 QtMoleculeInfoPage::~QtMoleculeInfoPage(){ 168 166 if (mol) 169 167 mol->signOff(this); 170 168 } 171 169 172 void Q TMoleculePage::update(Observable *subject){ std::cout << "tab mol update\n";170 void QtMoleculeInfoPage::update(Observable *subject){ std::cout << "tab mol update\n"; 173 171 } 174 172 175 void Q TMoleculePage::subjectKilled(Observable *subject){173 void QtMoleculeInfoPage::subjectKilled(Observable *subject){ 176 174 mol = NULL; 177 175 emit moleculeKilled();
Note:
See TracChangeset
for help on using the changeset viewer.