Add standard fullscreen mode
This commit is contained in:
@@ -1478,6 +1478,38 @@ bool StdViewUndock::isActive(void)
|
||||
return (qobject_cast<View3DInventor*>(view) ? true : false);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Std_MainFullscreen
|
||||
//===========================================================================
|
||||
DEF_STD_CMD(StdMainFullscreen)
|
||||
|
||||
StdMainFullscreen::StdMainFullscreen()
|
||||
: Command("Std_MainFullscreen")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Fullscreen");
|
||||
sToolTipText = QT_TR_NOOP("Display the main window in fullscreen mode");
|
||||
sWhatsThis = "Std_MainFullscreen";
|
||||
sStatusTip = QT_TR_NOOP("Display the main window in fullscreen mode");
|
||||
sPixmap = "view-fullscreen";
|
||||
sAccel = "Alt+F11";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdMainFullscreen::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
MDIView* view = getMainWindow()->activeWindow();
|
||||
|
||||
if (view)
|
||||
view->setCurrentViewMode(MDIView::Child);
|
||||
|
||||
if (getMainWindow()->isFullScreen())
|
||||
getMainWindow()->showNormal();
|
||||
else
|
||||
getMainWindow()->showFullScreen();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Std_ViewFullscreen
|
||||
//===========================================================================
|
||||
@@ -1548,6 +1580,10 @@ Action * StdViewDockUndockFullscreen::createAction(void)
|
||||
|
||||
void StdViewDockUndockFullscreen::activated(int iMsg)
|
||||
{
|
||||
// Check if main window is in fullscreen mode.
|
||||
if (getMainWindow()->isFullScreen())
|
||||
getMainWindow()->showNormal();
|
||||
|
||||
MDIView* view = getMainWindow()->activeWindow();
|
||||
if (!view) return; // no active view
|
||||
|
||||
@@ -2811,7 +2847,7 @@ void CreateViewStdCommands(void)
|
||||
|
||||
rcCmdMgr.addCommand(new StdCmdViewCreate());
|
||||
rcCmdMgr.addCommand(new StdViewScreenShot());
|
||||
|
||||
rcCmdMgr.addCommand(new StdMainFullscreen());
|
||||
rcCmdMgr.addCommand(new StdViewDockUndockFullscreen());
|
||||
rcCmdMgr.addCommand(new StdCmdSetAppearance());
|
||||
rcCmdMgr.addCommand(new StdCmdToggleVisibility());
|
||||
|
||||
@@ -539,7 +539,7 @@ MenuItem* StdWorkbench::setupMenuBar() const
|
||||
// View
|
||||
MenuItem* view = new MenuItem( menuBar );
|
||||
view->setCommand("&View");
|
||||
*view << "Std_ViewCreate" << "Std_OrthographicCamera" << "Std_PerspectiveCamera" << "Separator"
|
||||
*view << "Std_ViewCreate" << "Std_OrthographicCamera" << "Std_PerspectiveCamera" << "Std_MainFullscreen" << "Separator"
|
||||
<< stdviews << "Std_FreezeViews" << "Std_DrawStyle" << "Separator" << view3d << zoom
|
||||
<< "Std_ViewDockUndockFullscreen" << "Std_AxisCross" << "Std_ToggleClipPlane"
|
||||
<< "Std_TextureMapping"
|
||||
|
||||
Reference in New Issue
Block a user