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

Creating the usecase class

Let's start implementing the CheckAvailableGroceries usecase class. Remember from Chapter 1, Writing Acceptance Tests and Building a Visual Prototype, that in the Creating the first C++ test case section, we already created the check_available_groceries subproject, with an autogenerated check_available_groceries.pro. We will now need to create a file for the usecase classes, so that we can include them as a module in whatever client project requires them. To this purpose, in a QMake project, we can use a .pri file, or project include file.

QMake's .pri files are just convenience files that can be included in .pro files to keep sources and resources modular and organized, and to separate the source files from other ...

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