1999-12-24 01:36:47 +00:00
|
|
|
#ifndef __SYSTEMCLIENT_H
|
|
|
|
#define __SYSTEMCLIENT_H
|
|
|
|
|
|
|
|
#include <qbutton.h>
|
2000-10-23 14:42:16 +00:00
|
|
|
#include <qtoolbutton.h>
|
|
|
|
|
1999-12-24 01:36:47 +00:00
|
|
|
#include <qbitmap.h>
|
|
|
|
#include <kpixmap.h>
|
|
|
|
#include "../../client.h"
|
2000-10-23 14:42:16 +00:00
|
|
|
|
|
|
|
|
1999-12-24 01:36:47 +00:00
|
|
|
class QLabel;
|
|
|
|
class QSpacerItem;
|
|
|
|
|
2001-02-20 01:20:38 +00:00
|
|
|
namespace KWinInternal {
|
|
|
|
|
2000-10-23 14:42:16 +00:00
|
|
|
class SystemButton : public QToolButton
|
1999-12-24 01:36:47 +00:00
|
|
|
{
|
2000-10-23 14:42:16 +00:00
|
|
|
Q_OBJECT
|
1999-12-24 01:36:47 +00:00
|
|
|
public:
|
2000-04-28 02:44:29 +00:00
|
|
|
SystemButton(Client *parent=0, const char *name=0,
|
1999-12-24 01:36:47 +00:00
|
|
|
const unsigned char *bitmap=NULL);
|
|
|
|
void setBitmap(const unsigned char *bitmap);
|
2000-01-23 23:33:29 +00:00
|
|
|
void reset();
|
2000-03-18 12:35:05 +00:00
|
|
|
QSize sizeHint() const;
|
2000-10-23 14:42:16 +00:00
|
|
|
signals:
|
|
|
|
void clicked( int );
|
1999-12-24 01:36:47 +00:00
|
|
|
protected:
|
|
|
|
virtual void drawButton(QPainter *p);
|
|
|
|
void drawButtonLabel(QPainter *){;}
|
|
|
|
QBitmap deco;
|
2000-04-28 02:44:29 +00:00
|
|
|
Client *client;
|
2000-10-23 14:42:16 +00:00
|
|
|
|
|
|
|
void mousePressEvent( QMouseEvent* e );
|
|
|
|
void mouseReleaseEvent( QMouseEvent* e );
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void handleClicked();
|
|
|
|
|
|
|
|
private:
|
|
|
|
int last_button;
|
|
|
|
|
1999-12-24 01:36:47 +00:00
|
|
|
};
|
|
|
|
|
2001-02-20 01:20:38 +00:00
|
|
|
class SystemClient : public KWinInternal::Client
|
1999-12-24 01:36:47 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
SystemClient( Workspace *ws, WId w, QWidget *parent=0, const char *name=0 );
|
|
|
|
~SystemClient(){;}
|
|
|
|
protected:
|
|
|
|
void drawRoundFrame(QPainter &p, int x, int y, int w, int h);
|
|
|
|
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 doShape();
|
2000-04-01 01:18:12 +00:00
|
|
|
void recalcTitleBuffer();
|
2000-04-28 10:10:27 +00:00
|
|
|
void activeChange(bool);
|
2000-01-23 23:33:29 +00:00
|
|
|
protected slots:
|
|
|
|
void slotReset();
|
2000-10-23 14:42:16 +00:00
|
|
|
private slots:
|
|
|
|
void maxButtonClicked( int );
|
|
|
|
|
1999-12-24 01:36:47 +00:00
|
|
|
private:
|
|
|
|
SystemButton* button[5];
|
|
|
|
QSpacerItem* titlebar;
|
2000-04-01 01:18:12 +00:00
|
|
|
QPixmap titleBuffer;
|
|
|
|
QString oldTitle;
|
|
|
|
};
|
|
|
|
|
2001-02-20 01:20:38 +00:00
|
|
|
};
|
1999-12-24 01:36:47 +00:00
|
|
|
|
|
|
|
#endif
|