mirror of
https://github.com/tnodir/fort
synced 2024-11-15 10:55:10 +00:00
UI: RPC: Rename signal enums.
This commit is contained in:
parent
25bbd18d3b
commit
05ec5acfca
@ -28,14 +28,14 @@ enum Command : qint8 {
|
|||||||
Rpc_ConfManager_updateZone,
|
Rpc_ConfManager_updateZone,
|
||||||
Rpc_ConfManager_updateZoneName,
|
Rpc_ConfManager_updateZoneName,
|
||||||
Rpc_ConfManager_updateZoneEnabled,
|
Rpc_ConfManager_updateZoneEnabled,
|
||||||
Rpc_ConfManager_onConfChanged,
|
Rpc_ConfManager_confChanged,
|
||||||
Rpc_ConfManager_onAppEndTimesUpdated,
|
Rpc_ConfManager_appEndTimesUpdated,
|
||||||
Rpc_ConfManager_onAppAdded,
|
Rpc_ConfManager_appAdded,
|
||||||
Rpc_ConfManager_onAppRemoved,
|
Rpc_ConfManager_appRemoved,
|
||||||
Rpc_ConfManager_onAppUpdated,
|
Rpc_ConfManager_appUpdated,
|
||||||
Rpc_ConfManager_onZoneAdded,
|
Rpc_ConfManager_zoneAdded,
|
||||||
Rpc_ConfManager_onZoneRemoved,
|
Rpc_ConfManager_zoneRemoved,
|
||||||
Rpc_ConfManager_onZoneUpdated,
|
Rpc_ConfManager_zoneUpdated,
|
||||||
|
|
||||||
Rpc_DriverManager_reinstallDriver,
|
Rpc_DriverManager_reinstallDriver,
|
||||||
Rpc_DriverManager_uninstallDriver,
|
Rpc_DriverManager_uninstallDriver,
|
||||||
|
@ -88,26 +88,24 @@ void RpcManager::setupConfManagerSignals()
|
|||||||
{
|
{
|
||||||
connect(confManager(), &ConfManager::confChanged, this, [&](bool /*onlyFlags*/) {
|
connect(confManager(), &ConfManager::confChanged, this, [&](bool /*onlyFlags*/) {
|
||||||
const QVariant confVar = confManager()->conf()->toVariant(true);
|
const QVariant confVar = confManager()->conf()->toVariant(true);
|
||||||
invokeOnClients(Control::Rpc_ConfManager_onConfChanged, { confVar });
|
invokeOnClients(Control::Rpc_ConfManager_confChanged, { confVar });
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(confManager(), &ConfManager::appEndTimesUpdated, this,
|
connect(confManager(), &ConfManager::appEndTimesUpdated, this,
|
||||||
[&] { invokeOnClients(Control::Rpc_ConfManager_onAppEndTimesUpdated); });
|
[&] { invokeOnClients(Control::Rpc_ConfManager_appEndTimesUpdated); });
|
||||||
connect(confManager(), &ConfManager::appAdded, this, [&](bool alerted) {
|
connect(confManager(), &ConfManager::appAdded, this,
|
||||||
invokeOnClients(Control::Rpc_ConfManager_onAppAdded, { alerted });
|
[&](bool alerted) { invokeOnClients(Control::Rpc_ConfManager_appAdded, { alerted }); });
|
||||||
});
|
|
||||||
connect(confManager(), &ConfManager::appRemoved, this,
|
connect(confManager(), &ConfManager::appRemoved, this,
|
||||||
[&] { invokeOnClients(Control::Rpc_ConfManager_onAppRemoved); });
|
[&] { invokeOnClients(Control::Rpc_ConfManager_appRemoved); });
|
||||||
connect(confManager(), &ConfManager::appUpdated, this,
|
connect(confManager(), &ConfManager::appUpdated, this,
|
||||||
[&] { invokeOnClients(Control::Rpc_ConfManager_onAppUpdated); });
|
[&] { invokeOnClients(Control::Rpc_ConfManager_appUpdated); });
|
||||||
|
|
||||||
connect(confManager(), &ConfManager::zoneAdded, this,
|
connect(confManager(), &ConfManager::zoneAdded, this,
|
||||||
[&] { invokeOnClients(Control::Rpc_ConfManager_onZoneAdded); });
|
[&] { invokeOnClients(Control::Rpc_ConfManager_zoneAdded); });
|
||||||
connect(confManager(), &ConfManager::zoneRemoved, this, [&](int zoneId) {
|
connect(confManager(), &ConfManager::zoneRemoved, this,
|
||||||
invokeOnClients(Control::Rpc_ConfManager_onZoneRemoved, { zoneId });
|
[&](int zoneId) { invokeOnClients(Control::Rpc_ConfManager_zoneRemoved, { zoneId }); });
|
||||||
});
|
|
||||||
connect(confManager(), &ConfManager::zoneUpdated, this,
|
connect(confManager(), &ConfManager::zoneUpdated, this,
|
||||||
[&] { invokeOnClients(Control::Rpc_ConfManager_onZoneUpdated); });
|
[&] { invokeOnClients(Control::Rpc_ConfManager_zoneUpdated); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void RpcManager::setupDriverManagerSignals()
|
void RpcManager::setupDriverManagerSignals()
|
||||||
@ -257,14 +255,14 @@ bool RpcManager::processCommandRpc(
|
|||||||
if (!checkClientValidated(w))
|
if (!checkClientValidated(w))
|
||||||
return false;
|
return false;
|
||||||
Q_FALLTHROUGH();
|
Q_FALLTHROUGH();
|
||||||
case Control::Rpc_ConfManager_onConfChanged:
|
case Control::Rpc_ConfManager_confChanged:
|
||||||
case Control::Rpc_ConfManager_onAppEndTimesUpdated:
|
case Control::Rpc_ConfManager_appEndTimesUpdated:
|
||||||
case Control::Rpc_ConfManager_onAppAdded:
|
case Control::Rpc_ConfManager_appAdded:
|
||||||
case Control::Rpc_ConfManager_onAppRemoved:
|
case Control::Rpc_ConfManager_appRemoved:
|
||||||
case Control::Rpc_ConfManager_onAppUpdated:
|
case Control::Rpc_ConfManager_appUpdated:
|
||||||
case Control::Rpc_ConfManager_onZoneAdded:
|
case Control::Rpc_ConfManager_zoneAdded:
|
||||||
case Control::Rpc_ConfManager_onZoneRemoved:
|
case Control::Rpc_ConfManager_zoneRemoved:
|
||||||
case Control::Rpc_ConfManager_onZoneUpdated:
|
case Control::Rpc_ConfManager_zoneUpdated:
|
||||||
return processConfManagerRpc(w, cmd, args);
|
return processConfManagerRpc(w, cmd, args);
|
||||||
|
|
||||||
case Control::Rpc_DriverManager_reinstallDriver:
|
case Control::Rpc_DriverManager_reinstallDriver:
|
||||||
@ -373,30 +371,30 @@ bool RpcManager::processConfManagerRpc(
|
|||||||
confManager()->updateZoneEnabled(
|
confManager()->updateZoneEnabled(
|
||||||
args.value(0).toLongLong(), args.value(1).toBool()));
|
args.value(0).toLongLong(), args.value(1).toBool()));
|
||||||
return true;
|
return true;
|
||||||
case Control::Rpc_ConfManager_onConfChanged:
|
case Control::Rpc_ConfManager_confChanged:
|
||||||
if (auto cm = qobject_cast<ConfManagerRpc *>(confManager())) {
|
if (auto cm = qobject_cast<ConfManagerRpc *>(confManager())) {
|
||||||
cm->onConfChanged(args.value(0));
|
cm->onConfChanged(args.value(0));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case Control::Rpc_ConfManager_onAppEndTimesUpdated:
|
case Control::Rpc_ConfManager_appEndTimesUpdated:
|
||||||
emit confManager()->appEndTimesUpdated();
|
emit confManager()->appEndTimesUpdated();
|
||||||
return true;
|
return true;
|
||||||
case Control::Rpc_ConfManager_onAppAdded:
|
case Control::Rpc_ConfManager_appAdded:
|
||||||
emit confManager()->appAdded(args.value(0).toBool());
|
emit confManager()->appAdded(args.value(0).toBool());
|
||||||
return true;
|
return true;
|
||||||
case Control::Rpc_ConfManager_onAppRemoved:
|
case Control::Rpc_ConfManager_appRemoved:
|
||||||
emit confManager()->appRemoved();
|
emit confManager()->appRemoved();
|
||||||
return true;
|
return true;
|
||||||
case Control::Rpc_ConfManager_onAppUpdated:
|
case Control::Rpc_ConfManager_appUpdated:
|
||||||
emit confManager()->appUpdated();
|
emit confManager()->appUpdated();
|
||||||
return true;
|
return true;
|
||||||
case Control::Rpc_ConfManager_onZoneAdded:
|
case Control::Rpc_ConfManager_zoneAdded:
|
||||||
emit confManager()->zoneAdded();
|
emit confManager()->zoneAdded();
|
||||||
return true;
|
return true;
|
||||||
case Control::Rpc_ConfManager_onZoneRemoved:
|
case Control::Rpc_ConfManager_zoneRemoved:
|
||||||
emit confManager()->zoneRemoved(args.value(0).toInt());
|
emit confManager()->zoneRemoved(args.value(0).toInt());
|
||||||
return true;
|
return true;
|
||||||
case Control::Rpc_ConfManager_onZoneUpdated:
|
case Control::Rpc_ConfManager_zoneUpdated:
|
||||||
emit confManager()->zoneUpdated();
|
emit confManager()->zoneUpdated();
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user