2013-09-01 18:36:43 +02:00
|
|
|
#include "proxypluginwrappers.h"
|
|
|
|
|
#include <utility.h>
|
|
|
|
|
#include "error.h"
|
|
|
|
|
#include "gilock.h"
|
2015-11-08 23:15:55 +00:00
|
|
|
#include <QWidget>
|
2013-09-01 18:36:43 +02:00
|
|
|
|
2016-11-27 16:54:19 +02:00
|
|
|
namespace boost
|
|
|
|
|
{
|
2016-12-12 05:13:08 -08:00
|
|
|
// See bug https://connect.microsoft.com/VisualStudio/Feedback/Details/2852624
|
|
|
|
|
#if (_MSC_VER == 1900)
|
2016-11-27 16:54:19 +02:00
|
|
|
template<> const volatile MOBase::IOrganizer* get_pointer(const volatile MOBase::IOrganizer* p) { return p; }
|
|
|
|
|
template<> const volatile MOBase::IModInterface* get_pointer(const volatile MOBase::IModInterface* p) { return p; }
|
|
|
|
|
template<> const volatile MOBase::IPluginGame* get_pointer(const volatile MOBase::IPluginGame* p) { return p; }
|
|
|
|
|
template<> const volatile MOBase::IProfile* get_pointer(const volatile MOBase::IProfile* p) { return p; }
|
|
|
|
|
template<> const volatile MOBase::IModList* get_pointer(const volatile MOBase::IModList* p) { return p; }
|
|
|
|
|
template<> const volatile MOBase::IPluginList* get_pointer(const volatile MOBase::IPluginList* p) { return p; }
|
|
|
|
|
template<> const volatile MOBase::IDownloadManager* get_pointer(const volatile MOBase::IDownloadManager* p) { return p; }
|
|
|
|
|
template<> const volatile MOBase::IModRepositoryBridge* get_pointer(const volatile MOBase::IModRepositoryBridge* p) { return p; }
|
2016-12-12 05:13:08 -08:00
|
|
|
#endif
|
2016-11-27 16:54:19 +02:00
|
|
|
}
|
2013-09-01 18:36:43 +02:00
|
|
|
|
|
|
|
|
using namespace MOBase;
|
|
|
|
|
|
2016-11-27 16:54:19 +02:00
|
|
|
#define PYCATCH catch (const boost::python::error_already_set &) { reportPythonError(); throw MyException("unhandled exception"); }\
|
2013-09-01 18:36:43 +02:00
|
|
|
catch (...) { throw MyException("An unknown exception was thrown in python code"); }
|
|
|
|
|
|
|
|
|
|
|
2016-01-10 19:50:19 +01:00
|
|
|
/////////////////////////////
|
|
|
|
|
/// IPlugin Wrapper
|
2018-04-17 21:07:42 +01:00
|
|
|
|
|
|
|
|
|
2016-01-10 19:50:19 +01:00
|
|
|
bool IPluginWrapper::init(MOBase::IOrganizer *moInfo)
|
|
|
|
|
{
|
|
|
|
|
try {
|
2016-11-27 16:54:19 +02:00
|
|
|
return this->get_override("init")(boost::python::ptr(moInfo));
|
2016-01-10 19:50:19 +01:00
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginWrapper::name() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("name")().as<QString>();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginWrapper::author() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("author")().as<QString>();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginWrapper::description() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("description")().as<QString>();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MOBase::VersionInfo IPluginWrapper::version() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("version")().as<MOBase::VersionInfo>();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool IPluginWrapper::isActive() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("isActive")().as<bool>();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QList<MOBase::PluginSetting> IPluginWrapper::settings() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("settings")().as<QList<MOBase::PluginSetting>>();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
/// end IPlugin Wrapper
|
2013-09-01 18:36:43 +02:00
|
|
|
/////////////////////////////////////
|
2018-04-17 23:03:08 +01:00
|
|
|
/// IPluginGame Wrapper
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString IPluginGameWrapper::gameName() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("gameName")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void IPluginGameWrapper::initializeProfile(const QDir & directory, ProfileSettings settings) const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
this->get_override("initializeProfile")(directory, settings);
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginGameWrapper::savegameExtension() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("savegameExtension")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginGameWrapper::savegameSEExtension() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("savegameSEExtension")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool IPluginGameWrapper::isInstalled() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("isInstalled")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QIcon IPluginGameWrapper::gameIcon() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("gameIcon")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QDir IPluginGameWrapper::gameDirectory() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("gameDirectory")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QDir IPluginGameWrapper::dataDirectory() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("dataDirectory")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void IPluginGameWrapper::setGamePath(const QString & path)
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
this->get_override("setGamePath")(path);
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QDir IPluginGameWrapper::documentsDirectory() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("documentsDirectory")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QDir IPluginGameWrapper::savesDirectory() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("savesDirectory")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QList<MOBase::ExecutableInfo> IPluginGameWrapper::executables() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("executables")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginGameWrapper::steamAPPId() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("steamAPPId")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QStringList IPluginGameWrapper::primaryPlugins() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("primaryPlugins")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QStringList IPluginGameWrapper::gameVariants() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("gameVariants")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void IPluginGameWrapper::setGameVariant(const QString & variant)
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
this->get_override("setGameVariant")(variant);
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginGameWrapper::binaryName() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("binaryName")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginGameWrapper::gameShortName() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("gameShortName")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QStringList IPluginGameWrapper::validShortNames() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("validShortNames")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginGameWrapper::gameNexusName() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("gameNexusName")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QStringList IPluginGameWrapper::iniFiles() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("iniFiles")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QStringList IPluginGameWrapper::DLCPlugins() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("DLCPlugins")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QStringList IPluginGameWrapper::CCPlugins() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("CCPlugins")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IPluginGame::LoadOrderMechanism IPluginGameWrapper::loadOrderMechanism() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("loadorderMechanism")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IPluginGame::SortMechanism IPluginGameWrapper::sortMechanism() const
|
|
|
|
|
{
|
2018-04-18 12:31:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("sortMechanism")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int IPluginGameWrapper::nexusModOrganizerID() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("nexusModOrganizerID")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int IPluginGameWrapper::nexusGameID() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("nexusGameID")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool IPluginGameWrapper::looksValid(QDir const & dir) const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("looksValid")(dir);
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginGameWrapper::gameVersion() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("gameVersion")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginGameWrapper::getLauncherName() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("getLauncherName")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool IPluginGameWrapper::init(MOBase::IOrganizer * moInfo)
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
2018-04-18 00:06:12 +01:00
|
|
|
return this->get_override("init")(boost::python::ptr(moInfo));
|
2018-04-17 23:08:16 +01:00
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginGameWrapper::name() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("name")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginGameWrapper::author() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("author")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginGameWrapper::description() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("description")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MOBase::VersionInfo IPluginGameWrapper::version() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("version")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool IPluginGameWrapper::isActive() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("isActive")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QList<MOBase::PluginSetting> IPluginGameWrapper::settings() const
|
|
|
|
|
{
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("settings")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::map<std::type_index, boost::any> IPluginGameWrapper::featureList() const
|
|
|
|
|
{
|
2018-04-18 00:06:12 +01:00
|
|
|
qCritical("Calling unproxied method IPluginGameWrapper::featureList()");
|
2018-04-17 23:08:16 +01:00
|
|
|
try {
|
|
|
|
|
return this->get_override("_featureList")();
|
|
|
|
|
} PYCATCH;
|
2018-04-17 23:03:08 +01:00
|
|
|
}
|
|
|
|
|
/// end IPluginGame Wrapper
|
|
|
|
|
/////////////////////////////////////
|
2013-09-01 18:36:43 +02:00
|
|
|
/// IPluginInstallerCustom Wrapper
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool IPluginInstallerCustomWrapper::init(MOBase::IOrganizer *moInfo)
|
|
|
|
|
{
|
|
|
|
|
try {
|
2016-11-27 16:54:19 +02:00
|
|
|
return this->get_override("init")(boost::python::ptr(moInfo));
|
2013-09-01 18:36:43 +02:00
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginInstallerCustomWrapper::name() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
2014-11-09 14:01:48 +01:00
|
|
|
return this->get_override("name")().as<QString>();
|
2013-09-01 18:36:43 +02:00
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginInstallerCustomWrapper::author() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
2014-11-09 14:01:48 +01:00
|
|
|
return this->get_override("author")().as<QString>();
|
2013-09-01 18:36:43 +02:00
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginInstallerCustomWrapper::description() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
2014-11-09 14:01:48 +01:00
|
|
|
return this->get_override("description")().as<QString>();
|
2013-09-01 18:36:43 +02:00
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MOBase::VersionInfo IPluginInstallerCustomWrapper::version() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("version")();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool IPluginInstallerCustomWrapper::isActive() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("isActive")();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QList<MOBase::PluginSetting> IPluginInstallerCustomWrapper::settings() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
2014-11-09 14:01:48 +01:00
|
|
|
return this->get_override("settings")().as<QList<MOBase::PluginSetting>>();
|
2013-09-01 18:36:43 +02:00
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
unsigned int IPluginInstallerCustomWrapper::priority() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("priority")();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool IPluginInstallerCustomWrapper::isManualInstaller() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("isManualInstaller")();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
2013-10-16 23:04:03 +02:00
|
|
|
bool IPluginInstallerCustomWrapper::isArchiveSupported(const DirectoryTree &) const
|
2013-09-01 18:36:43 +02:00
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
//return this->get_override("isArchiveSupported")(tree);
|
|
|
|
|
return false;
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool IPluginInstallerCustomWrapper::isArchiveSupported(const QString &archiveName) const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("isArchiveSupported")(archiveName);
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::set<QString> IPluginInstallerCustomWrapper::supportedExtensions() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
2014-11-09 14:01:48 +01:00
|
|
|
return this->get_override("supportedExtensions")().as<std::set<QString>>();
|
2013-09-01 18:36:43 +02:00
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPluginInstaller::EInstallResult IPluginInstallerCustomWrapper::install(GuessedValue<QString> &modName, const QString &archiveName,
|
2018-04-17 22:31:53 +01:00
|
|
|
const QString &version, int modID)
|
2013-09-01 18:36:43 +02:00
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("install")(modName, archiveName, version, modID);
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void IPluginInstallerCustomWrapper::setParentWidget(QWidget *parent)
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
this->get_override("setParentWidget")(parent);
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
2018-04-17 21:07:42 +01:00
|
|
|
/// end IPluginInstallerCustom Wrapper
|
|
|
|
|
/////////////////////////////
|
|
|
|
|
/// IPluginTool Wrapper
|
2013-09-01 18:36:43 +02:00
|
|
|
|
|
|
|
|
|
2018-04-17 21:07:42 +01:00
|
|
|
bool IPluginToolWrapper::init(MOBase::IOrganizer *moInfo)
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("init")(boost::python::ptr(moInfo));
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginToolWrapper::name() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("name")().as<QString>();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginToolWrapper::author() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("author")().as<QString>();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginToolWrapper::description() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("description")().as<QString>();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MOBase::VersionInfo IPluginToolWrapper::version() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("version")().as<MOBase::VersionInfo>();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool IPluginToolWrapper::isActive() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("isActive")().as<bool>();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QList<MOBase::PluginSetting> IPluginToolWrapper::settings() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("settings")().as<QList<MOBase::PluginSetting>>();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginToolWrapper::displayName() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("displayName")().as<QString>();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString IPluginToolWrapper::tooltip() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("tooltip")().as<QString>();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QIcon IPluginToolWrapper::icon() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
return this->get_override("icon")().as<QIcon>();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void IPluginToolWrapper::setParentWidget(QWidget *parent)
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
this->get_override("setParentWidget")(parent);
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void IPluginToolWrapper::display() const
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
GILock lock;
|
|
|
|
|
|
|
|
|
|
this->get_override("display")();
|
|
|
|
|
} PYCATCH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// end IPluginTool Wrapper
|
|
|
|
|
|