kwin/clients/laptop/laptopclient.h
Daniel M. Duley ef5094b21a New KWin look-and-feel plugin specifically coded for laptops :)
It features a reduced height taskbar with oversized width buttons (I may make
these even wider to make them easier to hit), a minimal frame, and a
oversized shaped resize handle. Uses the system KWin style buttons, not just
because I like them but because they fit in the reduced size bar ;-)

As usual, here's a screenshot:
http://www.mosfet.org/kwinlaptop.gif

On another note, the Be style is going away and is now replaced by B2. Be
needs work so I asked Matthias Ettrich about it (he's the maintainer of that
style), and it turns out he's already using B2 :)

svn path=/trunk/kdebase/kwin/; revision=44656
2000-03-25 16:49:12 +00:00

55 lines
1.2 KiB
C++

#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
class SystemButton : public QButton
{
public:
SystemButton(QWidget *parent=0, const char *name=0,
const unsigned char *bitmap=NULL);
void setBitmap(const unsigned char *bitmap);
void reset();
QSize sizeHint() const;
protected:
virtual void drawButton(QPainter *p);
void drawButtonLabel(QPainter *){;}
KPixmap aBackground, iBackground;
QBitmap deco;
};
class LaptopClient : public Client
{
Q_OBJECT
public:
LaptopClient( Workspace *ws, WId w, QWidget *parent=0, const char *name=0 );
~LaptopClient(){;}
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();
protected slots:
void slotReset();
private:
SystemButton* button[5];
QSpacerItem* titlebar;
};
#endif