DisplayWidget.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package <PACKAGE_NAME>::<CATEGORY>::DisplayWidget
17  * @author Stefan Reither ( stef dot reither at web dot de )
18  * @date 2018
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
25 /* Qt headers */
26 #include <QWidget>
27 
28 /* Coin headers */
29 #include <Inventor/actions/SoGLRenderAction.h>
30 #include <Inventor/nodes/SoPerspectiveCamera.h>
31 #include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
32 
33 namespace armarx
34 {
35  class Display : public SoQtExaminerViewer
36  {
37  public:
38  Display(QWidget* widget);
39  ~Display() override;
40  SoSeparator* getRootNode();
41  void cameraViewAll();
42  void cameraViewNode(SoNode* node, const float slack = 1.0);
43 
44  private:
45  // virtual SbBool processSoEvent(const SoEvent* const event);
46  SoSeparator* sceneRootNode;
47  SoSeparator* contentRootNode;
48  SoPerspectiveCamera* camera;
49  };
50 
51  class DisplayWidget : public QWidget
52  {
53  Q_OBJECT
54 
55  public:
56  explicit DisplayWidget(QWidget* parent = 0);
57  ~DisplayWidget() override;
58 
60 
61  private:
62  Display* display;
63  };
64 }
armarx::Display::cameraViewAll
void cameraViewAll()
Definition: DisplayWidget.cpp:112
armarx::Display::~Display
~Display() override
Definition: DisplayWidget.cpp:99
armarx::DisplayWidget::DisplayWidget
DisplayWidget(QWidget *parent=0)
Definition: DisplayWidget.cpp:39
armarx::DisplayWidget
Definition: DisplayWidget.h:51
armarx::DisplayWidget::~DisplayWidget
~DisplayWidget() override
Definition: DisplayWidget.cpp:58
armarx::Display::cameraViewNode
void cameraViewNode(SoNode *node, const float slack=1.0)
Definition: DisplayWidget.cpp:117
armarx::DisplayWidget::getDisplay
Display * getDisplay()
Definition: DisplayWidget.cpp:64
armarx::Display::Display
Display(QWidget *widget)
Definition: DisplayWidget.cpp:69
armarx::Display
Definition: DisplayWidget.h:35
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::Display::getRootNode
SoSeparator * getRootNode()
Definition: DisplayWidget.cpp:107