Unity 8
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 (self)
 
def get_greeter_content_loader (self)
 
def get_login_loader (self)
 
def get_login_list (self)
 
def get_bottombar (self)
 
def get_pinPadLoader (self)
 
def get_lockscreen (self)
 
def get_pinentryField (self)
 
def open_indicator_page (self, indicator_name)
 
def close_indicator_page (self)
 
def show_dash_swiping (self)
 
def get_current_focused_app_id (self)
 
def show_dash_from_launcher (self)
 
def open_launcher (self)
 
def is_launcher_open (self)
 
def launch_application (self, application_name)
 
def enter_pin_code (self, code)
 

Detailed Description

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

Definition at line 32 of file main_window.py.

Member Function Documentation

def unity8.shell.emulators.main_window.QQuickView.close_indicator_page (   self)
Swipe to close the opened indicator, wait until it's closed.

Definition at line 92 of file main_window.py.

93  """Swipe to close the opened indicator, wait until it's closed."""
94  indicators_menu = self.wait_select_single('IndicatorsMenu')
95  end_x, end_y = input.get_center_point(indicators_menu)
96  start_x = end_x
97  start_y = self.height
98  self.pointing_device.drag(start_x, start_y, end_x, end_y)
99  indicators_menu.fullyClosed.wait_for(True)
100 
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 151 of file main_window.py.

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

Definition at line 115 of file main_window.py.

116  """Return the id of the focused application."""
117  return self._get_shell().focusedApplicationId
118 
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 140 of file main_window.py.

140  def launch_application(self, application_name):
141  """Launch an application.
142 
143  :parameter application_name: The name of the application to launch.
144 
145  """
146  launcher = self.open_launcher()
147  launcher.click_application_launcher_icon(application_name)
148  self.get_current_focused_app_id().wait_for(application_name)
149  launcher.shown.wait_for(False)
150 
def launch_application(self, application_name)
Definition: main_window.py:140
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 78 of file main_window.py.

78  def open_indicator_page(self, indicator_name):
79  """Swipe to open the indicator, wait until it's open.
80 
81  :returns: The indicator page.
82  """
83  widget = self._get_indicator_panel_item(indicator_name)
84  start_x, start_y = input.get_center_point(widget)
85  end_x = start_x
86  end_y = self.height
87  self.pointing_device.drag(start_x, start_y, end_x, end_y)
88  self.wait_select_single('IndicatorsMenu', fullyOpened=True)
89  return self._get_indicator_page(indicator_name)
90 
def open_indicator_page(self, indicator_name)
Definition: main_window.py:78
def _get_indicator_page(self, indicator_name)
Definition: main_window.py:71
def _get_indicator_panel_item(self, indicator_name)
Definition: main_window.py:65
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 120 of file main_window.py.

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

Definition at line 102 of file main_window.py.

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

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