36 #define BLACKLIST QStringLiteral("") 98 QStringLiteral(
" subgraph cluster_0 {\r\n" 99 " label = \"%1\";\r\n" 101 " fillcolor = \"grey95\";\r\n").arg(tr(
"Inputs"));
109 QStringList source = input->GetDescription();
110 foreach (
const QString &item, source)
119 Data->append(QStringLiteral(
" \"%1\" [shape=record id=\"%1\" label=<<B>%2</B>%3>];\r\n").arg(
id, label, desc));
122 Data->append(
" }\r\n\r\n");
144 QStringList inputsfortype;
149 if (!inputsfortype.isEmpty())
150 result.insert(TorcCoreUtils::EnumToLowerString<TorcInput::Type>(static_cast<TorcInput::Type>(type)), inputsfortype);
157 return TorcCoreUtils::EnumList<TorcInput::Type>();
168 LOG(VB_GENERAL, LOG_WARNING, QStringLiteral(
"Already have an input named %1 - ignoring").arg(Input->
GetUniqueId()));
174 LOG(VB_GENERAL, LOG_INFO, QStringLiteral(
"Registered input '%1'").arg(Input->
GetUniqueId()));
186 LOG(VB_GENERAL, LOG_WARNING, QStringLiteral(
"Input %1 not recognised - cannot remove").arg(Input->
GetUniqueId()));
190 LOG(VB_GENERAL, LOG_INFO, QStringLiteral(
"Input %1 de-registered").arg(Input->
GetUniqueId()));
200 QVariantMap::const_iterator i = Details.constBegin();
201 for ( ; i != Details.constEnd(); ++i)
206 QVariantMap devices = i.value().toMap();
207 QVariantMap::const_iterator j = devices.constBegin();
208 for ( ; j != devices.constEnd(); ++j)
211 QString group = j.key();
215 if (!network && !constant)
218 QVariantMap details = j.value().toMap();
219 QVariantMap::const_iterator it = details.constBegin();
220 for ( ; it != details.constEnd(); ++it)
225 if (it.key() == TorcCoreUtils::EnumToLowerString<TorcInput::Type>(
static_cast<TorcInput::Type>(type)))
227 QVariantMap input = it.value().toMap();
228 QString defaultvalue = network ? input.value(QStringLiteral(
"default")).toString() : input.value(QStringLiteral(
"value")).toString();
229 QString uniqueid = input.value(QStringLiteral(
"name"), QStringLiteral(
"Error")).toString();
232 double defaultdouble = defaultvalue.toDouble(&ok);
256 LOG(VB_GENERAL, LOG_ERR, QStringLiteral(
"Cannot create constant button input"));
263 m_createdInputs.insert(uniqueid, newinput);
275 QMap<QString,TorcInput*>::const_iterator it = m_createdInputs.constBegin();
276 for ( ; it != m_createdInputs.constEnd(); ++it)
278 it.value()->DownRef();
281 m_createdInputs.clear();
QString GetUserName(void)
double GetDefaultValue(void)
#define NETWORK_DEVICE_STRING
virtual bool DownRef(void)
void HandleSubscriberDeleted(QObject *Subscriber)
QReadWriteLock m_httpServiceLock
#define LOG(_MASK_, _LEVEL_, _STRING_)
QReadWriteLock m_handlerLock
#define CONSTANT_DEVICE_STRING
QString GetUniqueId(void)