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_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 32 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 141 of file main_window.py.

142  def enter_pin_code(self, code):
143  """Enter code 'code' into the single-pin lightdm pincode entry screen.
144 
145  :param code: must be a string of numeric characters.
146  :raises: TypeError if code is not a string.
147  :raises: ValueError if code contains non-numeric characters.
148 
149  """
150  if not isinstance(code, str):
151  raise TypeError(
152  "'code' parameter must be a string, not %r."
153  % type(code)
154  )
155  for num in code:
156  if not num.isdigit():
157  raise ValueError(
158  "'code' parameter contains non-numeric characters."
159  )
160  self.pointing_device.click_object(
161  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 105 of file main_window.py.

106  def get_current_focused_app_id(self):
107  """Return the id of the focused application."""
108  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 130 of file main_window.py.

131  def launch_application(self, application_name):
132  """Launch an application.
133 
134  :parameter application_name: The name of the application to launch.
135 
136  """
137  launcher = self.open_launcher()
138  launcher.click_application_launcher_icon(application_name)
139  self.get_current_focused_app_id().wait_for(application_name)
140  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 78 of file main_window.py.

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

111  def show_dash_from_launcher(self):
112  """Open the dash clicking the dash icon on the launcher."""
113  launcher = self.open_launcher()
114  launcher.click_dash_icon()
115  self.get_current_focused_app_id().wait_for('unity8-dash')
116  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 92 of file main_window.py.

92 
93  def show_dash_swiping(self):
94  """Show the dash swiping from the left."""
95  x, y, width, height = self._get_shell().globalRect
96  start_x = x
97  end_x = x + width
98  start_y = end_y = y + height // 2
99 
100  self.pointing_device.drag(start_x, start_y, end_x, end_y)
101  self.get_current_focused_app_id().wait_for('unity8-dash')

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