new_object_dialog.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008, Willow Garage, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of the Willow Garage, Inc. nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  */
29 
30 #ifndef RVIZ_NEW_OBJECT_DIALOG_H
31 #define RVIZ_NEW_OBJECT_DIALOG_H
32 
33 #include <QDialog>
34 
35 #include "rviz/factory.h"
36 
37 class QTreeWidget;
38 class QTreeWidgetItem;
39 class QTextBrowser;
40 class QLineEdit;
41 class QDialogButtonBox;
42 class QLabel;
43 
44 namespace rviz
45 {
46 
47 class NewObjectDialog : public QDialog
48 {
49 Q_OBJECT
50 public:
66  NewObjectDialog( Factory* factory,
67  const QString& object_type,
68  const QStringList& disallowed_display_names,
69  const QStringList& disallowed_class_lookup_names,
70  QString* lookup_name_output,
71  QString* display_name_output = 0,
72  QWidget* parent = 0 );
73 
74  virtual QSize sizeHint () const;
75 
76 public Q_SLOTS:
77  virtual void accept();
78 
79 private Q_SLOTS:
80  void onDisplaySelected( QTreeWidgetItem* selected_item );
81  void onNameChanged();
82 
83 private:
85  void fillTree( QTreeWidget* tree );
86 
89  bool isValid();
90 
93  void setError( const QString& error_text );
94 
96  const QStringList& disallowed_display_names_;
97  const QStringList& disallowed_class_lookup_names_;
98 
101 
103  QTextBrowser* description_;
104 
105  QLineEdit* name_editor_;
106 
108  QDialogButtonBox* button_box_;
109 
112  QString lookup_name_;
113 };
114 
115 } //namespace rviz
116 
117 #endif // RVIZ_NEW_OBJECT_DIALOG_H
void onDisplaySelected(QTreeWidgetItem *selected_item)
const QStringList & disallowed_display_names_
QTextBrowser * description_
void setError(const QString &error_text)
const QStringList & disallowed_class_lookup_names_
virtual QSize sizeHint() const
tree
Abstract superclass representing the ability to get a list of class IDs and the ability to get name...
Definition: factory.h:43
QDialogButtonBox * button_box_
void fillTree(QTreeWidget *tree)
NewObjectDialog(Factory *factory, const QString &object_type, const QStringList &disallowed_display_names, const QStringList &disallowed_class_lookup_names, QString *lookup_name_output, QString *display_name_output=0, QWidget *parent=0)


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Sat Apr 27 2019 02:33:41