Qt-Advanced-Docking-System/sip/DockOverlay.sip
Hugo Slepicka 8cc9cc25ad
Fixed and updated Python integration (#127)
* FIX: Add Q_OS_MACOS flag to moc compiler.

* (Python) Demo and example from @n-elie.

* FIX: Addressing some sip files that were inconsistent with the header files.

* (Python) Addressing comments by @n-elie and switching to use WS_X11 for platform checks.

* (Python) Wrap definition of tFloatingWidgetBase to avoid 'Already Defined' error and fix include path for sip/linux/FloatingWidgetTitleBar.sip.

* Remove simple.py

* Fix case sensitive ui file loading in Linux

* Add windows case in get_moc_args

* Remove conda recipe

Co-authored-by: n-elie <40382614+n-elie@users.noreply.github.com>
2020-02-25 07:22:51 +01:00

81 lines
1.9 KiB
Plaintext

%Import QtWidgets/QtWidgetsmod.sip
%If (Qt_5_0_0 -)
namespace ads
{
class CDockOverlay : public QFrame
{
%TypeHeaderCode
#include <DockOverlay.h>
%End
public:
enum eMode
{
ModeDockAreaOverlay,
ModeContainerOverlay
};
CDockOverlay(QWidget* parent /TransferThis/, eMode Mode = ads::CDockOverlay::ModeDockAreaOverlay);
virtual ~CDockOverlay();
void setAllowedAreas(ads::DockWidgetAreas areas);
ads::DockWidgetAreas allowedAreas() const;
ads::DockWidgetArea dropAreaUnderCursor() const;
ads::DockWidgetArea showOverlay(QWidget* target);
void hideOverlay();
void enableDropPreview(bool Enable);
bool dropPreviewEnabled() const;
QRect dropOverlayRect() const;
virtual bool event(QEvent *e);
protected:
virtual void paintEvent(QPaintEvent *e);
virtual void showEvent(QShowEvent* e);
virtual void hideEvent(QHideEvent* e);
};
class CDockOverlayCross : public QWidget
{
public:
enum eIconColor
{
FrameColor,
WindowBackgroundColor,
OverlayColor,
ArrowColor,
ShadowColor
};
protected:
QString iconColors() const;
QColor iconColor() const;
void setIconFrameColor(const QColor& Color);
void setIconBackgroundColor(const QColor& Color);
void setIconOverlayColor(const QColor& Color);
void setIconArrowColor(const QColor& Color);
void setIconShadowColor(const QColor& Color);
virtual void showEvent(QShowEvent* e);
void setAreaWidgets(const QHash<ads::DockWidgetArea, QWidget*>& widgets);
public:
CDockOverlayCross(ads::CDockOverlay* overlay /TransferThis/);
virtual ~CDockOverlayCross();
void setIconColor(ads::CDockOverlayCross::eIconColor ColorIndex, const QColor& Color);
QColor iconColor(ads::CDockOverlayCross::eIconColor ColorIndex) const;
ads::DockWidgetArea cursorLocation() const;
void setupOverlayCross(ads::CDockOverlay::eMode Mode);
void updateOverlayIcons();
void reset();
void updatePosition();
void setIconColors(const QString& Colors);
};
};
%End