From dce6507dad1ff7d76a5c0497d516c79bacd08477 Mon Sep 17 00:00:00 2001 From: Al12rs Date: Sun, 28 Oct 2018 15:04:50 +0100 Subject: Added Color costumization for Separators. --- src/modinforegular.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/modinforegular.cpp') diff --git a/src/modinforegular.cpp b/src/modinforegular.cpp index 1d84e2c8..d0f56a52 100644 --- a/src/modinforegular.cpp +++ b/src/modinforegular.cpp @@ -90,6 +90,7 @@ void ModInfoRegular::readMeta() m_Validated = metaFile.value("validated", false).toBool(); m_URL = metaFile.value("url", "").toString(); m_LastNexusQuery = QDateTime::fromString(metaFile.value("lastNexusQuery", "").toString(), Qt::ISODate); + m_Color = metaFile.value("color",QColor()).value(); if (metaFile.contains("endorsed")) { if (metaFile.value("endorsed").canConvert()) { switch (metaFile.value("endorsed").toInt()) { @@ -153,6 +154,7 @@ void ModInfoRegular::saveMeta() metaFile.setValue("lastNexusQuery", m_LastNexusQuery.toString(Qt::ISODate)); metaFile.setValue("converted", m_Converted); metaFile.setValue("validated", m_Validated); + metaFile.setValue("color", m_Color); if (m_EndorsedState != ENDORSED_UNKNOWN) { metaFile.setValue("endorsed", m_EndorsedState); } @@ -397,6 +399,17 @@ void ModInfoRegular::setNeverEndorse() } +void ModInfoRegular::setColor(QColor color) +{ + m_Color = color; + m_MetaInfoChanged = true; +} + +QColor ModInfoRegular::getColor() +{ + return m_Color; +} + bool ModInfoRegular::remove() { m_MetaInfoChanged = false; -- cgit v1.3.1