Storing and restoring DetachedWindowState
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include <optional>
|
||||
|
||||
#include "PanelWidget.hpp"
|
||||
#include "PaneState.hpp"
|
||||
@@ -18,15 +19,13 @@ namespace Bloom::Widgets
|
||||
|
||||
explicit PaneWidget(PanelWidget* parent);
|
||||
|
||||
[[nodiscard]] PaneState getCurrentState() const {
|
||||
return PaneState(
|
||||
this->activated
|
||||
);
|
||||
}
|
||||
[[nodiscard]] PaneState getCurrentState() const;
|
||||
|
||||
void activate();
|
||||
void deactivate();
|
||||
|
||||
void restoreLastPaneState(const PaneState& lastPaneState);
|
||||
|
||||
signals:
|
||||
void paneActivated();
|
||||
void paneDeactivated();
|
||||
@@ -38,5 +37,10 @@ namespace Bloom::Widgets
|
||||
void attach();
|
||||
|
||||
void closeEvent(QCloseEvent* event) override;
|
||||
|
||||
private:
|
||||
std::optional<DetachedWindowState> lastDetachedWindowState;
|
||||
|
||||
std::optional<DetachedWindowState> getDetachedWindowState() const;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user