Skip to content

Commit

Permalink
Removed create and debug context menu actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Glatzel committed Jun 5, 2017
1 parent c6bdf33 commit 8722193
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 54 deletions.
22 changes: 0 additions & 22 deletions IntrinsicEd/src/IntrinsicEd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,6 @@ IntrinsicEd::IntrinsicEd(QWidget* parent) : QMainWindow(parent)
QObject::connect(_ui.actionWireframe_Rendering, SIGNAL(triggered()), this,
SLOT(onDebugGeometryChanged()));

QObject::connect(_ui.actionShow_Create_Context_Menu, SIGNAL(triggered()),
this, SLOT(onShowCreateContextMenu()));
QObject::connect(_ui.actionShow_Debug_Context_Menu, SIGNAL(triggered()), this,
SLOT(onShowDebugContextMenu()));
QObject::connect(_ui.actionShow_Debug_Geometry_Context_Menu,
SIGNAL(triggered()), this,
SLOT(onShowDebugGeometryContextMenu()));
Expand Down Expand Up @@ -396,14 +392,6 @@ IntrinsicEd::IntrinsicEd(QWidget* parent) : QMainWindow(parent)

// Context menus
{
_createContextMenu.addAction(_ui.actionCreateCube);
_createContextMenu.addAction(_ui.actionCreateSphere);
_createContextMenu.addSeparator();
_createContextMenu.addAction(_ui.actionCreateLight);
_createContextMenu.addSeparator();
_createContextMenu.addAction(_ui.actionCreateRigidBody);
_createContextMenu.addAction(_ui.actionCreateRigidBody_Sphere);

_debugGeometryContextMenu.addAction(_ui.actionWireframe_Rendering);
_debugGeometryContextMenu.addAction(_ui.actionShow_World_Bounding_Spheres);
_debugGeometryContextMenu.addAction(_ui.actionShow_Benchmark_Paths);
Expand Down Expand Up @@ -826,21 +814,11 @@ void IntrinsicEd::closeEvent(QCloseEvent*)
Application::shutdown();
}

void IntrinsicEd::onShowDebugContextMenu()
{
_debugContextMenu.popup(QCursor::pos());
}

void IntrinsicEd::onShowDebugGeometryContextMenu()
{
_debugGeometryContextMenu.popup(QCursor::pos());
}

void IntrinsicEd::onShowCreateContextMenu()
{
_createContextMenu.popup(QCursor::pos());
}

void IntrinsicEd::onDebugGeometryChanged()
{
if (_ui.actionShow_PhysX_Debug_Geometry->isChecked())
Expand Down
4 changes: 0 additions & 4 deletions IntrinsicEd/src/IntrinsicEd.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ public slots:
void onCreateRigidBodySphere();
void onCreateLight();
void onCreateSphere();
void onShowDebugContextMenu();
void onShowDebugGeometryContextMenu();
void onShowCreateContextMenu();
void onDebugGeometryChanged();
void onOpenMicroprofile();
void onCompileShaders();
Expand All @@ -104,8 +102,6 @@ public slots:
void updateSettingsChangeWatch();
void updateUI();

QMenu _createContextMenu;
QMenu _debugContextMenu;
QMenu _debugGeometryContextMenu;

QSlider* _dayNightSlider;
Expand Down
32 changes: 4 additions & 28 deletions IntrinsicEd/src/IntrinsicEd.ui
Original file line number Diff line number Diff line change
Expand Up @@ -163,18 +163,18 @@
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
<attribute name="toolBarArea">
<enum>LeftToolBarArea</enum>
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
<addaction name="actionCreateCube"/>
<addaction name="actionCreateRigidBody"/>
<addaction name="actionCreateSphere"/>
<addaction name="actionCreateRigidBody_Sphere"/>
<addaction name="separator"/>
<addaction name="actionCreateLight"/>
<addaction name="separator"/>
<addaction name="actionShow_Create_Context_Menu"/>
</widget>
<widget class="QToolBar" name="devToolBar">
<property name="enabled">
Expand Down Expand Up @@ -524,37 +524,13 @@
<string>Main Game State</string>
</property>
</action>
<action name="actionShow_Create_Context_Menu">
<property name="icon">
<iconset resource="../IntrinsicEd.qrc">
<normaloff>:/Icons/icons/cad/star.png</normaloff>:/Icons/icons/cad/star.png</iconset>
</property>
<property name="text">
<string>All</string>
</property>
<property name="toolTip">
<string>Show Create Context Menu</string>
</property>
</action>
<action name="actionShow_Debug_Context_Menu">
<property name="icon">
<iconset>
<normaloff>:/Icons/icons/cc/white/png/lightbulb_icon&amp;48.png</normaloff>:/Icons/icons/cc/white/png/lightbulb_icon&amp;48.png</iconset>
</property>
<property name="text">
<string>Debugging</string>
</property>
<property name="toolTip">
<string>Show Debug Context Menu</string>
</property>
</action>
<action name="actionCreateRigidBody_Sphere">
<property name="icon">
<iconset resource="../IntrinsicEd.qrc">
<normaloff>:/Icons/icons/cad/circle-2.png</normaloff>:/Icons/icons/cad/circle-2.png</iconset>
<normaloff>:/Icons/icons/cad/circle-1.png</normaloff>:/Icons/icons/cad/circle-1.png</iconset>
</property>
<property name="text">
<string>R. Sphere</string>
<string>Rigid Sphere</string>
</property>
<property name="toolTip">
<string>Create Rigid Body (Dyn. Sphere)</string>
Expand Down

0 comments on commit 8722193

Please sign in to comment.