本文整理汇总了C++中CAknAppUi类的典型用法代码示例。如果您正苦于以下问题:C++ CAknAppUi类的具体用法?C++ CAknAppUi怎么用?C++ CAknAppUi使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CAknAppUi类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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();
}
示例2: 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); );
示例3: 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);
});
示例4: 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);
}
);
示例5: 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);
}
);
示例6: TRAP_IGNORE
/*!
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 );
}
);
示例7: 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);
}
示例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);
)
示例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);
}
示例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);
}
);
示例11: TestWEMAddObserverL
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
// CTestSDKWinSerEventObserver::TestWEMAddObserverL
// -----------------------------------------------------------------------------
//
TInt CTestSDKWinSerEventObserver::TestWEMAddObserverL( CStifItemParser& /*aItem*/ )
{
CAknAppUi* appUi = static_cast<CAknAppUi*>( CCoeEnv::Static()->AppUi() );
CAknWsEventMonitor* monitor = appUi->EventMonitor();
CTestSDKEventObserver* observer = CTestSDKEventObserver::NewL();
CleanupStack::PushL( observer );
monitor->AddObserverL( observer );
CleanupStack::PopAndDestroy( observer );
return KErrNone;
}
示例12: defined
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
}
示例13: 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);
}
);
示例14: TRAPD
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);
);
示例15: HTML5VideoWidget
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());
}