本文整理汇总了C++中KHBox::setEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ KHBox::setEnabled方法的具体用法?C++ KHBox::setEnabled怎么用?C++ KHBox::setEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KHBox
的用法示例。
在下文中一共展示了KHBox::setEnabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addBackgroundPage
void KasPrefsDialog::addBackgroundPage()
{
KVBox *bgPage = new KVBox( this );
KPageWidgetItem *item = addPage( bgPage, i18n("Background") );
item->setItem( Icon( "background" ) );
transCheck = new QCheckBox( i18n("Trans&parent"), bgPage );
transCheck->setWhatsThis( i18n( "Enables pseudo-transparent mode." ) );
transCheck->setChecked( kasbar->isTransparent() );
connect( transCheck, SIGNAL( toggled(bool) ), kasbar, SLOT( setTransparent(bool) ) );
tintCheck = new QCheckBox( i18n("Enable t&int"), bgPage );
tintCheck->setWhatsThis(
i18n( "Enables tinting the background that shows through in transparent mode." ) );
tintCheck->setChecked( kasbar->hasTint() );
connect( tintCheck, SIGNAL( toggled(bool) ), kasbar, SLOT( setTint(bool) ) );
KHBox *tintColBox = new KHBox( bgPage );
tintColBox->setWhatsThis(
i18n( "Specifies the color used for the background tint." ) );
connect( tintCheck, SIGNAL( toggled(bool) ), tintColBox, SLOT( setEnabled(bool) ) );
tintColBox->setEnabled( kasbar->hasTint() );
QLabel *tintLabel = new QLabel( i18n("Tint &color:"), tintColBox );
tintButton = new KColorButton( kasbar->tintColor(), tintColBox );
connect( tintButton, SIGNAL( changed( const QColor & ) ),
kasbar, SLOT( setTintColor( const QColor & ) ) );
tintLabel->setBuddy( tintButton );
KHBox *tintAmtBox = new KHBox( bgPage );
tintAmtBox->setWhatsThis(
i18n( "Specifies the strength of the background tint." ) );
connect( tintCheck, SIGNAL( toggled(bool) ), tintAmtBox, SLOT( setEnabled(bool) ) );
tintAmtBox->setEnabled( kasbar->hasTint() );
QLabel *tintStrengthLabel = new QLabel( i18n("Tint &strength: "), tintAmtBox );
int percent = (int) (kasbar->tintAmount() * 100.0);
tintAmount = new QSlider( 0, 100, 1, percent, Qt::Horizontal, tintAmtBox );
tintAmount->setTracking( true );
connect( tintAmount, SIGNAL( valueChanged( int ) ),
kasbar, SLOT( setTintAmount( int ) ) );
tintStrengthLabel->setBuddy( tintAmount );
(void) new QWidget( bgPage, "spacer" );
(void) new QWidget( bgPage, "spacer" );
(void) new QWidget( bgPage, "spacer" );
}