Unity 8
 All Classes Functions
unity8.shell.emulators.main_window.QQuickView Class Reference
Inheritance diagram for unity8.shell.emulators.main_window.QQuickView:
Collaboration diagram for unity8.shell.emulators.main_window.QQuickView:

Public Member Functions

def get_greeter
 
def get_greeter_content_loader
 
def get_login_loader
 
def get_login_list
 
def get_hud
 
def get_hud_showable
 
def get_hud_show_button
 
def get_hud_edge_drag_area
 
def get_bottombar
 
def get_pinPadLoader
 
def get_lockscreen
 
def get_pinentryField
 
def open_indicator_page
 
def show_dash_swiping
 
def get_current_focused_app_id
 
def show_dash_from_launcher
 
def open_launcher
 
def is_launcher_open
 
def launch_application
 
def enter_pin_code
 

Detailed Description

An emulator class that makes it easy to interact with the shell

Definition at line 33 of file main_window.py.

Member Function Documentation

def unity8.shell.emulators.main_window.QQuickView.enter_pin_code (   self,
  code 
)
Enter code 'code' into the single-pin lightdm pincode entry screen.

:param code: must be a string of numeric characters.
:raises: TypeError if code is not a string.
:raises: ValueError if code contains non-numeric characters.

Definition at line 154 of file main_window.py.

155  def enter_pin_code(self, code):
156  """Enter code 'code' into the single-pin lightdm pincode entry screen.
157 
158  :param code: must be a string of numeric characters.
159  :raises: TypeError if code is not a string.
160  :raises: ValueError if code contains non-numeric characters.
161 
162  """
163  if not isinstance(code, str):
164  raise TypeError(
165  "'code' parameter must be a string, not %r."
166  % type(code)
167  )
168  for num in code:
169  if not num.isdigit():
170  raise ValueError(
171  "'code' parameter contains non-numeric characters."
172  )
173  self.pointing_device.click_object(
174  self._get_pinpad_button(int(num)))
def unity8.shell.emulators.main_window.QQuickView.get_current_focused_app_id (   self)
Return the id of the focused application.

Definition at line 118 of file main_window.py.

119  def get_current_focused_app_id(self):
120  """Return the id of the focused application."""
121  return self._get_shell().focusedApplicationId
def unity8.shell.emulators.main_window.QQuickView.launch_application (   self,
  application_name 
)
Launch an application.

:parameter application_name: The name of the application to launch.

Definition at line 143 of file main_window.py.

144  def launch_application(self, application_name):
145  """Launch an application.
146 
147  :parameter application_name: The name of the application to launch.
148 
149  """
150  launcher = self.open_launcher()
151  launcher.click_application_launcher_icon(application_name)
152  self.get_current_focused_app_id().wait_for(application_name)
153  launcher.shown.wait_for(False)
def unity8.shell.emulators.main_window.QQuickView.open_indicator_page (   self,
  indicator_name 
)
Swipe to open the indicator, wait until it's open.

:returns: The indicator page.

Definition at line 91 of file main_window.py.

91 
92  def open_indicator_page(self, indicator_name):
93  """Swipe to open the indicator, wait until it's open.
94 
95  :returns: The indicator page.
96  """
97  widget = self._get_indicator_panel_item(indicator_name)
98  start_x, start_y = input.get_center_point(widget)
99  end_x = start_x
100  end_y = self.height
101  self.pointing_device.drag(start_x, start_y, end_x, end_y)
102  self.wait_select_single('IndicatorsMenu', fullyOpened=True)
103  return self._get_indicator_page(indicator_name)
def unity8.shell.emulators.main_window.QQuickView.show_dash_from_launcher (   self)
Open the dash clicking the dash icon on the launcher.

Definition at line 123 of file main_window.py.

124  def show_dash_from_launcher(self):
125  """Open the dash clicking the dash icon on the launcher."""
126  launcher = self.open_launcher()
127  launcher.click_dash_icon()
128  self.get_current_focused_app_id().wait_for('unity8-dash')
129  launcher.shown.wait_for(False)
def unity8.shell.emulators.main_window.QQuickView.show_dash_swiping (   self)
Show the dash swiping from the left.

Definition at line 105 of file main_window.py.

106  def show_dash_swiping(self):
107  """Show the dash swiping from the left."""
108  x, y, width, height = self._get_shell().globalRect
109  start_x = x
110  end_x = x + width
111  start_y = end_y = y + height // 2
112 
113  self.pointing_device.drag(start_x, start_y, end_x, end_y)
114  self.get_current_focused_app_id().wait_for('unity8-dash')

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