void FormStyle::ChIndex( int i ) { if ( !allowChColor ) return; ui.colorE->setText( ui.colorsB->itemText( i ) ); SetCustomPalette(); SetColor(); }
void FormStyle::applyAll() { allowChColor = false; LoadColorList(); if ( ui.colorsB->count() == 0 ) ui.scB->setChecked(true); SetCustomPalette(); SetStyle(0); allowChColor = true; SetColor(); }
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(); }
/** 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 }