SceneEditorMainWindow.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package MemoryX::gui-plugins::SceneEditor
19  * @date 2015
20  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
21  * GNU General Public License
22  */
23 
24 #pragma once
25 
26 /* Qt headers */
27 #include <QMainWindow>
28 #include <QPointer>
29 #include <QResizeEvent>
30 
31 #include "../controller/Controller.h"
32 #include "ObjectInspectorWidget.h"
33 #include "ObjectExplorerWidget.h"
34 #include "GroupExplorerWidget.h"
35 #include "MinimapWidget.h"
36 #include "SceneEditorWidget.h"
37 #include "ScenegraphWidget.h"
39 #include "CollapsibleDockWidget.h"
40 
41 namespace Ui
42 {
43  class SceneEditorMainWindow;
44 }
45 
46 namespace gui
47 {
48  /**
49  * This class provides the main window of the plugin.
50  * It initializes the central widget and all dock widgets.
51  *
52  */
53  class SceneEditorMainWindow : public QMainWindow
54  {
55  Q_OBJECT
56 
57  public:
58 
59  /**
60  * Constructor.
61  * Creates main window for SceneEditor and initialisizes all child widgets.
62  * Expects controller:ControllerPtr and a group editor dialog.
63  *
64  * @param control shared pointer to controller::Controller
65  * @param groupEditorDialog Qt::QPointer to group editor dialog
66  * @param parent parent widget
67  *
68  */
69  explicit SceneEditorMainWindow(const controller::ControllerPtr& control, QPointer<dialog::GroupExplorerDialog> groupEditorDialog, QWidget* parent = 0);
70 
71  /**
72  * Destructor.
73  * Destroys the SceneEditor main window.
74  *
75  */
76  ~SceneEditorMainWindow() override;
77 
78  void postDocking();
79 
80  /**
81  * Enables main window and updates its widgets.
82  *
83  */
84  void onConnect();
85 
86  /**
87  * Disables main window.
88  *
89  */
90  void onDisconnect();
91 
92  signals:
93  /**
94  * Signal emitted when user changed current language.
95  *
96  */
97  void languageChangedByUser();
98 
99  protected:
100  /**
101  * Reimplements Qt::QWidget:changeEvent().
102  *
103  * The state being changed in this event can be retrieved through the <i>event</i> supplied.
104  *
105  * @param event Qt::Event
106  * @see Qt::QEvent
107  * @see Qt::QWidget:changeEvent()
108  */
109  void changeEvent(QEvent* event) override;
110 
111  private:
112  QPointer<ObjectInspectorWidget> objectInspector;
113  QPointer<ObjectExplorerWidget> objectExplorer;
114  QPointer<GroupExplorerWidget> groupExplorer;
115  QPointer<MinimapWidget> minimap;
116  QPointer<SceneEditorWidget> scene;
117  QPointer<ScenegraphWidget> sceneGraph;
118  QPointer<dialog::GroupExplorerDialog> groupEditorDialog;
119  QPointer<gui::CollapsibleDockWidget> objectExplorerDock;
120  QPointer<gui::CollapsibleDockWidget> objectInspectorDock;
121  QPointer<gui::CollapsibleDockWidget> groupExplorerDock;
122  QPointer<gui::CollapsibleDockWidget> minimapDock;
123  controller::ControllerPtr mainControl;
124  };
125 }
126 
ObjectInspectorWidget.h
MinimapWidget.h
gui::SceneEditorMainWindow::postDocking
void postDocking()
Definition: SceneEditorMainWindow.cpp:73
gui::SceneEditorMainWindow::~SceneEditorMainWindow
~SceneEditorMainWindow() override
Destructor.
Definition: SceneEditorMainWindow.cpp:68
GroupExplorerDialog.h
ObjectExplorerWidget.h
gui::SceneEditorMainWindow::onDisconnect
void onDisconnect()
Disables main window.
Definition: SceneEditorMainWindow.cpp:88
ScenegraphWidget.h
gui::SceneEditorMainWindow::onConnect
void onConnect()
Enables main window and updates its widgets.
Definition: SceneEditorMainWindow.cpp:83
SceneEditorWidget.h
gui::SceneEditorMainWindow::changeEvent
void changeEvent(QEvent *event) override
Reimplements Qt::QWidget:changeEvent().
Definition: SceneEditorMainWindow.cpp:92
Ui
ArmarX Headers.
Definition: ArmarXMainWindow.h:54
controller::ControllerPtr
std::shared_ptr< Controller > ControllerPtr
Definition: ClassDefinitions.h:41
gui::SceneEditorMainWindow::SceneEditorMainWindow
SceneEditorMainWindow(const controller::ControllerPtr &control, QPointer< dialog::GroupExplorerDialog > groupEditorDialog, QWidget *parent=0)
Constructor.
Definition: SceneEditorMainWindow.cpp:30
gui::SceneEditorMainWindow::languageChangedByUser
void languageChangedByUser()
Signal emitted when user changed current language.
gui::SceneEditorMainWindow
This class provides the main window of the plugin.
Definition: SceneEditorMainWindow.h:53
CollapsibleDockWidget.h
control
This file is part of ArmarX.
GroupExplorerWidget.h