Translations:Development/Tutorials/Qt4 Ruby Tutorial/Chapter 05/23/ru: Difference between revisions

From KDE TechBase
(Created page with "Как только значение, установленное ползунком, меняется, ползунок выдаёт новое значение путём выр...")
 
(No difference)

Latest revision as of 17:30, 2 July 2011

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (Development/Tutorials/Qt4 Ruby Tutorial/Chapter 05)
Whenever the slider's value changes it broadcasts the new value by emitting the [http://doc.qt.nokia.com/latest/qabstractslider.html#valueChanged QAbstractSlider::valueChanged()] signal. Because that signal is connected to the LCD number's [http://doc.qt.nokia.com/latest/qlcdnumber.html#intValue-prop QLCDNumber::display()] slot, the slot is called when the signal is broadcast. Neither of the objects knows about the other. This is essential in component programming.

Как только значение, установленное ползунком, меняется, ползунок выдаёт новое значение путём выработки сигнала QAbstractSlider::valueChanged(). Поскольку этот сигнал подключён к слоту «ЖК-дисплея» QLCDNumber::display(), этот слот вызывается при каждой выработке сигнала. Ни ползунок, ни «ЖК-дисплей» не знают о существовании друг друга, это одна из идей компонентно-ориентированного программирования.