mirror of
https://github.com/leozide/leocad
synced 2025-01-17 18:11:42 +01:00
Added Shading and Projection to context menu. Closes #128.
This commit is contained in:
parent
733969913e
commit
fb62beb933
3 changed files with 29 additions and 11 deletions
|
@ -379,6 +379,15 @@ void lcMainWindow::CreateMenus()
|
|||
mViewpointMenu->addAction(mActions[LC_VIEW_VIEWPOINT_BOTTOM]);
|
||||
mViewpointMenu->addAction(mActions[LC_VIEW_VIEWPOINT_HOME]);
|
||||
|
||||
mProjectionMenu = new QMenu(tr("Projection"), this);
|
||||
mProjectionMenu->addAction(mActions[LC_VIEW_PROJECTION_PERSPECTIVE]);
|
||||
mProjectionMenu->addAction(mActions[LC_VIEW_PROJECTION_ORTHO]);
|
||||
|
||||
mShadingMenu = new QMenu(tr("Sh&ading"), this);
|
||||
mShadingMenu->addAction(mActions[LC_VIEW_SHADING_WIREFRAME]);
|
||||
mShadingMenu->addAction(mActions[LC_VIEW_SHADING_FLAT]);
|
||||
mShadingMenu->addAction(mActions[LC_VIEW_SHADING_DEFAULT_LIGHTS]);
|
||||
|
||||
QMenu* FileMenu = menuBar()->addMenu(tr("&File"));
|
||||
FileMenu->addAction(mActions[LC_FILE_NEW]);
|
||||
FileMenu->addAction(mActions[LC_FILE_OPEN]);
|
||||
|
@ -440,13 +449,8 @@ void lcMainWindow::CreateMenus()
|
|||
ViewMenu->addAction(mActions[LC_VIEW_LOOK_AT]);
|
||||
ViewMenu->addMenu(mViewpointMenu);
|
||||
ViewMenu->addMenu(mCameraMenu);
|
||||
QMenu* PerspectiveMenu = ViewMenu->addMenu(tr("Projection"));
|
||||
PerspectiveMenu->addAction(mActions[LC_VIEW_PROJECTION_PERSPECTIVE]);
|
||||
PerspectiveMenu->addAction(mActions[LC_VIEW_PROJECTION_ORTHO]);
|
||||
QMenu* ShadingMenu = ViewMenu->addMenu(tr("Sh&ading"));
|
||||
ShadingMenu->addAction(mActions[LC_VIEW_SHADING_WIREFRAME]);
|
||||
ShadingMenu->addAction(mActions[LC_VIEW_SHADING_FLAT]);
|
||||
ShadingMenu->addAction(mActions[LC_VIEW_SHADING_DEFAULT_LIGHTS]);
|
||||
ViewMenu->addMenu(mProjectionMenu);
|
||||
ViewMenu->addMenu(mShadingMenu);
|
||||
QMenu* StepMenu = ViewMenu->addMenu(tr("Ste&p"));
|
||||
StepMenu->addAction(mActions[LC_VIEW_TIME_FIRST]);
|
||||
StepMenu->addAction(mActions[LC_VIEW_TIME_PREVIOUS]);
|
||||
|
|
|
@ -213,14 +213,24 @@ public:
|
|||
return mPartSelectionWidget;
|
||||
}
|
||||
|
||||
QMenu* GetViewpointMenu() const
|
||||
{
|
||||
return mViewpointMenu;
|
||||
}
|
||||
|
||||
QMenu* GetCameraMenu() const
|
||||
{
|
||||
return mCameraMenu;
|
||||
}
|
||||
|
||||
QMenu* GetViewpointMenu() const
|
||||
QMenu* GetProjectionMenu() const
|
||||
{
|
||||
return mViewpointMenu;
|
||||
return mProjectionMenu;
|
||||
}
|
||||
|
||||
QMenu* GetShadingMenu() const
|
||||
{
|
||||
return mShadingMenu;
|
||||
}
|
||||
|
||||
bool DoDialog(LC_DIALOG_TYPE Type, void* Data);
|
||||
|
@ -372,8 +382,10 @@ protected:
|
|||
QLabel* mStatusSnapLabel;
|
||||
QLabel* mStatusTimeLabel;
|
||||
|
||||
QMenu* mCameraMenu;
|
||||
QMenu* mViewpointMenu;
|
||||
QMenu* mCameraMenu;
|
||||
QMenu* mProjectionMenu;
|
||||
QMenu* mShadingMenu;
|
||||
};
|
||||
|
||||
extern class lcMainWindow* gMainWindow;
|
||||
|
|
|
@ -413,8 +413,10 @@ void View::ShowContextMenu() const
|
|||
|
||||
Popup->addSeparator();
|
||||
|
||||
Popup->addMenu(gMainWindow->GetCameraMenu());
|
||||
Popup->addMenu(gMainWindow->GetViewpointMenu());
|
||||
Popup->addMenu(gMainWindow->GetCameraMenu());
|
||||
Popup->addMenu(gMainWindow->GetProjectionMenu());
|
||||
Popup->addMenu(gMainWindow->GetShadingMenu());
|
||||
|
||||
Popup->addSeparator();
|
||||
|
||||
|
|
Loading…
Reference in a new issue