Gestro
|
It sets up the GUI, initializes CaptureAndDetect, and DisplayControl. More...
#include <ControllerScreen.h>
Public Slots | |
void | unprocessedFeed_clicked () |
void | skinMask_clicked () |
void | detector_clicked () |
void | calibrate_clicked () |
void | setCalibrationValues () |
void | calibrateBackground_clicked () |
void | enableMouse () |
void | enableSpaceBar () |
void | enableMinimizeWindow () |
void | enableMoveWindow () |
void | enableVolume () |
Public Member Functions | |
ControllerScreen (QWidget *parent=0) | |
~ControllerScreen () | |
void | Callback_controls (FingerAndCoordinates finger) |
void | updateImage (Mat) override |
void | updateCalibratedTrackbar (int, int, int, int) override |
void | updateLogTable (String a, String b) override |
void | keyPressEvent (QKeyEvent *) override |
Public Member Functions inherited from ControllerScreenCallbackInterface | |
virtual void | updateImage (cv::Mat)=0 |
Private Member Functions | |
void | connectGuiEvents () |
void | connectSignals () |
Private Attributes | |
Ui::ControllerScreen * | ui |
A pointer to the ui class. More... | |
CaptureAndDetect | captureAndDetect |
Creating an instance of the CaptureAndDetect class. More... | |
Display * | display = XOpenDisplay(NULL) |
Opening a connection to the X server. More... | |
DisplayControl | displayControl = DisplayControl(display) |
Creating an instance of the DisplayControl class. More... | |
Screen * | screen = DefaultScreenOfDisplay(display) |
Getting the default screen of the display. More... | |
CustomSignals | signal |
Creating an instance of the CustomSignals class. More... | |
EnabledCommand | enabledCommands |
A class that is used to store the enabled commands. More... | |
It sets up the GUI, initializes CaptureAndDetect, and DisplayControl.
Connects the GUI events to the appropriate functions, and connects the signals to the appropriate slots
parent | The parent widget of the dialog. |
Definition at line 39 of file ControllerScreen.h.
|
explicit |
Construtor
parent |
Definition at line 4 of file ControllerScreen.cpp.
ControllerScreen::~ControllerScreen | ( | ) |
The destructor for the ControllerScreen class.
Definition at line 52 of file ControllerScreen.cpp.
|
slot |
When the calibrate button is clicked, the skin mask and detector buttons are enabled, the calibrate button is disabled, the calibrate signal is emitted, the image view is changed to the skin mask, and the log table is updated
Definition at line 79 of file ControllerScreen.cpp.
|
slot |
It calls the calibrateBackground() function in the Signal class, and then updates the log table with a message
Definition at line 89 of file ControllerScreen.cpp.
void ControllerScreen::Callback_controls | ( | FingerAndCoordinates | finger | ) |
|
private |
It connects the GUI elements to the appropriate slots
Definition at line 34 of file ControllerScreen.cpp.
|
private |
It connects the signals from the controller to the slots in the captureAndDetect class
Definition at line 26 of file ControllerScreen.cpp.
|
slot |
It changes the image view to the finger counter
Definition at line 72 of file ControllerScreen.cpp.
|
slot |
If the checkbox is checked, then the command is enabled
Definition at line 148 of file ControllerScreen.cpp.
|
slot |
If the checkbox is checked, then the controlMouse variable is set to true, otherwise it is set to false
Definition at line 132 of file ControllerScreen.cpp.
|
slot |
If the checkbox is checked, then the controlMoveWindow variable is set to true, otherwise it is set to false
Definition at line 156 of file ControllerScreen.cpp.
|
slot |
If the checkbox is checked, then the controlSpacebar variable is set to true, otherwise it is set to false
Definition at line 140 of file ControllerScreen.cpp.
|
slot |
If the checkbox is checked, then the controlVolume variable is set to true, otherwise it is set to false
Definition at line 165 of file ControllerScreen.cpp.
|
override |
If the user presses the "B" key, then the calibrateBackground_clicked() function is called
keypress | the key that was pressed |
Definition at line 173 of file ControllerScreen.cpp.
|
slot |
It sets the calibration values for the signal
Definition at line 95 of file ControllerScreen.cpp.
|
slot |
When the skinMask button is clicked, the imageViewChanged signal is emitted with the SKINMASK parameter, and the log table is updated.
Definition at line 65 of file ControllerScreen.cpp.
|
slot |
When the unprocessed feed button is clicked, the image view is changed to the unprocessed feed and the log table is updated
Definition at line 58 of file ControllerScreen.cpp.
|
overridevirtual |
It updates the trackbars on the controller screen with the values passed in
hmin | minimum hue value |
hmax | Hue maximum value |
smin | minimum saturation value |
smax | The maximum value of the saturation channel. |
Implements ControllerScreenCallbackInterface.
Definition at line 115 of file ControllerScreen.cpp.
|
override |
It recieves the latest frame converts from BGR to RGB, then it converts the image to a QImage, and finally it sets the QImage to the label
dest | the image to be displayed |
Definition at line 109 of file ControllerScreen.cpp.
|
overridevirtual |
It takes two strings as arguments, and adds them to the table widget
a | The first parameter is the name of the function that is being called. |
b | the message to be displayed |
Implements ControllerScreenCallbackInterface.
Definition at line 122 of file ControllerScreen.cpp.
|
private |
Creating an instance of the CaptureAndDetect class.
Definition at line 94 of file ControllerScreen.h.
|
private |
Opening a connection to the X server.
Definition at line 97 of file ControllerScreen.h.
|
private |
Creating an instance of the DisplayControl class.
Definition at line 100 of file ControllerScreen.h.
|
private |
A class that is used to store the enabled commands.
Definition at line 109 of file ControllerScreen.h.
|
private |
Getting the default screen of the display.
Definition at line 103 of file ControllerScreen.h.
|
private |
Creating an instance of the CustomSignals class.
Definition at line 106 of file ControllerScreen.h.
|
private |
A pointer to the ui class.
Definition at line 91 of file ControllerScreen.h.