Warning, file /frameworks/kparts/tests/partviewer.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     SPDX-FileCopyrightText: 2000 David Faure <faure@kde.org>
0003     SPDX-FileCopyrightText: 2000 Simon Hausmann <hausmann@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006 */
0007 
0008 #ifndef PARTVIEWER_H
0009 #define PARTVIEWER_H
0010 
0011 #include <kparts/mainwindow.h>
0012 #include <kparts/readonlypart.h>
0013 
0014 class KPluginMetaData;
0015 
0016 class PartViewer : public KParts::MainWindow
0017 {
0018     Q_OBJECT
0019 public:
0020     PartViewer();
0021     ~PartViewer() override;
0022 
0023     void openUrl(const QUrl &url);
0024 
0025     void switchToPart(const QUrl &url);
0026 
0027 public Q_SLOTS:
0028     void slotFileOpen();
0029 
0030 private:
0031     void loadPlugin(const KPluginMetaData &md, const QUrl &url);
0032 
0033     KParts::ReadOnlyPart *m_part;
0034     QList<QAction *> m_openWithActions;
0035 };
0036 
0037 #endif