ImportDialog.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2013 Open Source Robotics Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16*/
17#ifndef GAZEBO_GUI_MODEL_IMPORTDIALOG_HH_
18#define GAZEBO_GUI_MODEL_IMPORTDIALOG_HH_
19
20#include <string>
21#include "gazebo/gui/qt.h"
22#include "gazebo/util/system.hh"
23
24namespace gazebo
25{
26 namespace gui
27 {
30
33 class GZ_GUI_VISIBLE ImportDialog : public QDialog
34 {
35 Q_OBJECT
36
39 public: explicit ImportDialog(QWidget *_parent = 0);
40
42 public: ~ImportDialog();
43
46 public: std::string GetLinkName() const;
47
50 public: std::string GetImportPath() const;
51
54 public: void SetLinkName(const std::string &_name);
55
58 public: void SetImportPath(const std::string &_path);
59
62 public: void SetMessage(const std::string &_msg);
63
66 public: void SetTitle(const std::string &_title);
67
69 protected: virtual void showEvent(QShowEvent *event);
70
72 private slots: void OnBrowse();
73
75 private slots: void OnCancel();
76
78 private slots: void OnImport();
79
81 private: QLineEdit *nameLineEdit;
82
84 private: QLineEdit *pathLineEdit;
85
87 private: QLabel *messageLabel;
88 };
90 }
91}
92
93#endif
gui
Definition KeyEventHandler.hh:29
Dialog for saving to file.
Definition ImportDialog.hh:34
void SetMessage(const std::string &_msg)
Set the message to be displayed.
std::string GetLinkName() const
Get name of file.
void SetLinkName(const std::string &_name)
Set the name of the custom link.
void SetTitle(const std::string &_title)
Set the tile of the dialog.
void SetImportPath(const std::string &_path)
Set the import path of the custom link.
std::string GetImportPath() const
Get the import path of the custom link.
virtual void showEvent(QShowEvent *event)
Qt event emitted showing the dialog.
ImportDialog(QWidget *_parent=0)
Constructor.
Forward declarations for the common classes.
Definition Animation.hh:27