2001-06-24 06:10:59 +00:00
|
|
|
#ifndef __KWMTHEMECLIENT_H
|
|
|
|
#define __KWMTHEMECLIENT_H
|
|
|
|
|
|
|
|
#include <qbutton.h>
|
|
|
|
#include <qtoolbutton.h>
|
|
|
|
#include <kpixmap.h>
|
|
|
|
#include "../../client.h"
|
2001-07-01 10:10:17 +00:00
|
|
|
#include "../../kwinbutton.h"
|
2001-06-24 06:10:59 +00:00
|
|
|
class QLabel;
|
|
|
|
class QSpacerItem;
|
|
|
|
class QGridLayout;
|
|
|
|
|
2002-08-27 18:08:20 +00:00
|
|
|
namespace KWMTheme {
|
2001-06-24 06:10:59 +00:00
|
|
|
|
2002-08-27 18:08:20 +00:00
|
|
|
using namespace KWinInternal;
|
|
|
|
|
|
|
|
class MyButton : public KWinToolButton
|
2001-06-24 06:10:59 +00:00
|
|
|
{
|
|
|
|
public:
|
2001-07-01 10:10:17 +00:00
|
|
|
MyButton(QWidget *parent=0, const char *name=0, const QString& tip=NULL)
|
|
|
|
: KWinToolButton(parent, name, tip){setAutoRaise(true);}
|
2001-06-24 06:10:59 +00:00
|
|
|
protected:
|
|
|
|
void drawButtonLabel(QPainter *p);
|
|
|
|
};
|
|
|
|
|
2002-08-27 18:08:20 +00:00
|
|
|
class KWMThemeClient : public Client
|
2001-06-24 06:10:59 +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);
|
|
|
|
void iconChange();
|
|
|
|
MousePosition mousePosition(const QPoint &) const;
|
|
|
|
protected slots:
|
2002-06-26 15:38:26 +00:00
|
|
|
//void slotReset();
|
2001-06-24 06:10:59 +00:00
|
|
|
void menuButtonPressed();
|
|
|
|
private:
|
|
|
|
QPixmap buffer;
|
|
|
|
KPixmap *aGradient, *iGradient;
|
|
|
|
MyButton *maxBtn, *stickyBtn, *mnuBtn;
|
|
|
|
QSpacerItem *titlebar;
|
|
|
|
QGridLayout* layout;
|
|
|
|
};
|
|
|
|
|
2003-07-26 10:41:28 +00:00
|
|
|
}
|
2001-06-24 06:10:59 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|