fix(screensaver plugin): Lock screen wallpaper switching, screensaver will not switch automatically
Description: Lock screen wallpaper switching, screensaver will not switch automatically Log: 锁屏壁纸切换,屏保不会自动切换 Bug: bug#I8J6U1ukui屏保自动切换
This commit is contained in:
parent
4e9a89a29a
commit
9f40afbd14
|
@ -66,6 +66,9 @@ void SCConfiguration::onConfigurationChanged(QString key, QVariant value)
|
|||
}else if(key == "backgroundPath"){
|
||||
QString path = value.toString();
|
||||
Q_EMIT backgroundPathChanged(path);
|
||||
}else if(key == "background"){
|
||||
QString path = value.toString();
|
||||
Q_EMIT backgroundChanged(path);
|
||||
}else if(key == "mytext"){
|
||||
QString text = value.toString();
|
||||
Q_EMIT myTextChanged(text);
|
||||
|
|
|
@ -68,6 +68,7 @@ Q_SIGNALS:
|
|||
void cycleTimeChanged(int cycleTime);
|
||||
bool autoSwitchChanged(bool changed);
|
||||
QString backgroundPathChanged(QString path);
|
||||
QString backgroundChanged(QString path);
|
||||
QString myTextChanged(QString text);
|
||||
bool showCRestTimeChanged(bool isShow);
|
||||
bool showURestTimeChanged(bool isShow);
|
||||
|
|
|
@ -151,7 +151,7 @@ void Screensaver::getConfiguration()
|
|||
textIsCenter = configuration->getTextIsCenter();
|
||||
myText = configuration->getMyText();
|
||||
}else
|
||||
isUShowRestTime = configuration->getUShowRestTime();
|
||||
isUShowRestTime = configuration->getUShowRestTime();
|
||||
curFontSize = configuration->getFontSize();
|
||||
m_ptToPx = configuration->getPtToPx();
|
||||
|
||||
|
@ -168,6 +168,8 @@ void Screensaver::connectSingles()
|
|||
this, &Screensaver::autoSwitchChanged);
|
||||
connect(configuration, &SCConfiguration::backgroundPathChanged,
|
||||
this, &Screensaver::backgroundPathChanged);
|
||||
connect(configuration, &SCConfiguration::backgroundChanged,
|
||||
this, &Screensaver::backgroundChanged);
|
||||
connect(configuration, &SCConfiguration::cycleTimeChanged,
|
||||
this, &Screensaver::cycleTimeChanged);
|
||||
connect(configuration, &SCConfiguration::myTextChanged,
|
||||
|
@ -254,6 +256,11 @@ void Screensaver::backgroundPathChanged(QString path)
|
|||
startSwitchImages();
|
||||
}
|
||||
|
||||
void Screensaver::backgroundChanged(QString path)
|
||||
{
|
||||
background = loadFromFile(path);
|
||||
}
|
||||
|
||||
void Screensaver::cycleTimeChanged(int cTime)
|
||||
{
|
||||
cycleTime = cTime;
|
||||
|
|
|
@ -194,6 +194,7 @@ private Q_SLOTS:
|
|||
void updateTime();
|
||||
void autoSwitchChanged(bool iswitch);
|
||||
void backgroundPathChanged(QString path);
|
||||
void backgroundChanged(QString path);
|
||||
void cycleTimeChanged(int cTime);
|
||||
void myTextChanged(QString text);
|
||||
void showCRestTimeChanged(bool isShow);
|
||||
|
|
Loading…
Reference in New Issue