当前位置: 首页>>代码示例>>C++>>正文


C++ CAknAppUi::Orientation方法代码示例

本文整理汇总了C++中CAknAppUi::Orientation方法的典型用法代码示例。如果您正苦于以下问题:C++ CAknAppUi::Orientation方法的具体用法?C++ CAknAppUi::Orientation怎么用?C++ CAknAppUi::Orientation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CAknAppUi的用法示例。


在下文中一共展示了CAknAppUi::Orientation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: connect

void HTML5FullScreenVideoHandler::enterFullScreen(QMediaPlayer *player)
{
    if (!player)
        return;

    m_videoWidget = new HTML5VideoWidget();
    if (!m_videoWidget)
        return;

    m_videoWidget->setDuration(player->duration() / 1000);

    CAknAppUi* appUi = dynamic_cast<CAknAppUi*>(CEikonEnv::Static()->AppUi());
    if (appUi) {
        m_savedOrientation = appUi->Orientation();
        appUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape);
    }

    m_mediaPlayer = player;
    connect(m_mediaPlayer, SIGNAL(positionChanged(qint64)), m_videoWidget, SLOT(onPositionChanged(qint64)));
    connect(m_mediaPlayer, SIGNAL(durationChanged(qint64)), m_videoWidget, SLOT(setDuration(qint64)));
    connect(m_mediaPlayer, SIGNAL(stateChanged(QMediaPlayer::State)), this, SLOT(onPlayerStateChanged(QMediaPlayer::State)));
    connect(m_mediaPlayer, SIGNAL(error(QMediaPlayer::Error)), this, SLOT(onPlayerError(QMediaPlayer::Error)));
    connect(m_mediaPlayer, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), this, SLOT(onMediaStatusChanged(QMediaPlayer::MediaStatus)));
    connect(m_videoWidget, SIGNAL(positionChangedByUser(qint64)), m_mediaPlayer, SLOT(setPosition(qint64)));
    connect(m_videoWidget, SIGNAL(closeClicked()), this, SIGNAL(fullScreenClosed()));
    connect(m_videoWidget, SIGNAL(muted(bool)), m_mediaPlayer, SLOT(setMuted(bool)));
    connect(m_videoWidget, SIGNAL(volumeChanged(int)), m_mediaPlayer, SLOT(setVolume(int)));
    connect(m_videoWidget, SIGNAL(pauseClicked()), m_mediaPlayer, SLOT(pause()));
    connect(m_videoWidget, SIGNAL(playClicked()), m_mediaPlayer, SLOT(play()));

    m_mediaPlayer->setVideoOutput(m_videoWidget);

    m_videoWidget->setVolume(m_mediaPlayer->volume());
    m_videoWidget->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
    m_videoWidget->showFullScreen();
    m_fullScreen = true;

    // Handle current Media Status and Media Player error.
    onMediaStatusChanged(m_mediaPlayer->mediaStatus());
    onPlayerError(m_mediaPlayer->error());
}
开发者ID:Afreeca,项目名称:qt,代码行数:41,代码来源:HTML5VideoPlugin.cpp


注:本文中的CAknAppUi::Orientation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。