diff --git a/src/backends/scilab/scilabbackend.cpp b/src/backends/scilab/scilabbackend.cpp index ebde6c56..523b113b 100644 --- a/src/backends/scilab/scilabbackend.cpp +++ b/src/backends/scilab/scilabbackend.cpp @@ -1,102 +1,107 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- Copyright (C) 2011 Filipe Saraiva */ #include "scilabbackend.h" #include "scilabsession.h" #include "scilabextensions.h" #include "settings.h" #include "ui_settings.h" #include #include #include "cantor_macros.h" ScilabBackend::ScilabBackend(QObject* parent,const QList args) : Cantor::Backend(parent, args) { qDebug()<<"Creating ScilabBackend"; new ScilabVariableManagementExtension(this); new ScilabScriptExtension(this); setObjectName(QLatin1String("scilabbackend")); } ScilabBackend::~ScilabBackend() { qDebug()<<"Destroying ScilabBackend"; } QString ScilabBackend::id() const { return QLatin1String("scilab"); } +QString ScilabBackend::version() const +{ + return QLatin1String("5.5"); +} + Cantor::Session* ScilabBackend::createSession() { qDebug()<<"Spawning a new Scilab session"; return new ScilabSession(this); } Cantor::Backend::Capabilities ScilabBackend::capabilities() const { qDebug()<<"Requesting capabilities of ScilabSession"; return Cantor::Backend::SyntaxHighlighting | Cantor::Backend::Completion | Cantor::Backend::VariableManagement; } bool ScilabBackend::requirementsFullfilled() const { QFileInfo info(ScilabSettings::self()->path().toLocalFile()); return info.isExecutable(); } QWidget* ScilabBackend::settingsWidget(QWidget* parent) const { QWidget* widget=new QWidget(parent); Ui::ScilabSettingsBase s; s.setupUi(widget); return widget; } KConfigSkeleton* ScilabBackend::config() const { return ScilabSettings::self(); } QUrl ScilabBackend::helpUrl() const { return QUrl(i18nc("the url to the documentation of Scilab, please check if there is a translated version and use the correct url", "http://www.scilab.org/support/documentation")); } QString ScilabBackend::description() const { return i18n("

Warning: this backend works only with Scilab version 5.5 or later

"\ "

Scilab is a free software, cross-platform numerical computational package and a high-level, numerically oriented programming language.

" \ "Scilab is distributed under CeCILL license (GPL compatible)"); } K_PLUGIN_FACTORY_WITH_JSON(scilabbackend, "scilabbackend.json", registerPlugin();) #include "scilabbackend.moc" diff --git a/src/backends/scilab/scilabbackend.h b/src/backends/scilab/scilabbackend.h index 5e261432..8d835f8e 100644 --- a/src/backends/scilab/scilabbackend.h +++ b/src/backends/scilab/scilabbackend.h @@ -1,46 +1,47 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- Copyright (C) 2011 Filipe Saraiva */ #ifndef _SCILABBACKEND_H #define _SCILABBACKEND_H #include "backend.h" class ScilabBackend : public Cantor::Backend { Q_OBJECT public: explicit ScilabBackend( QObject* parent = 0,const QList args = QList()); ~ScilabBackend(); QString id() const; + QString version() const override; Cantor::Session *createSession(); Cantor::Backend::Capabilities capabilities() const; virtual bool requirementsFullfilled() const; QWidget* settingsWidget(QWidget* parent) const; KConfigSkeleton* config() const; QUrl helpUrl() const; QString description() const; }; #endif /* _SCILABBACKEND_H */