Update PyQt bindings to 4.1.1 (#542)

This commit is contained in:
Nicolas Elie 2023-08-02 20:23:49 +02:00 committed by GitHub
parent 65600a4dcd
commit 77ed9b0661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 70 additions and 29 deletions

View File

@ -24,9 +24,10 @@ public:
CAutoHideDockContainer(ads::CDockWidget* DockWidget /Transfer/, ads::SideBarLocation area,
ads::CDockContainerWidget* parent /TransferThis/);
virtual ~CAutoHideDockContainer();
ads::CAutoHideSideBar* sideBar() const;
ads::CAutoHideSideBar* autoHideSideBar() const;
ads::CAutoHideTab* autoHideTab() const;
ads::CDockWidget* dockWidget() const;
int tabIndex() const;
void addDockWidget(ads::CDockWidget* DockWidget /Transfer/);
ads::SideBarLocation sideBarLocation() const;
void setSideBarLocation(ads::SideBarLocation SideBarLocation);
@ -38,7 +39,9 @@ public:
void collapseView(bool Enable);
void toggleCollapseState();
void setSize(int Size);
void resetToInitialDockWidgetSize();
Qt::Orientation orientation() const;
void moveToNewSideBarLocation(ads::SideBarLocation);
};
};

View File

@ -24,10 +24,13 @@ public:
void removeTab(ads::CAutoHideTab* SideTab) /TransferBack/;
ads::CAutoHideDockContainer* insertDockWidget(int Index, ads::CDockWidget* DockWidget /Transfer/);
void removeAutoHideWidget(ads::CAutoHideDockContainer* AutoHideWidget) /TransferBack/;
void addAutoHideWidget(ads::CAutoHideDockContainer* AutoHideWidget);
void addAutoHideWidget(ads::CAutoHideDockContainer* AutoHideWidget, int Index);
Qt::Orientation orientation() const;
ads::CAutoHideTab* tabAt(int index) const;
int tabCount() const;
ads::CAutoHideTab* tab(int index) const;
int tabAt(const QPoint& Pos) const;
int tabInsertIndexAt(const QPoint& Pos) const;
int indexOfTab(const CAutoHideTab& Tab) const;
int count() const;
int visibleTabCount() const;
bool hasVisibleTabs() const;
ads::SideBarLocation sideBarLocation() const;

View File

@ -16,6 +16,10 @@ protected:
void setSideBar(ads::CAutoHideSideBar *SideTabBar);
void removeFromSideBar();
virtual bool event(QEvent* event);
virtual void contextMenuEvent(QContextMenuEvent* ev);
virtual void mousePressEvent(QMouseEvent* ev);
virtual void mouseReleaseEvent(QMouseEvent* ev);
virtual void mouseMoveEvent(QMouseEvent* ev);
public:
CAutoHideTab(QWidget* parent /TransferThis/ = 0);
@ -29,6 +33,10 @@ public:
void setDockWidget(ads::CDockWidget* DockWidget);
bool iconOnly() const;
ads::CAutoHideSideBar* sideBar() const;
int tabIndex() const;
void setDockWidgetFloating();
void unpinDockWidget();
void requestCloseDockWidget();
};
};

View File

@ -23,6 +23,8 @@ public:
int currentIndex() const;
ads::CDockWidgetTab* currentTab() const;
ads::CDockWidgetTab* tab(int Index) const;
int tabAt(const QPoint& Pos) const;
int tabInsertIndexAt(const QPoint& Pos) const;
virtual bool eventFilter(QObject *watched, QEvent *event);
bool isTabOpen(int Index) const;
virtual QSize minimumSizeHint() const;

View File

