Skip to content

Commit 5778dfe

Browse files
author
Hugo Slepicka
committed
WIP: Changes between 2.5.2 and 2.7.0.
1 parent 2150ebf commit 5778dfe

11 files changed

+126
-9
lines changed

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
from PyQt5.pyrcc_main import processResourceFile
1515

1616
MAJOR = 2
17-
MINOR = 5
18-
MICRO = 1
17+
MINOR = 7
18+
MICRO = 0
1919
ISRELEASED = True
2020
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
2121
MODULE_NAME = "ads"

sip/DockAreaTabBar.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ protected:
1818
virtual void mouseMoveEvent(QMouseEvent* ev);
1919
virtual void mouseDoubleClickEvent(QMouseEvent *event);
2020
void startFloating(const QPoint& Offset);
21-
ads::CFloatingDockContainer* makeAreaFloating(const QPoint& Offset,
21+
ads::IFloatingWidget* makeAreaFloating(const QPoint& Offset,
2222
ads::eDragState DragState);
2323

2424
public:

sip/DockContainerWidget.sip

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ protected:
2323
QSplitter* rootSplitter() const;
2424
void createRootSplitter();
2525
void dropFloatingWidget(ads::CFloatingDockContainer* FloatingWidget, const QPoint& TargetPos);
26+
void dropWidget(QWidget* widget, const QPoint& TargetPos);
2627
void addDockArea(ads::CDockAreaWidget* DockAreaWidget /Transfer/, ads::DockWidgetArea area = ads::CenterDockWidgetArea);
2728
void removeDockArea(ads::CDockAreaWidget* area /Transfer/);
2829
void saveState(QXmlStreamWriter& Stream) const;
29-
bool restoreState(QXmlStreamReader& Stream, bool Testing);
30+
bool restoreState(CDockingStateReader& Stream, bool Testing);
3031
ads::CDockAreaWidget* lastAddedDockAreaWidget(ads::DockWidgetArea area) const;
3132
bool hasTopLevelDockWidget() const;
3233
ads::CDockWidget* topLevelDockWidget() const;

sip/DockManager.sip

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,13 @@ public:
152152
TabCloseButtonIsToolButton,
153153
AllTabsHaveCloseButton,
154154
RetainTabSizeWhenCloseButtonHidden,
155+
OpaqueUndocking,
156+
DragPreviewIsDynamic,
157+
DragPreviewShowsContentPixmap,
158+
DragPreviewHasWindowFrame,
155159
DefaultConfig,
160+
DefaultNonOpaqueConfig,
161+
NonOpaqueWithWindowFrame,
156162
};
157163
typedef QFlags<ads::CDockManager::eConfigFlag> ConfigFlags;
158164

@@ -161,20 +167,22 @@ public:
161167
static ads::CDockManager::ConfigFlags configFlags();
162168
static void setConfigFlags(const ads::CDockManager::ConfigFlags Flags);
163169
static void setConfigFlag(ads::CDockManager::eConfigFlag Flag, bool On = true);
170+
static ads::CIconProvider& iconProvider();
164171
ads::CDockAreaWidget* addDockWidget(ads::DockWidgetArea area, ads::CDockWidget* Dockwidget /Transfer/,
165172
ads::CDockAreaWidget* DockAreaWidget /Transfer/ = 0);
166173
ads::CDockAreaWidget* addDockWidgetTab(ads::DockWidgetArea area,
167174
ads::CDockWidget* Dockwidget /Transfer/);
168175
ads::CDockAreaWidget* addDockWidgetTabToArea(ads::CDockWidget* Dockwidget /Transfer/,
169176
ads::CDockAreaWidget* DockAreaWidget /Transfer/);
177+
ads::CFloatingDockContainer* addDockWidgetFloating(ads::CDockWidget* DockWidget /Transfer/);
170178
ads::CDockWidget* findDockWidget(const QString& ObjectName) const;
171179
void removeDockWidget(ads::CDockWidget* Dockwidget) /TransferBack/;
172180
QMap<QString, ads::CDockWidget*> dockWidgetsMap() const;
173181
const QList<ads::CDockContainerWidget*> dockContainers() const;
174182
const QList<ads::CFloatingDockContainer*> floatingWidgets() const;
175183
virtual unsigned int zOrderIndex() const;
176-
QByteArray saveState(int version = 0) const;
177-
bool restoreState(const QByteArray &state, int version = 0);
184+
QByteArray saveState(int version = 1) const;
185+
bool restoreState(const QByteArray &state, int version = 1);
178186
void addPerspective(const QString& UniquePrespectiveName);
179187
void removePerspective(const QString& Name);
180188
void removePerspectives(const QStringList& Names);
@@ -198,8 +206,9 @@ signals:
198206
void stateRestored();
199207
void openingPerspective(const QString& PerspectiveName);
200208
void perspectiveOpened(const QString& PerspectiveName);
209+
void dockAreaCreated(ads::CDockAreaWidget* DockArea);
201210
};
202211

