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


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

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


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

示例1: lockViewMode

void MainWindow::lockViewMode()
{
    CAknAppUi *aknAppUi = dynamic_cast<CAknAppUi *>(CEikonEnv::Static()->AppUi());

    if (!aknAppUi)
      return;

    if (m_isPortrait)
        aknAppUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait);
    else
        aknAppUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape);
}
开发者ID:jordonwu,项目名称:qtquick_demo,代码行数:12,代码来源:mainwindow.cpp

示例2: main

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

#ifdef Q_OS_SYMBIAN
    // Lock S60 orientation
    // Req: LIBS += -lcone -leikcore -lavkon avkon cone eiksrv
    CAknAppUi* appUi = dynamic_cast<CAknAppUi*>(CEikonEnv::Static()->AppUi());
    if(appUi)
    {
        QT_TRAP_THROWING(appUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape))
    }
#endif

    app.setApplicationName("ChatMX");
    app.setApplicationVersion("1.0.0");

    QtChatMX window;

#if defined(Q_WS_S60)
    window.showFullScreen();
#elif defined(Q_WS_SIMULATOR)
    window.showFullScreen();
#else
	window.show();
#endif

    return app.exec();
}
开发者ID:chall3ng3r,项目名称:ChatMXQt,代码行数:29,代码来源:main.cpp

示例3: main

int main(int argc, char **argv)
{
    QApplication app(argc, argv);

#ifdef Q_OS_SYMBIAN
    // lock portrait mode for symbian
    CAknAppUi *akn = dynamic_cast<CAknAppUi*>(CEikonEnv::Static()->AppUi());
    TRAPD(error, if (akn) akn->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape); );
开发者ID:jordonwu,项目名称:qtquick_demo,代码行数:8,代码来源:main.cpp

示例4: main

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    // Lock orientation in Symbian
#ifdef Q_OS_SYMBIAN
    CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
    TRAP_IGNORE(if (appUi) {
        appUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape);
    });
开发者ID:bharath1097,项目名称:bullet-dice,代码行数:10,代码来源:main.cpp

示例5: main

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
    TRAP_IGNORE(
        if (appUi)
        {
            appUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape);
        }
    );
开发者ID:rhelmus,项目名称:ar-rover5,代码行数:11,代码来源:main.cpp

示例6: main

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    // Lock S60 orientation
#ifdef Q_OS_SYMBIAN
    CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
    TRAPD(error, 
    if (appUi) {
        appUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape);
    }
    );
开发者ID:0312birdzhang,项目名称:QtQuicksand,代码行数:12,代码来源:main.cpp

示例7: load

/*!
  Loads splash screen, also connects the splash screens hidden signal to this
  objects destroySplashScreen slot, so when the splash screen has animated
  away it will be destroyed.
*/
void MainLoader::load()
{
#ifdef Q_OS_SYMBIAN
    // Lock orientation in Symbian for the splash screen
    CAknAppUi* appUi = dynamic_cast<CAknAppUi*>( CEikonEnv::Static()->AppUi() );

    TRAP_IGNORE(
        if ( appUi )
            {
            appUi->SetOrientationL( CAknAppUi::EAppUiOrientationPortrait );
            }
    );
开发者ID:ltomuta,项目名称:restful-places-around,代码行数:17,代码来源:mainloader.cpp

示例8: main

QTM_USE_NAMESPACE


int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

#ifdef Q_OS_SYMBIAN
    // Lock orientation to landscape in Symbian
    CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
    TRAP_IGNORE(
        if (appUi)
            appUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape);
    )
开发者ID:AtlantisCD9,项目名称:Qt,代码行数:14,代码来源:main.cpp

示例9:

void HTML5FullScreenVideoHandler::exitFullScreen()
{
    m_videoWidget->hide();
    m_mediaPlayer->disconnect(m_videoWidget);
    m_mediaPlayer->disconnect(this);
    delete m_videoWidget;
    m_videoWidget = 0;
    if (m_mediaPlayer->state() == QMediaPlayer::PlayingState)
        m_mediaPlayer->pause();
    m_fullScreen = false;

    CAknAppUi* appUi = dynamic_cast<CAknAppUi*>(CEikonEnv::Static()->AppUi());
    if (appUi) 
        appUi->SetOrientationL(m_savedOrientation);
}
开发者ID:Afreeca,项目名称:qt,代码行数:15,代码来源:HTML5VideoPlugin.cpp

示例10: main

int main(int argc, char *argv[])
{
    // NOTE: set this value before creating MyApplication instance
    // http://doc.trolltech.com/qapplication.html#setGraphicsSystem
    QApplication::setGraphicsSystem("raster"); // NOTE: Seems that raster have to be enabled with Nokia N8

    MyApplication a(argc, argv);

    // Lock Symbian orientation
#ifdef Q_OS_SYMBIAN
    CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
    TRAP_IGNORE(
    if (appUi) {
        appUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape);
    }
    );
开发者ID:bailsoftware,项目名称:qt-embedded,代码行数:16,代码来源:main.cpp

示例11: setOrientation

void QmlApplicationViewer::setOrientation(Orientation orientation)
{
#ifdef Q_OS_SYMBIAN
    if (orientation != Auto) {
#if defined(ORIENTATIONLOCK)
        const CAknAppUiBase::TAppUiOrientation uiOrientation =
                (orientation == LockPortrait) ? CAknAppUi::EAppUiOrientationPortrait
                    : CAknAppUi::EAppUiOrientationLandscape;
        CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
        TRAPD(error,
            if (appUi)
                appUi->SetOrientationL(uiOrientation);
        );
#else // ORIENTATIONLOCK
        qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation.");
#endif // ORIENTATIONLOCK
    }
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:17,代码来源:qmlapplicationviewer.cpp

示例12: main

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

#ifndef Q_OS_SYMBIAN_1
    app.setApplicationVersion(APP_VERSION);
#endif

    // Lock orientation in Symbian
#ifdef Q_OS_SYMBIAN
        CAknAppUi* appUi =
                dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
        TRAP_IGNORE(
            if (appUi) {
                appUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait);
            }
        );
开发者ID:AnadoluPanteri,项目名称:airswype,代码行数:17,代码来源:main.cpp

示例13: initializePlatform

QTM_USE_NAMESPACE
#endif

#ifdef Q_OS_SYMBIAN
#include <eikenv.h>
#include <eikappui.h>
#include <aknenv.h>
#include <aknappui.h>
#endif

void ApplicationItemPrivate::initializePlatform()
{
    //QCoreApplication::setAttribute(Qt::AA_S60DontConstructApplicationPanes);
    CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
    TRAPD(error,
          if (appUi)
          appUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait);
         );
开发者ID:zsombi,项目名称:kuemelappz,代码行数:18,代码来源:applicationitem_p_symbian.cpp

示例14: 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

示例15: main

QTM_USE_NAMESPACE

#ifdef Q_OS_SYMBIAN
    // Lock orientation in Symbian
    #include <eikenv.h>
    #include <eikappui.h>
    #include <aknenv.h>
    #include <aknappui.h>
#endif

#include "screensize.h"

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    //*****sensor orientation
    #ifdef Q_OS_SYMBIAN
        // Lock orientation in Symbian
        CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
        TRAP_IGNORE( if(appUi) { appUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait); } );
开发者ID:Leafarx,项目名称:Chavita,代码行数:21,代码来源:main.cpp


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