Deprecated--
svn path=/trunk/KDE/kdebase/workspace/; revision=512331
This commit is contained in:
parent
029becd298
commit
f327b7f032
9 changed files with 35 additions and 35 deletions
|
@ -1234,14 +1234,14 @@ void B2Button::drawButton(QPainter *p)
|
|||
} else {
|
||||
int type;
|
||||
if (client->isActive()) {
|
||||
if (isOn() || isDown())
|
||||
if (isChecked() || isDown())
|
||||
type = Down;
|
||||
else if (hover)
|
||||
type = Hover;
|
||||
else
|
||||
type = Norm;
|
||||
} else {
|
||||
if (isOn() || isDown())
|
||||
if (isChecked() || isDown())
|
||||
type = IDown;
|
||||
else if (hover)
|
||||
type = IHover;
|
||||
|
|
|
@ -590,19 +590,19 @@ void KDEDefaultButton::reset(unsigned long changed)
|
|||
setBitmap(iconify_bits);
|
||||
break;
|
||||
case MaxButton:
|
||||
setBitmap( isOn() ? minmax_bits : maximize_bits );
|
||||
setBitmap( isChecked() ? minmax_bits : maximize_bits );
|
||||
break;
|
||||
case OnAllDesktopsButton:
|
||||
setBitmap(0);
|
||||
break;
|
||||
case ShadeButton:
|
||||
setBitmap( isOn() ? shade_on_bits : shade_off_bits );
|
||||
setBitmap( isChecked() ? shade_on_bits : shade_off_bits );
|
||||
break;
|
||||
case AboveButton:
|
||||
setBitmap( isOn() ? above_on_bits : above_off_bits );
|
||||
setBitmap( isChecked() ? above_on_bits : above_off_bits );
|
||||
break;
|
||||
case BelowButton:
|
||||
setBitmap( isOn() ? below_on_bits : below_off_bits );
|
||||
setBitmap( isChecked() ? below_on_bits : below_off_bits );
|
||||
break;
|
||||
default:
|
||||
setBitmap(0);
|
||||
|
@ -700,9 +700,9 @@ void KDEDefaultButton::drawButton(QPainter *p)
|
|||
|
||||
if (type()==OnAllDesktopsButton) {
|
||||
if (active)
|
||||
btnpix = isOn() ? *pinDownPix : *pinUpPix;
|
||||
btnpix = isChecked() ? *pinDownPix : *pinUpPix;
|
||||
else
|
||||
btnpix = isOn() ? *ipinDownPix : *ipinUpPix;
|
||||
btnpix = isChecked() ? *ipinDownPix : *ipinUpPix;
|
||||
} else
|
||||
btnpix = decoration()->icon().pixmap( QIcon::Small, QIcon::Normal );
|
||||
|
||||
|
|
|
@ -269,14 +269,14 @@ void LaptopButton::reset(unsigned long changed)
|
|||
setBitmap(iconify_bits);
|
||||
break;
|
||||
case MaxButton:
|
||||
if (isOn() ) {
|
||||
if (isChecked() ) {
|
||||
setBitmap(isLeft() ? l_minmax_bits : r_minmax_bits);
|
||||
} else {
|
||||
setBitmap(maximize_bits);
|
||||
}
|
||||
break;
|
||||
case OnAllDesktopsButton:
|
||||
setBitmap( isOn() ? unsticky_bits : sticky_bits );
|
||||
setBitmap( isChecked() ? unsticky_bits : sticky_bits );
|
||||
break;
|
||||
default:
|
||||
setBitmap(0);
|
||||
|
|
|
@ -313,19 +313,19 @@ void ModernButton::reset(unsigned long changed)
|
|||
setBitmap(iconify_bits);
|
||||
break;
|
||||
case MaxButton:
|
||||
setBitmap( isOn() ? (isLeft()?l_minmax_bits:r_minmax_bits) : maximize_bits );
|
||||
setBitmap( isChecked() ? (isLeft()?l_minmax_bits:r_minmax_bits) : maximize_bits );
|
||||
break;
|
||||
case OnAllDesktopsButton:
|
||||
setBitmap( isOn() ? unsticky_bits : sticky_bits );
|
||||
setBitmap( isChecked() ? unsticky_bits : sticky_bits );
|
||||
break;
|
||||
case ShadeButton:
|
||||
setBitmap( isOn() ? shade_on_bits : shade_off_bits );
|
||||
setBitmap( isChecked() ? shade_on_bits : shade_off_bits );
|
||||
break;
|
||||
case AboveButton:
|
||||
setBitmap( isOn() ? above_on_bits : above_off_bits );
|
||||
setBitmap( isChecked() ? above_on_bits : above_off_bits );
|
||||
break;
|
||||
case BelowButton:
|
||||
setBitmap( isOn() ? below_on_bits : below_off_bits );
|
||||
setBitmap( isChecked() ? below_on_bits : below_off_bits );
|
||||
break;
|
||||
case MenuButton:
|
||||
setBitmap(menu_bits);
|
||||
|
|
|
@ -74,35 +74,35 @@ void PlastikButton::reset(unsigned long changed)
|
|||
m_iconType = MinIcon;
|
||||
break;
|
||||
case MaxButton:
|
||||
if (isOn()) {
|
||||
if (isChecked()) {
|
||||
m_iconType = MaxRestoreIcon;
|
||||
} else {
|
||||
m_iconType = MaxIcon;
|
||||
}
|
||||
break;
|
||||
case OnAllDesktopsButton:
|
||||
if (isOn()) {
|
||||
if (isChecked()) {
|
||||
m_iconType = NotOnAllDesktopsIcon;
|
||||
} else {
|
||||
m_iconType = OnAllDesktopsIcon;
|
||||
}
|
||||
break;
|
||||
case ShadeButton:
|
||||
if (isOn()) {
|
||||
if (isChecked()) {
|
||||
m_iconType = UnShadeIcon;
|
||||
} else {
|
||||
m_iconType = ShadeIcon;
|
||||
}
|
||||
break;
|
||||
case AboveButton:
|
||||
if (isOn()) {
|
||||
if (isChecked()) {
|
||||
m_iconType = NoKeepAboveIcon;
|
||||
} else {
|
||||
m_iconType = KeepAboveIcon;
|
||||
}
|
||||
break;
|
||||
case BelowButton:
|
||||
if (isOn()) {
|
||||
if (isChecked()) {
|
||||
m_iconType = NoKeepBelowIcon;
|
||||
} else {
|
||||
m_iconType = KeepBelowIcon;
|
||||
|
|
|
@ -409,19 +409,19 @@ void QuartzButton::reset(unsigned long changed)
|
|||
setBitmap(iconify_bits);
|
||||
break;
|
||||
case MaxButton:
|
||||
setBitmap( isOn() ? minmax_bits : maximize_bits );
|
||||
setBitmap( isChecked() ? minmax_bits : maximize_bits );
|
||||
break;
|
||||
case OnAllDesktopsButton:
|
||||
setBitmap(0);
|
||||
break;
|
||||
case ShadeButton:
|
||||
setBitmap( isOn() ? shade_on_bits : shade_off_bits );
|
||||
setBitmap( isChecked() ? shade_on_bits : shade_off_bits );
|
||||
break;
|
||||
case AboveButton:
|
||||
setBitmap( isOn() ? above_on_bits : above_off_bits );
|
||||
setBitmap( isChecked() ? above_on_bits : above_off_bits );
|
||||
break;
|
||||
case BelowButton:
|
||||
setBitmap( isOn() ? below_on_bits : below_off_bits );
|
||||
setBitmap( isChecked() ? below_on_bits : below_off_bits );
|
||||
break;
|
||||
default:
|
||||
setBitmap(0);
|
||||
|
@ -488,9 +488,9 @@ void QuartzButton::drawButton(QPainter *p)
|
|||
|
||||
// Select the right onAllDesktops button to paint
|
||||
if (decoration()->isActive())
|
||||
btnpix = isOn() ? *pinDownPix : *pinUpPix;
|
||||
btnpix = isChecked() ? *pinDownPix : *pinUpPix;
|
||||
else
|
||||
btnpix = isOn() ? *ipinDownPix : *ipinUpPix;
|
||||
btnpix = isChecked() ? *ipinDownPix : *ipinUpPix;
|
||||
|
||||
} else
|
||||
btnpix = decoration()->icon().pixmap( QIcon::Small, QIcon::Normal);
|
||||
|
|
|
@ -256,7 +256,7 @@ void RedmondButton::reset(unsigned long changed)
|
|||
setBitmap(iconify_bits);
|
||||
break;
|
||||
case MaxButton:
|
||||
setBitmap( isOn() ? minmax_bits : maximize_bits );
|
||||
setBitmap( isChecked() ? minmax_bits : maximize_bits );
|
||||
break;
|
||||
case MenuButton:
|
||||
{
|
||||
|
|
|
@ -99,19 +99,19 @@ void WebButton::reset(unsigned long changed)
|
|||
setBitmap(iconify_bits);
|
||||
break;
|
||||
case MaxButton:
|
||||
setBitmap( isOn() ? unmaximize_bits : maximize_bits );
|
||||
setBitmap( isChecked() ? unmaximize_bits : maximize_bits );
|
||||
break;
|
||||
case OnAllDesktopsButton:
|
||||
setBitmap( isOn() ? unsticky_bits : sticky_bits );
|
||||
setBitmap( isChecked() ? unsticky_bits : sticky_bits );
|
||||
break;
|
||||
case ShadeButton:
|
||||
setBitmap( isOn() ? shade_on_bits : shade_off_bits );
|
||||
setBitmap( isChecked() ? shade_on_bits : shade_off_bits );
|
||||
break;
|
||||
case AboveButton:
|
||||
setBitmap( isOn() ? above_on_bits : above_off_bits );
|
||||
setBitmap( isChecked() ? above_on_bits : above_off_bits );
|
||||
break;
|
||||
case BelowButton:
|
||||
setBitmap( isOn() ? below_on_bits : below_off_bits );
|
||||
setBitmap( isChecked() ? below_on_bits : below_off_bits );
|
||||
break;
|
||||
case MenuButton:
|
||||
setBitmap(menu_bits);
|
||||
|
|
|
@ -574,7 +574,7 @@ void KCommonDecoration::keepAboveChange(bool above)
|
|||
m_button[AboveButton]->reset(KCommonDecorationButton::StateChange);
|
||||
}
|
||||
|
||||
if (m_button[BelowButton] && m_button[BelowButton]->isOn())
|
||||
if (m_button[BelowButton] && m_button[BelowButton]->isChecked())
|
||||
{
|
||||
m_button[BelowButton]->setOn(false);
|
||||
m_button[BelowButton]->setTipText( i18n("Keep below others") );
|
||||
|
@ -591,7 +591,7 @@ void KCommonDecoration::keepBelowChange(bool below)
|
|||
m_button[BelowButton]->reset(KCommonDecorationButton::StateChange);
|
||||
}
|
||||
|
||||
if (m_button[AboveButton] && m_button[AboveButton]->isOn())
|
||||
if (m_button[AboveButton] && m_button[AboveButton]->isChecked())
|
||||
{
|
||||
m_button[AboveButton]->setOn(false);
|
||||
m_button[AboveButton]->setTipText( i18n("Keep above others") );
|
||||
|
@ -939,7 +939,7 @@ void KCommonDecorationButton::setToggleButton(bool toggle)
|
|||
|
||||
void KCommonDecorationButton::setOn(bool on)
|
||||
{
|
||||
if (on != isOn() ) {
|
||||
if (on != isChecked() ) {
|
||||
QAbstractButton::setOn(on);
|
||||
reset(StateChange);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue