diff options
| author | Jeremy Rimpo <jrim@rimpo.org> | 2023-10-17 00:38:17 -0500 |
|---|---|---|
| committer | Jeremy Rimpo <jrim@rimpo.org> | 2023-10-18 22:57:48 -0500 |
| commit | 2f5cca5c60bf9ea62ccdddb45243ee163f6b227d (patch) | |
| tree | 8d498aa288b11dd1a1dab9a26e4882434247c0cf /src/pluginlist.cpp | |
| parent | d57d8bdd5a4462c644ad300dc19bf2e02d0ab534 (diff) | |
Plugins updates
- Temporarily remove some overlay info
- Add isDummy and dummy info
- Display refinements for plugin info
Diffstat (limited to 'src/pluginlist.cpp')
| -rw-r--r-- | src/pluginlist.cpp | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 07580c48..b944caf7 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -1016,6 +1016,16 @@ bool PluginList::isOverlayFlagged(const QString& name) const } } +bool PluginList::isDummy(const QString& name) const +{ + auto iter = m_ESPsByName.find(name); + if (iter == m_ESPsByName.end()) { + return false; + } else { + return m_ESPs[iter->second].isDummy; + } +} + boost::signals2::connection PluginList::onPluginStateChanged( const std::function<void(const std::map<QString, PluginStates>&)>& func) { @@ -1093,9 +1103,9 @@ void PluginList::generatePluginIndexes() .arg((numESLs) % 4096, 3, 16, QChar('0')) .toUpper(); ++numESLs; - } else if (overridePluginsSupported && m_ESPs[i].isOverlayFlagged) { - m_ESPs[i].index = QString("XX"); - ++numSkipped; + //} else if (overridePluginsSupported && m_ESPs[i].isOverlayFlagged) { + // m_ESPs[i].index = QString("XX"); + // ++numSkipped; } else { m_ESPs[i].index = QString("%1").arg(l - numESLs - numSkipped, 2, 16, QChar('0')).toUpper(); @@ -1233,10 +1243,11 @@ QVariant PluginList::fontData(const QModelIndex& modelIndex) const result.setWeight(QFont::Bold); } else if (m_ESPs[index].isLightFlagged) { result.setItalic(true); - } else if (m_ESPs[index].isOverlayFlagged) { - result.setUnderline(true); } + if (m_ESPs[index].isDummy) + result.setStrikeOut(true); + return result; } @@ -1329,11 +1340,17 @@ QVariant PluginList::tooltipData(const QModelIndex& modelIndex) const .arg(type); } - if (esp.isOverlayFlagged) { - toolTip += - "<br><br>" + tr("This plugin is flagged as an overlay plugin. It contains only " - "modified records and will overlay those changes onto the " - "existing records in memory. It takes no memory space."); + // if (esp.isOverlayFlagged) { + // toolTip += + // "<br><br>" + tr("This plugin is flagged as an overlay plugin. It contains + // only " + // "modified records and will overlay those changes onto the " + // "existing records in memory. It takes no memory space."); + // } + + if (esp.isDummy) { + toolTip += "<br><br>" + tr("This is a dummy plugin. It contains no records and is " + "typically used to load a paired archive file."); } if (esp.forceDisabled) { @@ -1787,6 +1804,7 @@ PluginList::ESPInfo::ESPInfo(const QString& name, bool forceLoaded, bool forceEn isOverlayFlagged = overlaySupported && file.isOverlay(); isLightFlagged = lightSupported && !isOverlayFlagged && file.isLight(overlaySupported); + isDummy = file.isDummy(); author = QString::fromLatin1(file.author().c_str()); description = QString::fromLatin1(file.description().c_str()); @@ -1801,6 +1819,7 @@ PluginList::ESPInfo::ESPInfo(const QString& name, bool forceLoaded, bool forceEn isMasterFlagged = false; isOverlayFlagged = false; isLightFlagged = false; + isDummy = false; } } |
