void frmInput::changeStyle(QString topColor, QString bottomColor, QString borderColor, QString textColor)
{
QStringList qss;
qss.append(QString("QWidget#frmInput{background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 %1,stop:1 %2);}")
.arg(topColor).arg(bottomColor));
qss.append("QPushButton{padding:5px;border-radius:3px;}");
qss.append(QString("QPushButton:hover{background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 %1,stop:1 %2);}")
.arg(topColor).arg(bottomColor));
qss.append(QString("QLabel,QPushButton{color:%1;}").arg(textColor));
qss.append(QString("QPushButton#btnPre,QPushButton#btnNext,QPushButton#btnClose{padding:5px;}"));
qss.append(QString("QPushButton{border:1px solid %1;}")
.arg(borderColor));
qss.append(QString("QLineEdit{border:1px solid %1;border-radius:5px;padding:2px;background:none;selection-background-color:%2;selection-color:%3;}")
.arg(borderColor).arg(bottomColor).arg(topColor));
this->setStyleSheet(qss.join(""));
}
void frmInput::ChangeStyle()
{
changeStyle("#4D4D4D", "#292929", "#D9D9D9", "#CACAD0");
#if 0
if (currentStyle == "blue") {
changeStyle("#4D4D4D", "#292929", "#D9D9D9", "#CACAD0");
//changeStyle("#DEF0FE", "#C0DEF6", "#C0DCF2", "#386487");
} else if (currentStyle == "dev") {
changeStyle("#C0D3EB", "#BCCFE7", "#B4C2D7", "#324C6C");
} else if (currentStyle == "gray") {
changeStyle("#E4E4E4", "#A2A2A2", "#A9A9A9", "#000000");
} else if (currentStyle == "lightgray") {
changeStyle("#EEEEEE", "#E5E5E5", "#D4D0C8", "#6F6F6F");
} else if (currentStyle == "darkgray") {
("#D8D9DE", "#C8C8D0", "#A9ACB5", "#5D5C6C");
} else if (currentStyle == "black") {
("#4D4D4D", "#292929", "#D9D9D9", "#CACAD0");
} else if (currentStyle == "brown") {
("#667481", "#566373", "#C2CCD8", "#E7ECF0");
} else if (currentStyle == "silvery") {
("#E1E4E6", "#CCD3D9", "#B2B6B9", "#000000");
}
#endif
}