1999-12-24 01:36:47 +00:00
|
|
|
#ifndef __SYSTEMCLIENT_H
|
|
|
|
#define __SYSTEMCLIENT_H
|
|
|
|
|
|
|
|
#include <qbutton.h>
|
|
|
|
#include <qbitmap.h>
|
|
|
|
#include <kpixmap.h>
|
|
|
|
#include "../../client.h"
|
|
|
|
class QLabel;
|
|
|
|
class QSpacerItem;
|
|
|
|
|
|
|
|
|
|
|
|
// get rid of autohide :P
|
|
|
|
class SystemButton : public QButton
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SystemButton(QWidget *parent=0, const char *name=0,
|
|
|
|
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;
|
1999-12-24 01:36:47 +00:00
|
|
|
protected:
|
|
|
|
virtual void drawButton(QPainter *p);
|
|
|
|
void drawButtonLabel(QPainter *){;}
|
|
|
|
KPixmap aBackground, iBackground;
|
|
|
|
QBitmap deco;
|
|
|
|
};
|
|
|
|
|
|
|
|
class SystemClient : public Client
|
|
|
|
{
|
|
|
|
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-01-23 23:33:29 +00:00
|
|
|
protected slots:
|
|
|
|
void slotReset();
|
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;
|
|
|
|
};
|
|
|
|
|
1999-12-24 01:36:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|