Beispiel #1
0
void window::invoke_window_moved_action() {
  std::for_each(std::begin(priv->m_window_move_cb_list),
                std::end(priv->m_window_move_cb_list),
                [&](std::function<void(const QPointF &)> a_func) {
    if (a_func)
      a_func(this->pos());
  });
}
Beispiel #2
0
void window::invoke_window_closed_action() {
  std::for_each(std::begin(priv->m_window_close_callback_list),
                std::end(priv->m_window_close_callback_list),
                [&](std::function<void(window *)> a_func) {
    if (a_func)
      a_func(this);
  });
}
Beispiel #3
0
void window::invoke_window_visibility_action(bool a_visibility) {
  std::for_each(std::begin(priv->m_window_visibility_callback_list),
                std::end(priv->m_window_visibility_callback_list),
                [&](WindowVisibilityCallback a_func) {
    if (a_func)
      a_func(this, a_visibility);
  });
}
void SyncEngineInterface::insert_request_complete(const SyncObject &a_object) {
  std::for_each(d->m_insert_handler_list.begin(),
                d->m_insert_handler_list.end(),
                [&](std::function<void(const SyncObject &)> a_func) {
    if (a_func)
      a_func(a_object);
  });
}
Beispiel #5
0
void window::invoke_focus_handlers() {
  std::for_each(std::begin(priv->m_window_focus_callback_list),
                std::end(priv->m_window_focus_callback_list),
                [&](WindowActionCallback a_func) {
    if (a_func)
      a_func(this);
  });
}
Beispiel #6
0
int main() {
struct a_struct s;
a_func();
b_func();
s.member = 7;
b_calls_a_func(s);
//exported_func();
return 0;
}
void SyncEngineInterface::search_request_complete(SyncObject &a_object,
                                                  std::string &a_app_name,
                                                  bool a_found) {
  std::for_each(
      d->m_search_handler_list.begin(), d->m_search_handler_list.end(),
      [&](std::function<void(SyncObject &, const std::string &, bool)> a_func) {
        if (a_func)
          a_func(a_object, a_app_name, a_found);
      });
}
Beispiel #8
0
void ToolBar::tool_button_press_handler(const Widget *a_widget_ptr) {
  if (a_widget_ptr) {
    const ImageButton *button = qobject_cast<const ImageButton *>(a_widget_ptr);
    if (button) {

      std::for_each(std::begin(o_tool_bar->m_action_handler_list),
                    std::end(o_tool_bar->m_action_handler_list),
                    [&](std::function<void(const QString &)> a_func) {
        if (a_func)
          a_func(button->label());
      });
    }
  }
}
Beispiel #9
0
void dial_view::mouseMoveEvent(QGraphicsSceneMouseEvent *event) {
  o_dial_widget->mInitPos = event->pos();
  QLineF line(boundingRect().center(), o_dial_widget->mInitPos);
  QLineF base_line(boundingRect().width() / 2, 0.0, boundingRect().center().x(),
                   boundingRect().center().y());
  o_dial_widget->mAngle = angle_to(line, base_line) - 180;
  o_dial_widget->m_is_pressed = 1;
  update();

  std::for_each(std::begin(o_dial_widget->m_on_dial_callback_list),
                std::end(o_dial_widget->m_on_dial_callback_list),
                [=](on_dial_callback_func a_func) {

    if (a_func)
      a_func(o_dial_widget->mProgressValue);
  });
}
Beispiel #10
0
void ShinyNode_enumerateNodes(const ShinyNode* a_node, void (*a_func)(const ShinyNode*)) {
	a_func(a_node);

	if (a_node->firstChild) ShinyNode_enumerateNodes(a_node->firstChild, a_func);
	if (a_node->nextSibling) ShinyNode_enumerateNodes(a_node->nextSibling, a_func);
}
Beispiel #11
0
int main(void) {
	f();	
	a_func();
	return 0;
}