IEK/Src/Pub/PubCss.cpp

63 lines
1.1 KiB
C++
Raw Permalink Normal View History

2022-05-06 07:34:00 +00:00
#include "PubCss.h"
#define GETSTR(x) #x
PubCss *PubCss::Get()
{
static PubCss cx;
return &cx;
}
QString PubCss::GetStr(CSS css) const
{
auto it = _mapList.begin();
for(; it != _mapList.end(); ++it)
{
if(it.key() == css)
{
return it.value();
}
}
return "";
}
PubCss::PubCss(QObject *obj)
:QObject (obj)
{
_mapList[SMALLWINDOW_LEFTBUTTONSTYLE] = GETSTR
(
QPushButton
{
border:none;
color:rgb(255,255,255);
}
QPushButton:hover
{
background-color:rgb(25,28,59);
}
);
_mapList[SMALLWINDOW_TITLELABEL] = GETSTR
(
QLabel
{
border:none;
color:rgb(255,255,255);
font: "楷体" 13pt;
}
);
_mapList[DEVICEMONITORING_BOTTOMLABEL] = GETSTR
(
QLabel
{
border:none;
color:rgb(235,235,235);
background-color:rgb(48,48,85);
}
);
}
PubCss::~PubCss()
{
}