File indexing completed on 2024-04-14 14:23:15

0001 /* This file is part of the KDE project
0002  *
0003  * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
0004  *                     1999 Lars Knoll <knoll@kde.org>
0005  *                     1999 Antti Koivisto <koivisto@kde.org>
0006  *                     2000 Simon Hausmann <hausmann@kde.org>
0007  *
0008  * This library is free software; you can redistribute it and/or
0009  * modify it under the terms of the GNU Library General Public
0010  * License as published by the Free Software Foundation; either
0011  * version 2 of the License, or (at your option) any later version.
0012  *
0013  * This library is distributed in the hope that it will be useful,
0014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0016  * Library General Public License for more details.
0017  *
0018  * You should have received a copy of the GNU Library General Public License
0019  * along with this library; see the file COPYING.LIB.  If not, write to
0020  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0021  * Boston, MA 02110-1301, USA.
0022  */
0023 #ifndef __khtml_run_h__
0024 #define __khtml_run_h__
0025 
0026 #include <kparts/browserrun.h>
0027 #include <kservice.h>
0028 #include <kparts/browserextension.h>
0029 
0030 #include <QUrl>
0031 
0032 class KHTMLPart;
0033 
0034 namespace khtml
0035 {
0036 class ChildFrame;
0037 }
0038 
0039 class KHTMLRun : public KParts::BrowserRun
0040 {
0041     Q_OBJECT
0042 public:
0043     KHTMLRun(KHTMLPart *part, khtml::ChildFrame *child, const QUrl &url,
0044              const KParts::OpenUrlArguments &args,
0045              const KParts::BrowserArguments &browserArgs,
0046              bool hideErrorDialog);
0047 
0048     void foundMimeType(const QString &mimetype) override;
0049     void handleError(KJob *job) override;
0050 
0051     //KHTMLPart *htmlPart() const;
0052 
0053 protected:
0054     void save(const QUrl &url, const QString &suggestedFilename) override;
0055 
0056 private:
0057     khtml::ChildFrame *m_child;
0058 };
0059 
0060 #endif