00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef RVIZ_NEW_OBJECT_DIALOG_H
00031 #define RVIZ_NEW_OBJECT_DIALOG_H
00032
00033 #include <QDialog>
00034
00035 #include "rviz/factory.h"
00036
00037 class QTreeWidget;
00038 class QTreeWidgetItem;
00039 class QTextBrowser;
00040 class QLineEdit;
00041 class QDialogButtonBox;
00042 class QLabel;
00043
00044 namespace rviz
00045 {
00046
00047 class NewObjectDialog : public QDialog
00048 {
00049 Q_OBJECT
00050 public:
00066 NewObjectDialog( Factory* factory,
00067 const QString& object_type,
00068 const QStringList& disallowed_display_names,
00069 const QStringList& disallowed_class_lookup_names,
00070 QString* lookup_name_output,
00071 QString* display_name_output = 0,
00072 QWidget* parent = 0 );
00073
00074 public Q_SLOTS:
00075 virtual void accept();
00076
00077 private Q_SLOTS:
00078 void onDisplaySelected( QTreeWidgetItem* selected_item );
00079 void onNameChanged();
00080
00081 private:
00083 void fillTree( QTreeWidget* tree );
00084
00087 bool isValid();
00088
00091 void setError( const QString& error_text );
00092
00093 Factory* factory_;
00094 const QStringList& disallowed_display_names_;
00095 const QStringList& disallowed_class_lookup_names_;
00096
00097 QString* lookup_name_output_;
00098 QString* display_name_output_;
00099
00101 QTextBrowser* description_;
00102
00103 QLineEdit* name_editor_;
00104
00106 QDialogButtonBox* button_box_;
00107
00110 QString lookup_name_;
00111 };
00112
00113 }
00114
00115 #endif // RVIZ_NEW_OBJECT_DIALOG_H