O'Reilly logo

Qt 5 Projects by Marco Piccolino

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Including and instantiating the components

First, we import into cmbroadcast.pro all the components that we have developed by including all of the QMake project's include files that we should have already created:

# cmbroadcast.pro...include(../entities/entities.pri)include(../usecases/uc_broadcaster_publishes_sensor_readings/uc_broadcaster_publishes_sensor_readings.pri)include(../usecases/uc_broadcaster_connects_to_sensor/uc_broadcaster_connects_to_sensor.pri)include(../channels/channel_broadcaster/channel_broadcaster.pri)

Then, we start instantiating the components in main.cpp. We begin with the Broadcaster entity and BroadcasterBt channel. If the Bluetooth channel is initialized correctly, we connect it to the entity_broadcaster:

#include ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required