g2o
main_window.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_MAIN_WINDOW_H
20 #define G2O_MAIN_WINDOW_H
21 
22 #include "g2o_viewer_api.h"
23 #include "ui_base_main_window.h"
24 
26 
27 #include <vector>
28 
30 class PropertiesWidget;
31 
32 namespace g2o {
33  class DlWrapper;
35 } // end namespace
36 
40 class G2O_VIEWER_API MainWindow : public QMainWindow, public Ui::BaseMainWindow
41 {
42  Q_OBJECT
43  public:
44  MainWindow(QWidget * parent = 0, Qt::WindowFlags flags = 0);
45  ~MainWindow();
46 
47  public:
51  void updateDisplayedSolvers();
52 
56  void updateRobustKernels();
57 
61  bool loadFromFile(const QString& filename);
62 
63  public slots:
64  void on_actionLoad_triggered(bool);
65  void on_actionSave_triggered(bool);
66  void on_actionQuit_triggered(bool);
67  void on_actionWhite_Background_triggered(bool);
68  void on_actionDefault_Background_triggered(bool);
69  void on_actionProperties_triggered(bool);
70  void on_actionSave_Screenshot_triggered(bool);
71  void on_actionLoad_Viewer_State_triggered(bool);
72  void on_actionSave_Viewer_State_triggered(bool);
73 
74  void on_btnOptimize_clicked();
75  void on_btnInitialGuess_clicked();
76  void on_btnSetZero_clicked();
77  void on_btnForceStop_clicked();
78  void on_btnOptimizerParamaters_clicked();
79 
80  protected:
81  void fixGraph();
82  bool allocateSolver(bool& allocatedNewSolver);
83  bool prepare();
84  void setRobustKernel();
85  bool load(const QString& filename);
86 
87  std::vector<g2o::OptimizationAlgorithmProperty> _knownSolvers;
92 
95 };
96 
97 
98 #endif
describe the properties of a solver
class G2O_CORE_API OptimizationAlgorithm
#define G2O_VIEWER_API
g2o::OptimizationAlgorithmProperty _currentOptimizationAlgorithmProperty
Definition: main_window.h:90
PropertiesWidget * _optimizerPropertiesWidget
Definition: main_window.h:94
std::vector< g2o::OptimizationAlgorithmProperty > _knownSolvers
Definition: main_window.h:87
bool _forceStopFlag
Definition: main_window.h:89
g2o::OptimizationAlgorithm * _currentSolver
Definition: main_window.h:91
Generic interface for a non-linear solver operating on a graph.
int _lastSolver
Definition: main_window.h:88
ViewerPropertiesWidget * _viewerPropertiesWidget
Definition: main_window.h:93
main window of the g2o viewer
Definition: main_window.h:40