File indexing completed on 2025-01-19 03:55:40
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2018-7-30 0007 * Description : Widget for displaying HTML in the backends 0008 * 0009 * SPDX-FileCopyrightText: 2018 by Tarek Talaat <tarektalaat93 at gmail dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #include "webwidget_qwebengine.h" 0016 0017 // Qt includes 0018 0019 #include <QCloseEvent> 0020 #include <QtWebEngineWidgetsVersion> 0021 0022 // Local includes 0023 0024 #include "digikam_debug.h" 0025 0026 namespace Digikam 0027 { 0028 0029 class Q_DECL_HIDDEN WebWidget::Private 0030 { 0031 public: 0032 0033 explicit Private() 0034 : parent(nullptr) 0035 { 0036 } 0037 0038 QWidget* parent; 0039 }; 0040 0041 WebWidget::WebWidget(QWidget* const parent) 0042 : QWebEngineView(parent), 0043 d (new Private()) 0044 { 0045 d->parent = parent; 0046 } 0047 0048 void WebWidget::closeEvent(QCloseEvent* event) 0049 { 0050 Q_EMIT closeView(false); 0051 event->accept(); 0052 } 0053 0054 WebWidget::~WebWidget() 0055 { 0056 delete d; 0057 } 0058 } 0059 0060 #include "moc_webwidget_qwebengine.cpp"