g2o
properties_widget.h
Go to the documentation of this file.
1 // g2o - General Graph Optimization
2 // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard
3 //
4 // This file is part of g2o.
5 //
6 // g2o is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // g2o is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with g2o. If not, see <http://www.gnu.org/licenses/>.
18 
19 #ifndef G2O_PROPERTIES_WINDOW_H
20 #define G2O_PROPERTIES_WINDOW_H
21 
22 #include <vector>
23 #include <string>
24 
25 #include <QDialog>
26 
27 #include "g2o_viewer_api.h"
28 #include "ui_base_properties_widget.h"
29 
30 namespace g2o
31 {
32  class G2oQGLViewer;
33  class PropertyMap;
34 }
35 
36 class G2O_VIEWER_API PropertiesWidget : public QDialog, public Ui::BasePropertiesWidget
37 {
38  Q_OBJECT
39  public:
40  PropertiesWidget(QWidget * parent = 0, Qt::WindowFlags f = 0);
41  virtual ~PropertiesWidget();
42 
43  void setProperties(g2o::PropertyMap* properties);
44 
45  public slots:
46  void on_btnApply_clicked();
47  void on_btnOK_clicked();
48 
49  protected:
50  std::vector<std::string> _propNames;
52 
53  virtual void updateDisplayedProperties();
54  virtual void applyProperties();
55  virtual std::string humanReadablePropName(const std::string& propertyName) const;
56 };
57 
58 #endif
g2o::PropertyMap * _properties
#define G2O_VIEWER_API
std::vector< std::string > _propNames
a collection of properties mapping from name to the property itself
Definition: property.h:76