当前位置: 首页>>代码示例>>C++>>正文


C++ KHBox::setWhatsThis方法代码示例

本文整理汇总了C++中KHBox::setWhatsThis方法的典型用法代码示例。如果您正苦于以下问题:C++ KHBox::setWhatsThis方法的具体用法?C++ KHBox::setWhatsThis怎么用?C++ KHBox::setWhatsThis使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KHBox的用法示例。


在下文中一共展示了KHBox::setWhatsThis方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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" );
}
开发者ID:jschwartzenberg,项目名称:kicker,代码行数:50,代码来源:kasprefsdlg.cpp

示例2: addThumbsPage

void KasPrefsDialog::addThumbsPage()
{
   KVBox *thumbsPage = new KVBox( this );

   KPageWidgetItem *item = addPage( thumbsPage, i18n("Thumbnails") );
   item->setIcon( Icon( "icons" ) );

   thumbsCheck = new QCheckBox( i18n("Enable thu&mbnails"), thumbsPage );
   thumbsCheck->setWhatsThis(
		    i18n( "Enables the display of a thumbnailed image of the window when "
			  "you move your mouse pointer over an item. The thumbnails are "
			  "approximate, and may not reflect the current window contents.\n\n"
			  "Using this option on a slow machine may cause performance problems." ) );
   thumbsCheck->setChecked( kasbar->thumbnailsEnabled() );
   connect( thumbsCheck, SIGNAL( toggled(bool) ), kasbar, SLOT( setThumbnailsEnabled(bool) ) );

   embedThumbsCheck = new QCheckBox( i18n("&Embed thumbnails"), thumbsPage );
   embedThumbsCheck->setChecked( kasbar->embedThumbnails() );
   connect( embedThumbsCheck, SIGNAL( toggled(bool) ), kasbar, SLOT( setEmbedThumbnails(bool) ) );

   KHBox *thumbSizeBox = new KHBox( thumbsPage );
   thumbSizeBox->setWhatsThis(
		    i18n( "Controls the size of the window thumbnails. Using large sizes may "
			  "cause performance problems." ) );
   QLabel *thumbSizeLabel = new QLabel( i18n("Thumbnail &size: "), thumbSizeBox );
   int percent = (int) (kasbar->thumbnailSize() * 100.0);
   thumbSizeSlider = new QSlider( 0, 100, 1, percent, Qt::Horizontal, thumbSizeBox );
   connect( thumbSizeSlider, SIGNAL( valueChanged( int ) ),
	    kasbar, SLOT( setThumbnailSize( int ) ) );
   thumbSizeLabel->setBuddy( thumbSizeSlider );

   KHBox *thumbUpdateBox = new KHBox( thumbsPage );
   thumbUpdateBox->setSpacing( spacingHint() );
   thumbUpdateBox->setWhatsThis(
		    i18n( "Controls the frequency with which the thumbnail of the active window "
			  "is updated. If the value is 0 then no updates will be performed.\n\n"
			  "Using small values may cause performance problems on slow machines." ) );
   QLabel *thumbUpdateLabel = new QLabel( i18n("&Update thumbnail every: "), thumbUpdateBox );
   thumbUpdateSpin = new QSpinBox( 0, 1000, 1, thumbUpdateBox );
   thumbUpdateSpin->setValue( kasbar->thumbnailUpdateDelay() );
   connect( thumbUpdateSpin, SIGNAL( valueChanged( int ) ),
   	    kasbar, SLOT( setThumbnailUpdateDelay( int ) ) );
   (void) new QLabel( i18n("seconds"), thumbUpdateBox );
   thumbUpdateLabel->setBuddy( thumbUpdateSpin );

   (void) new QWidget( thumbsPage, "spacer" );
   (void) new QWidget( thumbsPage, "spacer" );
   (void) new QWidget( thumbsPage, "spacer" );
}
开发者ID:jschwartzenberg,项目名称:kicker,代码行数:49,代码来源:kasprefsdlg.cpp

示例3: QFrame

