You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.5 KiB

//
// C++ Interface: malloryclient
//
// Description:
//
//
// Author: Remi Villatel <maxilys@tele2>, (C) 2005
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef MALLORYCLIENT_H
#define MALLORYCLIENT_H
#include <kdecoration.h>
#include <kdecorationfactory.h>
#include <qlayout.h>
#include "mallorybutton.h"
#include "enums.h"
class MalloryButton;
class MalloryClient : public KDecoration
{
Q_OBJECT
public:
MalloryClient(KDecorationBridge* bridge, KDecorationFactory* factory);
~MalloryClient();
virtual void init();
virtual bool eventFilter(QObject* o, QEvent* e);
virtual QSize minimumSize() const;
virtual void borders(int& left, int& right, int& top, int& bottom) const;
protected:
virtual void desktopChange();
virtual void activeChange();
virtual void captionChange();
virtual void maximizeChange();
virtual void iconChange();
virtual void shadeChange() {};
virtual void paintEvent(QPaintEvent *e);
virtual void showEvent(QShowEvent*);
virtual void resize(const QSize&);
virtual void reset(unsigned long changed);
private:
void addButtons(QBoxLayout *layout, const QString &buttons);
void resizeEvent(QResizeEvent *e);
void mouseDoubleClickEvent(QMouseEvent *e);
Position mousePosition(const QPoint &point) const;
MalloryButton *m_button[ButtonTypeCount];
QSpacerItem *m_titleBar, *m_leftSpacer, *m_rightSpacer, *m_topSpacer, *m_bottomSpacer, *m_leftButtonSpacer, *m_leftButtonSpacer2, *m_rightButtonSpacer, *m_rightButtonSpacer2;
private slots:
void maxButtonPressed();
void menuButtonPressed();
};
#endif