knotes

knotebutton.h
00001 /*******************************************************************
00002  KNotes -- Notes for the KDE project
00003 
00004  Copyright (c) 1997-2004, The KNotes Developers
00005 
00006  This program is free software; you can redistribute it and/or
00007  modify it under the terms of the GNU General Public License
00008  as published by the Free Software Foundation; either version 2
00009  of the License, or (at your option) any later version.
00010 
00011  This program is distributed in the hope that it will be useful,
00012  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  GNU General Public License for more details.
00015 
00016  You should have received a copy of the GNU General Public License
00017  along with this program; if not, write to the Free Software
00018  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019 *******************************************************************/
00020 
00021 #ifndef KNOTEBUTTON_H
00022 #define KNOTEBUTTON_H
00023 
00024 #include <tqpushbutton.h>
00025 
00026 class TQPainter;
00027 class TQEvent;
00028 class TQResizeEvent;
00029 
00030 
00031 class KNoteButton: public TQPushButton
00032 {
00033     Q_OBJECT
00034   TQ_OBJECT
00035 public:
00036     KNoteButton( const TQString& icon, TQWidget *parent=0, const char *name=0 );
00037     ~KNoteButton();
00038 
00039     virtual TQSize sizeHint() const;
00040 
00041 protected:
00042     virtual void enterEvent( TQEvent * );
00043     virtual void leaveEvent( TQEvent * );
00044 
00045     virtual void drawButton( TQPainter *p );
00046     virtual void drawButtonLabel( TQPainter *p );
00047 
00048 private:
00049     bool m_flat;
00050 };
00051 
00052 #endif