Qt event loop and unit testing?
QT的事件循环和单元测试?
Event loop with command-line switches.
带有命令行开关的事件循环。
Here I set the widgets to be visible, and start the GTK + main event loop.
这里,我将窗口小部件设置为可视的,然后启动GTK +主事件循环。
When command-line arguments are not enough, the next step is to write an event loop.
当命令行参数不够用时,下一步是编写一个事件循环。
Essentially, the strategy is to create a bunch of widgets with callbacks, then enter a main event loop.
本质上,这个策略是创建带回调的一串窗口小部件,然后进入一个主事件循环。
This script extends the simple event loop with switches to use Parse: : RecDescent as the parsing engine.
该脚本扩展了带开关的简单事件循环,将Parse:RecDescent用作解析引擎。
The application's "event loop" will send keyboard actions, mouse events and menu selections to this focus object.
应用程序的“事件循环”会给这个聚焦的对象发送键盘键盘动作、鼠标事件和菜单选择等行为。
The main function creates a Glib event loop, gets a connection to the session bus, and integrates the D-BUS event handling into the Glib event loop.
main函数创建一个Glib事件循环,获得会话总线的一个连接,并将D -BUS事件处理集成到Glib事件循环之中。
A common mistake that newbies make is to sample the input for the demo mode at a point in the event loop before or after the normal input is read.
一个新手常犯的错误是这样的,为游戏演示所进行的采样超前或落后于游戏的正确输入时刻。
We will now showcase specific abilities of the Parse: : RecDescent grammar by adding on to the UI features from a simple event loop and a simple user interface.
现在,通过在简单事件循环和简单用户界面的UI功能基础上再增加一些功能,我们将具体展示Parse:RecDescent文法所具有的特定能力。
The last thing we need to do is activate our POA to start queuing client requests and force the server to enter its event loop to receive those incoming requests.
最后要做的一件事,就是激活poa,使客户机请求开始排队,并强制服务器输入其事件循环,以接收这些传入的请求。
One of the threads then calls the SPU_RUN ioctl on the run file, while the other runs in an event loop on the mailbox files and potentially other file descriptors.
其中一个线程然后会对运行文件调用SPU_RUNioctl系统调用,而其他线程则可以对邮箱文件和其他可能的文件描述符执行一个事件循环。
Multithreading your application improves the responsiveness of your user interface by moving long calculations into separate threads and away from your main event loop.
将长时间的计算从主事件循环线程移到别的线程中,从而提高用户接口的响应速度。
If you're watching a single file that gets changed every 20-30 seconds or so, just poll for changes in your event loop, with a timer to make sure you don't poll too often.
如果你看到一个文件,得到改变每20 -30秒左右,只是调查你的事件循环的变化,用一个定时器来确保你不太经常的调查。
It provides data structure handling for c, portability wrappers, and interfaces for such runtime functionality as an event loop, threads, dynamic loading, and an object system.
它以事件循环,多线程,动态载入以及对象系统的方式为C语言提供了数据结构处理,轻便封装,以及运行时功能的接口。
Note that the extension is easy to understand and modify, and that it can do the job just as well as the previous, non-parsing example (see the Event loop with command-line switches).
请注意,很容易理解和修改这个扩展,而且该扩展可以与前面的非解析示例一样出色地完成工作(请参阅带命令行开关的事件循环)。
You create the necessary network listening sockets, register the events to be called during execution, and then start the main event loop with the libev handling the rest of the process.
创建所需的网络监听套接字,注册在执行期间要调用的事件,然后启动主事件循环,让libev处理过程的其余部分。
Then it states that it would like to be notified when signals with the com.burtonini.dbus.Signal interface are sent, sets signal_filter as the notification function, and enters the event loop.
然后它声明愿意当具有com. burtonini . dbus . signal接口的信号被发送时得到通知,将signal_filter设置为通知函数,然后进入事件循环。
It's possible that the player might have the fire button down in one part of the event loop and not in another, so you must sample at the same point you read the input for the game normally.
其可能造成的结果是游戏玩家在游戏事件循环的某一部分按下了发射键,而在另一部分却松开了它。所以必须在同一处进行采样与读入输入。
It is expected that GNOME will create wrappers around D-BUS using GObject (indeed these partially exist, integrating D-BUS into their event loop), and that KDE will create similar wrappers using Qt.
预期,GNOME将使用GObject创建包装d -BUS的包装器(实际上这些已经部分存在了,将D - BUS集成入它们的事件循环),KDE将使用Qt创建类似的包装器。
After the loop define a receive activity that waits until it is invoked by the last event handler.
在循环之后,定义接收活动,该活动将等待最后一个事件处理程序实例调用。
By doing so, the loop in the main scope and logic in the event handler controls the final number of event handler instances.
这样,主范围内的循环和事件处理程序中的逻辑就可以控制事件处理程序的最终数目。
Define a loop that starts the required number of event handlers.
定义启动所需数量的事件处理程序的循环。
When an event occurs, the object associated with that event emits a signal to inform the main loop that it has occurred.
当事件发生时,与这个事件对应的对象发出信号,通知主循环事件已经发生。
That name is wrapped in a foreach loop at the bottom of the script that adds a page for each event, then invokes the EventTable method.
该名称位于脚本底部,包装在foreach循环中,该脚本为每个事件添加一个页面,然后调用EventTable方法。
A selector is analogous to a Windows message loop, in which the selector captures the various events from different clients and dispatches them to their respective event handlers.
选择器(selector)与Windows消息循环类似,它从不同客户机捕获各种事件并将它们分派到相应的事件处理程序。
The skeleton of an application consists of just four steps: (1) create an application; (2) create one or more Windows; (3) add some widgets to the Windows; (4) call the app.run event-loop.
应用程序的主框架只由四个步骤组成:(1)创建一个应用程序;(2)创建一个或多个窗口;(3)在窗口中添加一些窗口小部件;(4)调用app. run事件循环。
This can be accomplished by modifying the loop of the example above so that the invoke activity invokes the external service immediately instead of invoking an event handler.
这可以通过修改上述示例的循环来完成,以便调用活动直接调用外部服务,而不是调用事件处理程序。
If you've ever done any event-driven programming in the past, I think you'll find signals to be a refreshing change from the common practice of setting up an explicit event processing loop.
如果您过去曾经编写过事件驱动的程序,那么我认为您会发现,对于设置显式事件处理循环这一常见做法,使用信号是一个令人耳目一新的变化。
It makes a difference if you loop through 500 or 5000 DOM elements on the page when you want to add an event handler for example.
如果您依次通过页上的500或5000DOM元素,当您要添加事件处理程序,例如,它使不同。
应用推荐