source: src/UIElements/Views/Qt4/QtHomologyList.hpp@ 4c6f0d

Action_Thermostats Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.1 ChemicalSpaceEvaluator Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Exclude_Hydrogens_annealWithBondGraph Fix_Verbose_Codepatterns ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion Gui_displays_atomic_force_velocity JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool PythonUI_with_named_parameters Recreated_GuiChecks StoppableMakroAction TremoloParser_IncreasedPrecision
Last change on this file since 4c6f0d was 7516f6, checked in by Frederik Heber <frederik.heber@…>, 8 years ago

FIX: several Qt...Lists required mutex to control refill triggered by observable update.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 * QtHomologyList.hpp
3 *
4 * Created on: Jun 24, 2013
5 * Author: heber
6 */
7
8#ifndef QTHOMOLOGYLIST_H_
9#define QTHOMOLOGYLIST_H_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16
17#include <QtGui/QWidget>
18#include "CodePatterns/Observer/Observer.hpp"
19
20#include <boost/thread/recursive_mutex.hpp>
21
22class HomologyGraph;
23class QSeisPlotPage;
24class QTreeWidget;
25
26class QtHomologyList: public QWidget, public Observer
27{
28 Q_OBJECT
29
30public:
31 QtHomologyList(QWidget * _parent=0);
32 virtual ~QtHomologyList();
33
34protected:
35 virtual void update(Observable *publisher);
36 virtual void subjectKilled(Observable *publisher);
37 virtual void paintEvent(QPaintEvent * event);
38
39 static const int COLUMNCOUNT;
40 enum {NUMBER,NODES,EDGES,OCCURRENCE,COLUMNTYPES_MAX} COLUMNTYPES;
41 static const char *COLUMNNAMES[];
42
43private slots:
44 void rowSelected();
45 void refill();
46
47signals:
48 void HomologySelected(HomologyGraph const *);
49 void HomologyUnSelected(HomologyGraph const *);
50 void changed();
51 void needsRefill();
52
53private:
54 std::vector<bool> HomologySelection; //!< needed to determine when a selection changes
55 //!> flag to indicate that we got an update
56 bool dirty;
57 //!> flag to indicate whether we are subscribed to PotentialRegistry
58 bool potentialregistry_enabled;
59
60 mutable boost::recursive_mutex refill_mutex;
61
62private:
63 QTreeWidget *treewidget;
64
65#ifdef HAVE_QWT
66 QSeisPlotPage *widget;
67#else
68 QWidget *widget;
69#endif
70};
71
72#endif /* QTHOMOLOGYLIST_H_ */
Note: See TracBrowser for help on using the repository browser.