bool SubWindow::isMaximized() { #ifdef LMMS_BUILD_APPLE // check if subwindow size is identical to the MdiArea size, accounting for scrollbars int hScrollBarHeight = mdiArea()->horizontalScrollBar()->isVisible() ? mdiArea()->horizontalScrollBar()->size().height() : 0; int vScrollBarWidth = mdiArea()->verticalScrollBar()->isVisible() ? mdiArea()->verticalScrollBar()->size().width() : 0; QSize areaSize( this->mdiArea()->size().width() - vScrollBarWidth, this->mdiArea()->size().height() - hScrollBarHeight ); return areaSize == this->size(); #else return QMdiSubWindow::isMaximized(); #endif }
// A demo which shows drag being applied to several objects. PrevailingWindDemo::PrevailingWindDemo(hkDemoEnvironment* env) : hkDefaultPhysicsDemo(env) { // X and Z are the half-extents of the floor, and Y is the height of the walls. hkReal x = 20.0f; hkReal y = 4.0f; hkReal z = 20.0f; // // Setup the camera. // { hkVector4 from( 0.0f, y * (4.0f), z * 2.0f ); hkVector4 to(0.0f, 0.0f, 0.0f); hkVector4 up(0.0f, 1.0f, 0.0f); setupDefaultCameras( env, from, to, up ); } // // Create the world. // { hkpWorldCinfo info; m_world = new hkpWorld( info ); m_world->lock(); setupGraphics(); } // // Register all collision agents. // { hkpAgentRegisterUtil::registerAllAgents( m_world->getCollisionDispatcher() ); } // Create the wind { m_wind = new hkpPrevailingWind( hkVector4( 1.0f, 0.5f, 0.5f ) ); m_wind->addOscillation( hkVector4( 0.6f, 0.0f, 0.2f ), 5.0f, 1.0f, 0.75f); m_wind->addOscillation( hkVector4( 1.5f, 1.0f, 0.0f ), 13.0f); m_wind->addOscillation( hkVector4( 2.5f, 0.0f, 1.0f ), 31.0f, 2.0f ); // Let the wind update the oscillators. m_world->addWorldPostSimulationListener( m_wind ); } hkVector4 areaSize( x, y, z ); // Create the floor { hkpRigidBody* lowerFloor; hkVector4 fixedBoxSize( 15.0f , 0.5f , 15.0f ); hkpBoxShape* fixedBoxShape = new hkpBoxShape( fixedBoxSize , 0 ); hkpRigidBodyCinfo info; { info.m_shape = fixedBoxShape; info.m_motionType = hkpMotion::MOTION_FIXED; info.m_position.set(0.0f, -0.5f, 0.0f); } lowerFloor = new hkpRigidBody(info); m_world->addEntity(lowerFloor); lowerFloor->removeReference(); fixedBoxShape->removeReference(); } createWindmill ( m_world, m_wind, hkVector4( -4.0f, 0.0f, 2.0f ) ); createPalmTree ( m_world, m_wind, hkVector4( 4.0f, 0.0f, -3.0f ) ); createPalmTree ( m_world, m_wind, hkVector4( 8.0f, 0.0f, 5.0f ) ); m_world->unlock(); }