2007-11-29 14:11:02 +00:00
|
|
|
/*
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
|
|
|
Copyright (C) 2007 Lubos Lunak <l.lunak@kde.org>
|
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
copy of this software and associated documentation files (the "Software"),
|
|
|
|
to deal in the Software without restriction, including without limitation
|
|
|
|
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
Software is furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
|
DEALINGS IN THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef KCOMMONDECORATION_P_H
|
|
|
|
#define KCOMMONDECORATION_P_H
|
|
|
|
|
|
|
|
#include "kdecoration.h"
|
|
|
|
|
2008-01-29 16:44:41 +00:00
|
|
|
//
|
|
|
|
// This header file is internal. I mean it.
|
2011-01-30 14:34:42 +00:00
|
|
|
//
|
2008-01-29 16:44:41 +00:00
|
|
|
|
2007-11-29 14:11:02 +00:00
|
|
|
class KCommonDecoration;
|
2008-10-18 08:10:37 +00:00
|
|
|
class KCommonDecorationUnstable;
|
2007-11-29 14:11:02 +00:00
|
|
|
class KDecorationBridge;
|
|
|
|
class KDecorationFactory;
|
|
|
|
|
|
|
|
// wrapper all functionality that needs reimplementing in KDecoration and forward it to KCommonDecoration
|
|
|
|
class KCommonDecorationWrapper
|
2013-08-20 09:58:02 +00:00
|
|
|
: public KDecoration
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2007-11-29 14:11:02 +00:00
|
|
|
Q_OBJECT
|
2011-01-30 14:34:42 +00:00
|
|
|
public:
|
|
|
|
KCommonDecorationWrapper(KCommonDecoration* deco, KDecorationBridge* bridge, KDecorationFactory* factory);
|
|
|
|
virtual ~KCommonDecorationWrapper();
|
|
|
|
virtual void init();
|
|
|
|
virtual Position mousePosition(const QPoint& p) const;
|
|
|
|
virtual void borders(int& left, int& right, int& top, int& bottom) const;
|
|
|
|
virtual void resize(const QSize& s);
|
|
|
|
virtual QSize minimumSize() const;
|
|
|
|
virtual bool drawbound(const QRect& geom, bool clear);
|
|
|
|
virtual bool windowDocked(Position side);
|
2008-10-17 10:30:43 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
virtual void padding(int &left, int &right, int &top, int &bottom) const;
|
2012-10-12 09:34:05 +00:00
|
|
|
|
|
|
|
void wrapSetAlphaEnabled(bool enabled);
|
2012-11-07 12:38:11 +00:00
|
|
|
|
|
|
|
public Q_SLOTS:
|
|
|
|
/**
|
|
|
|
* This slot can be reimplemented to return the regions defined
|
|
|
|
* by KDecorationDefines::Region.
|
|
|
|
*
|
|
|
|
* @since 4.10
|
|
|
|
*/
|
|
|
|
QRegion region(KDecorationDefines::Region r);
|
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
private:
|
|
|
|
KCommonDecoration* decoration;
|
|
|
|
};
|
2007-11-29 14:11:02 +00:00
|
|
|
|
|
|
|
#endif // KCOMMONDECORATION_P_H
|