FACT++  1.0
bool FactGui::event ( QEvent *  evt)
inlineprivate

Definition at line 3153 of file FactGui.h.

3154  {
3155  if (dynamic_cast<FunctionEvent*>(evt))
3156  return static_cast<FunctionEvent*>(evt)->Exec();
3157 
3158  if (dynamic_cast<CheckBoxEvent*>(evt))
3159  {
3160  const QStandardItem &item = static_cast<CheckBoxEvent*>(evt)->item;
3161  const QStandardItem *par = item.parent();
3162  if (par)
3163  {
3164  const QString server = par->text();
3165  const QString service = item.text();
3166 
3167  const string s = (server+'/'+service).toStdString();
3168 
3169  if (item.checkState()==Qt::Checked)
3170  SubscribeService(s);
3171  else
3172  UnsubscribeService(s);
3173  }
3174  }
3175 
3176  return MainWindow::event(evt); // unrecognized
3177  }
Definition: did.h:42
void SubscribeService(const string &service)
Definition: FactGui.h:403
void UnsubscribeService(const string &service, bool allow_unsubscribed=false)
Definition: FactGui.h:414
An event posted by the CheckBoxDelegate if the CheckBox is used.