Add support for placeholders

So dock widgets remember their previous position so can be restored.
TODO: Support playing with dock widget visibility
This commit is contained in:
Sergio Martins
2019-06-22 12:15:33 +01:00
parent 0c9b27e213
commit 7a6e9df2ed
21 changed files with 643 additions and 131 deletions

View File

@@ -44,6 +44,8 @@ class TitleBar;
class FloatingWindow;
class DragController;
class TitleBar;
class Item;
class LastPosition;
/**
* @brief Represents a dock widget.
@@ -203,6 +205,7 @@ public:
private:
#endif
Q_DISABLE_COPY(DockWidget)
friend class Frame;
friend class DropArea;
friend class TestDocks;
friend class KDDockWidgets::DragController;
@@ -225,6 +228,12 @@ private:
*/
Frame *frame() const;
///@brief sets the current layout item containing this dock widget
void setLayoutItem(Item*);
///@brief returns the last position, just for tests. TODO Make tests just use the d-pointer.
LastPosition *lastPosition() const;
class Private;
Private *const d;
};