anatomist  5.1.2
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,
50  WindowFlags f = Qt::WindowFlags() );
52  ~QTypeEdit();
53 
55  std::string text() const
56  { return( _te->text().utf8().data() ); }
58  QTypeEdit *typeEdit() { return( _te ); }
59 
60 signals:
61 
62 public slots:
63 
64 protected:
65 
67  QCancelTypeEdit *_te;
68 
69 private:
70 };
71 */
72 
74 #include <qdialog.h>
76 
77 //class QCancelLineEdit;
78 class QObjectBrowser;
79 class QCancelLineEdit;
80 class QTreeWidgetItem;
81 
82 
84 class listboxeditor : public QDialog
85 {
86  Q_OBJECT
87 
88 public:
89  listboxeditor( const std::string & text, int x, int y, unsigned w,
90  unsigned h, QObjectBrowser* br, carto::GenericObject* ao,
91  const std::string & att, QTreeWidgetItem* item,
92  QWidget* parent = theAnatomist->getQWidgetAncestor(),
93  const char* name = 0, Qt::WindowFlags f = Qt::WindowFlags() );
95 
96 // std::string text() const;
97  //carto::GenericObject* attributed() const { return( _ao ); }
98  std::string attrib() const { return( _att.toStdString() ); }
99  //Q3ListViewItem* item() const { return( _item ); }
101  //void receiveValue( const std::string & val );
102 
103 public slots:
104  void change(QComboBox *);
105  QString get_result();
106  void reject();
107  //string send_text();
108 
109 protected:
113  QString _att;
114  QTreeWidgetItem *_item;
115 
116 private:
117 };
118 
119 
120 #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
Objects browser window.
QWidget * getQWidgetAncestor() const
Gets an empty QWidget that is created in Anatomist application to become a default parent for all Ana...
Editor window for labels (interaction with hierarchies)
Definition: listboxeditor.h:85
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=Qt::WindowFlags())
carto::GenericObject * _ao
QTreeWidgetItem * _item
QString get_result()
void change(QComboBox *)
Receive input from a browser (click on a hierarchy)
QObjectBrowser * _browser
QCancelLineEdit * _te
std::string attrib() const
Definition: listboxeditor.h:98