203212
};
204213

205-
%End
214+
%End

sip/DockWidget.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public:
8888

8989
public slots:
9090
void toggleView(bool Open = true);
91+
void setFloating();
9192

9293
signals:
9394
void viewToggled(bool Open);

sip/DockingStateReader.sip

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
%If (Qt_5_0_0 -)
2+
3+
namespace ads
4+
{
5+
6+
class CDockingStateReader : QXmlStreamReader
7+
{
8+
9+
%TypeHeaderCode
10+
#include <DockingStateReader.h>
11+
%End
12+
13+
14+
public:
15+
void setFileVersion(int FileVersion);
16+
int fileVersion() const;
17+
};
18+
19+
};
20+
21+
%End

sip/FloatingDockContainer.sip

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,21 @@
55
namespace ads
66
{
77

8-
class CFloatingDockContainer : QWidget
8+
class IFloatingWidget
9+
{
10+
%TypeHeaderCode
11+
#include <FloatingDockContainer.h>
12+
%End
13+
14+
public:
15+
virtual void startFloating(const QPoint& DragStartMousePos, const QSize& Size,
16+
ads::eDragState DragState, QWidget* MouseEventHandler) = 0;
17+
18+
virtual void moveFloating() = 0;
19+
};
20+
21+
22+
class CFloatingDockContainer : QWidget, ads::IFloatingWidget
923
{
1024

1125
%TypeHeaderCode
@@ -20,7 +34,7 @@ protected:
2034
void finishDragging();
2135
void initFloatingGeometry(const QPoint& DragStartMousePos, const QSize& Size);
2236
void moveFloating();
23-
bool restoreState(QXmlStreamReader& Stream, bool Testing);
37+
bool restoreState(ads::CDockingStateReader& Stream, bool Testing);
2438
void updateWindowTitle();
2539

2640

sip/FloatingOverlay.sip

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
%Import QtWidgets/QtWidgetsmod.sip
2+
3+
%If (Qt_5_0_0 -)
4+
5+
namespace ads
6+
{
7+
8+
class CFloatingOverlay : QWidget, ads::IFloatingWidget
9+
{
10+
11+
%TypeHeaderCode
12+
#include <FloatingOverlay.h>
13+
%End
14+
15+
16+
public:
17+
CFloatingOverlay(ads::CDockWidget* Content /TransferThis/ );
18+
CFloatingOverlay(ads::CDockAreaWidget* Content /TransferThis/ );
19+
20+
virtual ~CFloatingOverlay();
21+
22+
virtual void startFloating(const QPoint& DragStartMousePos, const QSize& Size,
23+
ads::eDragState DragState, QWidget* MouseEventHandler);
24+
25+
virtual void moveFloating();
26+
};
27+
28+
};
29+
30+
%End

sip/IconProvider.sip

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
%Import QtWidgets/QtWidgetsmod.sip
2+
3+
%If (Qt_5_0_0 -)
4+
5+
namespace ads
6+
{
7+
8+
class CIconProvider
9+
{
10+
11+
%TypeHeaderCode
12+
#include <IconProvider.h>
13+
%End
14+
15+
16+
public:
17+
CIconProvider();
18+
19+
virtual ~CIconProvider();
20+
21+
QIcon customIcon(eIcon IconId);
22+
23+
void registerCustomIcon(eIcon IconId, const QIcon& icon /TransferThis/ );
24+
};
25+
26+
};
27+
28+
%End

sip/ads.sip

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@
99
%Include DockAreaTitleBar.sip
1010
%Include DockAreaWidget.sip
1111
%Include DockContainerWidget.sip
12+
%Include DockingStateReader.sip
1213
%Include DockManager.sip
1314
%Include DockOverlay.sip
1415
%Include DockSplitter.sip
1516
%Include DockWidgetTab.sip
1617
%Include ElidingLabel.sip
1718
%Include FloatingDockContainer.sip
19+
%Include FloatingOverlay.sip
20+
%Include IconProvider.sip
1821
%If (Linux)
1922
%Include linux/FloatingWidgetTitleBar.sip
2023
%End

0 commit comments

Comments
 (0)