Back to index

unity  6.0.0
Public Member Functions | Static Public Attributes
unity.emulators.dash.LensView Class Reference
Inheritance diagram for unity.emulators.dash.LensView:
Inheritance graph
[legend]
Collaboration diagram for unity.emulators.dash.LensView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def get_groups
def get_focused_category
def get_category_by_name
def get_num_visible_categories
def get_filterbar

Static Public Attributes

string DBUS_SERVICE = "com.canonical.Unity"
string DBUS_OBJECT = "/com/canonical/Unity/Debug"

Detailed Description

A Lens View.

Definition at line 185 of file dash.py.


Member Function Documentation

def unity.emulators.dash.LensView.get_category_by_name (   self,
  category_name 
)
Return a PlacesGroup instance with the given name, or None.

Definition at line 205 of file dash.py.

00205 
00206     def get_category_by_name(self, category_name):
00207         """Return a PlacesGroup instance with the given name, or None."""
00208         categories = self.get_children_by_type(PlacesGroup)
00209         matches = [m for m in categories if m.name == category_name]
00210         if matches:
00211             return matches[0]
00212         return None

Get the filter bar for the current lense, or None if it doesn't have one.

Definition at line 217 of file dash.py.

00217 
00218     def get_filterbar(self):
00219         """Get the filter bar for the current lense, or None if it doesn't have one."""
00220         bars = self.get_children_by_type(FilterBar)
00221         if bars:
00222             return bars[0]
00223         return None
00224 

Return a PlacesGroup instance for the category whose header has keyboard focus.

Returns None if no category headers have keyboard focus.

Definition at line 193 of file dash.py.

00193 
00194     def get_focused_category(self):
00195         """Return a PlacesGroup instance for the category whose header has keyboard focus.
00196 
00197         Returns None if no category headers have keyboard focus.
00198 
00199         """
00200         categories = self.get_children_by_type(PlacesGroup)
00201         matches = [m for m in categories if m.header_has_keyfocus]
00202         if matches:
00203             return matches[0]
00204         return None

Get a list of all groups within this lensview. May return an empty list.

Definition at line 188 of file dash.py.

00188 
00189     def get_groups(self):
00190         """Get a list of all groups within this lensview. May return an empty list."""
00191         groups = self.get_children_by_type(PlacesGroup)
00192         return groups

Get the number of visible categories in this lens.

Definition at line 213 of file dash.py.

00213 
00214     def get_num_visible_categories(self):
00215         """Get the number of visible categories in this lens."""
00216         return len([c for c in self.get_children_by_type(PlacesGroup) if c.is_visible])


Member Data Documentation

string unity.emulators.UnityIntrospectionObject.DBUS_OBJECT = "/com/canonical/Unity/Debug" [static, inherited]

Definition at line 19 of file __init__.py.

string unity.emulators.UnityIntrospectionObject.DBUS_SERVICE = "com.canonical.Unity" [static, inherited]

Definition at line 18 of file __init__.py.


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