本文整理汇总了C++中QStackedWidget::setFont方法的典型用法代码示例。如果您正苦于以下问题:C++ QStackedWidget::setFont方法的具体用法?C++ QStackedWidget::setFont怎么用?C++ QStackedWidget::setFont使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QStackedWidget
的用法示例。
在下文中一共展示了QStackedWidget::setFont方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QGroupBox
/*
* Exposure bracketing page.
*
* Purpose:
* 1. selecting best shot, and
* 2. increase dynamic range (HDR).
*
* For both of these purposes, it is best to maintain a fixed aperture,
* focal distance, focal length, ISO setting, subject distance, and white
* balance. That means Manual mode or Av mode, and no auto ISO, no auto
* white balance, no auto focus (or turn off auto focus once focus has
* been achieved when setting up the shot) and use a tripod if available
* (turn off image stabilization).
*
* For purpose 2, want to take the frames as quickly as the exposure can
* be adjusted between images (to minimize movement of the subject).
* For static subjects, the exposure is usually adjusted by altering the
* shutter speed. For dynamic subjects, the exposure can be adjusted by
* altering the ISO (not yet implemented, but if shooting RAW this can
* be done in post-processing).
*/
QWidget *
MultiShot::getExposureBracketingPage()
{
/*
* Settings.
*/
const int MAX_Frames = 7; // range is 1 .. 2*MAX + 1
QLabel *eFramesLabel = new QLabel( tr("Images:" ) );
eFramesLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
QStackedWidget *eFramesDisplay = new QStackedWidget();
eFramesDisplay->setFont( QFont("Calibri", 12) );
QLabel *eFramePage[MAX_Frames+1];
for( int i = 0; i <= MAX_Frames; i++ ) {
eFramePage[i] = new QLabel( eFramesDisplay );
eFramePage[i]->setText( QString::number((2*i)+1) );
eFramePage[i]->setAlignment( Qt::AlignLeft );
eFramesDisplay->insertWidget( i, eFramePage[i] );
}
eFramesDisplay->setCurrentIndex( 0 );
eFrames = new QSlider();
eFrames->setCursor( QCursor(Qt::SizeHorCursor) );
eFrames->setValue( 0 );
eFrames->setMinimum( 0 );
eFrames->setMaximum( MAX_Frames );
eFrames->setPageStep( 1 );
eFrames->setOrientation( Qt::Horizontal );
eFrames->setTickPosition( QSlider::TicksBelow );
eFrames->setTickInterval( 1 );
QObject::connect(
eFrames, SIGNAL(valueChanged(int)),
eFramesDisplay, SLOT(setCurrentIndex(int)));
QLabel *eIncrementLabel = new QLabel( tr("Increment:" ) );
eIncrementLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
QStackedWidget *eIncrementDisplay = new QStackedWidget();
eIncrementDisplay->setFont( QFont("Calibri", 12) );
for( int i = 0; i < 10; i++ ) {
eIncrementPage[i] = new QLabel( eIncrementDisplay );
eIncrementPage[i]->setAlignment( Qt::AlignLeft );
eIncrementDisplay->insertWidget( i, eIncrementPage[i] );
}
eIncrementDisplay->setCurrentIndex( 0 );
eIncrement = new QSlider();
eIncrement->setCursor( QCursor(Qt::SizeHorCursor) );
eIncrement->setValue( 0 );
eIncrement->setMinimum( 0 );
eIncrement->setPageStep( 1 );
eIncrement->setOrientation( Qt::Horizontal );
eIncrement->setTickPosition( QSlider::TicksBelow );
eIncrement->setTickInterval( 1 );
setIncrementPages();
QObject::connect(
eIncrement, SIGNAL(valueChanged(int)),
eIncrementDisplay, SLOT(setCurrentIndex(int)));
//QPushButton *autoButton = new QPushButton( tr("Auto") );
eCompensation = new ExposureComp( camera, 5 );
QObject::connect(
eCompensation, SIGNAL(propertyChanged(int,int)),
this, SIGNAL(propertyChanged(int,int)));
QObject::connect(
eFrames, SIGNAL(valueChanged(int)),
eCompensation, SLOT(updateExposures(int)));
QObject::connect(
eIncrement, SIGNAL(valueChanged(int)),
eCompensation, SLOT(updateIncrement(int)));
/*
* Final layout.
*/
QGridLayout *settingsLayout = new QGridLayout();
//.........这里部分代码省略.........