Controller

Event

class plugins.Thread_inspection.controller.mouse_control_event.MouseController(Parent)[source]

Bases: object

Mouse event controller. :param Parent (): The main class of this application

mouse_event(e)[source]

Specify coordinate from mouse left event to generate anypoint view and recenter image.

Parameters:

() (e) – Coordinate point return by pyqt core

Returns:

mouseDoubleclick_event(e)[source]

Reset to default by mouse event.

Parameters:

() (e)

Returns:

mouse_wheelEvent(e)[source]

Resize image using mouse wheel event.

mouse_wheelEvent_ori_label(e)[source]

Resize image using mouse wheel event.

mouse_release_event(e)[source]

Mouse release event right click to show menu. the menu can select is show maximum, show minimum, save image, and show info.

Parameters:

() (e)

Returns:

None.

menuMouseEvent(e)[source]

showing the menu image when release right click.

Parameters:

() (e)

Returns:

None.

mouseMovedOriImage(e)[source]

Mouse move event to look in surrounding view in result label image.

Parameters:

() (e)

Returns:

init_ori_ratio(image)[source]

Calculate the initial ratio of the image.

Returns:

ratio width between image and ui window. ratio_y : ratio height between image and ui window. center : find the center image on window user interface.

Return type:

ratio_x

init_result_ratio(image)[source]

Calculate the initial ratio of the image.

Returns:

ratio width between image and ui window. ratio_y : ratio height between image and ui window. center : find the center image on window user interface.

Return type:

ratio_x

Camera

plugins.Thread_inspection.controller.select_source_camera.check_Port_USB_Camera()[source]

Detect the USB camera port available and show it on message box prompt.

Returns:

class plugins.Thread_inspection.controller.select_source_camera.OpenCameraSource(Parent, RecentWindow)[source]

Bases: Ui_Dialog

Create class controller open camera with inheritance from Ui Dialog Class.

Parameters:
  • () (RecentWindow)

  • ()

handle_activated_comboBox()[source]

Handle the selection from comboBox of source camera.

Returns:

camera_source_used()[source]

This function will return the source of camera used depend on what the camera use.

Returns:

camera source

onclick_comboBox_oke()[source]

Open the camera following the parent function and close the dialog window.

Returns:

onclick_comboBox_cancel()[source]

close the window when you click the buttonBox cancel.

Returns:

Serial Controller

plugins.Thread_inspection.controller.serial_controller.getPassword()[source]

Get password from input dialog.

class plugins.Thread_inspection.controller.serial_controller.AxisController(Parent)[source]

Bases: object

Axis controller class.

Parameters:

() (Parent) – The main class of this application

open_axis_controller()[source]

Open the widget on user interface to control the axis.

set_speed_axis()[source]

Set the speed axis from the value given by user.

go_connect_serial()[source]

Connect the serial port into the system.

go_disconnect_serial()[source]

Disconnect the serial port with the system.

go_reset()[source]

Reset the axis controller, speed and position.

go_absolute_moving()[source]

axis will move with absolute moving.

axis will move with related moving forward which the value is plus.

axis will move with related moving backward which the value is minus.

help_axis_controller()[source]

Open prompt for axis controller help.

Video Controller