Пример #1
0
void FormStyle::ChIndex( int i )
{
	if ( !allowChColor )
		return;
	ui.colorE->setText( ui.colorsB->itemText( i ) );
	SetCustomPalette();
	SetColor();
}
Пример #2
0
void FormStyle::applyAll()
{
	allowChColor = false;
	LoadColorList();
	if ( ui.colorsB->count() == 0 )
		ui.scB->setChecked(true);
	SetCustomPalette();
	SetStyle(0);
	allowChColor = true;
	SetColor();
}
Пример #3
0
void FormStyle::SetEnabled()
{
	bool tmpAllowChColor = allowChColor;
	allowChColor = false;
	if ( ui.ccB->isChecked() )
	{
		ui.groupBox->setEnabled(true);
		LoadColorList();
		SetCustomPalette();
		ui.mainWindowSets->setEnabled( ui.use2->isChecked() );
		ui.colorE->setText( ui.colorsB->currentText() );
	}
	else
	{
		ui.groupBox->setEnabled(false);
		applicationPalette = systemPalette;
		mainWindowPalette = systemPalette;
	}
	allowChColor = tmpAllowChColor;
	if ( allowChColor )
		SetColor();
	else if ( ui.scB->isChecked() )
		sliderButtonColor = qApp->palette().brush( QPalette::Button ).color();
}
Пример #4
0
/** Sets the device's palette to the specified palette.

Setting the palette is only possible if the device has a modifiable palette, 
which can be determined by calling PaletteAttributes().

The function provides a concrete implementation of the pure virtual
function CGraphicsDevice::SetPalette(). */
EXPORT_C void CFbsBitmapDevice::SetPalette(CPalette* aPalette)
	{
	SetCustomPalette(aPalette); // Have to ignore error for compatibility
	}