1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 02:18:12 +00:00
serenity/Ladybird/Qt/InspectorWidget.h
Timothy Flynn c55d8a9971 Ladybird/Qt: Make the Inspector widget owned by its parent tab
This ensures the Inspector is closed when the BrowserWindow which owns
the tab is closed.
2023-12-04 12:03:48 -07:00

37 lines
678 B
C++

/*
* Copyright (c) 2022, MacDue <macdue@dueutil.tech>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "WebContentView.h"
#include <LibWebView/Forward.h>
#include <QWidget>
namespace Ladybird {
class WebContentView;
class InspectorWidget final : public QWidget {
Q_OBJECT
public:
InspectorWidget(QWidget* tab, WebContentView& content_view);
virtual ~InspectorWidget() override;
void inspect();
void reset();
void select_hovered_node();
void select_default_node();
private:
void closeEvent(QCloseEvent*) override;
WebContentView* m_inspector_view;
OwnPtr<WebView::InspectorClient> m_inspector_client;
};
}