读取色板配置文件,获取背景色颜色值。

This commit is contained in:
DESKTOP-450PEFP\mainc 2026-05-12 09:49:19 +08:00
parent c2445d4ed0
commit 3bcc8f031d
2 changed files with 10 additions and 0 deletions

View File

@ -478,6 +478,7 @@ bool QtColorTableData::LoadColorConfig()
{
colorList.push_back(QtColorItem(QColor(pColorArr[k])));
}
m_colorBg.push_back(QtColorItem(QColor(m_GraInfo.GetBackgroundColour())));
QString str = qvFiles.at(i);
QStringList slist = str.split("_");
@ -566,6 +567,12 @@ QList<QRgb> QtColorTableData::GetRgb_UseTag(int nuse, int schemIndex, int colorn
return rgbList;
}
QRgb QtColorTableData::getRgb_Bg(int schemIndex) const
{
const QtColorItem& item = m_colorBg[schemIndex];
return qRgb(item.color.red(),item.color.green(),item.color.blue());
}
void QtColorTableData::ChangeDataRange(QtSchemeColor *scheme)
{
int colorNum=scheme->colorList.count();

View File

@ -179,6 +179,8 @@ public:
QList<QRgb> GetRgb_UseTag(int nuse, int schemIndex, int colornum=0) const;
QRgb getRgb_Bg(int schemIndex) const;
void ChangeDataRange(QtSchemeColor *scheme);
void ReadSettings();
@ -206,6 +208,7 @@ private:
// 当前所有的颜色方案,包括系统方案,自定义方案
QList<QtSchemeColor> m_colorSchemeList;
QList<QtSchemeColor> m_colorCfgList;
QList<QtColorItem> m_colorBg;
// 备份的颜色方案
QList<QtSchemeColor> m_systemSchemeList;