2022-12-12 16:45:31 +01:00
|
|
|
// Copyright (C) 2022 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial
|
2022-11-28 09:48:11 +01:00
|
|
|
|
|
|
|
|
#include "axivionplugin.h"
|
|
|
|
|
|
|
|
|
|
#include "axivionoutputpane.h"
|
|
|
|
|
#include "axivionsettings.h"
|
|
|
|
|
#include "axivionsettingspage.h"
|
|
|
|
|
|
2022-12-12 16:45:31 +01:00
|
|
|
#include <coreplugin/icore.h>
|
|
|
|
|
#include <extensionsystem/pluginmanager.h>
|
2022-11-28 09:48:11 +01:00
|
|
|
|
|
|
|
|
#ifdef LICENSECHECKER
|
|
|
|
|
# include <licensechecker/licensecheckerplugin.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
namespace Axivion::Internal {
|
|
|
|
|
|
|
|
|
|
class AxivionPluginPrivate
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
AxivionSettings axivionSettings;
|
|
|
|
|
AxivionSettingsPage axivionSettingsPage{&axivionSettings};
|
|
|
|
|
AxivionOutputPane axivionOutputPane;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
AxivionPlugin::~AxivionPlugin()
|
|
|
|
|
{
|
|
|
|
|
delete d;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool AxivionPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
|
|
|
|
{
|
|
|
|
|
Q_UNUSED(arguments)
|
|
|
|
|
Q_UNUSED(errorMessage)
|
|
|
|
|
|
|
|
|
|
#ifdef LICENSECHECKER
|
|
|
|
|
LicenseChecker::LicenseCheckerPlugin *licenseChecker
|
|
|
|
|
= ExtensionSystem::PluginManager::getObject<LicenseChecker::LicenseCheckerPlugin>();
|
|
|
|
|
|
|
|
|
|
if (!licenseChecker || !licenseChecker->hasValidLicense() || !licenseChecker->enterpriseFeatures())
|
|
|
|
|
return true;
|
|
|
|
|
#endif // LICENSECHECKER
|
|
|
|
|
|
|
|
|
|
d = new AxivionPluginPrivate;
|
2022-12-12 16:45:31 +01:00
|
|
|
d->axivionSettings.fromSettings(Core::ICore::settings());
|
2022-11-28 09:48:11 +01:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // Axivion::Internal
|