add more spacing
[personal-kdebase.git] / workspace / kwin / clients / web / WebButton.h
blob49551e1ce2334dfab21ab4dd1760975469ceb8bb
1 /*
2 'Web' kwin client
4 Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
22 #ifndef KWIN_WEB_BUTTON_H
23 #define KWIN_WEB_BUTTON_H
25 #include <QWidget>
26 #include <QBitmap>
27 #include <klocale.h>
29 #include "../../lib/kcommondecoration.h"
31 namespace Web
33 class WebClient;
35 class WebButton : public KCommonDecorationButton
37 public:
39 enum Position
41 Left, Mid, Right
44 WebButton(ButtonType type, WebClient *parent, bool shape);
46 virtual ~WebButton();
48 virtual void reset(unsigned long changed);
50 protected:
51 void setBitmap(const unsigned char *bitmap);
53 void enterEvent(QEvent *);
54 void leaveEvent(QEvent *);
55 void paintEvent(QPaintEvent *);
56 void drawButton(QPainter *p);
58 private:
59 QBitmap bitmap_;
61 bool mouseOver_;
63 bool shape_;
64 WebClient* deco_;
68 #endif
70 // vim:ts=2:sw=2:tw=78:set et:
71 // kate: indent-width 2; replace-tabs on; tab-width 2; space-indent on;