1 /***************************************************************************
2 toggleaction.cpp - description
4 begin : Son Feb 10 2002
5 copyright : (C) 2002 by Mark Hollomon
6 email : mhh@mindspring.com
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
18 #include "toggleaction.h"
20 ToggleAction::ToggleAction(const QString
& ontext
, const QIconSet
& onpix
,
21 const QString
& offtext
, const QIconSet
& offpix
,
22 int accel
, const QObject
* receiver
, const char* slot
, QObject
* parent
, const char* name
) :
23 KAction(ontext
, onpix
, accel
, receiver
, slot
, parent
, name
),
31 ToggleAction::ToggleAction(const QString
& ontext
, const QString
& offtext
,
32 int accel
, const QObject
* receiver
, const char* slot
, QObject
* parent
, const char* name
) :
33 KAction(ontext
, accel
, receiver
, slot
, parent
, name
),
41 void ToggleAction::turnOff() {
42 if ( !officon
.isNull() ) setIconSet(officon
);
48 void ToggleAction::turnOn() {
49 if ( !onicon
.isNull() ) setIconSet(onicon
);
55 void ToggleAction::setOnToolTip(QString tip
) {
61 void ToggleAction::setOffToolTip(QString tip
) {
67 #include "toggleaction.moc"