@ -5,6 +5,22 @@
namespace ads
{
class CTitleBarButton : QToolButton
{
%TypeHeaderCode
#include <DockAreaTitleBar.h>
%End
public:
CTitleBarButton(bool visible = true, QWidget* parent /TransferThis/ = Q_NULLPTR );
virtual void setVisible(bool);
void setShowInTitleBar(bool);
protected:
bool event(QEvent *ev);
};
class CDockAreaTitleBar : QFrame
{
%TypeHeaderCode
@ -26,14 +42,15 @@ public:
CDockAreaTitleBar(ads::CDockAreaWidget* parent /TransferThis/);
virtual ~CDockAreaTitleBar();
ads::CDockAreaTabBar* tabBar() const;
QAbstractButton* button(ads::TitleBarButton which) const;
ads::CTitleBarButton* button(ads::TitleBarButton which) const;
ads::CElidingLabel* autoHideTitleLabel() const;
void updateDockWidgetActionsButtons();
virtual void setVisible(bool Visible);
void insertWidget(int index, QWidget *widget /Transfer/ );
int indexOf(QWidget *widget) const;
QString titleBarButtonToolTip(ads::TitleBarButton Button) const;
void setAreaFloating();
signals:
void tabBarClicked(int index);

View File

@ -5,21 +5,6 @@
namespace ads
{
class CTitleBarButton : QToolButton
{
%TypeHeaderCode
#include <DockAreaTitleBar_p.h>
%End
protected:
bool event(QEvent *ev);
public:
CTitleBarButton(bool visible = true, QWidget* parent /TransferThis/ = Q_NULLPTR );
virtual void setVisible(bool visible);
};
class CSpacerWidget : QWidget
{
%TypeHeaderCode

View File

@ -40,6 +40,9 @@ public:
virtual ~CDockAreaWidget();
ads::CDockManager* dockManager() const;
ads::CDockContainerWidget* dockContainer() const;
ads::CAutoHideDockContainer* autoHideDockContainer() const;
bool isAutoHide() const;
void setAutoHideDockContainer(CAutoHideDockContainer*);
virtual QSize minimumSizeHint() const;
QRect titleBarGeometry() const;
QRect contentAreaGeometry() const;
@ -74,7 +77,10 @@ public:
public slots:
void setCurrentIndex(int index);
void closeArea();
void setAutoHide(bool Enable, SideBarLocation Location = ads::SideBarNone, int TabIndex = -1);
void toggleAutoHide(SideBarLocation Location = ads::SideBarNone);
void closeOtherAreas();
void setFloating();
signals:
void tabBarClicked(int index);

View File

@ -21,10 +21,10 @@ class CDockContainerWidget : QFrame
protected:
virtual bool event(QEvent *e);
QSplitter* rootSplitter() const;
ads::CAutoHideDockContainer* createAndSetupAutoHideContainer(ads::SideBarLocation area, ads::CDockWidget* DockWidget /Transfer/);
ads::CAutoHideDockContainer* createAndSetupAutoHideContainer(ads::SideBarLocation area, ads::CDockWidget* DockWidget /Transfer/, int TabIndex = -1);
void createRootSplitter();
void dropFloatingWidget(ads::CFloatingDockContainer* FloatingWidget, const QPoint& TargetPos);
void dropWidget(QWidget* Widget, DockWidgetArea DropArea, CDockAreaWidget* TargetAreaWidget);
void dropWidget(QWidget* Widget, DockWidgetArea DropArea, CDockAreaWidget* TargetAreaWidget, int TabIndex = -1);
void addDockArea(ads::CDockAreaWidget* DockAreaWidget /Transfer/, ads::DockWidgetArea area = ads::CenterDockWidgetArea);
void removeDockArea(ads::CDockAreaWidget* area /TransferBack/);
void saveState(QXmlStreamWriter& Stream) const;
@ -59,7 +59,7 @@ public:
ads::CDockWidget::DockWidgetFeatures features() const;
ads::CFloatingDockContainer* floatingWidget() const;
void closeOtherAreas(ads::CDockAreaWidget* KeepOpenArea);
ads::CAutoHideSideBar* sideTabBar(SideBarLocation area) const;
ads::CAutoHideSideBar* autoHideSideBar(SideBarLocation area) const;
QList<ads::CAutoHideDockContainer*> autoHideWidgets() const;
QRect contentRect() const;
QRect contentRectGlobal() const;

View File

@ -187,8 +187,8 @@ public:
AutoHideButtonCheckable,
AutoHideSideBarsIconOnly,
AutoHideShowOnMouseOver,
DefaultAutoHideConfig,
AutoHideCloseButtonCollapsesDock,
DefaultAutoHideConfig,
};
typedef QFlags<ads::CDockManager::eAutoHideFlag> AutoHideFlags;

View File

@ -22,8 +22,10 @@ public:
CDockOverlay(QWidget* parent /TransferThis/, eMode Mode = ads::CDockOverlay::ModeDockAreaOverlay);
virtual ~CDockOverlay();
void setAllowedAreas(ads::DockWidgetAreas areas);
void setAllowedArea(ads::DockWidgetArea area, bool Enable);
ads::DockWidgetAreas allowedAreas() const;
ads::DockWidgetArea dropAreaUnderCursor() const;
int tabIndexUnderCursor() const;
ads::DockWidgetArea visibleDropAreaUnderCursor() const;
ads::DockWidgetArea showOverlay(QWidget* target);
void hideOverlay();

View File

@ -90,6 +90,7 @@ public:
void setSideTabWidget(ads::CAutoHideTab* SideTab /Transfer/) const;
bool isAutoHide() const;
ads::CAutoHideDockContainer* autoHideDockContainer() const;
ads::SideBarLocation autoHideLocation() const;
bool isFloating() const;
bool isInFloatingContainer() const;
bool isClosed() const;
@ -125,9 +126,10 @@ public slots:
void setFloating();
void deleteDockWidget();
void closeDockWidget();
void requestCloseDockWidget();
void showFullScreen();
void showNormal();
void setAutoHide(bool Enable, ads::SideBarLocation Location = ads::SideBarNone);
void setAutoHide(bool Enable, ads::SideBarLocation Location = ads::SideBarNone, int TabIndex = -1);
void toggleAutoHide(ads::SideBarLocation Location = ads::SideBarNone);
signals:

View File

@ -37,7 +37,6 @@ public:
void updateStyle();
QSize iconSize() const;
void setIconSize(const QSize& Size);
bool mousePressed() const;
public slots:
virtual void setVisible(bool visible);

View File

@ -29,7 +29,7 @@ public: // implements IFloatingWidget
ads::eDragState DragState, QWidget* MouseEventHandler);
virtual void moveFloating();
virtual void finishDragging();
void cleanupAutoHideContainerWidget();
void cleanupAutoHideContainerWidget(ads::DockWidgetArea ContainerDropArea);
signals:
void draggingCanceled();

View File

@ -50,13 +50,24 @@ namespace ads
TopDockWidgetArea,
BottomDockWidgetArea,
CenterDockWidgetArea,
LeftAutoHideArea,
RightAutoHideArea,
TopAutoHideArea,
BottomAutoHideArea,
InvalidDockWidgetArea,
OuterDockAreas,
AutoHideDockAreas,
AllDockAreas
};
typedef QFlags<ads::DockWidgetArea> DockWidgetAreas;
enum eTabIndex
{
TabDefaultInsertIndex,
TabInvalidIndex
};
enum TitleBarButton
{
TitleBarButtonTabsMenu,
@ -115,6 +126,9 @@ namespace ads
int insertOffset() const;
};
ads::internal::CDockInsertParam dockAreaInsertParameters(ads::DockWidgetArea Area);
ads::SideBarLocation toSideBarLocation(ads::DockWidgetArea Area);
bool isHorizontalSideBarLocation(ads::SideBarLocation Location);
bool isSideBarArea(ads::DockWidgetArea Area);
SIP_PYOBJECT findParent(SIP_PYTYPE type, const QWidget *w) const /TypeHint="QObject"/;
%MethodCode