source: src/UIElements/Views/Qt4/ElementList/QtElementList.hpp@ 2fe4a5

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Added_ParseSaveFragmentResults Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests 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_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 FragmentMolecule_checks_bonddegrees GeometryObjects Gui_Fixes Gui_displays_atomic_force_velocity IndependentFragmentGrids IndependentFragmentGrids_IndividualZeroInstances IndependentFragmentGrids_IntegrationTest IndependentFragmentGrids_Sole_NN_Calculation JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks 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
Last change on this file since 2fe4a5 was 3054f4a, checked in by Frederik Heber <heber@…>, 9 years ago

QtObserved...Observed now get index on ...Removed() signal.

  • Property mode set to 100644
File size: 1.5 KB
RevLine 
[0e6156]1/*
2 * QtElementList.h
3 *
4 * Created on: Mar 6, 2012
5 * Author: ankele
6 */
7
8#ifndef QTELEMENTLIST_H_
9#define QTELEMENTLIST_H_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
[f20fa5]16#include <QtGui/QTreeWidget>
[ea73ce]17
[bfd520c]18#include <boost/thread/recursive_mutex.hpp>
[0e6156]19
[a4dee7]20#include "types.hpp"
21
[5aec20]22#include "UIElements/Qt4/InstanceBoard/QtObservedAtom.hpp"
[bfd520c]23#include "UIElements/Views/Qt4/ElementList/QtObservedAtomObserver.hpp"
[5aec20]24
25class QtObservedInstanceBoard;
[0e6156]26
[bfd520c]27class QtElementList: public QTreeWidget
[0e6156]28{
29 Q_OBJECT
30
31public:
[5aec20]32 QtElementList(QtObservedInstanceBoard *_board, QWidget * _parent=0);
[0e6156]33 virtual ~QtElementList();
34
35protected:
[25b3559]36 virtual void paintEvent(QPaintEvent * event);
[0e6156]37
[a4dee7]38 void setOccurrence(QTreeWidgetItem &_item, const int count);
39
[0e6156]40 static const int COLUMNCOUNT;
[fcdf05]41 enum COLUMNTYPES {NUMBER,NAME,SYMBOL,MASS,OCCURRENCE,COLUMNTYPES_MAX};
[0e6156]42 static const char *COLUMNNAMES[];
43
44private slots:
[1de61e]45 void rowSelected();
[bfd520c]46 void changeElement(const QtObservedAtom::ptr _atom);
47 void addAtomElement(const QtObservedAtom::ptr _atom);
[3054f4a]48 void removeAtomElement(ObservedValue_Index_t _id);
[0e6156]49
50private:
[1de61e]51 std::vector<bool> elementSelection; //!< needed to determine when a selection changes
[3054f4a]52 typedef std::map<ObservedValue_Index_t, atomicNumber_t> AtomElementMap_t;
[a4dee7]53 AtomElementMap_t AtomElementMap;
[818201]54 bool dirty;
[ea73ce]55
[bfd520c]56 //!> observed all QtObservedAtoms for ElementChanged signals
57 QtObservedAtomObserver atomobserver;
[5aec20]58
[bfd520c]59 mutable boost::recursive_mutex refill_mutex;
[0e6156]60};
61
62#endif /* QTELEMENTLIST_H_ */
Note: See TracBrowser for help on using the repository browser.