File indexing completed on 2024-04-21 15:24:07

0001 /*
0002     SPDX-FileCopyrightText: 2012 Milian Wolff <mail@milianw.de>
0003 
0004     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005 */
0006 
0007 #ifndef PHPDOCUMENTATIONWIDGET_H
0008 #define PHPDOCUMENTATIONWIDGET_H
0009 
0010 #include <QStackedWidget>
0011 
0012 class QUrl;
0013 
0014 namespace KDevelop {
0015     class StandardDocumentationView;
0016     class DocumentationFindWidget;
0017 }
0018 
0019 class PhpDocsPlugin;
0020 
0021 class PhpDocumentationWidget : public QStackedWidget
0022 {
0023     Q_OBJECT
0024 
0025 public:
0026     explicit PhpDocumentationWidget(KDevelop::DocumentationFindWidget* find, const QUrl &url,
0027                                     PhpDocsPlugin* provider, QWidget* parent = nullptr);
0028     ~PhpDocumentationWidget() override;
0029 
0030 private slots:
0031     /// used to inject some custom CSS to alter the remote php.net site
0032     void documentLoaded();
0033     void linkClicked(const QUrl& url);
0034 
0035 private:
0036     KDevelop::StandardDocumentationView* m_part;
0037     QWidget* m_loading;
0038     PhpDocsPlugin* m_provider;
0039 };
0040 
0041 #endif // PHPDOCUMENTATIONWIDGET_H