stable
v1.7.0
|
Last change
on this file was 3c9ac3, checked in by Frederik Heber <frederik.heber@…>, 8 years ago |
|
Qt..Lists now take note of subjectKilled propery.
|
-
Property mode
set to
100644
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * QtShapeList.h
|
|---|
| 3 | *
|
|---|
| 4 | * Created on: Sep 14, 2012
|
|---|
| 5 | * Author: ankele
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | #ifndef QTSHAPELIST_H_
|
|---|
| 9 | #define QTSHAPELIST_H_
|
|---|
| 10 |
|
|---|
| 11 | // include config.h
|
|---|
| 12 | #ifdef HAVE_CONFIG_H
|
|---|
| 13 | #include <config.h>
|
|---|
| 14 | #endif
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 | #include <QtGui/QTreeWidget>
|
|---|
| 18 |
|
|---|
| 19 | #include <boost/thread/recursive_mutex.hpp>
|
|---|
| 20 |
|
|---|
| 21 | #include "CodePatterns/Observer/Observer.hpp"
|
|---|
| 22 |
|
|---|
| 23 | class Shape;
|
|---|
| 24 |
|
|---|
| 25 | class QtShapeList: public QTreeWidget, public Observer
|
|---|
| 26 | {
|
|---|
| 27 | Q_OBJECT
|
|---|
| 28 |
|
|---|
| 29 | public:
|
|---|
| 30 | QtShapeList(QWidget * _parent=0);
|
|---|
| 31 | virtual ~QtShapeList();
|
|---|
| 32 |
|
|---|
| 33 | protected:
|
|---|
| 34 | virtual void update(Observable *publisher);
|
|---|
| 35 | virtual void subjectKilled(Observable *publisher);
|
|---|
| 36 | virtual void recieveNotification(Observable *publisher, Notification_ptr notification);
|
|---|
| 37 | virtual void paintEvent(QPaintEvent * event);
|
|---|
| 38 | void refill(::Shape *ignore);
|
|---|
| 39 |
|
|---|
| 40 | static const int COLUMNCOUNT;
|
|---|
| 41 | enum {NAME,TYPE,CENTER,RADIUS,COLUMNTYPES_MAX} COLUMNTYPES;
|
|---|
| 42 | static const char *COLUMNNAMES[];
|
|---|
| 43 |
|
|---|
| 44 | private slots:
|
|---|
| 45 | void rowSelected();
|
|---|
| 46 |
|
|---|
| 47 | /*signals:
|
|---|
| 48 | void moleculeSelected(molecule*);
|
|---|
| 49 | void moleculeUnSelected(molecule*);
|
|---|
| 50 | void changed();*/
|
|---|
| 51 |
|
|---|
| 52 | private:
|
|---|
| 53 | bool selecting;
|
|---|
| 54 | std::vector<bool> shapeSelection; //!< needed to determine when a selection changes
|
|---|
| 55 |
|
|---|
| 56 | //!> flag to indicate whether we are signed on
|
|---|
| 57 | bool shaperegistry_enabled;
|
|---|
| 58 |
|
|---|
| 59 | mutable boost::recursive_mutex refill_mutex;
|
|---|
| 60 | };
|
|---|
| 61 |
|
|---|
| 62 | #endif /* QTSHAPELIST_H_ */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.