2000-03-25 16:49:12 +00:00
|
|
|
#ifndef __LAPTOPCLIENT_H
|
|
|
|
#define __LAPTOPCLIENT_H
|
|
|
|
|
|
|
|
#include <qbutton.h>
|
|
|
|
#include <qbitmap.h>
|
|
|
|
#include <kpixmap.h>
|
|
|
|
#include "../../client.h"
|
|
|
|
class QLabel;
|
|
|
|
class QSpacerItem;
|
|
|
|
|
|
|
|
|
|
|
|
// get rid of autohide :P
|
2000-08-16 13:11:21 +00:00
|
|
|
class LaptopClientButton : public QButton
|
2000-03-25 16:49:12 +00:00
|
|
|
{
|
|
|
|
public:
|
2000-08-16 13:11:21 +00:00
|
|
|
LaptopClientButton(int w, int h, Client *parent=0, const char *name=0,
|
2000-03-25 16:49:12 +00:00
|
|
|
const unsigned char *bitmap=NULL);
|
|
|
|
void setBitmap(const unsigned char *bitmap);
|
|
|
|
void reset();
|
2000-03-25 21:37:49 +00:00
|
|
|
//QSize sizeHint() const;
|
2000-03-25 16:49:12 +00:00
|
|
|
protected:
|
|
|
|
virtual void drawButton(QPainter *p);
|
|
|
|
void drawButtonLabel(QPainter *){;}
|
|
|
|
QBitmap deco;
|
2000-04-28 15:53:00 +00:00
|
|
|
Client *client;
|
2000-03-25 16:49:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class LaptopClient : public Client
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
LaptopClient( Workspace *ws, WId w, QWidget *parent=0, const char *name=0 );
|
|
|
|
~LaptopClient(){;}
|
2000-08-14 17:50:51 +00:00
|
|
|
MousePosition mousePosition( const QPoint& ) const;
|
2000-03-25 16:49:12 +00:00
|
|
|
protected:
|
|
|
|
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-28 15:53:00 +00:00
|
|
|
void activeChange(bool);
|
2000-03-25 16:49:12 +00:00
|
|
|
protected slots:
|
|
|
|
void slotReset();
|
|
|
|
private:
|
2000-08-16 13:11:21 +00:00
|
|
|
LaptopClientButton* button[5];
|
2000-03-25 16:49:12 +00:00
|
|
|
QSpacerItem* titlebar;
|
2000-08-14 17:50:51 +00:00
|
|
|
};
|
2000-03-25 16:49:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|