1 /* 2 * SPDX-FileCopyrightText: 2013-2014 Andreas Cord-Landwehr <cordlandwehr@kde.org> 3 * 4 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 5 */ 6 7 #ifndef SCRIPTAPIWIDGET_H 8 #define SCRIPTAPIWIDGET_H 9 10 #include "ui_scriptapiwidget.h" 11 #include <QWidget> 12 13 class QUrl; 14 class ScriptApiManager; 15 class ScriptApiModel; 16 17 /** 18 * \class ScriptApiWidget 19 * This Widget loads API information about all script interfaces and displays them. 20 */ 21 class ScriptApiWidget : public QWidget 22 { 23 Q_OBJECT 24 25 public: 26 /** 27 * Default constructor. 28 */ 29 explicit ScriptApiWidget(QWidget* parent); 30 void showHtmlOutline(bool logHistory); 31 32 public Q_SLOTS: 33 void showTreeOutline(); 34 void showHtmlOutline(); 35 void showDetails(const QModelIndex &index); 36 void showObjectApi(const QString &id, bool logHistory); 37 void showObjectApi(const QUrl &aliasPage); 38 void historyGoBack(); 39 void historyGoForward(); 40 41 private: 42 ScriptApiManager *m_manager; 43 ScriptApiModel *m_model; 44 QUrl m_baseUrl; 45 QList<QString> m_history; 46 int m_historyPointer; 47 Ui::ScriptApiWidget *ui; 48 }; 49 50 #endif 51