The plugin interface
The Qt plugin mechanism is a powerful method that makes Qt applications more extensible. As we discussed previously, we will use this mechanism to abstract a way in which we can add new editing features easily. Once we're finished, we only need to pay attention to the name of the editing feature and the operation on the Mat instance while adding a new editing feature.
The first step is to figure out an interface in order to provide a common protocol between the application and the plugins so that we can load and call the plugins despite how they are implemented. In C++, an interface is a class with pure virtual member functions. For our plugins, we take care of the action name and the operation to Mat, so we declare our ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access