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.h" 0016 0017 // Qt includes 0018 0019 #include <QCloseEvent> 0020 0021 // Local includes 0022 0023 #include "digikam_debug.h" 0024 0025 namespace Digikam 0026 { 0027 class Q_DECL_HIDDEN WebWidget::Private 0028 { 0029 public: 0030 0031 explicit Private() 0032 : parent(nullptr) 0033 { 0034 } 0035 0036 QWidget* parent; 0037 }; 0038 0039 WebWidget::WebWidget(QWidget* const parent) 0040 : QWebView(parent), 0041 d (new Private()) 0042 { 0043 d->parent = parent; 0044 0045 } 0046 0047 void WebWidget::closeEvent(QCloseEvent *event) 0048 { 0049 Q_EMIT closeView(false); 0050 event->accept(); 0051 } 0052 0053 WebWidget::~WebWidget() 0054 { 0055 delete d; 0056 } 0057 0058 } // namespace Digikam 0059 0060 #include "moc_webwidget.cpp"