本文整理汇总了C++中orientationChanged函数的典型用法代码示例。如果您正苦于以下问题:C++ orientationChanged函数的具体用法?C++ orientationChanged怎么用?C++ orientationChanged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了orientationChanged函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: QLabel
void BitcoinGUI::createToolBars()
{
/*
mainIcon = new QLabel (this);
//mainIcon->setPixmap(QPixmap(":images/gns-vertical"));
mainIcon->show();
mainToolbar = addToolBar(tr("Tabs toolbar"));
mainToolbar->setObjectName("main");
mainToolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
mainToolbar->addWidget(mainIcon);
*/
//mainIcon = new QLabel (this);
//mainIcon->show();
mainToolbar = addToolBar(tr("Tabs toolbar"));
mainToolbar->setObjectName("main");
mainToolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
mainToolbar->addAction(overviewAction);
mainToolbar->addAction(sendCoinsAction);
mainToolbar->addAction(receiveCoinsAction);
mainToolbar->addAction(historyAction);
mainToolbar->addAction(addressBookAction);
mainToolbar->setContextMenuPolicy(Qt::NoContextMenu);
secondaryToolbar = addToolBar(tr("Actions toolbar"));
secondaryToolbar->setObjectName("actions");
secondaryToolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
secondaryToolbar->addAction(exportAction);
secondaryToolbar->setContextMenuPolicy(Qt::NoContextMenu);
connect(mainToolbar, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(mainToolbarOrientation(Qt::Orientation)));
connect(secondaryToolbar, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(secondaryToolbarOrientation(Qt::Orientation)));
mainToolbarOrientation(mainToolbar->orientation());
secondaryToolbarOrientation(secondaryToolbar->orientation());
}
开发者ID:hicoindev,项目名称:hicoin,代码行数:35,代码来源:bitcoingui.cpp
示例2: defined
void Utility::onReadingChanged()
{
#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN)
QOrientationReading* reading = m_sensor->reading();
switch(reading->orientation())
{
case QOrientationReading::TopUp:
m_state = "Landscape";
emit orientationChanged();
break;
case QOrientationReading::TopDown:
m_state = "LandscapeInverted";
emit orientationChanged();
break;
case QOrientationReading::LeftUp:
m_state = "Portrait";
emit orientationChanged();
break;
case QOrientationReading::RightUp:
m_state = "PortraitInverted";
emit orientationChanged();
default:
break;
}
#endif
}
开发者ID:Slocan,项目名称:EZRil,代码行数:26,代码来源:utility.cpp
示例3: QLabel
void BitcoinGUI::createToolBars()
{
mainIcon = new QLabel (this);
mainIcon->setPixmap(QPixmap(":images/vertical"));
mainIcon->show();
mainToolbar = addToolBar(tr("Tabs toolbar"));
mainToolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
mainToolbar->addWidget(mainIcon);
mainToolbar->addAction(overviewAction);
mainToolbar->addAction(sendCoinsAction);
mainToolbar->addAction(receiveCoinsAction);
mainToolbar->addAction(historyAction);
mainToolbar->addAction(addressBookAction);
mainToolbar->addAction(messageAction);
mainToolbar->addAction(statisticsAction);
mainToolbar->addAction(blockAction);
secondaryToolbar = addToolBar(tr("Actions toolbar"));
secondaryToolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
secondaryToolbar->addAction(exportAction);
connect(mainToolbar, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(mainToolbarOrientation(Qt::Orientation)));
connect(secondaryToolbar, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(secondaryToolbarOrientation(Qt::Orientation)));
mainToolbarOrientation(mainToolbar->orientation());
secondaryToolbarOrientation(secondaryToolbar->orientation());
}
开发者ID:envycoin,项目名称:Envycoin,代码行数:27,代码来源:bitcoingui.cpp
示例4: HbScrollArea
/*!
\brief Constructor
Configures scroll area settings and resets internal stares of widget.
Gets the width of device.
\param parent The parent of scroll area widget
*/
CalenDayContentScrollArea::CalenDayContentScrollArea(QGraphicsItem *parent) :
HbScrollArea(parent), mPanDayDirection(ECalenPanNotSet), mIsMoving(false),
mMoveDirection(ECalenScrollNoDayChange), mDisallowedDirection(ECalenScrollNoDayChange)
{
#ifdef CALENDAYVIEW_PANNING_ENABLED
grabGesture(Qt::PanGesture);
ungrabGesture(Qt::SwipeGesture);
#else
grabGesture(Qt::SwipeGesture);
ungrabGesture(Qt::PanGesture);
#endif
// Get the width of content area and orientation of screen
mContentWidth = CalenDayUtils::instance()->contentWidth();
mOrientation = CalenDayUtils::instance()->orientation();
// Fix the width of scroll area
setMinimumWidth(mContentWidth);
setMaximumWidth(mContentWidth);
// Connect to main window's orientationChanged SIGNAL to handle orientation
// switching
connect(CalenDayUtils::instance()->mainWindow(),
SIGNAL(orientationChanged(Qt::Orientation)), this,
SLOT(orientationChanged(Qt::Orientation)));
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:34,代码来源:calendaycontentscrollarea.cpp
示例5: OstTraceFunctionEntry0
/*!
Displays the to-do viewer and populates the to-do entry attributes.
\param entry Agenda entry from which attributes have to be read.
*/
void AgendaEventView::execute(AgendaEntry entry,
AgendaEventViewer::Actions action)
{
OstTraceFunctionEntry0( AGENDAEVENTVIEW_EXECUTE_ENTRY );
mOriginalAgendaEntry = entry;
mAgendaEntry = entry;
// For later reference
mParentId = mOwner->mAgendaUtil->parentEntry(mAgendaEntry).id();
// Add the viewer data reading from the agenda entry.
addViewerData();
// Remove unnecessary widget from event viewer.
removeWidget();
// Add the menu items to event viewer.
addMenuItem();
// Add the toolbar items to event viewer
addToolBarItem(action);
// Connect for the entry updation and addtion signal to refresh the view
// when the same is edited in editor.
connect(mOwner->mAgendaUtil, SIGNAL(entryUpdated(ulong)),
this, SLOT(handleEntryUpdation(ulong)));
connect(mOwner->mAgendaUtil, SIGNAL(entryAdded(ulong)),
this, SLOT(handleEntryUpdation(ulong)));
// Connect for entry deletion signal to close the event viewer.
connect(mOwner->mAgendaUtil, SIGNAL(entryDeleted(ulong)), this,
SLOT(handleEntryDeletion(ulong)));
// Add the view to the main window.
HbMainWindow *window = hbInstance->allMainWindows().first();
if (!window) {
// Might be some non-ui based app called us
// so create mainwindow now
mMainWindow = new HbMainWindow();
mMainWindow->addView(mViewer);
mMainWindow->setCurrentView(mViewer);
connect(mMainWindow,SIGNAL(orientationChanged(Qt::Orientation)),this,SLOT(changedOrientation(Qt::Orientation)));
} else {
window->addView(mViewer);
window->setCurrentView(mViewer);
connect(window,SIGNAL(orientationChanged(Qt::Orientation)),this,SLOT(changedOrientation(Qt::Orientation)));
}
// Add softkey after adding view on window
mBackAction = new HbAction(Hb::BackNaviAction);
mViewer->setNavigationAction(mBackAction);
connect(mBackAction, SIGNAL(triggered()), this, SLOT(close()));
OstTraceFunctionExit0( AGENDAEVENTVIEW_EXECUTE_EXIT );
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:63,代码来源:agendaeventview.cpp
示例6: QObject
HsGui::HsGui(QObject *parent):
QObject(parent),mImpl(new HsGuiImpl)
{
mImpl->mIdleView = 0;
mImpl->mIdleWidget = 0;
mImpl->mNavigationAction = 0;
mImpl->mPageChangeAnimation = 0;
mImpl->mPageCrawlingAnimation = 0;
mImpl->mWindow = hbInstance->allMainWindows().first();
connect(mImpl->mWindow, SIGNAL(orientationChanged(Qt::Orientation)),
SIGNAL(orientationChanged(Qt::Orientation)));
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:13,代码来源:hsgui_mock.cpp
示例7: QOrientationSensor
void ScreenProvider::setRotate(bool value)
{
if(value) {
orientationSensor_ = new QOrientationSensor(this);
connect(orientationSensor_, SIGNAL(readingChanged()), this, SLOT(orientationChanged()));
orientationSensor_->start();
} else {
orientationSensor_->stop();
disconnect(orientationSensor_, SIGNAL(readingChanged()), this, SLOT(orientationChanged()));
delete orientationSensor_;
orientationSensor_ = 0;
orientation_ = QOrientationReading::TopUp;
}
}
开发者ID:kimmoli,项目名称:SailCast,代码行数:14,代码来源:screenprovider.cpp
示例8: QMainWindow
PmChart::PmChart() : QMainWindow(NULL)
{
my.dialogsSetup = false;
setIconSize(QSize(22, 22));
setupUi(this);
my.statusBar = new StatusBar;
setStatusBar(my.statusBar);
connect(my.statusBar->timeFrame(), SIGNAL(clicked()),
this, SLOT(editSamples()));
connect(my.statusBar->timeButton(), SIGNAL(clicked()),
this, SLOT(optionsShowTimeControl()));
my.timeAxisRightAlign = toolBar->height();
toolBar->setAllowedAreas(Qt::RightToolBarArea | Qt::TopToolBarArea);
connect(toolBar, SIGNAL(orientationChanged(Qt::Orientation)),
this, SLOT(updateToolbarOrientation(Qt::Orientation)));
updateToolbarLocation();
setupEnabledActionsList();
if (!globalSettings.initialToolbar && !outfile)
toolBar->hide();
toolbarAction->setChecked(true);
my.toolbarHidden = !globalSettings.initialToolbar;
my.consoleHidden = true;
if (!pmDebug)
consoleAction->setVisible(false);
consoleAction->setChecked(false);
if (outfile)
QTimer::singleShot(0, this, SLOT(exportFile()));
else
QTimer::singleShot(PmChart::defaultTimeout(), this, SLOT(timeout()));
}
开发者ID:felipebetancur,项目名称:pcp,代码行数:35,代码来源:pmchart.cpp
示例9: QDialog
TravelInfoDialog::TravelInfoDialog(Travel *travel, QWidget *parent) :
QDialog(parent),
ui(new Ui::TravelInfoDialog)
{
ui->setupUi(this);
#ifdef Q_WS_MAEMO_5
setAttribute(Qt::WA_Maemo5AutoOrientation, true);
setAttribute(Qt::WA_Maemo5StackedWindow);
#endif
#ifdef Q_OS_SYMBIAN
// We need to add a back button
QAction *backSoftKeyAction = new QAction(tr("Back"), this);
backSoftKeyAction->setSoftKeyRole(QAction::NegativeSoftKey);
connect(backSoftKeyAction,SIGNAL(triggered()),SLOT(close())); // when the back button is pressed, just close this window
addAction(backSoftKeyAction);
#endif
ui->tblResults->setItemDelegate(new TravelStageListDelegate(this, this));
ui->tblResults->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
ui->tblResults->setModel(new TravelStageListModel(this, travel->travelStages));
ui->tblResults->resizeRowsToContents();
ui->tblResults->setFixedHeight(ui->tblResults->verticalHeader()->length() + 60);
connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(orientationChanged()));
orientationChanged(); // call this just in case we're in portrait mode from before
}
开发者ID:dragly,项目名称:trafikanten-maemo,代码行数:27,代码来源:travelinfodialog.cpp
示例10: QDialog
QgsLayoutAddPagesDialog::QgsLayoutAddPagesDialog( QWidget *parent, Qt::WindowFlags flags )
: QDialog( parent, flags )
{
setupUi( this );
mPageOrientationComboBox->addItem( tr( "Portrait" ), QgsLayoutItemPage::Portrait );
mPageOrientationComboBox->addItem( tr( "Landscape" ), QgsLayoutItemPage::Landscape );
mPageOrientationComboBox->setCurrentIndex( 1 );
const auto constEntries = QgsApplication::pageSizeRegistry()->entries();
for ( const QgsPageSize &size : constEntries )
{
mPageSizeComboBox->addItem( size.displayName, size.name );
}
mPageSizeComboBox->addItem( tr( "Custom" ) );
mPageSizeComboBox->setCurrentIndex( mPageSizeComboBox->findData( QStringLiteral( "A4" ) ) );
pageSizeChanged( mPageSizeComboBox->currentIndex() );
orientationChanged( 1 );
mSizeUnitsComboBox->linkToWidget( mWidthSpin );
mSizeUnitsComboBox->linkToWidget( mHeightSpin );
mLockAspectRatio->setWidthSpinBox( mWidthSpin );
mLockAspectRatio->setHeightSpinBox( mHeightSpin );
connect( mPositionComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsLayoutAddPagesDialog::positionChanged );
mExistingPageSpinBox->setEnabled( false );
connect( mPageSizeComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsLayoutAddPagesDialog::pageSizeChanged );
connect( mPageOrientationComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsLayoutAddPagesDialog::orientationChanged );
connect( mWidthSpin, static_cast< void ( QDoubleSpinBox::* )( double )>( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutAddPagesDialog::setToCustomSize );
connect( mHeightSpin, static_cast< void ( QDoubleSpinBox::* )( double )>( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutAddPagesDialog::setToCustomSize );
}
开发者ID:alexbruy,项目名称:QGIS,代码行数:34,代码来源:qgslayoutaddpagesdialog.cpp
示例11: codeChanged
void LatexDocument::setOrientation(Orientation o)
{
_orientation = o;
/// @todo wording
emit codeChanged();
emit orientationChanged();
}
开发者ID:featureNull,项目名称:QMLaTex,代码行数:7,代码来源:LatexDocument.cpp
示例12: OstTraceFunctionEntry1
/*!
Loads the page with all the widgets
@return HbWidget* Returns the view widget
*/
HbWidget* WpsPageStepFour::initializePage()
{
OstTraceFunctionEntry1(WPSPAGESTEPFOUR_INITIALIZEPAGE_ENTRY, this);
if (!mWidget) {
bool ok;
mLoader = new HbDocumentLoader(mWizard->mainWindow());
mLoader->load(":/docml/occ_wps_04.docml", &ok);
Q_ASSERT(ok);
// Initialize orientation
loadDocmlSection(mWizard->mainWindow()->orientation());
mWidget = qobject_cast<HbWidget*> (mLoader->findWidget("occ_wps_04"));
Q_ASSERT(mWidget);
bool connectOk = connect(
mWizard->mainWindow(),
SIGNAL(orientationChanged(Qt::Orientation)),
this,
SLOT(loadDocmlSection(Qt::Orientation)));
Q_ASSERT(connectOk);
}
OstTraceFunctionExit1(WPSPAGESTEPFOUR_INITIALIZEPAGE_EXIT, this);
return mWidget;
}
开发者ID:gvsurenderreddy,项目名称:symbiandump-mw4,代码行数:35,代码来源:wpswizardstepfour.cpp
示例13: connect
void CntFavoritesView::activate( const CntViewParameters aArgs )
{
if (mView->navigationAction() != mSoftkey)
mView->setNavigationAction(mSoftkey);
HbMainWindow* window = mView->mainWindow();
connect(window, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(setOrientation(Qt::Orientation)));
setOrientation(window->orientation());
mContact = new QContact(aArgs.value(ESelectedGroupContact).value<QContact>());
mViewManager = &mEngine->viewManager();
HbPushButton *addButton = static_cast<HbPushButton*>(mDocumentLoader.findWidget(QString("cnt_button_add")));
connect(addButton, SIGNAL(clicked()), this, SLOT(openSelectionPopup()));
connect(addButton, SIGNAL(longPress(QPointF)), this, SLOT(openSelectionPopup()));
// If no contacts are present, then disable the button
QContactDetailFilter filter;
filter.setDetailDefinitionName(QContactType::DefinitionName, QContactType::FieldType);
filter.setValue(QLatin1String(QContactType::TypeContact));
QList<QContactLocalId> contactIds = getContactManager()->contactIds(filter);
if (contactIds.isEmpty())
{
addButton->setEnabled(false);
}
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:28,代码来源:cntfavoritesview.cpp
示例14: Q_UNUSED
bool BbGuiHelper::nativeEventFilter(const QByteArray &eventType, void *message, long *result)
{
Q_UNUSED(result);
Q_UNUSED(eventType);
bps_event_t * const event = static_cast<bps_event_t *>(message);
if (event && bps_event_get_domain(event) == navigator_get_domain()) {
const int code = bps_event_get_code(event);
if (code == NAVIGATOR_ORIENTATION) {
const int newOrientation = navigator_event_get_orientation_angle(event);
if (newOrientation != m_currentOrientation) {
m_currentOrientation = newOrientation;
emit orientationChanged();
}
} else if (code == NAVIGATOR_WINDOW_STATE) {
const bool appActive =
(navigator_event_get_window_state(event) == NAVIGATOR_WINDOW_FULLSCREEN);
if (m_applicationActive != appActive) {
m_applicationActive = appActive;
emit applicationActiveChanged();
}
}
}
return false;
}
开发者ID:RobinWuDev,项目名称:Qt,代码行数:26,代码来源:bbguihelper.cpp
示例15: OstTraceFunctionEntry0
/*!
See WlanWizardPage.
*/
HbWidget* EapWizardPageCertUser::initializePage()
{
OstTraceFunctionEntry0( EAPWIZARDPAGECERTUSER_INITIALIZEPAGE_ENTRY );
if (!mWidget) {
bool ok;
mDocumentLoader.reset(new HbDocumentLoader(mWizard->wizardHelper()->mainWindow()));
mDocumentLoader->load(":/docml/occ_eap_wizard_06.docml", &ok);
Q_ASSERT(ok);
loadDocmlSection(mWizard->wizardHelper()->mainWindow()->orientation());
mWidget = qobject_cast<HbWidget*> (mDocumentLoader->findWidget("occ_eap_wizard_06"));
Q_ASSERT(mWidget);
mCertList = qobject_cast<HbRadioButtonList*> (mDocumentLoader->findWidget("list"));
Q_ASSERT(mCertList);
mErrorLabel = qobject_cast<HbLabel*> (mDocumentLoader->findWidget("errorLabel"));
Q_ASSERT(mErrorLabel);
mErrorLabel->setPlainText(hbTrId("txt_occ_dialog_no_certificates_installed_wizard_c"));
ok = connect(
mWizard->wizardHelper()->mainWindow(),
SIGNAL(orientationChanged(Qt::Orientation)),
this,
SLOT(loadDocmlSection(Qt::Orientation)));
Q_ASSERT(ok);
ok = connect(
mCertList, SIGNAL(itemSelected(int)),
this, SLOT(itemSelected(int)));
Q_ASSERT(ok);
}
开发者ID:kuailexs,项目名称:symbiandump-mw4,代码行数:36,代码来源:eapwizardpagecertuser.cpp
示例16: QWidget
TabWidget::TabWidget(QWidget *parent)
: QWidget(parent)
, m_toolBar(new QToolBar(this))
, m_toolBarTree(new QToolBar(this))
, m_tabBar(NULL)
, m_tabTree(NULL)
, m_stackedWidget(NULL)
, m_hideTabBar(false)
{
// Set object name for tool bars so they can be saved with QMainWindow::saveState().
m_toolBar->setObjectName("toolBarTabBar");
m_toolBarTree->setObjectName("toolBarTabTree");
m_toolBar->setContextMenuPolicy(Qt::NoContextMenu);
m_toolBarTree->setContextMenuPolicy(Qt::NoContextMenu);
m_toolBar->installEventFilter(this);
connect( m_toolBar, SIGNAL(orientationChanged(Qt::Orientation)),
this, SLOT(onToolBarOrientationChanged(Qt::Orientation)) );
QBoxLayout *layout = new QBoxLayout(QBoxLayout::TopToBottom, this);
setLayout(layout);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
m_stackedWidget = new QStackedWidget(this);
layout->addWidget(m_stackedWidget);
createTabBar();
addTabAction(this, QKeySequence::PreviousChild, this, SLOT(previousTab()));
addTabAction(this, QKeySequence::NextChild, this, SLOT(nextTab()));
}
开发者ID:fade2gray,项目名称:CopyQ,代码行数:33,代码来源:tabwidget.cpp
示例17: orientationChanged
void Settings::setOrientation(Settings::Orientation orientation)
{
if (m_orientation != orientation) {
m_orientation = orientation;
emit orientationChanged();
}
}
开发者ID:nickdiego,项目名称:blue-barcode-reader,代码行数:8,代码来源:settings.cpp
示例18: orientationChanged
void QmlOrientationSensorReading::readingUpdate()
{
QOrientationReading::Orientation o = m_sensor->reading()->orientation();
if (m_orientation != o) {
m_orientation = o;
Q_EMIT orientationChanged();
}
}
开发者ID:RobinWuDev,项目名称:Qt,代码行数:8,代码来源:qmlorientationsensor.cpp
示例19: orientationChanged
void ScreenOutput::setOrientation(Qt::ScreenOrientation orientation)
{
if (m_orientation == orientation)
return;
m_orientation = orientation;
Q_EMIT orientationChanged();
}
开发者ID:hbarve1,项目名称:greenisland,代码行数:8,代码来源:screenconfiguration.cpp
示例20: QObject
ScreenData::ScreenData(QObject *parent) : QObject(parent)
{
getScreenResolution();
CalculateRatio();
QScreen *mScreen = QApplication::screens().at(0);
connect(mScreen, SIGNAL(orientationChanged(Qt::ScreenOrientation)), this, SLOT(Orientation(Qt::ScreenOrientation)));
}
开发者ID:peder2key,项目名称:Balancing-Robot,代码行数:8,代码来源:screendata.cpp
注:本文中的orientationChanged函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论