diff options
| author | Brian Munro <brian.alexander.munro@gmail.com> | 2018-05-08 12:47:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-08 12:47:54 +0200 |
| commit | 0da6af17b2d6a6965849aa0effd5a1a876f447c4 (patch) | |
| tree | 306056296c7a35504e85825ec6965b5193c74b24 /src/modinforegular.h | |
| parent | bc75009169ecbf378fa90891dc8183a8cb3ef499 (diff) | |
| parent | 44111d12c181ff062d7936480fdc380e33232e0e (diff) | |
Merge pull request #336 from Modorganizer2/Develop
Release 2.1.3
Diffstat (limited to 'src/modinforegular.h')
| -rw-r--r-- | src/modinforegular.h | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/src/modinforegular.h b/src/modinforegular.h index a94d0363..3abaded4 100644 --- a/src/modinforegular.h +++ b/src/modinforegular.h @@ -2,7 +2,6 @@ #define MODINFOREGULAR_H #include "modinfowithconflictinfo.h" - #include "nexusinterface.h" /** @@ -27,6 +26,9 @@ public: virtual bool isEmpty() const; + bool isAlternate() { return m_IsAlternate; } + bool isConverted() { return m_Converted; } + /** * @brief test if there is a newer version of the mod * @@ -94,6 +96,13 @@ public: void setNotes(const QString ¬es); /** + * @brief set/change the source game of this mod + * + * @param gameName the source game shortName + */ + void setGameName(QString gameName); + + /** * @brief set/change the nexus mod id of this mod * * @param modID the nexus mod id @@ -175,6 +184,11 @@ public: virtual void endorse(bool doEndorse); /** + * @brief updates the mod to flag it as converted in order to ignore the alternate game warning + */ + virtual void markConverted(bool converted) override; + + /** * @brief getter for the mod name * * @return the mod name @@ -206,6 +220,14 @@ public: * @return file used to install this mod from */ virtual QString getInstallationFile() const { return m_InstallationFile; } + + /** + * @brief getter for the source game repository + * + * @return the source game repository. should default to the active game. + **/ + QString getGameName() const { return m_GameName; } + /** * @brief getter for the nexus mod id * @@ -308,13 +330,13 @@ private: private slots: - void nxmDescriptionAvailable(int modID, QVariant userData, QVariant resultData); - void nxmEndorsementToggled(int, QVariant userData, QVariant resultData); - void nxmRequestFailed(int modID, int fileID, QVariant userData, const QString &errorMessage); + void nxmDescriptionAvailable(QString, int modID, QVariant userData, QVariant resultData); + void nxmEndorsementToggled(QString, int, QVariant userData, QVariant resultData); + void nxmRequestFailed(QString, int modID, int fileID, QVariant userData, const QString &errorMessage); protected: - ModInfoRegular(const QDir &path, MOShared::DirectoryEntry **directoryStructure); + ModInfoRegular(PluginContainer *pluginContainer, const MOBase::IPluginGame *game, const QDir &path, MOShared::DirectoryEntry **directoryStructure); private: @@ -325,6 +347,7 @@ private: QString m_NexusDescription; QString m_Repository; QString m_URL; + QString m_GameName; QDateTime m_CreationTime; QDateTime m_LastNexusQuery; @@ -333,6 +356,8 @@ private: std::set<std::pair<int, int>> m_InstalledFileIDs; bool m_MetaInfoChanged; + bool m_IsAlternate; + bool m_Converted; MOBase::VersionInfo m_NewestVersion; MOBase::VersionInfo m_IgnoredVersion; |
