diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2024-10-03 20:32:40 +0300 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2024-10-03 20:32:40 +0300 |
commit | 19097d1bb96f8d52743121fb8f00d90029f1dfc0 (patch) | |
tree | 30a179f283f71a8bb8e6f9db9c9b3a3ce9198376 /malloryclient/malloryclient.h | |
download | twin-style-mallory-19097d1bb96f8d52743121fb8f00d90029f1dfc0.tar.gz twin-style-mallory-19097d1bb96f8d52743121fb8f00d90029f1dfc0.zip |
Initial commit
Sourced from https://www.pling.com/p/1100385
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'malloryclient/malloryclient.h')
-rw-r--r-- | malloryclient/malloryclient.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/malloryclient/malloryclient.h b/malloryclient/malloryclient.h new file mode 100644 index 0000000..9bb62b9 --- /dev/null +++ b/malloryclient/malloryclient.h @@ -0,0 +1,65 @@ +// +// 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 |