All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SaveDialog.hh
Go to the documentation of this file.
1 /*
2  * Copyright 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 
18 #ifndef _SAVE_DIALOG_HH_
19 #define _SAVE_DIALOG_HH_
20 
21 #include <string>
22 #include "gazebo/gui/qt.h"
23 #include "gazebo/util/system.hh"
24 
25 namespace gazebo
26 {
27  namespace gui
28  {
31 
34  class GAZEBO_VISIBLE SaveDialog : public QDialog
35  {
36  Q_OBJECT
37 
40  public: SaveDialog(QWidget *_parent = 0);
41 
43  public: ~SaveDialog();
44 
47  public: std::string GetSaveName() const;
48 
51  public: std::string GetSaveLocation() const;
52 
55  public: void SetSaveName(const std::string &_name);
56 
59  public: void SetSaveLocation(const std::string &_location);
60 
63  public: void SetMessage(const std::string &_msg);
64 
67  public: void SetTitle(const std::string &_title);
68 
71  public: void SetFileExtension(const std::string &_extension);
72 
74  protected: virtual void showEvent(QShowEvent *_event);
75 
77  private slots: void OnBrowse();
78 
80  private slots: void OnCancel();
81 
83  private slots: void OnSave();
84 
86  private: QLineEdit *nameLineEdit;
87 
89  private: QLineEdit *locationLineEdit;
90 
92  private: QLabel *messageLabel;
93 
95  private: std::string fileExtension;
96  };
98  }
99 }
100 
101 #endif
Dialog for saving to file.
Definition: SaveDialog.hh:34
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48