anatomist  5.0.5
3D neuroimaging data viewer
listboxeditor.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 #ifndef ANAQT_BROWSER_TYPEEDIT_H
35 #define ANAQT_BROWSER_TYPEEDIT_H
36 
37 #include <QListWidget>
38 #include <qcombobox.h>
39 
40 /*
41 
42 class QTypeEdit : public QWidget
43 {
44  Q_OBJECT
45 
46 public:
48  QTypeEdit( const std::string & text, int x, int y, int w, int h,
49  QWidget* parent = 0, const char* name = 0, WindowFlags f = 0 );
51  ~QTypeEdit();
52 
54  std::string text() const
55  { return( _te->text().utf8().data() ); }
57  QTypeEdit *typeEdit() { return( _te ); }
58 
59 signals:
60 
61 public slots:
62 
63 protected:
64 
66  QCancelTypeEdit *_te;
67 
68 private:
69 };
70 */
71 
73 #include <qdialog.h>
75 
76 //class QCancelLineEdit;
77 class QObjectBrowser;
78 class QCancelLineEdit;
79 class QTreeWidgetItem;
80 
81 
83 class listboxeditor : public QDialog
84 {
85  Q_OBJECT
86 
87 public:
88  listboxeditor( const std::string & text, int x, int y, unsigned w,
89  unsigned h, QObjectBrowser* br, carto::GenericObject* ao,
90  const std::string & att, QTreeWidgetItem* item,
91  QWidget* parent = theAnatomist->getQWidgetAncestor(),
92  const char* name = 0, Qt::WindowFlags f = 0 );
94 
95 // std::string text() const;
96  //carto::GenericObject* attributed() const { return( _ao ); }
97  std::string attrib() const { return( _att.toStdString() ); }
98  //Q3ListViewItem* item() const { return( _item ); }
100  //void receiveValue( const std::string & val );
101 
102 public slots:
103  void change(QComboBox *);
104  QString get_result();
105  void reject();
106  //string send_text();
107 
108 protected:
112  QString _att;
113  QTreeWidgetItem *_item;
114 
115 private:
116 };
117 
118 
119 #endif
QCancelLineEdit * _te
Editor window for labels (interaction with hierarchies)
Definition: listboxeditor.h:83
A "cancelable" line edit: hitting &#39;esc&#39; sends the "cancel()" signal.
Definition: stringEdit.h:46
QString get_result()
void change(QComboBox *)
Receive input from a browser (click on a hierarchy)
QTreeWidgetItem * _item
QObjectBrowser * _browser
#define slots
std::string attrib() const
Definition: listboxeditor.h:97
anatomist::Anatomist *ANATOMIST_API theAnatomist
Pointer to the Anatomist application.
listboxeditor(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=0)
carto::GenericObject * _ao
Objects browser window.
QWidget * getQWidgetAncestor() const
Gets an empty QWidget that is created in Anatomist application to become a default parent for all Ana...