TimeSelector::TimeSelector(const QString& selectText, const QString& postfix, const QString& selectWhatsThis,
                           const QString& valueWhatsThis, bool allowHourMinute, QWidget* parent)
	: QFrame(parent),
	  mLabel(0),
	  mReadOnly(false)
{
	QHBoxLayout* layout = new QHBoxLayout(this);
	layout->setMargin(0);
	layout->setSpacing(KDialog::spacingHint());
	mSelect = new CheckBox(selectText, this);
	mSelect->setFixedSize(mSelect->sizeHint());
	connect(mSelect, SIGNAL(toggled(bool)), SLOT(selectToggled(bool)));
	mSelect->setWhatsThis(selectWhatsThis);
	layout->addWidget(mSelect);

	KHBox* box = new KHBox(this);    // to group widgets for QWhatsThis text
	box->setSpacing(KDialog::spacingHint());
	layout->addWidget(box);
	mPeriod = new TimePeriod(allowHourMinute, box);
	mPeriod->setFixedSize(mPeriod->sizeHint());
	mPeriod->setSelectOnStep(false);
	connect(mPeriod, SIGNAL(valueChanged(const KCal::Duration&)), SLOT(periodChanged(const KCal::Duration&)));
	mSelect->setFocusWidget(mPeriod);
	mPeriod->setEnabled(false);

	if (!postfix.isEmpty())
	{
		mLabel = new QLabel(postfix, box);
		mLabel->setEnabled(false);
	}
	box->setWhatsThis(valueWhatsThis);
	layout->addStretch();
}
开发者ID:akhuettel,项目名称:kdepim-noakonadi,代码行数:33,代码来源:timeselector.cpp

示例4: QWidget

FontColourChooser::FontColourChooser(QWidget *parent,
          const QStringList &fontList, const QString& frameLabel, bool fg, bool defaultFont, int visibleListSize)
	: QWidget(parent),
	  mFgColourButton(0),
	  mReadOnly(false)
{
	QVBoxLayout* topLayout = new QVBoxLayout(this);
	topLayout->setMargin(0);
	topLayout->setSpacing(KDialog::spacingHint());
	QWidget* page = this;
	if (!frameLabel.isNull())
	{
		page = new QGroupBox(frameLabel, this);
		topLayout->addWidget(page);
		topLayout = new QVBoxLayout(page);
		topLayout->setMargin(KDialog::marginHint());
		topLayout->setSpacing(KDialog::spacingHint());
	}
	QHBoxLayout* hlayout = new QHBoxLayout();
	hlayout->setMargin(0);
	topLayout->addLayout(hlayout);
	QVBoxLayout* colourLayout = new QVBoxLayout();
	colourLayout->setMargin(0);
	hlayout->addLayout(colourLayout);
	if (fg)
	{
		KHBox* box = new KHBox(page);    // to group widgets for QWhatsThis text
		box->setMargin(0);
		box->setSpacing(KDialog::spacingHint()/2);
		colourLayout->addWidget(box);

		QLabel* label = new QLabel(i18nc("@label:listbox", "Foreground color:"), box);
		box->setStretchFactor(new QWidget(box), 0);
		mFgColourButton = new ColourButton(box);
		connect(mFgColourButton, SIGNAL(changed(const QColor&)), SLOT(setSampleColour()));
		label->setBuddy(mFgColourButton);
		box->setWhatsThis(i18nc("@info:whatsthis", "Select the alarm message foreground color"));
	}

	KHBox* box = new KHBox(page);    // to group widgets for QWhatsThis text
	box->setMargin(0);
	box->setSpacing(KDialog::spacingHint()/2);
	colourLayout->addWidget(box);

	QLabel* label = new QLabel(i18nc("@label:listbox", "Background color:"), box);
	box->setStretchFactor(new QWidget(box), 0);
	mBgColourButton = new ColourButton(box);
	connect(mBgColourButton, SIGNAL(changed(const QColor&)), SLOT(setSampleColour()));
	label->setBuddy(mBgColourButton);
	box->setWhatsThis(i18nc("@info:whatsthis", "Select the alarm message background color"));
	hlayout->addStretch();

	if (defaultFont)
	{
		QHBoxLayout* layout = new QHBoxLayout();
		layout->setMargin(0);
		topLayout->addLayout(layout);
		mDefaultFont = new CheckBox(i18nc("@option:check", "Use default font"), page);
		mDefaultFont->setMinimumSize(mDefaultFont->sizeHint());
		connect(mDefaultFont, SIGNAL(toggled(bool)), SLOT(slotDefaultFontToggled(bool)));
		mDefaultFont->setWhatsThis(i18nc("@info:whatsthis", "Check to use the default font current at the time the alarm is displayed."));
		layout->addWidget(mDefaultFont);
		layout->addWidget(new QWidget(page));    // left adjust the widget
	}
	else
		mDefaultFont = 0;

	mFontChooser = new KFontChooser(page, KFontChooser::DisplayFrame, fontList, visibleListSize);
	mFontChooser->installEventFilter(this);   // for read-only mode
	QList<QWidget*> kids = mFontChooser->findChildren<QWidget*>();
	for (int i = 0, end = kids.count();  i < end;  ++i)
		kids[i]->installEventFilter(this);
	topLayout->addWidget(mFontChooser);

	slotDefaultFontToggled(false);
}
开发者ID:akhuettel,项目名称:kdepim-noakonadi,代码行数:76,代码来源:fontcolour.cpp

