2001-05-06 19:03:20 +00:00
|
|
|
/*
|
|
|
|
'Web' kwin client
|
|
|
|
|
|
|
|
Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; see the file COPYING. If not, write to
|
2005-07-04 19:02:09 +00:00
|
|
|
the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
|
|
|
Boston, MA 02110-1301, USA.
|
2001-05-06 19:03:20 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef KWIN_WEB_BUTTON_H
|
|
|
|
#define KWIN_WEB_BUTTON_H
|
|
|
|
|
|
|
|
#include <qwidget.h>
|
|
|
|
#include <qbitmap.h>
|
2001-07-01 10:10:17 +00:00
|
|
|
#include <klocale.h>
|
2001-05-06 19:03:20 +00:00
|
|
|
|
2005-03-21 19:57:25 +00:00
|
|
|
#include "../../lib/kcommondecoration.h"
|
|
|
|
|
2002-08-27 18:08:20 +00:00
|
|
|
namespace Web
|
2001-05-06 19:03:20 +00:00
|
|
|
{
|
2003-11-20 13:31:19 +00:00
|
|
|
class WebClient;
|
2002-08-27 18:08:20 +00:00
|
|
|
|
2005-03-21 19:57:25 +00:00
|
|
|
class WebButton : public KCommonDecorationButton
|
2001-05-06 19:03:20 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
enum Position
|
|
|
|
{
|
|
|
|
Left, Mid, Right
|
|
|
|
};
|
|
|
|
|
2005-03-21 19:57:25 +00:00
|
|
|
WebButton(ButtonType type, WebClient *parent, const char *name, bool shape);
|
2001-05-06 19:03:20 +00:00
|
|
|
|
|
|
|
virtual ~WebButton();
|
|
|
|
|
2005-03-21 19:57:25 +00:00
|
|
|
virtual void reset(unsigned long changed);
|
2003-09-18 14:59:47 +00:00
|
|
|
|
2001-05-06 19:03:20 +00:00
|
|
|
protected:
|
2005-03-21 19:57:25 +00:00
|
|
|
void setBitmap(const unsigned char *bitmap);
|
2001-05-06 19:03:20 +00:00
|
|
|
|
|
|
|
void enterEvent(QEvent *);
|
|
|
|
void leaveEvent(QEvent *);
|
2005-03-21 19:57:25 +00:00
|
|
|
void drawButton(QPainter *p);
|
2001-05-06 19:03:20 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
QBitmap bitmap_;
|
|
|
|
|
|
|
|
bool mouseOver_;
|
|
|
|
|
|
|
|
bool shape_;
|
2003-11-20 13:31:19 +00:00
|
|
|
WebClient* deco_;
|
2001-05-06 19:03:20 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// vim:ts=2:sw=2:tw=78:set et:
|
2005-03-21 19:57:25 +00:00
|
|
|
// kate: indent-width 2; replace-tabs on; tab-width 2; space-indent on;
|