Candidate_v1.7.0
        stable
      
      
        
          | Last change
 on this file since 1ca493a 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 | 
      
      
| Rev | Line |  | 
|---|
| [4458b0] | 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> | 
|---|
| [7516f6] | 18 |  | 
|---|
|  | 19 | #include <boost/thread/recursive_mutex.hpp> | 
|---|
|  | 20 |  | 
|---|
| [4458b0] | 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); | 
|---|
| [85c36d] | 36 | virtual void recieveNotification(Observable *publisher, Notification_ptr notification); | 
|---|
| [7516f6] | 37 | virtual void paintEvent(QPaintEvent * event); | 
|---|
| [85c36d] | 38 | void refill(::Shape *ignore); | 
|---|
| [4458b0] | 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: | 
|---|
| [a0d5ef] | 53 | bool selecting; | 
|---|
| [4458b0] | 54 | std::vector<bool> shapeSelection; //!< needed to determine when a selection changes | 
|---|
| [7516f6] | 55 |  | 
|---|
| [3c9ac3] | 56 | //!> flag to indicate whether we are signed on | 
|---|
|  | 57 | bool shaperegistry_enabled; | 
|---|
|  | 58 |  | 
|---|
| [7516f6] | 59 | mutable boost::recursive_mutex refill_mutex; | 
|---|
| [4458b0] | 60 | }; | 
|---|
|  | 61 |  | 
|---|
|  | 62 | #endif /* QTSHAPELIST_H_ */ | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.