2019-10-09 20:15:53 +08:00
|
|
|
%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);
|
2023-08-03 02:23:49 +08:00
|
|
|
void setAllowedArea(ads::DockWidgetArea area, bool Enable);
|
2019-10-09 20:15:53 +08:00
|
|
|
ads::DockWidgetAreas allowedAreas() const;
|
|
|
|
ads::DockWidgetArea dropAreaUnderCursor() const;
|
2023-08-03 02:23:49 +08:00
|
|
|
int tabIndexUnderCursor() const;
|
2020-03-17 16:12:00 +08:00
|
|
|
ads::DockWidgetArea visibleDropAreaUnderCursor() const;
|
2019-10-09 20:15:53 +08:00
|
|
|
ads::DockWidgetArea showOverlay(QWidget* target);
|
|
|
|
void hideOverlay();
|
|
|
|
void enableDropPreview(bool Enable);
|
2020-02-25 14:22:51 +08:00
|
|
|
bool dropPreviewEnabled() const;
|
2019-10-09 20:15:53 +08:00
|
|
|
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);
|
2020-02-25 14:22:51 +08:00
|
|
|
virtual void showEvent(QShowEvent* e);
|
|
|
|
void setAreaWidgets(const QHash<ads::DockWidgetArea, QWidget*>& widgets);
|
2019-10-09 20:15:53 +08:00
|
|
|
|
|
|
|
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
|