RestUiLoginDialog.hh
Go to the documentation of this file.
1 /*
2  * copyright (C) 2015 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 GAZEBO_PLUGINS_REST_WEB_RESTUILOGINDIALOG_HH_
19 #define GAZEBO_PLUGINS_REST_WEB_RESTUILOGINDIALOG_HH_
20 
21 #include <string>
22 
23 #include <gazebo/gui/qt.h>
24 #include "gazebo/util/system.hh"
25 
26 namespace gazebo
27 {
28  namespace gui
29  {
30  class RestUiWidget;
31 
34  class GAZEBO_VISIBLE RestUiLoginDialog : public QDialog
35  {
36  Q_OBJECT
37 
43  public: RestUiLoginDialog(QWidget *_parent,
44  const std::string &_title,
45  const std::string &_urlLabel,
46  const std::string &_defautlUrl);
47 
52  signals: void AcceptLogin(QString &_url,
53  QString &_username,
54  QString &_password);
55 
58  public: std::string GetUsername() const;
59 
62  public: std::string GetPassword() const;
63 
66  public: std::string GetUrl() const;
67 
69  public slots: void SlotAcceptLogin();
70 
73  private: QLabel *labelUrl;
74 
76  private: QLabel *labelUsername;
77 
79  private: QLabel *labelPassword;
80 
82  private: QLineEdit *editUrl;
83 
85  private: QLineEdit *editUsername;
86 
88  private: QLineEdit *editPassword;
89 
91  private: QLabel *labelInfo;
92 
94  private: QDialogButtonBox *buttons;
95 
97  private: std::string username;
98 
100  private: std::string password;
101 
103  private: std::string url;
104  };
105  }
106 }
107 
108 #endif
Forward declarations for the common classes.
Definition: Animation.hh:33
Provides a means to login to a webservice.
Definition: RestUiLoginDialog.hh:34
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:58