Apply clang-format to Lts/Common and DTC/enum headers
- Formatted all CodeGen module files (9 files) - Formatted LtsAppDescriptor module files - Formatted LtsAppManager/AppChooser files - Applied clang-format to all DTC and enum headers across modules - Removed coordTransTests from CommonUnitTestsPlaceholder (moved to tests/) Cosmetic changes only, no functional modifications. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
848 files changed
+89305
-100020
No files matched your search
Executable → Regular
+99
-53
@@ -1,19 +1,16 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LtsWidgets/lts_base.h>
|
||||
#include <ProjectConfig/project_defines.h>
|
||||
#include <LtsAppDescriptor/lts_app_descriptor.h>
|
||||
#include <LtsUtilsCore/lts_translatable_identifier.h>
|
||||
|
||||
#include <LtsWidgets/lts_base.h>
|
||||
#include <ProjectConfig/project_defines.h>
|
||||
#include <QFlags>
|
||||
#include <QObject>
|
||||
#include <QVector>
|
||||
#include <QFlags>
|
||||
#include <memory>
|
||||
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
class INGLLogger;
|
||||
@@ -23,7 +20,8 @@ namespace LtsWidgets
|
||||
{
|
||||
class LtsBackgroundWidget;
|
||||
class LtsBaseLayoutWidget;
|
||||
}
|
||||
} // namespace LtsWidgets
|
||||
|
||||
namespace LtsSession
|
||||
{
|
||||
class LtsSession;
|
||||
@@ -33,65 +31,113 @@ namespace GuiPluginBase
|
||||
{
|
||||
class Interface;
|
||||
|
||||
|
||||
class Plugin
|
||||
class Plugin
|
||||
{
|
||||
public:
|
||||
Plugin() = default;
|
||||
virtual ~Plugin() = default;
|
||||
public:
|
||||
Plugin() = default;
|
||||
virtual ~Plugin() = default;
|
||||
|
||||
virtual QString pluginName() = 0;
|
||||
virtual std::shared_ptr<Interface> createGuiInterface(LtsSession::LtsSession *session) = 0;
|
||||
virtual bool availableInPartition(IDL::PartitionType partition) const = 0;
|
||||
virtual QString pluginName() = 0;
|
||||
virtual std::shared_ptr<Interface> createGuiInterface(LtsSession::LtsSession* session) = 0;
|
||||
virtual bool availableInPartition(IDL::PartitionType partition) const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class Interface
|
||||
{
|
||||
public:
|
||||
Interface(LtsSession::LtsSession *session, NGL::INGLLogger &logger)
|
||||
: m_hasInit(true)
|
||||
, m_session(session)
|
||||
, m_logger(logger)
|
||||
, m_appId(LtsAppDescriptor::App::Login)
|
||||
{}
|
||||
virtual ~Interface() = default;
|
||||
public:
|
||||
Interface(LtsSession::LtsSession* session, NGL::INGLLogger& logger)
|
||||
: m_hasInit(true), m_session(session), m_logger(logger), m_appId(LtsAppDescriptor::App::Login)
|
||||
{
|
||||
}
|
||||
|
||||
void setFlags(const QFlags<LtsAppDescriptor::PluginInfo::Flag> &flags) { m_flags = flags; }
|
||||
const QFlags<LtsAppDescriptor::PluginInfo::Flag> &getFlags() const { return m_flags; }
|
||||
void setOptions(const QStringList &options) { m_options = options; }
|
||||
const QStringList &getOptions() const { return m_options; }
|
||||
void setAppId(LtsAppDescriptor::App appId) { m_appId = appId; }
|
||||
LtsAppDescriptor::App appId() const { return m_appId; }
|
||||
virtual ~Interface() = default;
|
||||
|
||||
virtual QVector<LtsWidgets::PluginData> getActions() { return QVector<LtsWidgets::PluginData>(); }
|
||||
|
||||
virtual bool fetchInterfaces() { return true; }
|
||||
virtual void clearInterfaces() {}
|
||||
virtual QString menuGroup() const { return {}; }
|
||||
virtual LtsUtils::LtsTranslatableIdentifier menuGroupIdentifier() const { m_hasMenuGroupIdentifier = false; return {}; }
|
||||
virtual bool availableInPartition(IDL::PartitionType partition) const { Q_UNUSED(partition); return true; }
|
||||
virtual void init() { m_hasInit = false; }
|
||||
void setFlags(const QFlags<LtsAppDescriptor::PluginInfo::Flag>& flags)
|
||||
{
|
||||
m_flags = flags;
|
||||
}
|
||||
|
||||
|
||||
virtual void executePayload(LtsWidgets::LtsBackgroundWidget *mainBackground) { (void)mainBackground; }
|
||||
virtual int executionPriority() const { return -1; }
|
||||
const QFlags<LtsAppDescriptor::PluginInfo::Flag>& getFlags() const
|
||||
{
|
||||
return m_flags;
|
||||
}
|
||||
|
||||
|
||||
void setOptions(const QStringList& options)
|
||||
{
|
||||
m_options = options;
|
||||
}
|
||||
|
||||
bool m_hasInit;
|
||||
mutable bool m_hasMenuGroupIdentifier = true;
|
||||
const QStringList& getOptions() const
|
||||
{
|
||||
return m_options;
|
||||
}
|
||||
|
||||
protected:
|
||||
LtsSession::LtsSession *m_session;
|
||||
private:
|
||||
QFlags<LtsAppDescriptor::PluginInfo::Flag> m_flags;
|
||||
QStringList m_options;
|
||||
LtsAppDescriptor::App m_appId;
|
||||
|
||||
void setAppId(LtsAppDescriptor::App appId)
|
||||
{
|
||||
m_appId = appId;
|
||||
}
|
||||
|
||||
LtsAppDescriptor::App appId() const
|
||||
{
|
||||
return m_appId;
|
||||
}
|
||||
|
||||
virtual QVector<LtsWidgets::PluginData> getActions()
|
||||
{
|
||||
return QVector<LtsWidgets::PluginData>();
|
||||
}
|
||||
|
||||
virtual bool fetchInterfaces()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void clearInterfaces() {}
|
||||
|
||||
virtual QString menuGroup() const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
virtual LtsUtils::LtsTranslatableIdentifier menuGroupIdentifier() const
|
||||
{
|
||||
m_hasMenuGroupIdentifier = false;
|
||||
return {};
|
||||
}
|
||||
|
||||
virtual bool availableInPartition(IDL::PartitionType partition) const
|
||||
{
|
||||
Q_UNUSED(partition);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void init()
|
||||
{
|
||||
m_hasInit = false;
|
||||
}
|
||||
|
||||
virtual void executePayload(LtsWidgets::LtsBackgroundWidget* mainBackground)
|
||||
{
|
||||
(void)mainBackground;
|
||||
}
|
||||
|
||||
virtual int executionPriority() const
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool m_hasInit;
|
||||
mutable bool m_hasMenuGroupIdentifier = true;
|
||||
|
||||
protected:
|
||||
LtsSession::LtsSession* m_session;
|
||||
|
||||
private:
|
||||
QFlags<LtsAppDescriptor::PluginInfo::Flag> m_flags;
|
||||
QStringList m_options;
|
||||
LtsAppDescriptor::App m_appId;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace GuiPluginBase
|
||||
|
||||
Q_DECLARE_INTERFACE(GuiPluginBase::Plugin, "gui")
|
||||
Reference in new issue
Block a user