- Timestamp:
- Oct 6, 2011, 12:08:30 PM (13 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:
- 573d72
- Parents:
- b40b9d
- git-author:
- Frederik Heber <heber@…> (08/12/11 16:09:00)
- git-committer:
- Frederik Heber <heber@…> (10/06/11 12:08:30)
- Location:
- src/UIElements/Views/Qt4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/QtWorldView.cpp
rb40b9d r47812b 46 46 for(int i=0; i<COLUMNCOUNT;++i) { 47 47 QTableWidgetItem *heading = new QTableWidgetItem(); 48 std::cout << "Creating heading item " << heading << "." << std::endl; 48 49 heading->setText(QString(COLUMNNAMES[i])); 49 50 setHorizontalHeaderItem(i,heading); … … 76 77 const int index = (*iter)->IndexNr; 77 78 QTableWidgetItem *indexWidget = new QTableWidgetItem(); 79 //std::cout << "Creating index item " << indexWidget << "." << std::endl; 78 80 indexWidget->setText(QString::number(index)); 79 81 indexWidget->setData(Qt::UserRole,QVariant(index)); … … 82 84 const string name = (*iter)->getName(); 83 85 QTableWidgetItem *nameWidget = new QTableWidgetItem(); 86 //std::cout << "Creating name item " << nameWidget << " at " << i << "," << NAME << "." << std::endl; 84 87 nameWidget->setText(QString(name.c_str())); 85 88 setItem(i,NAME,nameWidget); … … 87 90 const int atomCount = (*iter)->getAtomCount(); 88 91 QTableWidgetItem *countWidget= new QTableWidgetItem(); 92 //std::cout << "Creating count item " << countWidget << " at " << i << "," << ATOMCOUNT << "." << std::endl; 89 93 countWidget->setText(QString::number(atomCount)); 90 94 countWidget->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled); 91 setItem(i,ATOM S,countWidget);95 setItem(i,ATOMCOUNT,countWidget); 92 96 93 97 const Formula formula = (*iter)->getFormula(); 94 98 QTableWidgetItem *formulaWidget= new QTableWidgetItem(); 99 //std::cout << "Creating formula item " << formulaWidget << " at " << i << "," << FORMULA << "." << std::endl; 95 100 formulaWidget->setText(QString(formula.toString().c_str())); 96 101 formulaWidget->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled); 97 setItem(i, ATOMS,formulaWidget);102 setItem(i,FORMULA,formulaWidget); 98 103 99 104 molSelection[i]=nameWidget->isSelected(); … … 118 123 119 124 void QtWorldView::cellSelected(int row, int column){ 125 //std::cout << "Selection in (" << row << "," << column << "): " << item(row,column) << std::endl; 120 126 bool state = item(row,column)->isSelected(); 121 127 for(int i = 0; i<COLUMNCOUNT; i++){ 128 //std::cout << "Setting " << i << "-th item " << item(row,i) << " in row " << row << " to state selected." << std::endl; 122 129 item(row,i)->setSelected(state); 123 130 } -
src/UIElements/Views/Qt4/QtWorldView.hpp
rb40b9d r47812b 34 34 35 35 static const int COLUMNCOUNT; 36 enum {NAME,ATOM S,FORMULA,COLUMNTYPES_MAX} COLUMNTYPES;36 enum {NAME,ATOMCOUNT,FORMULA,COLUMNTYPES_MAX} COLUMNTYPES; 37 37 static const char *COLUMNNAMES[]; 38 38
Note:
See TracChangeset
for help on using the changeset viewer.