anatomist 6.0.4
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
40#include <cartobase/object/attributed.h>
42#include <qlineedit.h>
43
44
45namespace anatomist
46{
47 class ASurfMatcher;
48}
49
50
52class QSurfMatchWin : public QWidget, public anatomist::Observer
53{
54 Q_OBJECT
55
56public:
57 QSurfMatchWin( QWidget* parent, anatomist::ASurfMatcher* obj );
58 virtual ~QSurfMatchWin();
59
60 virtual void update( const anatomist::Observable* obs, void* arg );
61
62signals:
63 void changeParam( const std::string & attrib, const QString & val );
64
65protected slots:
71 void record( bool );
72 void paramChanged( const std::string & attrib, const QString & val );
79
80protected:
81 class ASThread;
82 struct Widgets;
83 friend class ASThread;
84
87 QWidget* paramWidget( QWidget* parent );
88 QWidget* ctrlPointsWidget( QWidget* parent );
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
100private:
101};
102
103
104class QSurfMatchWin_AttEdit : public QLineEdit
105{
106 Q_OBJECT
107
108public:
109 QSurfMatchWin_AttEdit( const std::string & attr, const QString & txt,
110 QWidget* parent );
112
113signals:
114 void textChanged( const std::string &, const QString & );
115
116protected slots:
118
119protected:
120 virtual void leaveEvent( QEvent* ev );
121 virtual void focusOutEvent( QFocusEvent* ev );
122
123 std::string _attrib;
124};
125
126
127#endif
#define slots
virtual void leaveEvent(QEvent *ev)
void textChanged(const std::string &, const QString &)
virtual ~QSurfMatchWin_AttEdit()
virtual void focusOutEvent(QFocusEvent *ev)
QSurfMatchWin_AttEdit(const std::string &attr, const QString &txt, QWidget *parent)
void deletePointDst()
friend class ASThread
Definition qwSurfMatch.h:83
void fillCtrlPoints()
QWidget * paramWidget(QWidget *parent)
virtual void unregisterObservable(anatomist::Observable *)
Called when an observable is destroyed, only called by Observable: don't use this function directly.
void addPointByNumDst()
void resetProcess()
void paramChanged(const std::string &attrib, const QString &val)
void startProcess()
QWidget * ctrlPointsWidget(QWidget *parent)
bool event(QEvent *e)
void processThread()
QSurfMatchWin(QWidget *parent, anatomist::ASurfMatcher *obj)
Widgets * _widgets
Definition qwSurfMatch.h:98
void addPointByClickOrg()
void deletePointOrg()
void invertDirection()
void processStepFinished()
void addPointByNumOrg()
void addPointByClickDst()
void notifyUpdate()
virtual ~QSurfMatchWin()
anatomist::ASurfMatcher * _obj
Definition qwSurfMatch.h:97
QString strAttribute(const std::string &attr, const carto::AttributedObject &ao, const carto::SyntaxSet &synt)
virtual void update(const anatomist::Observable *obs, void *arg)
This method is called whenever the observed object is changed.
void changeParam(const std::string &attrib, const QString &val)
void fillDirectionLabel()
void record(bool)
void stopProcess()
Fusion object to match 2 surfaces.
Definition surfMatcher.h:57
This class can be subclassed to represent an object that the programmer wants to have observed.
Definition Observable.h:68
A class can implement the Observer interface when it wants to be informed of changes in observable ob...
Definition Observer.h:55
SyntaxedObject< PropertySet > AttributedObject
std::map< std::string, Syntax > SyntaxSet