You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
626 B
33 lines
626 B
15 years ago
|
#include <tqpushbutton.h>
|
||
|
#include <tqpainter.h>
|
||
15 years ago
|
|
||
14 years ago
|
class KMidButton : public TQPushButton
|
||
15 years ago
|
{
|
||
|
protected:
|
||
|
|
||
15 years ago
|
TQPixmap pixmap1,pixmap2;
|
||
15 years ago
|
|
||
15 years ago
|
virtual void drawButton(TQPainter *paint)
|
||
15 years ago
|
{
|
||
|
if ((isOn())&&(!pixmap1.isNull())) paint->drawPixmap(0,0,pixmap1);
|
||
|
else if ((!isOn())&&(!pixmap2.isNull())) paint->drawPixmap(0,0,pixmap2);
|
||
|
};
|
||
|
|
||
|
public:
|
||
|
|
||
13 years ago
|
KMidButton (TQWidget *parent,const char *name) : TQPushButton (parent,name)
|
||
15 years ago
|
{
|
||
|
};
|
||
|
|
||
|
~KMidButton()
|
||
|
{
|
||
|
};
|
||
|
|
||
15 years ago
|
void setPixmaps(const TQPixmap& p1, const TQPixmap& p2)
|
||
15 years ago
|
{
|
||
|
pixmap1=p1;
|
||
|
pixmap2=p2;
|
||
|
};
|
||
|
|
||
|
};
|