Eneboo - Documentación para desarrolladores
|
Intefaz para QSignalMapper. Más...
#include <FLObjectFactory.h>
Slots públicos | |
void | setMapping (QObject *sender, int identifier) |
void | setMapping (QObject *sender, const QString &identifier) |
void | removeMappings (QObject *sender) |
Métodos públicos | |
AQSignalMapper (QObject *parent) |
Intefaz para QSignalMapper.
Ejemplo:
.... class interna { var ctx:Object; function interna( context ) { this.ctx = context; } function init() { this.ctx.interna_init(); } var signalMapper; function dispatcher(name) { this.ctx.interna_dispatcher(name); } } ... ... function interna_init() { var sigMap = this.iface.signalMapper = new AQSignalMapper(this.obj()); connect(sigMap, "mapped(QString)", this.iface, "dispatcher()"); var list = new AQObjectQueryList(this.obj(), "QPushButton", "", true, true); var obj; while((obj = list.current()) != undefined) { connect(obj, "clicked()", sigMap, "map()"); sigMap.setMapping(obj, obj.name); list.next(); } } function interna_dispatcher(name) { debug ("dispatcher " + name); switch (name) { case "pbClear": ... break; case "pbFilter": ... break; ... ... etc ... etc ... etc ... } } ... ...
AQSignalMapper::AQSignalMapper | ( | QObject * | parent | ) | [inline] |
void AQSignalMapper::removeMappings | ( | QObject * | sender | ) | [inline, slot] |