Simple Signal Slot

授权协议 未知
开发语言
所属分类 jQuery 插件、 其他jQuery插件
软件类型 开源软件
地区 不详
投 递 者 梁俊友
操作系统 未知
开源组织
适用人群 未知
 软件概览

This plugin is utility for convinience of communication between iframes in HTML page,
it is mimicking from Qt's signal/slot concept.

you can do with jquery.sigslot.js:

  • send signal to N-depth iframe page
  • async. or sync. communication
  • exclude or include particular iframe
  • allow multiple slot or just one

Usage

([ .. ] for opton , '|' for seperator)

    1. slot
  • $.slot.add( 'sig/slot id', function [,repeatable] )
  • repeatable = true | false
    false: allow only one slot function for signal-id (default)
    true: allow every slot function for signal-id, even it is identical. so, slot function is called as many as times you registered
    ex) $.slot.add( 'test', [a,b,c,d], true );
  • $.slot.remove( 'sig/slot id'[, function]);
  • * if function is omitted, remove all slot functions for signal-id
  • $.slot.countOf( 'sig/slot id');
  • * return number of registered slot function for signal-id

    2. signal
  • $.signal( 'sig/slot id',  args, [, options ] );
  • * args: arguments passing to slot function. wrap by [] if you want to pass more than one.
    * options : simple object, for ...

       direction = $.signal.SELF | $.signal.UPLINK | $.signal.FOLLOWLINK | $.signal.OTHER | $.signal.BROADCAST
       purpose: direct where to pass signal. default for all iframes include window.self
       - $.signal.SELF (send signal only to current page that the signal occur)
       - $.signal.UPLINK (send signal only to parents iframes EXCLUDE current page that the signal occur)
       - $.signal.FOLLOWLINK (send signal only to child iframes EXCLUDE current page that the signal occur)
       - $.signal.OTHER (send signal to all iframe pages EXCLUDE current page that the signal occur)
       - $.signal.BROADCAST (send signal to all iframes INCLUDE current page that the signal occur)

       sync = true | false
       purpose: select async or sync call. boolean type. default is sync.

    * $.signal will NOT cause error, if there's no slot function for signal-id. It will do nothing.
  • The Qt signals/slots and property system are based on the ability to introspect the objects at runtime. C++ does not offer introspection support natively, so Qt comes with a tool to provide it. That t

  • New-style Signal and Slot Support¶ New-style Signal and Slot Support — PyQt 4.9.6 Reference Guide New-style Signal and Slot Support¶ This section describes the new style of connecting signals and slot

  • //typedef function0 <int> FunctionType; #include <iostream> #include <boost/shared_ptr.hpp> #include <vector> #include <algorithm> using namespace boost; using namespace std; typedef int RType; typede

  • 作者: 一去、二三里 个人微信号: iwaleon 微信公众号: 高效程序员 在《12:高级篇 - CTK 事件管理机制(sendEvent/postEvent)》一文中,我们介绍了如何进行插件间通信 - sendEvent()/postEvent() + ctkEventHandler。然而,除了这种方式之外,EventAdmin 还提供了另一种方式 - signal/slot,也可以达到相同的

  • New-style Signal and Slot Support This section describes the new style of connecting signals and slots introduced in PyQt4 v4.5. One of the key features of Qt is its use of signals and slots to commun

  • Creating a Simple PySide2 Dialog Application¶ 这个教程是一个对话框部件。想法是让用户输入他们的名字在一个QLineEdit部件里。并且在对话框中提示信息。 Let us just start with a simple stub that creates and shows a dialog. 【stub,根 是什么东西?】 【感觉不重要】 impor

  • 1 // httpclientdemo.h 2 #ifndef HTTPCLIENTDEMO_H 3 #define HTTPCLIENTDEMO_H 4 5 #include <QMainWindow> 6 #include <QTcpSocket> 7 8 namespace Ui { 9 class HttpClientDemo; 10 } 11 12 class Ht

  • So in QT programming signals and slots are at the heart of a well formed application. In Python (using PyQt) it is not exactly obvious how to start developing your own signals and slots. Hopefully thi

  • player.h #ifndef PLAYER_H #define PLAYER_H #include <QWidget> #include <QMediaPlayer> #include <QMediaPlaylist> class Player : public QWidget {     Q_OBJECT public:     Player(QWidget *parent = 0);   

  • 代做P–Code留学生作业、代做C programs作业、代写C++编程作业、代做C课程实验作业 Homework 3 : Compiling Simple Expressions to P–Code Monday 17 December 2018 Abstract The task of this assignment is to implement a compiler that can ev

相关阅读

相关文章

相关问答

相关文档