dialogloadenvironment.hh
Go to the documentation of this file.
1 // Copyright (c) 2015-2018, LAAS-CNRS
2 // Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
3 //
4 // This file is part of gepetto-viewer.
5 // gepetto-viewer is free software: you can redistribute it
6 // and/or modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation, either version
8 // 3 of the License, or (at your option) any later version.
9 //
10 // gepetto-viewer is distributed in the hope that it will be
11 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Lesser Public License for more details. You should have
14 // received a copy of the GNU Lesser General Public License along with
15 // gepetto-viewer. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef GEPETTO_GUI_DIALOGLOADENVIRONMENT_HH
18 #define GEPETTO_GUI_DIALOGLOADENVIRONMENT_HH
19 
20 #include <QDialog>
21 #include <QComboBox>
22 
23 namespace Ui {
24  class DialogLoadEnvironment;
25 }
26 
27 namespace gepetto {
28  namespace gui {
29  class DialogLoadEnvironment : public QDialog
30  {
31  Q_OBJECT
32 
33  public:
34  explicit DialogLoadEnvironment(QWidget *parent = 0);
36 
38  QString name_, envName_, urdfFilename_, package_, urdfSuf_,
39  srdfSuf_;
41  EnvironmentDefinition (QString name, QString envName,
42  QString package,
43  QString urdfFilename, QString urdfSuffix, QString srdfSuffix) :
44  name_(name), envName_ (envName), urdfFilename_(urdfFilename),
45  package_ (package), urdfSuf_(urdfSuffix), srdfSuf_(srdfSuffix)
46  {}
47  };
48 
49  static void addEnvironmentDefinition (QString name,
50  QString envName,
51  QString package,
52  QString urdfFilename,
53  QString urdfSuffix,
54  QString srdfSuffix);
55  static QList <EnvironmentDefinition> getEnvironmentDefinitions ();
56 
58  return selected_;
59  }
60 
61  private slots:
62  void accept();
63  void envSelect(int index);
64 
65  private:
66  ::Ui::DialogLoadEnvironment *ui_;
67  QComboBox* defs_;
68  EnvironmentDefinition selected_;
69 
70  static QList <EnvironmentDefinition> definitions;
71  };
72  } // namespace gui
73 } // namespace gepetto
74 
76 
77 #endif // GEPETTO_GUI_DIALOGLOADENVIRONMENT_HH
Definition: dialogloadenvironment.hh:29
Definition: dialogloadenvironment.hh:23
EnvironmentDefinition getSelectedDescription()
Definition: dialogloadenvironment.hh:57
Definition: action-search-bar.hh:27
QString urdfSuf_
Definition: dialogloadenvironment.hh:38
Definition: dialogloadenvironment.hh:37
EnvironmentDefinition(QString name, QString envName, QString package, QString urdfFilename, QString urdfSuffix, QString srdfSuffix)
Definition: dialogloadenvironment.hh:41
EnvironmentDefinition()
Definition: dialogloadenvironment.hh:40