g2o
Loading...
Searching...
No Matches
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 <vector>
23
25#include "g2o_viewer_api.h"
26#include "ui_base_main_window.h"
27
30
31namespace g2o {
32class DlWrapper;
34} // namespace g2o
35
39class G2O_VIEWER_API MainWindow : public QMainWindow,
40 public Ui::BaseMainWindow {
41 Q_OBJECT
42 public:
43 MainWindow(QWidget* parent = 0);
45
46 public:
50 void updateDisplayedSolvers();
51
55 void updateRobustKernels();
56
60 bool loadFromFile(const QString& filename);
61
62 public slots:
63 void on_actionLoad_triggered(bool);
64 void on_actionSave_triggered(bool);
65 void on_actionQuit_triggered(bool);
66 void on_actionWhite_Background_triggered(bool);
67 void on_actionDefault_Background_triggered(bool);
68 void on_actionProperties_triggered(bool);
69 void on_actionSave_Screenshot_triggered(bool);
70 void on_actionLoad_Viewer_State_triggered(bool);
71 void on_actionSave_Viewer_State_triggered(bool);
72
73 void on_btnOptimize_clicked();
74 void on_btnInitialGuess_clicked();
75 void on_btnSetZero_clicked();
76 void on_btnForceStop_clicked();
77 void on_btnOptimizerParameters_clicked();
78 void on_btnReload_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 std::string _filename;
96};
97
98#endif
main window of the g2o viewer
Definition main_window.h:40
int _lastSolver
Definition main_window.h:88
ViewerPropertiesWidget * _viewerPropertiesWidget
Definition main_window.h:93
g2o::OptimizationAlgorithm * _currentSolver
Definition main_window.h:91
PropertiesWidget * _optimizerPropertiesWidget
Definition main_window.h:94
std::vector< g2o::OptimizationAlgorithmProperty > _knownSolvers
Definition main_window.h:87
g2o::OptimizationAlgorithmProperty _currentOptimizationAlgorithmProperty
Definition main_window.h:90
bool _forceStopFlag
Definition main_window.h:89
std::string _filename
Definition main_window.h:95
Generic interface for a non-linear solver operating on a graph.
#define G2O_VIEWER_API
class G2O_CORE_API OptimizationAlgorithm