signals

How to call c++ function from qml and change the lable text

核能气质少年 提交于 2019-12-12 01:51:00
问题 I'm new to Blackberry 10 development. I've created simple BB 10 cascades project. I want to change the text of a label through c++ function. main.qml import bb.cascades 1.0 Page { content: Container { id: containerID Button { id: button1 objectName: "button" text: "text" onClicked: { btnClicked("New Label Text"); } } Label { id: label1 objectName: "label1" text: "Old Label Text" } } } Now in which file i've to declare and in which file i've to define the function btnClicked(QString) function.

Signals Keyboard Movement AS3

六眼飞鱼酱① 提交于 2019-12-12 01:06:23
问题 I'm trying to get my keyboard movement to work using signals and a Hero class. So far I can get the signal to dispatch but I can't get it to take the keyboard input. Should I be using signals for movement at all or should I just call the function from the Hero class. This is the code for Hero: package { import flash.display.MovieClip; import flash.display.Sprite; import org.osflash.signals.Signal; import flash.events.Event; import com.natejc.input.KeyboardManager; import com.natejc.input

qt signals cause segmentation fault on connect

好久不见. 提交于 2019-12-12 00:31:14
问题 I made a widget that behaves as a window and when a button is pressed it simply emits a signal: signals: void SaveTask( void ); in my mainwindow.cpp I define (in the constructor): connect( taskWindow, SIGNAL(SaveTask()), task_view, SLOT(UpdateFromTasks()) ); taskWindow = pointer to window where this signal emits. task_view = pointer to treewidget in mainwindow with a slot. It is designed so that when you save a task it is displayed in the treeview. unfortunately when I try to run the program

connecting pyqt4 signals in a pyqt4 qobject class

爷,独闯天下 提交于 2019-12-12 00:21:21
问题 I've got two classes; one for my window and one for my controlling object class window(baseClass, testForm): scanStarted = QtCore.pyqtSignal(str) def __init__(self,parent=None): super(window, self).__init__(parent) self.setupUi(self) #other window setup self._scanner.pushScan.clicked.connect(self._scanClicked) def _scanClicked(self): self.scanStarted.emit( self._scanner.getTextData() ) and my controlling object class vis(QtCore.QObject): def __init__(self): self._oreList = [] self._w = window

django signals using decorators issue

 ̄綄美尐妖づ 提交于 2019-12-11 22:02:11
问题 I have the below given structure in my project -parentDirectory -myModule __init__.py models.py handler.py models.py @register class Student(): number = models.PositiveIntegerNumber(unique=True) name = models.CharField(max_length=64) def post_delete: """some code""" def post_save: """some code""" @register class Course(SomeBaseModel): code = models.CharField(unique=True) teacher = models.CharField(max_length=64) SomeBaseModel has post_delete and post_save functions defined in it. handler.py

QTableWidget filled with QLineEdits does not fire signals

别等时光非礼了梦想. 提交于 2019-12-11 20:15:26
问题 I'm relatively new to QT. In my code, I create a QTableWidget, iterate through the rows and set the cells to QLineEdits and QCheckBoxes. I want to make it so that changing the text within any of the QLineEdits or checking/unchecking the QCheckBoxes causes my table to fire a signal passing either the item in question, or the row/column that it's within. I build the table here: for(int row=0; row < conditionTable->rowCount(); row++) { QLineEdit *condition = new QLineEdit; conditionTable-

Thread blocked waiting for a signal

我是研究僧i 提交于 2019-12-11 19:46:50
问题 sIn my application, I try to catch a specific signal which is SIGUSR1, I wrote the below code to do this issue, in which the application will create a thread for "init_signal_catcher". The problem is when I run the code ,the program goes to sleep forever and does not respond to any signal even if it is SIGUSR1. So could you please tell me what is the problem in my below code? Note: The below can be run directly without having to create a thread, just replace the function name init_signal

Java signal handling and then return to main program

时间秒杀一切 提交于 2019-12-11 18:09:00
问题 MI have a program that starts with for loop and it spins for 10 times, and one loop lasts one second. I need to handle a signal (CTRL+C) and while handling it, it should do it's own for loop, and after it stops, then I should return to the main loop. I've managed to do almost everything above, but the loops don't execute separately. They do it parallel. Hope you can help... thanks :) BTW, my code is: import sun.misc.Signal; import sun.misc.SignalHandler; public class MySig { public static

Finding R peak from a heart signal input from a stethoscope

倖福魔咒の 提交于 2019-12-11 17:51:20
问题 Given an heart beat signal measured using a stethoscope to the audio card of the computer through a hardware(mainly amplifier and low pass filter having cutoff frequency 100hz). Now the signal is filtered with cutoff 100hz..the code to find the peak and beats per minute is given below..The code works only for certain cases. Please help me find the mistake clear all %input the signal into matlab [x,fs]=wavread('heartbeat.wav'); figure(1) subplot(2,1,1) x1=x(:,2); plot(x1(500:10000),'r-');

How to trigger a signal / hook on edit of a specific page?

瘦欲@ 提交于 2019-12-11 17:46:10
问题 Is it possible to trigger some kind of signal or configure a hook (e.g. execution of defined / hard coded shell script) after editing one specific page of a MediaWiki? The scenario is as follows. Up to now a RSS feed is generated from the content of one specific MediaWiki page (call it wiki/index.php?title=News ) each time the RSS feed is requested. As this page gets edited only once in a couple of days, having a Perl::CGI oder PHP script as the source of the RSS feed (e.g. URL for feed