anatomist 6.0.4
3D neuroimaging data viewer
objectparamselect.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 ANA_OBJECT_OBJECTPARAMSELECT_H
36#define ANA_OBJECT_OBJECTPARAMSELECT_H
37
38#include <qdialog.h>
39#include <qwidget.h>
40#include <set>
41
42class QListWidget;
43
44namespace anatomist
45{
46 class AObject;
47}
48
49
50class ObjectParamSelect : public QWidget
51{
52 Q_OBJECT
53
54public:
55 typedef bool (*Filter)( const anatomist::AObject* );
57 {
61 };
62
63 ObjectParamSelect( const std::set<anatomist::AObject *> &,
64 QWidget* parent );
66
67 virtual void addFilter( Filter );
68 virtual bool filter( const anatomist::AObject* o ) const;
69 // update object label after objects list has changed (object destroyed...)
70 void updateLabel( const std::set<anatomist::AObject *> & );
75 const std::set<anatomist::AObject *> & selectedObjects() const;
76
77signals:
79 void objectsSelected( const std::set<anatomist::AObject *> & );
80
81public slots:
82 virtual void selectObjects();
83 virtual void selectObjects( const std::set<anatomist::AObject *> & obj,
84 const std::set<anatomist::AObject *> & sel );
85
86protected slots:
87 void setObjectsViewMode( int );
88
89private:
90 struct Private;
91 Private *d;
92
93 void drawContents();
94};
95
96
97class ObjectChooseDialog : public QDialog
98{
99 Q_OBJECT
100
101public:
102 ObjectChooseDialog( const std::set<anatomist::AObject *> & obj,
103 const std::set<anatomist::AObject *> & sel,
104 ObjectParamSelect* s, QWidget* parent = 0 );
106
107 const QListWidget* list() const;
108 int objectsViewMode() const;
109
110 std::set<anatomist::AObject *> selected() const;
111
112public slots:
114
115private:
116 struct Private;
117 Private *d;
118};
119
120
121#endif
122
#define slots
std::set< anatomist::AObject * > selected() const
ObjectChooseDialog(const std::set< anatomist::AObject * > &obj, const std::set< anatomist::AObject * > &sel, ObjectParamSelect *s, QWidget *parent=0)
virtual ~ObjectChooseDialog()
const QListWidget * list() const
int objectsViewMode() const
void setObjectsViewMode(int)
virtual void addFilter(Filter)
virtual void selectObjects()
ObjectParamSelect(const std::set< anatomist::AObject * > &, QWidget *parent)
const std::set< anatomist::AObject * > & selectedObjects() const
there objects are passed by the objectsSelected signal.
virtual ~ObjectParamSelect()
virtual void selectObjects(const std::set< anatomist::AObject * > &obj, const std::set< anatomist::AObject * > &sel)
bool(* Filter)(const anatomist::AObject *)
void setObjectsViewMode(int)
virtual bool filter(const anatomist::AObject *o) const
void updateLabel(const std::set< anatomist::AObject * > &)
void objectsSelected(const std::set< anatomist::AObject * > &)
Base Anatomist object (abstract)
Definition Object.h:97