Книга: Embedded Linux development using Eclipse
Creating an Event Procedure
Creating an Event Procedure
In order for our new button to actually do something, we have to attach it to an event procedure. With the Hello button selected in the Editor, click the Add procedure icon in the Procedures view to bring up the dialog in Figure 6.16. Name the function “hello_button” and select ACTIVATE as the trigger.
Figure 6.16: NAB Create Procedure dialog.
Clicking OK creates a new .cpp file with a template for the hello_button()
function. In the source code Editor, enter the following line in the hello_button()
function:
object->setProperty(WSNlabelString, "Hello from NAB");
When you save the revised hello_button.cpp
file, the project is rebuilt. Now we have a program that does something.
Оглавление статьи/книги
Похожие страницы
- Creating an Application Window
- EVENT MEMORY SIZE
- Creating CDs from the Command Line
- Creating and Deleting Device Objects
- Creating a Delegate
- Creating a Root Password and User Accounts
- Creating Users
- Creating CDs and DVDs with Fedora's Graphical Clients
- Creating DVDs from the Command Line
- Creating and Configuring Local Printers
- Creating the Print Queue
- Creating a Database in MySQL