June 2019
Intermediate to advanced
348 pages
8h 28m
English
In the previous two subsections, we measured distance in two modes: the bird's eye view and the eye-level view. However, in our DiGauge application, the only way to switch between these modes is to change the code and recompile the application. Obviously, the end users cannot do this. In order to introduce this feature to the end users, we will add a new menu in the application to give the user a chance to switch between the modes. Let's start coding.
First, let's add some lines in the capture_thread.h file:
class CaptureThread : public QThread { // ... public: // ... enum ViewMode { BIRDEYE, EYELEVEL, }; void setViewMode(ViewMode m) {viewMode = m; }; // ... private: // ... ViewMode viewMode; };
In the preceding ...
Read now
Unlock full access