// // C++ Interface: malloryclient // // Description: // // // Author: Remi Villatel , (C) 2005 // // Copyright: See COPYING file that comes with this distribution // // #ifndef MALLORYCLIENT_H #define MALLORYCLIENT_H #include #include #include #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