2022-12-18 00:50:53 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022, MacDue <macdue@dueutil.tech>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-01-12 20:22:14 +00:00
|
|
|
#include "WebContentView.h"
|
2023-11-24 01:04:54 +00:00
|
|
|
#include <LibWebView/Forward.h>
|
2022-12-18 00:50:53 +00:00
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
namespace Ladybird {
|
|
|
|
|
2023-11-24 01:04:54 +00:00
|
|
|
class WebContentView;
|
|
|
|
|
2022-12-18 00:50:53 +00:00
|
|
|
class InspectorWidget final : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
|
2023-11-24 01:04:54 +00:00
|
|
|
public:
|
|
|
|
explicit InspectorWidget(WebContentView& content_view);
|
|
|
|
virtual ~InspectorWidget() override;
|
2023-05-08 20:15:35 +00:00
|
|
|
|
2023-11-24 01:04:54 +00:00
|
|
|
void inspect();
|
|
|
|
void reset();
|
2023-05-08 20:15:35 +00:00
|
|
|
|
2023-11-24 01:04:54 +00:00
|
|
|
void select_hovered_node();
|
2023-05-08 20:15:35 +00:00
|
|
|
void select_default_node();
|
|
|
|
|
2023-11-24 01:04:54 +00:00
|
|
|
private:
|
2022-12-18 00:50:53 +00:00
|
|
|
void closeEvent(QCloseEvent*) override;
|
|
|
|
|
2023-11-24 01:04:54 +00:00
|
|
|
OwnPtr<WebContentView> m_inspector_view;
|
|
|
|
OwnPtr<WebView::InspectorClient> m_inspector_client;
|
2022-12-18 00:50:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|