Skip to content

Commit

Permalink
Web Browser window: remove our support for Python.
Browse files Browse the repository at this point in the history
Indeed, there is, at this stage at least, no need for accessing our Web Browser window from Python.
  • Loading branch information
agarny committed Nov 19, 2019
1 parent 82bceea commit 48f052e
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 200 deletions.
3 changes: 0 additions & 3 deletions src/plugins/miscellaneous/WebBrowserWindow/CMakeLists.txt
Expand Up @@ -7,18 +7,15 @@ add_plugin(WebBrowserWindow
../../i18ninterface.cpp
../../plugininfo.cpp
../../plugininterface.cpp
../../pythoninterface.cpp
../../windowinterface.cpp

src/webbrowserwindowplugin.cpp
src/webbrowserwindowpythonwrapper.cpp
src/webbrowserwindowwidget.cpp
src/webbrowserwindowwindow.cpp
UIS
src/webbrowserwindowwindow.ui
PLUGINS
Core
PythonQtSupport
WebViewerWidget
QT_MODULES
PrintSupport
Expand Down
Expand Up @@ -21,11 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Web Browser window plugin
//==============================================================================

#include "corecliutils.h"
#include "coreguiutils.h"
#include "webbrowserwindowplugin.h"
#include "webbrowserwindowwindow.h"
#include "webbrowserwindowpythonwrapper.h"

//==============================================================================

Expand All @@ -47,7 +45,7 @@ PLUGININFO_FUNC WebBrowserWindowPluginInfo()
descriptions.insert("fr", QString::fromUtf8("une extension pour naviguer sur le Web."));

return new PluginInfo(PluginInfo::Category::Miscellaneous, true, false,
QStringList() << "Core" << "PythonQtSupport" << "WebViewerWidget",
QStringList() << "Core" << "WebViewerWidget",
#if !defined(QT_DEBUG) || !defined(Q_OS_WIN)
descriptions,
QStringList() << "PythonConsoleWindow");
Expand Down Expand Up @@ -108,12 +106,6 @@ void WebBrowserWindowPlugin::initializePlugin()
// Create our Web Browser window

mWebBrowserWindowWindow = new WebBrowserWindowWindow(Core::mainWindow());

// Get the Web Browser window's widget and save it for our Python wrapper

mWebBrowserWindowWidget = mWebBrowserWindowWindow->widget();

instance()->mWebBrowserWindowWidget = mWebBrowserWindowWidget;
}

//==============================================================================
Expand Down Expand Up @@ -163,17 +155,6 @@ void WebBrowserWindowPlugin::handleUrl(const QUrl &pUrl)
// We don't handle this interface...
}

//==============================================================================
// Python interface
//==============================================================================

void WebBrowserWindowPlugin::registerPythonClasses(PyObject *pModule)
{
// Register our Python classes

new WebBrowserWindowPythonWrapper(pModule, this);
}

//==============================================================================
// Window interface
//==============================================================================
Expand Down Expand Up @@ -203,30 +184,6 @@ QDockWidget * WebBrowserWindowPlugin::windowWidget() const
return mWebBrowserWindowWindow;
}

//==============================================================================
// Plugin specific
//==============================================================================

WebBrowserWindowPlugin * WebBrowserWindowPlugin::instance()
{
// Return the 'global' instance of our plugin

static WebBrowserWindowPlugin instance;

return static_cast<WebBrowserWindowPlugin *>(Core::globalInstance("OpenCOR::WebBrowserWindow::WebBrowserWindowPlugin::instance()",
&instance));
}


//==============================================================================

WebBrowserWindowWidget * WebBrowserWindowPlugin::webBrowserWindowWidget() const
{
// Return our Web Browser window widget

return mWebBrowserWindowWidget;
}

//==============================================================================

} // namespace WebBrowserWindow
Expand Down
Expand Up @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "i18ninterface.h"
#include "plugininfo.h"
#include "plugininterface.h"
#include "pythoninterface.h"
#include "windowinterface.h"

//==============================================================================
Expand All @@ -42,38 +41,29 @@ PLUGININFO_FUNC WebBrowserWindowPluginInfo();

//==============================================================================

class WebBrowserWindowWidget;
class WebBrowserWindowWindow;

//==============================================================================

class WebBrowserWindowPlugin : public QObject, public I18nInterface,
public PluginInterface, public PythonInterface,
public WindowInterface
public PluginInterface, public WindowInterface
{
Q_OBJECT

Q_PLUGIN_METADATA(IID "OpenCOR.WebBrowserWindowPlugin" FILE "webbrowserwindowplugin.json")

Q_INTERFACES(OpenCOR::I18nInterface)
Q_INTERFACES(OpenCOR::PluginInterface)
Q_INTERFACES(OpenCOR::PythonInterface)
Q_INTERFACES(OpenCOR::WindowInterface)

public:
#include "i18ninterface.inl"
#include "plugininterface.inl"
#include "pythoninterface.inl"
#include "windowinterface.inl"

static WebBrowserWindowPlugin * instance();

WebBrowserWindowWidget * webBrowserWindowWidget() const;

private:
QAction *mWebBrowserWindowAction = nullptr;

WebBrowserWindowWidget *mWebBrowserWindowWidget = nullptr;
WebBrowserWindowWindow *mWebBrowserWindowWindow = nullptr;
};

Expand Down

This file was deleted.

This file was deleted.

Expand Up @@ -261,13 +261,6 @@ void WebBrowserWindowWindow::saveSettings(QSettings &pSettings) const

//==============================================================================

WebBrowserWindowWidget * WebBrowserWindowWindow::widget() const
{
return mWebBrowserWindowWidget;
}

//==============================================================================

void WebBrowserWindowWindow::urlChanged(const QUrl &pUrl)
{
// The URL has changed, so update our URL value
Expand Down
Expand Up @@ -62,8 +62,6 @@ class WebBrowserWindowWindow : public Core::WindowWidget
void loadSettings(QSettings &pSettings) override;
void saveSettings(QSettings &pSettings) const override;

WebBrowserWindowWidget * widget() const;

private:
Ui::WebBrowserWindowWindow *mGui;

Expand Down

0 comments on commit 48f052e

Please sign in to comment.