mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
52 lines
1.1 KiB
C++
52 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) 2022, MacDue <macdue@dueutil.tech>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "WebContentView.h"
|
|
#include <LibGfx/Point.h>
|
|
#include <LibWebView/Forward.h>
|
|
#include <QWidget>
|
|
|
|
class QAction;
|
|
class QMenu;
|
|
|
|
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;
|
|
|
|
QPoint to_widget_position(Gfx::IntPoint) const;
|
|
|
|
WebContentView* m_inspector_view;
|
|
OwnPtr<WebView::InspectorClient> m_inspector_client;
|
|
|
|
QMenu* m_dom_node_text_context_menu { nullptr };
|
|
QMenu* m_dom_node_tag_context_menu { nullptr };
|
|
QMenu* m_dom_node_attribute_context_menu { nullptr };
|
|
|
|
QAction* m_edit_node_action { nullptr };
|
|
QAction* m_delete_node_action { nullptr };
|
|
QAction* m_add_attribute_action { nullptr };
|
|
QAction* m_remove_attribute_action { nullptr };
|
|
};
|
|
|
|
}
|