anatomist 6.0.4
3D neuroimaging data viewer
labeledit.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 ANAQT_BROWSER_LABELEDIT_H
36#define ANAQT_BROWSER_LABELEDIT_H
37
38#include <cartobase/object/attributed.h>
40#include <qdialog.h>
41
42class QCancelLineEdit;
43class QObjectBrowser;
44class QTreeWidgetItem;
45
46
48class QLabelEdit : public QDialog
49{
50 Q_OBJECT
51
52public:
53 QLabelEdit( const std::string & text, int x, int y, unsigned w, unsigned h,
55 const std::string & att, QTreeWidgetItem* item,
56 QWidget* parent = theAnatomist->getQWidgetAncestor(), const char* name = 0, Qt::WindowFlags f = Qt::WindowFlags() );
57 QLabelEdit( const std::string & text, int x, int y, unsigned w, unsigned h,
58 QObjectBrowser* br, const std::set<carto::GenericObject*> & ao,
59 const std::string & att, const std::set<QTreeWidgetItem*> & item,
60 QWidget* parent = theAnatomist->getQWidgetAncestor(), const char* name = 0, Qt::WindowFlags f = Qt::WindowFlags() );
62
63 std::string text() const;
65 std::set<carto::GenericObject*> attributedObjects() const;
66 std::string attrib() const { return( _att ); }
67 QTreeWidgetItem* item() const;
68 std::set<QTreeWidgetItem*> items() const;
69
71 void receiveValue( const std::string & val );
72
73public slots:
74 void accept();
75 void reject();
76
77protected:
78 void drawContents( const std::string & text, int x, int y, unsigned w,
79 unsigned h, const char* name );
80
83 std::string _att;
84
85private:
86 struct Private;
87 Private *d;
88};
89
90
91#endif
anatomist::Anatomist *ANATOMIST_API theAnatomist
Pointer to the Anatomist application.
#define slots
A "cancelable" line edit: hitting 'esc' sends the "cancel()" signal.
Definition stringEdit.h:47
void reject()
QTreeWidgetItem * item() const
void drawContents(const std::string &text, int x, int y, unsigned w, unsigned h, const char *name)
std::string text() const
QLabelEdit(const std::string &text, int x, int y, unsigned w, unsigned h, QObjectBrowser *br, const std::set< carto::GenericObject * > &ao, const std::string &att, const std::set< QTreeWidgetItem * > &item, QWidget *parent=theAnatomist->getQWidgetAncestor(), const char *name=0, Qt::WindowFlags f=Qt::WindowFlags())
void accept()
std::set< QTreeWidgetItem * > items() const
std::string attrib() const
Definition labeledit.h:66
QCancelLineEdit * _le
Definition labeledit.h:82
std::set< carto::GenericObject * > attributedObjects() const
std::string _att
Definition labeledit.h:83
carto::GenericObject * attributed() const
void receiveValue(const std::string &val)
Receive input from a browser (click on a hierarchy)
QObjectBrowser * _browser
Definition labeledit.h:81
QLabelEdit(const std::string &text, int x, int y, unsigned w, unsigned h, QObjectBrowser *br, carto::GenericObject *ao, const std::string &att, QTreeWidgetItem *item, QWidget *parent=theAnatomist->getQWidgetAncestor(), const char *name=0, Qt::WindowFlags f=Qt::WindowFlags())
Objects browser window.