2000-01-03 13:13:57 +00:00
|
|
|
#ifndef __KWMTHEMECLIENT_H
|
|
|
|
#define __KWMTHEMECLIENT_H
|
|
|
|
|
|
|
|
#include <qbutton.h>
|
|
|
|
#include <qtoolbutton.h>
|
|
|
|
#include <kpixmap.h>
|
|
|
|
#include "../../client.h"
|
|
|
|
class QLabel;
|
|
|
|
class QSpacerItem;
|
|
|
|
|
2001-02-23 22:10:30 +00:00
|
|
|
namespace KWinInternal{
|
2001-02-20 01:20:38 +00:00
|
|
|
|
2000-01-03 13:13:57 +00:00
|
|
|
// QToolButton uses a 1 pixel border :P
|
|
|
|
class MyButton : public QToolButton
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MyButton(QWidget *parent=0, const char *name=0)
|
2000-03-31 19:10:22 +00:00
|
|
|
: QToolButton(parent, name){setAutoRaise(true);}
|
2000-01-03 13:13:57 +00:00
|
|
|
protected:
|
|
|
|
void drawButtonLabel(QPainter *p);
|
|
|
|
};
|
|
|
|
|
2001-02-20 01:20:38 +00:00
|
|
|
class KWMThemeClient : public KWinInternal::Client
|
2000-01-03 13:13:57 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
KWMThemeClient( Workspace *ws, WId w, QWidget *parent=0, const char *name=0 );
|
|
|
|
~KWMThemeClient(){;}
|
|
|
|
protected:
|
|
|
|
void doShape();
|
|
|
|
void drawTitle(QPainter &p);
|
|
|
|
void resizeEvent( QResizeEvent* );
|
|
|
|
void paintEvent( QPaintEvent* );
|
|
|
|
void showEvent( QShowEvent* );
|
|
|
|
void windowWrapperShowEvent( QShowEvent* );
|
|
|
|
void mouseDoubleClickEvent( QMouseEvent * );
|
|
|
|
void init();
|
|
|
|
void captionChange( const QString& name );
|
|
|
|
void stickyChange(bool on);
|
|
|
|
void maximizeChange(bool m);
|
2001-02-23 22:10:30 +00:00
|
|
|
void iconChange();
|
2000-12-13 10:21:31 +00:00
|
|
|
MousePosition mousePosition(const QPoint &) const;
|
2001-01-16 21:45:23 +00:00
|
|
|
protected slots:
|
|
|
|
void slotReset();
|
2001-02-23 22:10:30 +00:00
|
|
|
void menuButtonPressed();
|
2000-01-03 13:13:57 +00:00
|
|
|
private:
|
2001-02-06 22:16:17 +00:00
|
|
|
QPixmap buffer;
|
2000-01-03 13:13:57 +00:00
|
|
|
KPixmap *aGradient, *iGradient;
|
2001-02-23 22:10:30 +00:00
|
|
|
MyButton *maxBtn, *stickyBtn, *mnuBtn;
|
2000-01-03 13:13:57 +00:00
|
|
|
QSpacerItem *titlebar;
|
|
|
|
};
|
|
|
|
|
2001-02-20 01:20:38 +00:00
|
|
|
};
|
|
|
|
|
2000-01-03 13:13:57 +00:00
|
|
|
#endif
|
2000-12-11 20:27:43 +00:00
|
|
|
|