本文整理汇总了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());
}