feat(framework): add helper method to TUWidgetLayoutViewBase which returns the frame which contains this TULayoutView

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2026-01-14 23:48:20 -05:00
parent 6c205d476b
commit 7477821b9b
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

View File

@ -57,6 +57,17 @@ public:
void isTULayoutView() override {} void isTULayoutView() override {}
void disconnectView() override {} void disconnectView() override {}
TULayoutFrame *getOwnerFrame() {
auto lm = PLUG_Services::getLayoutManager();
if (!lm) {
return nullptr;
}
auto frame = lm->findFrame(this);
if (!frame) {
return nullptr;
}
return frame;
}
protected: protected:
QPointer<T> m_widget; QPointer<T> m_widget;