本文整理汇总了C++中QRadioButton::setCheckable方法的典型用法代码示例。如果您正苦于以下问题:C++ QRadioButton::setCheckable方法的具体用法?C++ QRadioButton::setCheckable怎么用?C++ QRadioButton::setCheckable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QRadioButton
的用法示例。
在下文中一共展示了QRadioButton::setCheckable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QWidget
RaspiLcdWidget::RaspiLcdWidget( QWidget *parent )
: QWidget(parent)
, m_image(128,64,QImage::Format_Mono)
, m_keyPressed(eKeyNone)
{
QRgb value;
value = m_background.rgb();
m_image.setColor(0, value);
value = QColor(Qt::black).rgb();
m_image.setColor(1, value);
QRadioButton *butA = new QRadioButton(this);
butA->move(24+marginx,160+marginy);
butA->setCheckable(false);
registerKey(butA,eKeyA);
QRadioButton *butB = new QRadioButton(this);
butB->move(120+marginx,160+marginy);
butB->setCheckable(false);
registerKey(butB,eKeyB);
QRadioButton *butC = new QRadioButton(this);
butC->move(216+marginx,160+marginy);
butC->setCheckable(false);
registerKey(butC,eKeyC);
QRadioButton *butD = new QRadioButton(this);
butD->move(300+marginx,160+marginy);
butD->setCheckable(false);
registerKey(butD,eKeyD);
QRadioButton *butUp = new QRadioButton(this);
butUp->move(300+marginx,10+marginy);
butUp->setCheckable(false);
registerKey(butUp,eKeyUp);
QRadioButton *butDown = new QRadioButton(this);
butDown->move(300+marginx,96+marginy);
butDown->setCheckable(false);
registerKey(butDown,eKeyDown);
resize(350+2*marginx,200+2*marginy);
startTimer(100);
}
示例2: d
StrokeDocker::StrokeDocker()
: d( new Private() )
{
setWindowTitle( i18n( "Stroke Properties" ) );
QWidget *mainWidget = new QWidget( this );
QGridLayout *mainLayout = new QGridLayout( mainWidget );
QLabel * styleLabel = new QLabel( i18n( "Style:" ), mainWidget );
mainLayout->addWidget( styleLabel, 0, 0 );
d->lineStyle = new KoLineStyleSelector( mainWidget );
mainLayout->addWidget( d->lineStyle, 0, 1, 1, 3 );
connect( d->lineStyle, SIGNAL(currentIndexChanged( int ) ), this, SLOT( styleChanged() ) );
QLabel* widthLabel = new QLabel( i18n ( "Width:" ), mainWidget );
mainLayout->addWidget( widthLabel, 1, 0 );
// set min/max/step and value in points, then set actual unit
d->setLineWidth = new KoUnitDoubleSpinBox( mainWidget );
d->setLineWidth->setMinMaxStep( 0.0, 1000.0, 0.5 );
d->setLineWidth->setDecimals( 2 );
d->setLineWidth->setUnit( KoUnit(KoUnit::Point) );
d->setLineWidth->setToolTip( i18n( "Set line width of actual selection" ) );
mainLayout->addWidget( d->setLineWidth, 1, 1, 1, 3 );
connect( d->setLineWidth, SIGNAL( valueChangedPt( qreal ) ), this, SLOT( widthChanged() ) );
QLabel* capLabel = new QLabel( i18n ( "Cap:" ), mainWidget );
mainLayout->addWidget( capLabel, 2, 0 );
d->capGroup = new QButtonGroup( mainWidget );
d->capGroup->setExclusive( true );
d->capGroup->setExclusive( true );
QRadioButton *button = 0;
button = new QRadioButton( mainWidget );
button->setIcon( SmallIcon( "cap_butt" ) );
button->setCheckable( true );
button->setToolTip( i18n( "Butt cap" ) );
d->capGroup->addButton( button, Qt::FlatCap );
mainLayout->addWidget( button, 2, 1 );
button = new QRadioButton( mainWidget );
button->setIcon( SmallIcon( "cap_round" ) );
button->setCheckable( true );
button->setToolTip( i18n( "Round cap" ) );
d->capGroup->addButton( button, Qt::RoundCap );
mainLayout->addWidget( button, 2, 2 );
button = new QRadioButton( mainWidget );
button->setIcon( SmallIcon( "cap_square" ) );
button->setCheckable( true );
button->setToolTip( i18n( "Square cap" ) );
d->capGroup->addButton( button, Qt::SquareCap );
mainLayout->addWidget( button, 2, 3 );
connect( d->capGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( slotCapChanged( int ) ) );
QLabel* joinLabel = new QLabel( i18n ( "Join:" ), mainWidget );
mainLayout->addWidget( joinLabel, 3, 0 );
d->joinGroup = new QButtonGroup( mainWidget );
d->joinGroup->setExclusive( true );
button = new QRadioButton( mainWidget );
button->setIcon( SmallIcon( "join_miter" ) );
button->setCheckable( true );
button->setToolTip( i18n( "Miter join" ) );
d->joinGroup->addButton( button, Qt::MiterJoin );
mainLayout->addWidget( button, 3, 1 );
button = new QRadioButton( mainWidget );
button->setIcon( SmallIcon( "join_round" ) );
button->setCheckable( true );
button->setToolTip( i18n( "Round join" ) );
d->joinGroup->addButton( button, Qt::RoundJoin );
mainLayout->addWidget( button, 3, 2 );
button = new QRadioButton( mainWidget );
button->setIcon( SmallIcon( "join_bevel" ) );
button->setCheckable( true );
button->setToolTip( i18n( "Bevel join" ) );
d->joinGroup->addButton( button, Qt::BevelJoin );
mainLayout->addWidget( button, 3, 3 );
connect( d->joinGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( slotJoinChanged( int ) ) );
QLabel* miterLabel = new QLabel( i18n ( "Miter limit:" ), mainWidget );
mainLayout->addWidget( miterLabel, 4, 0 );
// set min/max/step and value in points, then set actual unit
d->miterLimit = new KoUnitDoubleSpinBox( mainWidget );
d->miterLimit->setMinMaxStep( 0.0, 1000.0, 0.5 );
d->miterLimit->setDecimals( 2 );
d->miterLimit->setUnit( KoUnit(KoUnit::Point) );
d->miterLimit->setToolTip( i18n( "Set miter limit" ) );
mainLayout->addWidget( d->miterLimit, 4, 1, 1, 3 );
connect( d->miterLimit, SIGNAL( valueChangedPt( qreal ) ), this, SLOT( miterLimitChanged() ) );
mainLayout->setRowStretch( 5, 1 );
mainLayout->setColumnStretch( 1, 1 );
mainLayout->setColumnStretch( 2, 1 );
//.........这里部分代码省略.........