Changeset 0b2be1 for src/UIElements/Views/Qt4/QtInfoBox.cpp
- Timestamp:
- Sep 26, 2012, 5:24:05 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:
- 52575c
- Parents:
- 6cab535
- git-author:
- Michael Ankele <ankele@…> (08/31/12 16:02:31)
- git-committer:
- Frederik Heber <heber@…> (09/26/12 17:24:05)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/QtInfoBox.cpp
r6cab535 r0b2be1 39 39 timer = new QTimer(this); 40 40 timer->setSingleShot(true); 41 42 setMinimumWidth(200); 41 43 42 44 connect(timer, SIGNAL(timeout()), this, SLOT(timerTimeout())); … … 83 85 // Show new tabs. 84 86 if (curAtom){ 85 page_atom = new QtAtomInfoPage(curAtom );87 page_atom = new QtAtomInfoPage(curAtom, this); 86 88 addTab(page_atom, "Atom"); 87 89 connect(page_atom, SIGNAL(atomKilled()), this, SLOT(clearTabs())); 88 90 89 91 if (curAtom->getMolecule()){ 90 page_mol = new QtMoleculeInfoPage(curAtom->getMolecule() );92 page_mol = new QtMoleculeInfoPage(curAtom->getMolecule(), this); 91 93 addTab(page_mol, "Molecule"); 92 94 connect(page_mol, SIGNAL(moleculeKilled()), this, SLOT(clearTabs())); … … 104 106 } 105 107 106 QtAtomInfoPage::QtAtomInfoPage(const atom *_atom) : 108 QtAtomInfoPage::QtAtomInfoPage(const atom *_atom, QWidget *parent) : 109 QTreeWidget(parent), 107 110 Observer("QTAtomPage"), 108 111 atomRef(_atom) … … 110 113 atomRef->signOn(this); 111 114 112 info = new QTreeWidget(this); 113 info->setColumnCount(2); 115 setColumnCount(2); 114 116 QStringList header; 115 117 header << "data"; 116 118 header << "value"; 117 info->setHeaderLabels(header);119 setHeaderLabels(header); 118 120 119 addInfo( info, "Element", QString(atomRef->getElement().getName().c_str()));120 addInfo( info, "Mass", QString("%1").arg(atomRef->getMass()));121 addInfo( info, "Charge", QString("%1").arg(atomRef->getCharge()));122 addInfo( info, "Position", QString(toString(atomRef->getPosition()).c_str()));123 addInfo( info, "Bonds", QString("%1").arg(atomRef->getListOfBonds().size()));121 addInfo(this, "Element", QString(atomRef->getElement().getName().c_str())); 122 addInfo(this, "Mass", QString("%1").arg(atomRef->getMass())); 123 addInfo(this, "Charge", QString("%1").arg(atomRef->getCharge())); 124 addInfo(this, "Position", QString(toString(atomRef->getPosition()).c_str())); 125 addInfo(this, "Bonds", QString("%1").arg(atomRef->getListOfBonds().size())); 124 126 } 125 127 … … 144 146 /************************ Tab for single Molecules *****************/ 145 147 146 QtMoleculeInfoPage::QtMoleculeInfoPage(const molecule *_mol) : 148 QtMoleculeInfoPage::QtMoleculeInfoPage(const molecule *_mol, QWidget *parent) : 149 QTreeWidget(parent), 147 150 Observer("QTMoleculePage"), 148 151 mol(_mol) … … 150 153 mol->signOn(this); 151 154 152 info = new QTreeWidget(this); 153 info->setColumnCount(2); 155 setColumnCount(2); 154 156 QStringList header; 155 157 header << "data"; 156 158 header << "value"; 157 info->setHeaderLabels(header);159 setHeaderLabels(header); 158 160 159 addInfo( info, "Name", QString(mol->getName().c_str()));160 addInfo( info, "Formula", QString(mol->getFormula().toString().c_str()));161 addInfo( info, "Atoms", QString("%1").arg(mol->getAtomCount()));162 addInfo( info, "Bonds", QString("%1").arg(mol->getBondCount()));161 addInfo(this, "Name", QString(mol->getName().c_str())); 162 addInfo(this, "Formula", QString(mol->getFormula().toString().c_str())); 163 addInfo(this, "Atoms", QString("%1").arg(mol->getAtomCount())); 164 addInfo(this, "Bonds", QString("%1").arg(mol->getBondCount())); 163 165 } 164 166
Note:
See TracChangeset
for help on using the changeset viewer.