2011-10-29 12:24:12 +02:00
|
|
|
/* ============================================================
|
|
|
|
* QupZilla - WebKit based browser
|
2016-02-20 15:07:36 +01:00
|
|
|
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
|
2011-10-29 12:24:12 +02:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
* ============================================================ */
|
2011-10-14 20:14:57 +02:00
|
|
|
#ifndef WEBINSPECTORDOCKWIDGET_H
|
|
|
|
#define WEBINSPECTORDOCKWIDGET_H
|
|
|
|
|
2015-08-30 14:44:00 +02:00
|
|
|
#include <QWebEngineView>
|
2012-01-29 14:05:57 +01:00
|
|
|
|
2014-02-26 20:03:20 +01:00
|
|
|
#include "qzcommon.h"
|
2012-02-29 18:33:50 +01:00
|
|
|
|
2014-03-31 17:46:59 +02:00
|
|
|
class ToolButton;
|
2011-10-14 20:14:57 +02:00
|
|
|
|
2015-08-30 14:44:00 +02:00
|
|
|
class QUPZILLA_EXPORT WebInspector : public QWebEngineView
|
2011-10-14 20:14:57 +02:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2012-03-16 16:57:24 +01:00
|
|
|
|
2014-03-31 17:46:59 +02:00
|
|
|
public:
|
2015-08-30 14:44:00 +02:00
|
|
|
explicit WebInspector(QWidget *parent = Q_NULLPTR);
|
|
|
|
~WebInspector();
|
|
|
|
|
|
|
|
void setView(QWebEngineView *view);
|
2015-10-15 17:19:16 +02:00
|
|
|
void inspectElement();
|
2015-08-30 14:44:00 +02:00
|
|
|
|
2016-02-20 15:07:36 +01:00
|
|
|
static bool isEnabled();
|
2015-08-30 14:44:00 +02:00
|
|
|
static void pushView(QWebEngineView *view);
|
|
|
|
static void registerView(QWebEngineView *view);
|
|
|
|
static void unregisterView(QWebEngineView *view);
|
2011-10-14 20:14:57 +02:00
|
|
|
|
2014-03-31 17:46:59 +02:00
|
|
|
private slots:
|
2015-10-15 17:19:16 +02:00
|
|
|
void loadFinished();
|
2011-10-14 20:14:57 +02:00
|
|
|
|
|
|
|
private:
|
2015-10-04 19:44:25 +02:00
|
|
|
void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
|
|
|
|
void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
|
|
|
|
|
2015-08-30 14:44:00 +02:00
|
|
|
static QList<QWebEngineView*> s_views;
|
2015-10-15 17:19:16 +02:00
|
|
|
|
|
|
|
bool m_inspectElement;
|
|
|
|
QWebEngineView *m_view;
|
2011-10-14 20:14:57 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // WEBINSPECTORDOCKWIDGET_H
|