source:
src/UIElements/Views/Qt4/QtHomologyList.hpp@
d9632e
Last change on this file since d9632e was 3c9ac3, checked in by , 8 years ago | |
---|---|
|
|
File size: 1.6 KB |
Rev | Line | |
---|---|---|
[1e1098] | 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 | ||
[a8f5d94] | 17 | #include <QtGui/QWidget> |
[1e1098] | 18 | #include "CodePatterns/Observer/Observer.hpp" |
19 | ||
[7516f6] | 20 | #include <boost/thread/recursive_mutex.hpp> |
21 | ||
[1e1098] | 22 | class HomologyGraph; |
[b677ab] | 23 | class QSeisPlotPage; |
[a8f5d94] | 24 | class QTreeWidget; |
[1e1098] | 25 | |
[a8f5d94] | 26 | class QtHomologyList: public QWidget, public Observer |
[1e1098] | 27 | { |
28 | Q_OBJECT | |
29 | ||
30 | public: | |
31 | QtHomologyList(QWidget * _parent=0); | |
32 | virtual ~QtHomologyList(); | |
33 | ||
34 | protected: | |
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 | ||
43 | private slots: | |
44 | void rowSelected(); | |
[9d4f964] | 45 | void refill(); |
[1e1098] | 46 | |
47 | signals: | |
48 | void HomologySelected(HomologyGraph const *); | |
49 | void HomologyUnSelected(HomologyGraph const *); | |
50 | void changed(); | |
[9d4f964] | 51 | void needsRefill(); |
[1e1098] | 52 | |
53 | private: | |
54 | std::vector<bool> HomologySelection; //!< needed to determine when a selection changes | |
[52bb5a] | 55 | //!> flag to indicate that we got an update |
[1e1098] | 56 | bool dirty; |
[3c9ac3] | 57 | //!> flag to indicate whether we are subscribed to HomologyContainer |
58 | bool homologycontainer_enabled; | |
[f0964c] | 59 | //!> flag to indicate whether we are subscribed to PotentialRegistry |
60 | bool potentialregistry_enabled; | |
[a8f5d94] | 61 | |
[7516f6] | 62 | mutable boost::recursive_mutex refill_mutex; |
63 | ||
[a8f5d94] | 64 | private: |
65 | QTreeWidget *treewidget; | |
[b677ab] | 66 | |
67 | #ifdef HAVE_QWT | |
68 | QSeisPlotPage *widget; | |
69 | #else | |
[a8f5d94] | 70 | QWidget *widget; |
[b677ab] | 71 | #endif |
[1e1098] | 72 | }; |
73 | ||
74 | #endif /* QTHOMOLOGYLIST_H_ */ |
Note:
See TracBrowser
for help on using the repository browser.