Lomiri
Loading...
Searching...
No Matches
lomiri.launcher.Launcher Class Reference

Inherits lomiriuitoolkit.LomiriUIToolkitCustomProxyObjectBase.

Public Member Functions

 show (self)
 
 click_dash_icon (self)
 
 click_application_launcher_icon (self, application_name)
 

Protected Member Functions

 _swipe_to_show_launcher (self)
 

Detailed Description

A helper that understands the Launcher.

Definition at line 31 of file launcher.py.

Member Function Documentation

◆ _swipe_to_show_launcher()

lomiri.launcher.Launcher._swipe_to_show_launcher (   self)
protected

Definition at line 44 of file launcher.py.

44 def _swipe_to_show_launcher(self):
45 view = self.get_root_instance().select_single('ShellView')
46 start_y = stop_y = view.y + view.height // 2
47
48 start_x = view.x + 1
49 stop_x = start_x + self.panelWidth - 1
50
51 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
52

◆ click_application_launcher_icon()

lomiri.launcher.Launcher.click_application_launcher_icon (   self,
  application_name 
)

Definition at line 63 of file launcher.py.

63 def click_application_launcher_icon(self, application_name):
64 launcher_delegate = self.select_single(
65 'LauncherDelegate', appId=application_name)
66 self.pointing_device.click_object(launcher_delegate)

◆ click_dash_icon()

lomiri.launcher.Launcher.click_dash_icon (   self)

Definition at line 54 of file launcher.py.

54 def click_dash_icon(self):
55 if self.shown:
56 dash_icon = self.select_single(
57 'QQuickImage', objectName='dashItem')
58 self.pointing_device.click_object(dash_icon)
59 else:
60 raise lomiri.LomiriException('The launcher is closed.')
61

◆ show()

lomiri.launcher.Launcher.show (   self)
Show the launcher swiping it to the right.

Definition at line 36 of file launcher.py.

36 def show(self):
37 """Show the launcher swiping it to the right."""
38 if not self.shown:
39 self._swipe_to_show_launcher()
40 self.shown.wait_for(True)
41 else:
42 logger.debug('The launcher is already opened.')
43

The documentation for this class was generated from the following file: