From ce06956d314dc8d7080ba96b76f4ee8ad851912a Mon Sep 17 00:00:00 2001 From: aqua Date: Wed, 17 Aug 2022 22:48:01 +0300 Subject: Show main window - added Task Manager, showing all plugins, windows and view --- src/application.hpp | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src/application.hpp') diff --git a/src/application.hpp b/src/application.hpp index e74350f1..ce4bbfd1 100644 --- a/src/application.hpp +++ b/src/application.hpp @@ -11,7 +11,9 @@ #pragma once +#include "mainwindow/rekonqwindow.h" #include "rekonq.hpp" +#include #include #include #include @@ -19,13 +21,13 @@ // Forward Declarations class rView; class PluginLoader; -// class RekonqWindow; // class WebTab; // class WebPage; -// typedef QList< QWeakPointer > RekonqWindowList; -// typedef QList WebAppList; +typedef QList> RekonqPluginList; +typedef QList> RekonqWindowList; +typedef QList> RekonqViewList; // --------------------------------------------------------------------------------------------------------------- @@ -40,12 +42,14 @@ public: ~Application() override; bool registerPlugin(const QString &path); + [[nodiscard]] auto pluginList() const { return m_plugins; }; // int newInstance(); - [[deprecated]] static Application *instance() { return (qobject_cast(QCoreApplication::instance())); } + static Application *instance() { return (qobject_cast(QCoreApplication::instance())); } // RekonqWindow *rekonqWindow(const QString &activityID = QString()); - // RekonqWindowList rekonqWindowList(); + [[nodiscard]] auto windowList() const { return m_windows; } + [[nodiscard]] auto viewList() const { return m_views; } /** * @returns the list of windows associated with activity whose id is @param activityID @@ -90,7 +94,8 @@ public slots: // RekonqWindow *newWindow(bool withTab = true, bool PrivateBrowsingMode = false); // RekonqWindow *newWindow(WebPage *pg); - rView *newWebApp(const QUrl &url = QUrl()); + RekonqWindow *newWindow(); + rView *newView(const QUrl &url = QUrl(), RekonqWindow *window = nullptr); // void createWebAppShortcut(const QString & urlString = QString(), const QString & titleString = QString()); @@ -117,7 +122,7 @@ private slots: // void pageCreated(WebPage *); private: - QList m_plugins; - // RekonqWindowList m_rekonqWindows; - QList m_webApps; + RekonqPluginList m_plugins; + RekonqWindowList m_windows; + RekonqViewList m_views; }; -- cgit v1.2.1