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
33#include "GroupExplorerWidget.h"
34#include "MinimapWidget.h"
37#include "SceneEditorWidget.h"
38#include "ScenegraphWidget.h"
40
41namespace Ui
42{
43 class SceneEditorMainWindow;
44}
45
46namespace 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 * Constructor.
60 * Creates main window for SceneEditor and initialisizes all child widgets.
61 * Expects controller:ControllerPtr and a group editor dialog.
62 *
63 * @param control shared pointer to controller::Controller
64 * @param groupEditorDialog Qt::QPointer to group editor dialog
65 * @param parent parent widget
66 *
67 */
69 QPointer<dialog::GroupExplorerDialog> groupEditorDialog,
70 QWidget* parent = 0);
71
72 /**
73 * Destructor.
74 * Destroys the SceneEditor main window.
75 *
76 */
77 ~SceneEditorMainWindow() override;
78
79 void postDocking();
80
81 /**
82 * Enables main window and updates its widgets.
83 *
84 */
85 void onConnect();
86
87 /**
88 * Disables main window.
89 *
90 */
91 void onDisconnect();
92
93 signals:
94 /**
95 * Signal emitted when user changed current language.
96 *
97 */
99
100 protected:
101 /**
102 * Reimplements Qt::QWidget:changeEvent().
103 *
104 * The state being changed in this event can be retrieved through the <i>event</i> supplied.
105 *
106 * @param event Qt::Event
107 * @see Qt::QEvent
108 * @see Qt::QWidget:changeEvent()
109 */
110 void changeEvent(QEvent* event) override;
111
112 private:
113 QPointer<ObjectInspectorWidget> objectInspector;
114 QPointer<ObjectExplorerWidget> objectExplorer;
115 QPointer<GroupExplorerWidget> groupExplorer;
116 QPointer<MinimapWidget> minimap;
117 QPointer<SceneEditorWidget> scene;
118 QPointer<ScenegraphWidget> sceneGraph;
119 QPointer<dialog::GroupExplorerDialog> groupEditorDialog;
120 QPointer<gui::CollapsibleDockWidget> objectExplorerDock;
121 QPointer<gui::CollapsibleDockWidget> objectInspectorDock;
122 QPointer<gui::CollapsibleDockWidget> groupExplorerDock;
123 QPointer<gui::CollapsibleDockWidget> minimapDock;
124 controller::ControllerPtr mainControl;
125 };
126} // namespace gui
void changeEvent(QEvent *event) override
Reimplements Qt::QWidget:changeEvent().
~SceneEditorMainWindow() override
Destructor.
void languageChangedByUser()
Signal emitted when user changed current language.
void onConnect()
Enables main window and updates its widgets.
void onDisconnect()
Disables main window.
SceneEditorMainWindow(const controller::ControllerPtr &control, QPointer< dialog::GroupExplorerDialog > groupEditorDialog, QWidget *parent=0)
Constructor.
ArmarX Headers.
This file is part of ArmarX.
std::shared_ptr< Controller > ControllerPtr