anatomist  5.0.5
3D neuroimaging data viewer
qwSurfMatch.h
Go to the documentation of this file.
1 /* This software and supporting documentation are distributed by
2  * Institut Federatif de Recherche 49
3  * CEA/NeuroSpin, Batiment 145,
4  * 91191 Gif-sur-Yvette cedex
5  * France
6  *
7  * This software is governed by the CeCILL-B license under
8  * French law and abiding by the rules of distribution of free software.
9  * You can use, modify and/or redistribute the software under the
10  * terms of the CeCILL-B license as circulated by CEA, CNRS
11  * and INRIA at the following URL "http://www.cecill.info".
12  *
13  * As a counterpart to the access to the source code and rights to copy,
14  * modify and redistribute granted by the license, users are provided only
15  * with a limited warranty and the software's author, the holder of the
16  * economic rights, and the successive licensors have only limited
17  * liability.
18  *
19  * In this respect, the user's attention is drawn to the risks associated
20  * with loading, using, modifying and/or developing or reproducing the
21  * software by the user in light of its specific status of free software,
22  * that may mean that it is complicated to manipulate, and that also
23  * therefore means that it is reserved for developers and experienced
24  * professionals having in-depth computer knowledge. Users are therefore
25  * encouraged to load and test the software's suitability as regards their
26  * requirements in conditions enabling the security of their systems and/or
27  * data to be ensured and, more generally, to use and operate it in the
28  * same conditions as regards security.
29  *
30  * The fact that you are presently reading this means that you have had
31  * knowledge of the CeCILL-B license and that you accept its terms.
32  */
33 
34 
35 #ifndef ANATOMIST_INTERFACE_QWSURFMATCH_H
36 #define ANATOMIST_INTERFACE_QWSURFMATCH_H
37 
38 
42 #include <qlineedit.h>
43 
44 
45 namespace anatomist
46 {
47  class ASurfMatcher;
48 }
49 
50 
52 class QSurfMatchWin : public QWidget, public anatomist::Observer
53 {
54  Q_OBJECT
55 
56 public:
57  QSurfMatchWin( QWidget* parent, anatomist::ASurfMatcher* obj );
58  virtual ~QSurfMatchWin();
59 
60  virtual void update( const anatomist::Observable* obs, void* arg );
61 
62 signals:
63  void changeParam( const std::string & attrib, const QString & val );
64 
65 protected slots:
66  void invertDirection();
67  void startProcess();
68  void stopProcess();
69  void resetProcess();
70  void processStepFinished();
71  void record( bool );
72  void paramChanged( const std::string & attrib, const QString & val );
73  void addPointByClickOrg();
74  void addPointByClickDst();
75  void addPointByNumOrg();
76  void addPointByNumDst();
77  void deletePointOrg();
78  void deletePointDst();
79 
80 protected:
81  class ASThread;
82  struct Widgets;
83  friend class ASThread;
84 
85  virtual void unregisterObservable( anatomist::Observable* );
86  void fillDirectionLabel();
87  QWidget* paramWidget( QWidget* parent );
88  QWidget* ctrlPointsWidget( QWidget* parent );
89  void fillCtrlPoints();
90  void processThread();
91  void notifyUpdate();
92  QString strAttribute( const std::string & attr,
93  const carto::AttributedObject & ao,
94  const carto::SyntaxSet & synt );
95  bool event( QEvent * e );
96 
98  Widgets *_widgets;
99 
100 private:
101 };
102 
103 
104 class QSurfMatchWin_AttEdit : public QLineEdit
105 {
106  Q_OBJECT
107 
108 public:
109  QSurfMatchWin_AttEdit( const std::string & attr, const QString & txt,
110  QWidget* parent );
111  virtual ~QSurfMatchWin_AttEdit();
112 
113 signals:
114  void textChanged( const std::string &, const QString & );
115 
116 protected slots:
117  void textChangedSlot();
118 
119 protected:
120  virtual void leaveEvent( QEvent* ev );
121  virtual void focusOutEvent( QFocusEvent* ev );
122 
123  std::string _attrib;
124 };
125 
126 
127 #endif
anatomist::ASurfMatcher * _obj
Definition: qwSurfMatch.h:97
Widgets * _widgets
Definition: qwSurfMatch.h:98
A class can implement the Observer interface when it wants to be informed of changes in observable ob...
Definition: Observer.h:54
This class can be subclassed to represent an object that the programmer wants to have observed...
Definition: Observable.h:67
#define slots
std::map< std::string, Syntax > SyntaxSet
Fusion object to match 2 surfaces.
Definition: surfMatcher.h:56
Surface matcher control window.
Definition: qwSurfMatch.h:52