示例5: addLookPage

void KasPrefsDialog::addLookPage()
{
   KVBox *lookPage = new KVBox( this );

   KPageWidgetItem *item = addPage( lookPage, i18n("Appearance") );
   item->setIcon( Icon( "appearance" ) );

   //
   // Item size
   //

   Q3Grid *itemSizeBox = new Q3Grid( 2, lookPage );
   itemSizeBox->setSpacing( spacingHint() );

   itemSizeBox->setWhatsThis(
		    i18n( "Specifies the size of the task items." ) );

   QLabel *itemSizeLabel = new QLabel( i18n("Si&ze:"), itemSizeBox );

   itemSizeCombo = new QComboBox( itemSizeBox );
   itemSizeCombo->insertItem( i18n( "Enormous" ) );
   itemSizeCombo->insertItem( i18n( "Huge" ) );
   itemSizeCombo->insertItem( i18n( "Large" ) );
   itemSizeCombo->insertItem( i18n( "Medium" ) );
   itemSizeCombo->insertItem( i18n( "Small" ) );
   itemSizeCombo->insertItem( i18n( "Custom" ) );

   itemSizeLabel->setBuddy( itemSizeCombo );

   connect( itemSizeCombo, SIGNAL( activated( int ) ),
	    kasbar, SLOT( setItemSize( int ) ) );
   connect( itemSizeCombo, SIGNAL( activated( int ) ), SLOT( itemSizeChanged( int ) ) );

   new QWidget( itemSizeBox );

   customSize = new QSpinBox( 5, 1000, 1, itemSizeBox );

   customSize->setValue( kasbar->itemExtent() );

   connect( customSize, SIGNAL( valueChanged( int ) ),
	    kasbar, SLOT( setItemExtent( int ) ) );
   connect( customSize, SIGNAL( valueChanged( int ) ),
	    kasbar, SLOT( customSizeChanged( int ) ) );

   int sz = kasbar->itemSize();
   itemSizeCombo->setCurrentItem( sz );
   customSize->setEnabled( sz == KasBar::Custom );

   //
   // Boxes per line
   //

   KHBox *maxBoxesBox = new KHBox( lookPage );
   maxBoxesBox->setWhatsThis(
		    i18n( "Specifies the maximum number of items that should be placed in a line "
			  "before starting a new row or column. If the value is 0 then all the "
			  "available space will be used." ) );
   QLabel *maxBoxesLabel = new QLabel( i18n("Bo&xes per line: "), maxBoxesBox );

   KConfig *conf = kasbar->config();
   if ( conf )
       conf->setGroup( "Layout" );
   maxBoxesSpin = new KIntSpinBox( 0, 50, 1,
				   conf ? conf->readEntry( "MaxBoxes", 0 ) : 11,
				   maxBoxesBox );
   connect( maxBoxesSpin, SIGNAL( valueChanged( int ) ), kasbar, SLOT( setMaxBoxes( int ) ) );
   maxBoxesLabel->setBuddy( maxBoxesSpin );

   //
   // Mode
   //

   detachedCheck = new QCheckBox( i18n("&Detach from screen edge"), lookPage );
   detachedCheck->setWhatsThis( i18n( "Detaches the bar from the screen edge and makes it draggable." ) );

   detachedCheck->setEnabled( !kasbar->isStandAlone() );
   detachedCheck->setChecked( kasbar->isDetached() );
   connect( detachedCheck, SIGNAL( toggled(bool) ), kasbar, SLOT( setDetached(bool) ) );

   (void) new QWidget( lookPage, "spacer" );
   (void) new QWidget( lookPage, "spacer" );
   (void) new QWidget( lookPage, "spacer" );
}
开发者ID:jschwartzenberg,项目名称:kicker,代码行数:83,代码来源:kasprefsdlg.cpp


注:本文中的KHBox::setWhatsThis方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。