mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-07 19:42:45 +01:00
Rename setWallpaperValue to setWallpaperValueAtMonitorIndex to be clearer about the index
same with requestProjectSettingsAtMonitorIndex
This commit is contained in:
parent
f69c4a1381
commit
4f175e610b
@ -36,19 +36,19 @@ ColumnLayout {
|
||||
|
||||
SP.Slider {
|
||||
headline: qsTr("Volume")
|
||||
onValueChanged: ScreenPlay.screenPlayManager.setWallpaperValue(
|
||||
onValueChanged: ScreenPlay.screenPlayManager.setWallpaperValueAtMonitorIndex(
|
||||
activeMonitorIndex, "volume", value)
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
SP.Slider {
|
||||
headline: qsTr("Playback rate")
|
||||
onValueChanged: ScreenPlay.screenPlayManager.setWallpaperValue(
|
||||
onValueChanged: ScreenPlay.screenPlayManager.setWallpaperValueAtMonitorIndex(
|
||||
activeMonitorIndex, "playbackRate", value)
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
SP.Slider {
|
||||
headline: qsTr("Current Video Time")
|
||||
onValueChanged: ScreenPlay.screenPlayManager.setWallpaperValue(
|
||||
onValueChanged: ScreenPlay.screenPlayManager.setWallpaperValueAtMonitorIndex(
|
||||
activeMonitorIndex, "currentTime", value)
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
@ -73,7 +73,7 @@ ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: 10
|
||||
onActivated: {
|
||||
ScreenPlay.screenPlayManager.setWallpaperValue(
|
||||
ScreenPlay.screenPlayManager.setWallpaperValueAtMonitorIndex(
|
||||
activeMonitorIndex, "fillmode",
|
||||
settingsComboBox.currentText)
|
||||
}
|
||||
|
@ -91,8 +91,7 @@ Item {
|
||||
availableWidth: width - 20
|
||||
availableHeight: 150
|
||||
onRequestProjectSettings: {
|
||||
// This will return in the connection with target: screenPlay
|
||||
ScreenPlay.screenPlayManager.requestProjectSettingsListModelAt(at)
|
||||
ScreenPlay.screenPlayManager.requestProjectSettingsAtMonitorIndex(at)
|
||||
activeMonitorIndex = at
|
||||
}
|
||||
Connections {
|
||||
|
@ -86,7 +86,7 @@ Rectangle {
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
onCheckedChanged: {
|
||||
ScreenPlay.screenPlayManager.setWallpaperValue(
|
||||
ScreenPlay.screenPlayManager.setWallpaperValueAtMonitorIndex(
|
||||
selectedMonitor, name, checkbox.checked)
|
||||
}
|
||||
}
|
||||
@ -130,7 +130,7 @@ Rectangle {
|
||||
onAccepted: {
|
||||
rctPreviewColor.color = colorDialog.color
|
||||
let tmpColor = "'" + colorDialog.color.toString() + "'"
|
||||
ScreenPlay.screenPlayManager.setWallpaperValue(
|
||||
ScreenPlay.screenPlayManager.setWallpaperValueAtMonitorIndex(
|
||||
selectedMonitor, name, tmpColor)
|
||||
}
|
||||
}
|
||||
@ -167,7 +167,7 @@ Rectangle {
|
||||
onValueChanged: {
|
||||
var value = Math.round(slider.value * 100) / 100
|
||||
txtSliderValue.text = value
|
||||
ScreenPlay.screenPlayManager.setWallpaperValue(
|
||||
ScreenPlay.screenPlayManager.setWallpaperValueAtMonitorIndex(
|
||||
selectedMonitor, name, value)
|
||||
}
|
||||
}
|
||||
|
@ -193,10 +193,10 @@ bool ScreenPlayManager::removeWallpaperAt(int index)
|
||||
/*!
|
||||
\brief Request a spesific json profile to display in the active wallpaper popup on the right.
|
||||
*/
|
||||
void ScreenPlayManager::requestProjectSettingsListModelAt(const int index)
|
||||
void ScreenPlayManager::requestProjectSettingsAtMonitorIndex(const int index)
|
||||
{
|
||||
for (const std::shared_ptr<ScreenPlayWallpaper>& uPtrWallpaper : qAsConst(m_screenPlayWallpapers)) {
|
||||
if (!uPtrWallpaper->screenNumber().empty() && uPtrWallpaper->screenNumber()[0] == index) {
|
||||
if (uPtrWallpaper->screenNumber()[0] == index) {
|
||||
emit projectSettingsListModelResult(
|
||||
true,
|
||||
uPtrWallpaper->projectSettingsListModel().get(),
|
||||
@ -210,7 +210,7 @@ void ScreenPlayManager::requestProjectSettingsListModelAt(const int index)
|
||||
/*!
|
||||
\brief Set a wallpaper \a value at a given \a index and \a key.
|
||||
*/
|
||||
void ScreenPlayManager::setWallpaperValue(const int index, const QString& key, const QString& value)
|
||||
void ScreenPlayManager::setWallpaperValueAtMonitorIndex(const int index, const QString& key, const QString& value)
|
||||
{
|
||||
if (auto appID = m_monitorListModel->getAppIDByMonitorIndex(index)) {
|
||||
|
||||
|
@ -108,8 +108,8 @@ public slots:
|
||||
void removeAllWidgets();
|
||||
bool removeWallpaperAt(const int index);
|
||||
|
||||
void requestProjectSettingsListModelAt(const int index);
|
||||
void setWallpaperValue(const int index, const QString& key, const QString& value);
|
||||
void requestProjectSettingsAtMonitorIndex(const int index);
|
||||
void setWallpaperValueAtMonitorIndex(const int index, const QString& key, const QString& value);
|
||||
void setAllWallpaperValue(const QString& key, const QString& value);
|
||||
std::optional<std::shared_ptr<ScreenPlayWallpaper>> getWallpaperByAppID(const QString& appID);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user